Class Checker


  • public class Checker
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      Checker()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean check​(Node node)
      A node -- must be concrete node or a variable.
      static boolean check​(Node node, ErrorHandler errorHandler, long line, long col)
      A node -- must be a concrete node or a variable.
      static boolean checkBlankNode​(java.lang.String label)  
      static boolean checkBlankNode​(java.lang.String label, ErrorHandler errorHandler, long line, long col)  
      static boolean checkBlankNode​(Node node)  
      static boolean checkBlankNode​(Node node, ErrorHandler errorHandler, long line, long col)  
      static boolean checkIRI​(java.lang.String iriStr)  
      static boolean checkIRI​(java.lang.String iriStr, ErrorHandler errorHandler, long line, long col)
      static boolean checkIRI​(Node node)  
      static boolean checkIRI​(Node node, ErrorHandler errorHandler, long line, long col)  
      static boolean checkLiteral​(java.lang.String lexicalForm, java.lang.String lang, RDFDatatype datatype, ErrorHandler errorHandler, long line, long col)  
      static boolean checkLiteral​(java.lang.String lexicalForm, java.lang.String lang, ErrorHandler errorHandler, long line, long col)  
      static boolean checkLiteral​(java.lang.String lexicalForm, RDFDatatype datatype, ErrorHandler errorHandler, long line, long col)  
      static boolean checkLiteral​(Node node)  
      static boolean checkLiteral​(Node node, ErrorHandler errorHandler, long line, long col)  
      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
      static boolean checkQuad​(Quad quad)  
      static boolean checkQuad​(Quad quad, ErrorHandler errorHandler, long line, long col)
      Check a quad - assumes individual nodes are legal
      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
      static boolean checkTriple​(Triple triple)  
      static boolean checkTriple​(Triple triple, ErrorHandler errorHandler, long line, long col)
      Check a triple - assumes individual nodes are legal
      static boolean checkVar​(Node node)  
      static boolean checkVar​(Node node, ErrorHandler errorHandler, long line, long col)  
      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 Detail

      • Checker

        public Checker()
    • Method Detail

      • 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​(java.lang.String iriStr)
      • 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
      • 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​(java.lang.String lexicalForm,
                                           RDFDatatype datatype,
                                           ErrorHandler errorHandler,
                                           long line,
                                           long col)
      • checkLiteral

        public static boolean checkLiteral​(java.lang.String lexicalForm,
                                           java.lang.String lang,
                                           ErrorHandler errorHandler,
                                           long line,
                                           long col)
      • checkLiteral

        public static boolean checkLiteral​(java.lang.String lexicalForm,
                                           java.lang.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​(java.lang.String label)
      • checkBlankNode

        public static boolean checkBlankNode​(java.lang.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