Class Checker

java.lang.Object
org.apache.jena.riot.system.Checker

public class Checker extends Object
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 - the ErrorHandler 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.
If the errorHandler is null, the line and column numbers not used.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
     
    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
    checkIRI(String iriStr)
     
    static boolean
    checkIRI(String iriStr, ErrorHandler errorHandler, long line, long col)
    See also IRIs.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 IRI
    static boolean
     
    static boolean
    checkQuad(Quad quad, ErrorHandler errorHandler, long line, long col)
    Check a quad - assumes individual nodes are legal
    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
    static 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 legal
    static 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 the ErrorHandler 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 the ErrorHandler on all errors and warnings (as warnings).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static boolean checkIRI(String iriStr)
    • checkIRI

      public static boolean checkIRI(String iriStr, ErrorHandler errorHandler, long line, long col)
      See also IRIs.reference(java.lang.String)
    • iriViolations

      public static void iriViolations(org.apache.jena.iri.IRI iri)
      Process violations on an IRI Calls the ErrorHandler 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 the ErrorHandler 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

      public static boolean checkBlankNode(String label)
    • checkBlankNode

      public static boolean checkBlankNode(String label, ErrorHandler errorHandler, long line, long col)
    • 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

      public static boolean checkQuad(Quad quad)
    • checkQuad

      public static boolean checkQuad(Quad quad, ErrorHandler errorHandler, long line, long col)
      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