Class Quad

java.lang.Object
org.apache.jena.sparql.core.Quad
All Implemented Interfaces:
Serializable

public class Quad extends Object implements Serializable
See Also:
  • Field Details

    • 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.
  • Constructor Details

  • Method Details

    • create

      public static Quad create(Node g, Node s, Node p, Node o)
    • create

      public static Quad create(Node g, Triple t)
    • 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()
    • 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 Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • matches

      public boolean matches(Node g, Node s, Node p, Node o)
    • toString

      public String toString()
      Overrides:
      toString in class Object