Class Quad

  • All Implemented Interfaces:
    java.io.Serializable

    public class Quad
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • defaultGraphIRI

        public static final Node defaultGraphIRI
        Name of the default for explicit use in GRAPH
      • defaultGraphNodeGenerated

        public static final Node defaultGraphNodeGenerated
        Name of the default graph as used by parsers and in quad form of algebra. Not for access to the default graph by name - use Quad.defaultGraphIRI.
      • unionGraph

        public static final Node unionGraph
        Name of the merge of all named graphs (use this for the graph of all named graphs)
      • tripleInQuad

        public static final Node tripleInQuad
        Name of the non-graph when a quad is really a triple - also parsing of triples formats (and the default graph when parsing N-Quads or TriG) Not for access to the default graph by name - use Quad.defaultGraphIRI.
      • ANY

        public static final Quad ANY
        A Quad that has a wildcard in all fields.
    • Method Detail

      • getGraph

        public final Node getGraph()
      • getSubject

        public final Node getSubject()
      • getPredicate

        public final Node getPredicate()
      • getObject

        public final Node getObject()
      • asTriple

        public Triple asTriple()
        Get as a triple - useful because quads often come in blocks for the same graph
      • isConcrete

        public boolean isConcrete()
      • isDefaultGraphGenerated

        public static boolean isDefaultGraphGenerated​(Node node)
        Test whether this is a quad for the default graph (not the default graphs by explicit name)
      • isDefaultGraphExplicit

        public static boolean isDefaultGraphExplicit​(Node node)
        Default, explicitly named concrete graph
      • isDefaultGraph

        public static boolean isDefaultGraph​(Node node)
        Default, concrete graph (either generated or explicitly named) -- not triple-in-quad
      • isUnionGraph

        public static boolean isUnionGraph​(Node node)
        Default, concrete graph (either generated or explicitly named) -- not triple-in-quad
      • isDefaultGraphExplicit

        public boolean isDefaultGraphExplicit()
        Default, concrete graph via generated URI (not explicitly, named)
      • isDefaultGraphGenerated

        public boolean isDefaultGraphGenerated()
        Default graph, explicitly named (not generated)
      • isDefaultGraph

        public boolean isDefaultGraph()
        Default, concrete graph (either generated or explicitly named)
      • isUnionGraph

        public boolean isUnionGraph()
        node used for the RDF merge of named graphs
      • isTriple

        public boolean isTriple()
        Is it really a triple?
      • isLegalAsData

        public boolean isLegalAsData()
        Is this quad a legal data quad (legal data triple, IRI for graph)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object