better support for allowExamples
This commit is contained in:
parent
c16c88aba2
commit
5fcc1866cd
|
@ -108,4 +108,12 @@ public class CommaSeparatedStringBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String join(String sep, List<String> list) {
|
||||||
|
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(sep);
|
||||||
|
for (String s : list) {
|
||||||
|
b.append(s);
|
||||||
|
}
|
||||||
|
return b.toString();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -950,7 +950,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hint(errors, IssueType.UNKNOWN, element.line(), element.col(), path, done, I18nConstants.TERMINOLOGY_TX_SYSTEM_NOTKNOWN, system);
|
if (!isAllowExamples() || !Utilities.startsWithInList(system, "http://example.org", "https://example.org")) {
|
||||||
|
hint(errors, IssueType.UNKNOWN, element.line(), element.col(), path, done, I18nConstants.TERMINOLOGY_TX_SYSTEM_NOTKNOWN, system);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -3205,6 +3207,8 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
if (pol == ReferenceValidationPolicy.CHECK_VALID) {
|
if (pol == ReferenceValidationPolicy.CHECK_VALID) {
|
||||||
// todo....
|
// todo....
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo: if the content is a resource, check that Reference.type is describing a resource
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSuspiciousReference(String url) {
|
private boolean isSuspiciousReference(String url) {
|
||||||
|
|
Loading…
Reference in New Issue