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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Quad
    A Quad that has a wildcard in all fields.
    static final org.apache.jena.graph.Node
    Name of the default for explicit use in GRAPH
    static final org.apache.jena.graph.Node
    Name of the default graph as used by parsers and in quad form of algebra.
    static final org.apache.jena.graph.Node
    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.
    static final org.apache.jena.graph.Node
    Name of the merge of all named graphs (use this for the graph of all named graphs)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Quad(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Deprecated.
    Quad(org.apache.jena.graph.Node graph, org.apache.jena.graph.Triple triple)
    Deprecated.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.graph.Triple
    Get the subject/predicate/object as a triple.
    static Quad
    create(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Create a Quad.
    static Quad
    create(org.apache.jena.graph.Node g, org.apache.jena.graph.Triple t)
     
    static Quad
    createMatch(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Create a Quad.
    boolean
    equals(Object other)
     
    final org.apache.jena.graph.Node
     
    final org.apache.jena.graph.Node
     
    final org.apache.jena.graph.Node
     
    final org.apache.jena.graph.Node
     
    int
     
    boolean
     
    boolean
    Default, concrete graph (either generated or explicitly named)
    static boolean
    isDefaultGraph(org.apache.jena.graph.Node node)
    Default, concrete graph (either generated or explicitly named) -- not triple-in-quad
    boolean
    Default, concrete graph via generated URI (not explicitly, named)
    static boolean
    isDefaultGraphExplicit(org.apache.jena.graph.Node node)
    Default, explicitly named concrete graph
    boolean
    Default graph, explicitly named (not generated)
    static boolean
    isDefaultGraphGenerated(org.apache.jena.graph.Node node)
    Test whether this is a quad for the default graph (not the default graphs by explicit name)
    boolean
    Is this quad a legal data quad (legal data triple, IRI for graph)
    boolean
    Is it really a triple?
    boolean
     
    static boolean
    isUnionGraph(org.apache.jena.graph.Node node)
    Default, concrete graph (either generated or explicitly named) -- not triple-in-quad
    boolean
    matches(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
     
    boolean
    matches(Quad other)
    Does this quad, match the other quad, allowing for wildcards.
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • defaultGraphIRI

      public static final org.apache.jena.graph.Node defaultGraphIRI
      Name of the default for explicit use in GRAPH
    • defaultGraphNodeGenerated

      public static final org.apache.jena.graph.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 org.apache.jena.graph.Node unionGraph
      Name of the merge of all named graphs (use this for the graph of all named graphs)
    • tripleInQuad

      public static final org.apache.jena.graph.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(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Create a Quad. Nulls are not allowed for subject/predicate/object.

      Null for graph means this is a triple, but for type checking reasons, it is being carried as a Quad.

    • createMatch

      public static Quad createMatch(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Create a Quad. Nulls for for subject/predicate/object are converted to Node.ANY.

      Null for graph means this is a triple, but for type checking reasons, it is being carried as a Quad.

    • create

      public static Quad create(org.apache.jena.graph.Node g, org.apache.jena.graph.Triple t)
    • getGraph

      public final org.apache.jena.graph.Node getGraph()
    • getSubject

      public final org.apache.jena.graph.Node getSubject()
    • getPredicate

      public final org.apache.jena.graph.Node getPredicate()
    • getObject

      public final org.apache.jena.graph.Node getObject()
    • asTriple

      public org.apache.jena.graph.Triple asTriple()
      Get the subject/predicate/object as a triple.
    • isConcrete

      public boolean isConcrete()
    • matches

      public boolean matches(Quad other)
      Does this quad, match the other quad, allowing for wildcards. The wildcard node is Node.ANY and it matches any node, including a wildcard. Both this quad and the argument quad may contain wildcards, that is "matches" is symmetric: this.matches(that) == that.matches(this).
    • matches

      public boolean matches(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    • isDefaultGraphGenerated

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

      public static boolean isDefaultGraphExplicit(org.apache.jena.graph.Node node)
      Default, explicitly named concrete graph
    • isDefaultGraph

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

      public static boolean isUnionGraph(org.apache.jena.graph.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
    • toString

      public String toString()
      Overrides:
      toString in class Object