|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.graph.Triple
Triples are the basis for RDF statements; they have a subject, predicate, and object field (all nodes) and express the notion that the relationship named by the predicate holds between the subject and the object.
Constructor Summary | |
Triple(Node s,
Node p,
Node o)
|
Method Summary | |
Triple |
asTriple()
Answer a Triple capturing this match. |
static Triple |
create(Node s,
Node p,
Node o)
Factory method for creating triples, allows caching opportunities. |
static Triple |
create(com.hp.hpl.jena.shared.PrefixMapping pm,
java.lang.String fact)
Utility factory as for create(String), but allowing the PrefixMapping to be specified explicitly. |
static Triple |
create(java.lang.String fact)
Utility factory method for creating a triple based on the content of an "S P O" string. |
static Triple |
createMatch(Node s,
Node p,
Node o)
|
boolean |
equals(java.lang.Object o)
triples only equal other triples with the same components. |
Node |
getMatchObject()
If it is known that all triples selected by this match will have a common object, return that node, otherwise return null |
Node |
getMatchPredicate()
If it is known that all triples selected by this match will have a common predicate, return that node, otherwise return null |
Node |
getMatchSubject()
If it is known that all triples selected by this filter will have a common subject, return that node, otherwise return null |
Node |
getObject()
|
Node |
getPredicate()
|
Node |
getSubject()
|
int |
hashCode()
The hash-code of a triple is the hash-codes of its components munged together. |
boolean |
isConcrete()
|
boolean |
matches(Node s,
Node p,
Node o)
|
boolean |
matches(Triple other)
|
boolean |
objectMatches(Node o)
|
boolean |
predicateMatches(Node p)
|
boolean |
subjectMatches(Node s)
|
java.lang.String |
toString()
return a human-readable string "subject @predicate object" describing the triple |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Triple(Node s, Node p, Node o)
Method Detail |
public java.lang.String toString()
public Node getSubject()
public Node getPredicate()
public Node getObject()
public Node getMatchSubject()
TripleMatch
getMatchSubject
in interface TripleMatch
public Node getMatchPredicate()
TripleMatch
getMatchPredicate
in interface TripleMatch
public Node getMatchObject()
TripleMatch
getMatchObject
in interface TripleMatch
public Triple asTriple()
TripleMatch
asTriple
in interface TripleMatch
public boolean isConcrete()
public boolean equals(java.lang.Object o)
internals: avoids grubbing around in the insides of the other triple.
public boolean matches(Triple other)
public boolean matches(Node s, Node p, Node o)
public boolean subjectMatches(Node s)
public boolean predicateMatches(Node p)
public boolean objectMatches(Node o)
public int hashCode()
public static Triple create(Node s, Node p, Node o)
public static Triple createMatch(Node s, Node p, Node o)
public static Triple create(java.lang.String fact)
public static Triple create(com.hp.hpl.jena.shared.PrefixMapping pm, java.lang.String fact)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |