use of org.apache.jena.shacl.compact.writer.ShaclNotCompactException in project jena by apache.
the class ShNot method printCompact.
@Override
public void printCompact(IndentedWriter out, NodeFormatter nodeFmt) {
// "other" must be a node shape with no property shapes and one constraint.
Constraint constraint = CompactWriter.getCompactPrintable(other);
if (constraint == null)
throw new ShaclNotCompactException("sh:not(" + other + ")");
out.print("! ");
constraint.printCompact(out, nodeFmt);
}
use of org.apache.jena.shacl.compact.writer.ShaclNotCompactException in project jena by apache.
the class ShOr method printCompact.
@Override
public void printCompact(IndentedWriter out, NodeFormatter nodeFmt) {
boolean first = true;
for (Shape shape : others) {
if (!first)
out.print(" | ");
first = false;
Constraint c = CompactWriter.getCompactPrintable(shape);
if (c == null)
throw new ShaclNotCompactException("or");
c.printCompact(out, nodeFmt);
}
}
Aggregations