java.lang.Object
org.apache.jena.riot.system.Checker
Functions for checking nodes, triples and quads.
The "check..." functions have two basic signatures:
1. check...(<i>object</i>)
2. check...(<i>object, errorHandler, line, col</i>)
The first type are for boolean testing and do not generate output. They call the second type with default values for the last 3 parameters: nullErrorHandler, -1L, -1L. The second type are for boolean testing and optionally generate error handling output.
- Argument
errorHandler
- theErrorHandler
for output. If the errorHandler is null, use the system wide handler. - Argument
line
- code line number (a long integer) generating the check. - Argument
col
- code column number (a long integer) generating the check.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
check
(org.apache.jena.graph.Node node) A node -- must be concrete node or a variable.static boolean
check
(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) A node -- must be a concrete node or a variable.static boolean
checkBlankNode
(String label) static boolean
checkBlankNode
(String label, ErrorHandler errorHandler, long line, long col) static boolean
checkBlankNode
(org.apache.jena.graph.Node node) static boolean
checkBlankNode
(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) static boolean
static boolean
checkIRI
(String iriStr, ErrorHandler errorHandler, long line, long col) See alsoIRIs.reference(java.lang.String)
static boolean
checkIRI
(org.apache.jena.graph.Node node) static boolean
checkIRI
(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) static boolean
checkLiteral
(String lexicalForm, String lang, org.apache.jena.datatypes.RDFDatatype datatype, ErrorHandler errorHandler, long line, long col) static boolean
checkLiteral
(String lexicalForm, String lang, ErrorHandler errorHandler, long line, long col) static boolean
checkLiteral
(String lexicalForm, org.apache.jena.datatypes.RDFDatatype datatype, ErrorHandler errorHandler, long line, long col) static boolean
checkLiteral
(org.apache.jena.graph.Node node) static boolean
checkLiteral
(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) static boolean
checkQuad
(org.apache.jena.graph.Node graph, org.apache.jena.graph.Node subject, org.apache.jena.graph.Node predicate, org.apache.jena.graph.Node object, ErrorHandler errorHandler, long line, long col) Check a quad against the RDF rules for a quad : subject is a IRI or bnode, predicate is a IRI and object is an bnode, literal or IRIstatic boolean
static boolean
checkQuad
(Quad quad, ErrorHandler errorHandler, long line, long col) Check a quad - assumes individual nodes are legalstatic boolean
checkTriple
(org.apache.jena.graph.Node subject, org.apache.jena.graph.Node predicate, org.apache.jena.graph.Node object, ErrorHandler errorHandler, long line, long col) Check a triple against the RDF rules for a triple : subject is a IRI or bnode, predicate is a IRI and object is an bnode, literal or IRIstatic boolean
checkTriple
(org.apache.jena.graph.Triple triple) static boolean
checkTriple
(org.apache.jena.graph.Triple triple, ErrorHandler errorHandler, long line, long col) Check a triple - assumes individual nodes are legalstatic boolean
checkVar
(org.apache.jena.graph.Node node) static boolean
checkVar
(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) static void
iriViolationMessage
(String iriStr, boolean isError, String msg, long line, long col, ErrorHandler errorHandler) Common handling messages about IRIs during parsing whether a violation or an IRIException.static void
iriViolations
(org.apache.jena.iri.IRI iri) Process violations on an IRI Calls theErrorHandler
on all errors and warnings (as warnings).static boolean
iriViolations
(org.apache.jena.iri.IRI iri, ErrorHandler errorHandler, boolean allowRelativeIRIs, boolean includeIRIwarnings, long line, long col) Process violations on an IRI Calls the errorHandler on all errors and warnings (as warning).static boolean
iriViolations
(org.apache.jena.iri.IRI iri, ErrorHandler errorHandler, long line, long col) Process violations on an IRI Calls theErrorHandler
on all errors and warnings (as warnings).
-
Constructor Details
-
Checker
public Checker()
-
-
Method Details
-
check
public static boolean check(org.apache.jena.graph.Node node) A node -- must be concrete node or a variable. -
check
public static boolean check(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) A node -- must be a concrete node or a variable. -
checkIRI
public static boolean checkIRI(org.apache.jena.graph.Node node) -
checkIRI
public static boolean checkIRI(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) -
checkIRI
-
checkIRI
See alsoIRIs.reference(java.lang.String)
-
iriViolations
public static void iriViolations(org.apache.jena.iri.IRI iri) Process violations on an IRI Calls theErrorHandler
on all errors and warnings (as warnings). -
iriViolations
public static boolean iriViolations(org.apache.jena.iri.IRI iri, ErrorHandler errorHandler, long line, long col) Process violations on an IRI Calls theErrorHandler
on all errors and warnings (as warnings). -
iriViolations
public static boolean iriViolations(org.apache.jena.iri.IRI iri, ErrorHandler errorHandler, boolean allowRelativeIRIs, boolean includeIRIwarnings, long line, long col) Process violations on an IRI Calls the errorHandler on all errors and warnings (as warning). (If checking for relative IRIs, these are sent out as errors.) Assumes error handler throws exceptions on errors if need be -
iriViolationMessage
public static void iriViolationMessage(String iriStr, boolean isError, String msg, long line, long col, ErrorHandler errorHandler) Common handling messages about IRIs during parsing whether a violation or an IRIException. Prints a warning, with different messages for IRI error or warning. -
checkLiteral
public static boolean checkLiteral(org.apache.jena.graph.Node node) -
checkLiteral
public static boolean checkLiteral(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) -
checkLiteral
public static boolean checkLiteral(String lexicalForm, org.apache.jena.datatypes.RDFDatatype datatype, ErrorHandler errorHandler, long line, long col) -
checkLiteral
public static boolean checkLiteral(String lexicalForm, String lang, ErrorHandler errorHandler, long line, long col) -
checkLiteral
public static boolean checkLiteral(String lexicalForm, String lang, org.apache.jena.datatypes.RDFDatatype datatype, ErrorHandler errorHandler, long line, long col) -
checkBlankNode
public static boolean checkBlankNode(org.apache.jena.graph.Node node) -
checkBlankNode
public static boolean checkBlankNode(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) -
checkBlankNode
-
checkBlankNode
-
checkVar
public static boolean checkVar(org.apache.jena.graph.Node node) -
checkVar
public static boolean checkVar(org.apache.jena.graph.Node node, ErrorHandler errorHandler, long line, long col) -
checkTriple
public static boolean checkTriple(org.apache.jena.graph.Triple triple) -
checkTriple
public static boolean checkTriple(org.apache.jena.graph.Triple triple, ErrorHandler errorHandler, long line, long col) Check a triple - assumes individual nodes are legal -
checkTriple
public static boolean checkTriple(org.apache.jena.graph.Node subject, org.apache.jena.graph.Node predicate, org.apache.jena.graph.Node object, ErrorHandler errorHandler, long line, long col) Check a triple against the RDF rules for a triple : subject is a IRI or bnode, predicate is a IRI and object is an bnode, literal or IRI -
checkQuad
-
checkQuad
Check a quad - assumes individual nodes are legal -
checkQuad
public static boolean checkQuad(org.apache.jena.graph.Node graph, org.apache.jena.graph.Node subject, org.apache.jena.graph.Node predicate, org.apache.jena.graph.Node object, ErrorHandler errorHandler, long line, long col) Check a quad against the RDF rules for a quad : subject is a IRI or bnode, predicate is a IRI and object is an bnode, literal or IRI
-