|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.w3c.rdf.implementation.model.ModelImpl
| Fields inherited from interface org.w3c.rdf.digest.Digest |
MD5, SHA1 |
| Constructor Summary | |
|
ModelImpl()
|
|
ModelImpl(NodeFactory f)
|
protected |
ModelImpl(java.lang.String uri,
java.util.Hashtable triples,
FindIndex findIndex,
boolean shared)
|
| Method Summary | |
void |
add(Resource subject,
Resource predicate,
RDFNode object)
Adds a new triple to the model. |
void |
add(Resource subject,
Resource predicate,
java.lang.String object)
Adds a new triple to the model. |
void |
add(Statement t)
Adds a new triple to the model. |
java.lang.Object |
clone()
|
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. |
Digest |
getDigest()
|
java.lang.String |
getDigestAlgorithm()
|
byte[] |
getDigestBytes()
|
java.lang.String |
getLabel()
The formal string label of the node. |
java.lang.String |
getLocalName()
Returns the local name of the resource. |
java.lang.String |
getNamespace()
Returns the namespace of the resource. |
NodeFactory |
getNodeFactory()
Returns the node factory for this model |
java.lang.String |
getSourceURI()
Returns current base URI setting. |
java.lang.String |
getURI()
Returns the URI of the resource. |
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 message. |
int |
size()
Number of triples in the model |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ModelImpl()
public ModelImpl(NodeFactory f)
protected ModelImpl(java.lang.String uri,
java.util.Hashtable triples,
FindIndex findIndex,
boolean shared)
| Method Detail |
public void setSourceURI(java.lang.String uri)
null is just alright, meaning that
the serializer will use always rdf:about and never rdf:IDsetSourceURI in interface Modelpublic java.lang.String getSourceURI()
getSourceURI in interface Modelpublic int size()
size in interface Modelpublic boolean isEmpty()
ModelisEmpty in interface Modelpublic java.util.Enumeration elements()
elements in interface Modelpublic boolean contains(Statement t)
contains in interface Modeltrue if the triple belongs to the model;
false otherwise.Statement
public void add(Resource subject,
Resource predicate,
java.lang.String object)
throws ModelException
object.
This method is just a shortcut.Resource
public void add(Resource subject,
Resource predicate,
RDFNode object)
throws ModelException
Resource,
RDFNode
public void add(Statement t)
throws ModelException
add in interface ModelStatement
public void remove(Statement t)
throws ModelException
remove in interface ModelStatement
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, new Resource("http://...#MyClass") )
finds all instances of the class MyClass
find in interface ModelResource,
RDFNodepublic Model duplicate()
duplicate in interface Modelpublic java.lang.Object clone()
clone in class java.lang.Objectpublic Model create()
create in interface Modelpublic NodeFactory getNodeFactory()
ModelgetNodeFactory in interface Model
public java.lang.String getLabel()
throws ModelException
RDFNodegetLabel in interface RDFNodepublic java.lang.String getNamespace()
ResourcegetNamespace in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Model
public java.lang.String getLocalName()
throws ModelException
ResourcegetLocalName in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Modelpublic Digest getDigest()
getDigest in interface Digestableorg.w3c.rdf.digest.Digestablepublic boolean isMutable()
ModelisMutable in interface Model
public java.lang.String getURI()
throws ModelException
ResourcegetURI in interface Resourceorg.w3c.rdf.model.ResourceStatement,
Modelpublic java.lang.String getDigestAlgorithm()
getDigestAlgorithm in interface Digest
public byte[] getDigestBytes()
throws DigestException
getDigestBytes in interface Digestpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||