add isUnknownLocalReferencesNotLinks to RenderingContext
This commit is contained in:
parent
0114837ede
commit
f4f978941d
|
@ -341,7 +341,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
ResourceWithReference rr = resolveReference(actual);
|
||||
if (rr == null) {
|
||||
String disp = display != null && display.hasPrimitiveValue() ? displayDataType(display) : actual.primitiveValue();
|
||||
if (Utilities.isAbsoluteUrl(actual.primitiveValue())) {
|
||||
if (Utilities.isAbsoluteUrl(actual.primitiveValue()) || !context.isUnknownLocalReferencesNotLinks()) {
|
||||
x.ah(context.prefixLocalHref(actual.primitiveValue())).tx(disp);
|
||||
} else {
|
||||
x.code().tx(disp);
|
||||
|
|
|
@ -274,6 +274,7 @@ public class RenderingContext extends RenderingI18nContext {
|
|||
private boolean shortPatientForm;
|
||||
private String uniqueLocalPrefix;
|
||||
private Set<String> anchors = new HashSet<>();
|
||||
private boolean unknownLocalReferencesNotLinks;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -342,6 +343,7 @@ public class RenderingContext extends RenderingI18nContext {
|
|||
if (copyAnchors) {
|
||||
res.anchors = anchors;
|
||||
}
|
||||
res.unknownLocalReferencesNotLinks = unknownLocalReferencesNotLinks;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1023,4 +1025,12 @@ public class RenderingContext extends RenderingI18nContext {
|
|||
public void clearAnchors() {
|
||||
anchors.clear();
|
||||
}
|
||||
|
||||
public boolean isUnknownLocalReferencesNotLinks() {
|
||||
return unknownLocalReferencesNotLinks;
|
||||
}
|
||||
|
||||
public void setUnknownLocalReferencesNotLinks(boolean unknownLocalReferencesNotLinks) {
|
||||
this.unknownLocalReferencesNotLinks = unknownLocalReferencesNotLinks;
|
||||
}
|
||||
}
|
|
@ -94,6 +94,10 @@ public class ExternalTerminologyServiceTests implements ITxTesterLoader {
|
|||
if (tester == null) {
|
||||
tester = new TxTester(this, SERVER, true, externals);
|
||||
}
|
||||
|
||||
if (setup.suite.asBoolean("disabled") || setup.test.asBoolean("disabled")) {
|
||||
return;
|
||||
}
|
||||
String err = tester.executeTest(setup.suite, setup.test, modes);
|
||||
Assertions.assertTrue(err == null, err);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue