| java.lang.Object com.hp.hpl.jena.graph.Triple
Triple | public class Triple implements TripleMatch(Code) | | 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.
author: Jeremy Carroll, kers |
Inner Class :abstract public static class Field | |
Field Summary | |
final public static Triple | ANY A Triple that is wildcarded in all fields. | protected static TripleCache | cache The cache of already-created triples. |
Method Summary | |
public Triple | asTriple() | public static Triple | create(Node s, Node p, Node o) Factory method for creating triples, allows caching opportunities. | public static Triple | create(String fact) Utility factory method for creating a triple based on the content of an
"S P O" string. | public static Triple | create(PrefixMapping pm, String fact) Utility factory as for create(String), but allowing the PrefixMapping to
be specified explicitly. | public static Triple | createMatch(Node s, Node p, Node o) | public boolean | equals(Object o) Answer true if o is a Triple with the same subject, predicate,
and object as this triple. | public Node | getMatchObject() | public Node | getMatchPredicate() | public Node | getMatchSubject() | final public Node | getObject() | final public Node | getPredicate() | final public Node | getSubject() | public int | hashCode() The hash-code of a triple is the hash-codes of its components munged
together: see hashCode(S, P, O). | public static int | hashCode(Node s, Node p, Node o) Return the munged hashCodes of the specified nodes, an exclusive-or of
the slightly-shifted component hashcodes; this means (almost) all of the bits
count, and the order matters, so (S @P O) has a different hash from
(O @P S), etc. | public boolean | isConcrete() | public boolean | matches(Triple other) | public boolean | matches(Node s, Node p, Node o) | public boolean | objectMatches(Node o) | public boolean | predicateMatches(Node p) | public boolean | sameAs(Node s, Node p, Node o) Answer true iff this triple has subject s, predicate p, and object o. | public boolean | subjectMatches(Node s) | public String | toString() | public String | toString(PrefixMapping pm) |
ANY | final public static Triple ANY(Code) | | A Triple that is wildcarded in all fields.
|
create | public static Triple create(Node s, Node p, Node o)(Code) | | Factory method for creating triples, allows caching opportunities. Attempts
to use triples from the cache, if any suitable ones exist.
a triple with subject=s, predicate=p, object=o |
create | public static Triple create(String fact)(Code) | | Utility factory method for creating a triple based on the content of an
"S P O" string. The S, P, O are processed by Node.create, see which for
details of the supported syntax. This method exists to support test code.
Nodes are interpreted using the Standard prefix mapping.
|
create | public static Triple create(PrefixMapping pm, String fact)(Code) | | Utility factory as for create(String), but allowing the PrefixMapping to
be specified explicitly.
|
equals | public boolean equals(Object o)(Code) | | Answer true if o is a Triple with the same subject, predicate,
and object as this triple.
|
getMatchPredicate | public Node getMatchPredicate()(Code) | | |
getMatchSubject | public Node getMatchSubject()(Code) | | |
getObject | final public Node getObject()(Code) | | the object of the triple |
getPredicate | final public Node getPredicate()(Code) | | the predicate of the triple |
getSubject | final public Node getSubject()(Code) | | the subject of the triple |
hashCode | public int hashCode()(Code) | | The hash-code of a triple is the hash-codes of its components munged
together: see hashCode(S, P, O).
|
hashCode | public static int hashCode(Node s, Node p, Node o)(Code) | | Return the munged hashCodes of the specified nodes, an exclusive-or of
the slightly-shifted component hashcodes; this means (almost) all of the bits
count, and the order matters, so (S @P O) has a different hash from
(O @P S), etc.
|
isConcrete | public boolean isConcrete()(Code) | | |
objectMatches | public boolean objectMatches(Node o)(Code) | | |
predicateMatches | public boolean predicateMatches(Node p)(Code) | | |
sameAs | public boolean sameAs(Node s, Node p, Node o)(Code) | | Answer true iff this triple has subject s, predicate p, and object o.
|
subjectMatches | public boolean subjectMatches(Node s)(Code) | | |
toString | public String toString()(Code) | | return a human-readable string "subject @predicate object" describing the triple
|
|
|