fix problem generating snapshot representations
This commit is contained in:
parent
a684fffcf3
commit
75af914631
|
@ -122,14 +122,14 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
|||
}
|
||||
|
||||
private void download(String address, String filename) throws IOException {
|
||||
System.out.print("Download "+address+" to "+filename);
|
||||
// System.out.print("Download "+address+" to "+filename);
|
||||
URL url = new URL(address);
|
||||
URLConnection c = url.openConnection();
|
||||
InputStream s = c.getInputStream();
|
||||
FileOutputStream f = new FileOutputStream(filename);
|
||||
transfer(s, f, 1024);
|
||||
f.close();
|
||||
System.out.println(" ... "+new File(filename).length()+" bytes");
|
||||
// System.out.println(" ... "+new File(filename).length()+" bytes");
|
||||
}
|
||||
|
||||
|
||||
|
@ -464,7 +464,6 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
|||
* @throws FHIRFormatError
|
||||
*/
|
||||
private boolean compareElements(ProfileComparison outcome, String path, DefinitionNavigator left, DefinitionNavigator right, String sliceName) throws DefinitionException, IOException, FHIRFormatError {
|
||||
// System.out.println(path);
|
||||
// preconditions:
|
||||
assert(path != null);
|
||||
assert(left != null);
|
||||
|
@ -1534,7 +1533,6 @@ public class ProfileComparer implements ProfileKnowledgeProvider {
|
|||
vars.put("valuesets", genValueSets(folder+"/"+getId()+"-vs"));
|
||||
producePage(summaryTemplate(), Utilities.path(folder, getId()+".html"), vars);
|
||||
|
||||
System.out.println(" .. profiles");
|
||||
// then we produce a comparison page for each pair
|
||||
for (ProfileComparison cmp : getComparisons()) {
|
||||
vars.clear();
|
||||
|
|
|
@ -3088,7 +3088,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
} else if (definition.hasExample()) {
|
||||
for (ElementDefinitionExampleComponent ex : definition.getExample()) {
|
||||
if (!c.getPieces().isEmpty()) c.addPiece(gen.new Piece("br"));
|
||||
c.getPieces().add(checkForNoChange(ex, gen.new Piece(null, translate("sd.table", "Example")+("".equals("General")? "" : " "+ex.getLabel()+"'")+": ", null).addStyle("font-weight:bold")));
|
||||
c.getPieces().add(checkForNoChange(ex, gen.new Piece(null, translate("sd.table", "Example")+("".equals("General")? "" : " "+ex.getLabel())+": ", null).addStyle("font-weight:bold")));
|
||||
c.getPieces().add(checkForNoChange(ex, gen.new Piece(null, buildJson(ex.getValue()), null).addStyle("color: darkgreen")));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -873,22 +873,18 @@ public abstract class BaseDateTimeType extends PrimitiveType<Date> {
|
|||
String ms = df.format(this.getValue());
|
||||
String os = df.format(theOther.getValue());
|
||||
if (!sub(ms, cp.stringLength()).equals(sub(os, cp.stringLength()))) {
|
||||
System.out.println(" ms = "+ms+", os = "+os+", return false");
|
||||
return false;
|
||||
}
|
||||
if (mp != op) {
|
||||
System.out.println(" ms = "+ms+", os = "+os+", return null");
|
||||
return null;
|
||||
}
|
||||
if (this.myPrecision == TemporalPrecisionEnum.MILLI || theOther.myPrecision == TemporalPrecisionEnum.MILLI) {
|
||||
float mf = Float.parseFloat(ms.substring(17));
|
||||
float of = Float.parseFloat(os.substring(17));
|
||||
if (mf != of) {
|
||||
System.out.println(" ms = "+ms+", os = "+os+", return false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
System.out.println(" ms = "+ms+", os = "+os+", return true");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ public class SnapShotGenerationTests {
|
|||
ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages , new TestPKP());
|
||||
pu.setNewSlicingProcessing(true);
|
||||
pu.setThrowException(true);
|
||||
pu.setDebug(true);
|
||||
pu.setDebug(false);
|
||||
pu.setIds(test.getSource(), false);
|
||||
if (test.isSort()) {
|
||||
List<String> errors = new ArrayList<String>();
|
||||
|
|
Loading…
Reference in New Issue