org.w3c.rdf.implementation.model
Class StatementImpl
java.lang.Object
|
+--org.w3c.rdf.implementation.model.StatementImpl
- public final class StatementImpl
- extends java.lang.Object
- implements Statement, Digestable
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
StatementImpl
public StatementImpl(Resource subj,
Resource pred,
RDFNode obj)
- The parameters to constructor are instances of classes
and not just strings
predicate
public Resource predicate()
- Specified by:
- predicate in interface Statement
- Tags copied from interface: Statement
- Returns:
- predicate of the triple
subject
public Resource subject()
- Specified by:
- subject in interface Statement
- Tags copied from interface: Statement
- Returns:
- subject of the triple
object
public RDFNode object()
- Specified by:
- object in interface Statement
- Tags copied from interface: Statement
- Returns:
- object of the triple
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.lang.Object
- Returns:
- four most significant bytes of the digest
getDigest
public Digest getDigest()
throws DigestException
- Properties: digest can be constructed given the digests of the pred, subj, obj
Permutations of the s, p, o return different digests
- Specified by:
- getDigest in interface Digestable
- Tags copied from interface: Digestable
- Returns:
- a Digest
getURI
public java.lang.String getURI()
throws ModelException
- Description copied from interface: Resource
- Returns the URI of the resource. Triples and models must implement this method in a standard way.
- Tags copied from interface: Resource
- Returns:
- the URI of the resource
- See Also:
org.w3c.rdf.model.Triple,
org.w3c.rdf.model.RDFModel
getLabel
public java.lang.String getLabel()
throws ModelException
- Description copied from interface: RDFNode
- The formal string label of the node.
URI in case of a resource, string in case of a literal.
node2string
public java.lang.String node2string(RDFNode n)
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
equals
public boolean equals(java.lang.Object that)
- Overrides:
- equals in class java.lang.Object
main
public static void main(java.lang.String[] args)
throws java.lang.Exception