Package com.apicatalog.rdf.primitive
Class Quad
- java.lang.Object
-
- com.apicatalog.rdf.primitive.Triple
-
- com.apicatalog.rdf.primitive.Quad
-
-
Constructor Summary
Constructors Constructor Description Quad(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graphName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares this RDF term to the specified object.java.util.Optional<RdfResource>graphName()Returns the optional graph name for this N-Quad statement.inthashCode()Returns a hash code value for this RDF term.static RdfQuadof(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graphName)java.lang.StringtoString()Returns a string representation of this RDF term.-
Methods inherited from class com.apicatalog.rdf.primitive.Triple
object, of, predicate, printTriple, printTripleTerm, subject
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.apicatalog.rdf.model.RdfTerm
asLiteral, asResource, isLiteral, isResource
-
-
-
-
Field Detail
-
graphName
final RdfResource graphName
-
-
Constructor Detail
-
Quad
Quad(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graphName)
-
-
Method Detail
-
of
public static RdfQuad of(RdfResource subject, RdfResource predicate, RdfTerm object, RdfResource graphName)
-
graphName
public java.util.Optional<RdfResource> graphName()
Description copied from interface:RdfQuadReturns the optional graph name for this N-Quad statement.If the N-Quad is part of a named graph, this method returns an
Optionalcontaining the graph name. Otherwise, it returnsOptional.empty()if no graph name is specified.
-
toString
public java.lang.String toString()
Description copied from interface:RdfTermReturns a string representation of this RDF term.
-
hashCode
public int hashCode()
Description copied from interface:RdfTermReturns a hash code value for this RDF term.- Specified by:
hashCodein interfaceRdfTerm- Overrides:
hashCodein classTriple- Returns:
- a hash code consistent with
RdfTerm.equals(Object).
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:RdfTermCompares this RDF term to the specified object. Implementations must override this method to provide equality checks appropriate to the term type.
-
-