fix failing rendering test
This commit is contained in:
parent
6cf6d139c4
commit
f30f3e9ca9
|
@ -1,33 +1,50 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="src" path="target/generated-sources/annotations">
|
||||||
</classpath>
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="ignore_optional_problems" value="true"/>
|
||||||
|
<attribute name="m2e-apt" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="optional" value="true"/>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="ignore_optional_problems" value="true"/>
|
||||||
|
<attribute name="m2e-apt" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
||||||
|
|
|
@ -20,4 +20,15 @@
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<filteredResources>
|
||||||
|
<filter>
|
||||||
|
<id>1662504185037</id>
|
||||||
|
<name></name>
|
||||||
|
<type>30</type>
|
||||||
|
<matcher>
|
||||||
|
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||||
|
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||||
|
</matcher>
|
||||||
|
</filter>
|
||||||
|
</filteredResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+" (not intended for production usage). ");
|
p.addText(Utilities.capitalize(cm.getStatus().toString())+" (not intended for production usage). ");
|
||||||
else
|
else
|
||||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+". ");
|
p.addText(Utilities.capitalize(cm.getStatus().toString())+". ");
|
||||||
p.tx("Published on "+(cm.hasDate() ? cm.getDateElement().toHumanDisplay() : "?ngen-10?")+" by "+cm.getPublisher());
|
p.tx("Published on "+(cm.hasDate() ? display(cm.getDateElement()) : "?ngen-10?")+" by "+cm.getPublisher());
|
||||||
if (!cm.getContact().isEmpty()) {
|
if (!cm.getContact().isEmpty()) {
|
||||||
p.tx(" (");
|
p.tx(" (");
|
||||||
boolean firsti = true;
|
boolean firsti = true;
|
||||||
|
@ -129,14 +129,28 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
XhtmlNode tr = tbl.tr();
|
XhtmlNode tr = tbl.tr();
|
||||||
tr.td().b().tx("Source Code");
|
tr.td().b().tx("Source Code");
|
||||||
tr.td().b().tx("Relationship");
|
tr.td().b().tx("Relationship");
|
||||||
tr.td().b().tx("Destination Code");
|
tr.td().b().tx("Target Code");
|
||||||
if (comment)
|
if (comment)
|
||||||
tr.td().b().tx("Comment");
|
tr.td().b().tx("Comment");
|
||||||
|
tr = tbl.tr();
|
||||||
|
XhtmlNode td = tr.td().colspan(comment ? "4" : "3");
|
||||||
|
td.tx("Mapping from ");
|
||||||
|
if (grp.hasSource()) {
|
||||||
|
renderCanonical(cm, td, grp.getSource());
|
||||||
|
} else {
|
||||||
|
td.code("unspecified code system");
|
||||||
|
}
|
||||||
|
td.tx(" to ");
|
||||||
|
if (grp.hasTarget()) {
|
||||||
|
renderCanonical(cm, td, grp.getTarget());
|
||||||
|
} else {
|
||||||
|
td.code("unspecified code system");
|
||||||
|
}
|
||||||
for (SourceElementComponent ccl : grp.getElement()) {
|
for (SourceElementComponent ccl : grp.getElement()) {
|
||||||
tr = tbl.tr();
|
tr = tbl.tr();
|
||||||
XhtmlNode td = tr.td();
|
td = tr.td();
|
||||||
td.addText(ccl.getCode());
|
td.addText(ccl.getCode());
|
||||||
display = getDisplayForConcept(systemFromCanonical(grp.getSource()), versionFromCanonical(grp.getSource()), ccl.getCode());
|
display = ccl.hasDisplay() ? ccl.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getSource()), versionFromCanonical(grp.getSource()), ccl.getCode());
|
||||||
if (display != null && !isSameCodeAndDisplay(ccl.getCode(), display))
|
if (display != null && !isSameCodeAndDisplay(ccl.getCode(), display))
|
||||||
td.tx(" ("+display+")");
|
td.tx(" ("+display+")");
|
||||||
TargetElementComponent ccm = ccl.getTarget().get(0);
|
TargetElementComponent ccm = ccl.getTarget().get(0);
|
||||||
|
@ -148,7 +162,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
}
|
}
|
||||||
td = tr.td();
|
td = tr.td();
|
||||||
td.addText(ccm.getCode());
|
td.addText(ccm.getCode());
|
||||||
display = getDisplayForConcept(systemFromCanonical(grp.getTarget()), versionFromCanonical(grp.getTarget()), ccm.getCode());
|
display = ccm.hasDisplay() ? ccm.getDisplay() : getDisplayForConcept(systemFromCanonical(grp.getTarget()), versionFromCanonical(grp.getTarget()), ccm.getCode());
|
||||||
if (display != null && !isSameCodeAndDisplay(ccm.getCode(), display))
|
if (display != null && !isSameCodeAndDisplay(ccm.getCode(), display))
|
||||||
td.tx(" ("+display+")");
|
td.tx(" ("+display+")");
|
||||||
if (comment)
|
if (comment)
|
||||||
|
@ -174,7 +188,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
if (hasRelationships) {
|
if (hasRelationships) {
|
||||||
tr.td().b().tx("Relationship");
|
tr.td().b().tx("Relationship");
|
||||||
}
|
}
|
||||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx("Destination Concept Details");
|
tr.td().colspan(Integer.toString(1+targets.size())).b().tx("Target Concept Details");
|
||||||
if (comment) {
|
if (comment) {
|
||||||
tr.td().b().tx("Comment");
|
tr.td().b().tx("Comment");
|
||||||
}
|
}
|
||||||
|
@ -403,7 +417,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
for (OtherElementComponent c : list) {
|
for (OtherElementComponent c : list) {
|
||||||
if (s.equals(c.getProperty()))
|
if (s.equals(c.getProperty()))
|
||||||
if (withSystem)
|
if (withSystem)
|
||||||
return c.getSystem()+" / "+c.getValue();
|
return /*c.getSystem()+" / "+*/c.getValue();
|
||||||
else
|
else
|
||||||
return c.getValue();
|
return c.getValue();
|
||||||
}
|
}
|
||||||
|
@ -412,8 +426,9 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
||||||
|
|
||||||
private String getDisplay(List<OtherElementComponent> list, String s) {
|
private String getDisplay(List<OtherElementComponent> list, String s) {
|
||||||
for (OtherElementComponent c : list) {
|
for (OtherElementComponent c : list) {
|
||||||
if (s.equals(c.getProperty()))
|
if (s.equals(c.getProperty())) {
|
||||||
return getDisplayForConcept(systemFromCanonical(c.getSystem()), versionFromCanonical(c.getSystem()), c.getValue());
|
// return getDisplayForConcept(systemFromCanonical(c.getSystem()), versionFromCanonical(c.getSystem()), c.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue