|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is a programming interface to an RDF model.
An RDF model is a directed labeled graph.
This interface represents a model as container of triples.
RDF should implement getURI()
according to the digest algorithm provided in RDFDigestUtil.
org.w3c.tools.crypt.DigestUtil
,
org.w3c.rdf.util.RDFDigestUtil
Method Summary | |
void |
add(Statement t)
Adds a new triple to the model. |
boolean |
contains(Statement t)
Tests if the model contains the given triple. |
Model |
create()
Creates empty model of the same Class |
Model |
duplicate()
Clone the model. |
java.util.Enumeration |
elements()
Enumerate triples |
Model |
find(Resource subject,
Resource predicate,
RDFNode object)
General method to search for triples. |
NodeFactory |
getNodeFactory()
Returns the node factory for this model |
java.lang.String |
getSourceURI()
Returns current base URI setting. |
boolean |
isEmpty()
true if the model contains no triples |
boolean |
isMutable()
True if the model supports add() and remove() methods. |
void |
remove(Statement t)
Removes the triple from the model. |
void |
setSourceURI(java.lang.String uri)
Set a base URI for the model. |
int |
size()
Number of triples in the model |
Methods inherited from interface org.w3c.rdf.model.Resource |
getLocalName, getNamespace, getURI |
Methods inherited from interface org.w3c.rdf.model.RDFNode |
getLabel |
Method Detail |
public void setSourceURI(java.lang.String uri) throws ModelException
public java.lang.String getSourceURI() throws ModelException
public int size() throws ModelException
public boolean isEmpty() throws ModelException
public java.util.Enumeration elements() throws ModelException
public boolean contains(Statement t) throws ModelException
true
if the triple belongs to the model;
false
otherwise.public void add(Statement t) throws ModelException
public void remove(Statement t) throws ModelException
public boolean isMutable() throws ModelException
public Model find(Resource subject, Resource predicate, RDFNode object) throws ModelException
null
input for any parameter will match anything.
Example: Model result = m.find( null, RDF.type, m.getNodeFactory().createResource("http://...#MyClass") )
finds all instances of the class MyClass
public Model duplicate() throws ModelException
public Model create() throws ModelException
public NodeFactory getNodeFactory() throws ModelException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |