Class Checker

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

public class Checker extends Object
Functions for checking nodes, triples and quads.

If the errorHandler is null, use the system wide handler.

If the errorHandler line/columns numbers are -1, -1, messages do not include them.

Operations "checkXXX(item)" are for boolean testing and do not generate output.

  • Constructor Details

    • Checker

      public Checker()
  • Method Details

    • check

      public static boolean check(Node node)
      A node -- must be concrete node or a variable.
    • check

      public static boolean check(Node node, ErrorHandler errorHandler, long line, long col)
      A node -- must be a concrete node or a variable.
    • checkIRI

      public static boolean checkIRI(Node node)
    • checkIRI

      public static boolean checkIRI(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)
    • 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(Node node)
    • checkLiteral

      public static boolean checkLiteral(Node node, ErrorHandler errorHandler, long line, long col)
    • checkLiteral

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

      public static boolean checkBlankNode(Node node)
    • checkBlankNode

      public static boolean checkBlankNode(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(Node node)
    • checkVar

      public static boolean checkVar(Node node, ErrorHandler errorHandler, long line, long col)
    • checkTriple

      public static boolean checkTriple(Triple triple)
    • checkTriple

      public static boolean checkTriple(Triple triple, ErrorHandler errorHandler, long line, long col)
      Check a triple - assumes individual nodes are legal
    • checkTriple

      public static boolean checkTriple(Node subject, Node predicate, 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(Node graph, Node subject, Node predicate, 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