Don't validate Bundle.entry.fullUrl as a reference

This commit is contained in:
Grahame Grieve 2022-04-07 00:20:43 +10:00
parent cdef76bc6d
commit 7e9b148837
2 changed files with 15 additions and 2 deletions

View File

@ -599,6 +599,14 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
this.dest = dest;
this.inLineGraphics = inlineGraphics;
this.makeTargets = true;
checkSetup();
}
private void checkSetup() {
if (dest == null) {
throw new Error("what");
}
}
public HierarchicalTableGenerator(String dest, boolean inlineGraphics, boolean makeTargets) {
@ -606,6 +614,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
this.dest = dest;
this.inLineGraphics = inlineGraphics;
this.makeTargets = makeTargets;
checkSetup();
}
public TableModel initNormalTable(String prefix, boolean isLogical, boolean alternating, String id, boolean isActive) {
@ -947,7 +956,11 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
String file = Utilities.path(dest, b.toString());
if (!new File(file).exists()) {
File newFile = new File(file);
if (newFile.getParentFile() == null) {
throw new Error("No source directory provided. ("+file+")");
} else {
newFile.getParentFile().mkdirs();
}
newFile.createNewFile();
FileOutputStream stream = new FileOutputStream(file);
genImage(indents, hasChildren, lineColor, stream);

View File

@ -2143,7 +2143,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
// the URL must be an IRI if present
rule(errors, IssueType.INVALID, e.line(), e.col(), path, Utilities.isAbsoluteUrl(url),
node.isContained() ? I18nConstants.TYPE_SPECIFIC_CHECKS_CANONICAL_CONTAINED : I18nConstants.TYPE_SPECIFIC_CHECKS_CANONICAL_ABSOLUTE, url);
} else {
} else if (!e.getProperty().getDefinition().getPath().equals("Bundle.entry.fullUrl")) { // we don't check fullUrl here; it's not a reference, it's a definition. It'll get checked as part of checking the bundle
validateReference(hostContext, errors, path, type, context, e, url);
}
}