|
|||||||||
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 Model
public java.lang.String getSourceURI()
getSourceURI
in interface Model
public int size()
size
in interface Model
public boolean isEmpty()
Model
isEmpty
in interface Model
public java.util.Enumeration elements()
elements
in interface Model
public boolean contains(Statement t)
contains
in interface Model
true
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 Model
Statement
public void remove(Statement t) throws ModelException
remove
in interface Model
Statement
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 Model
Resource
,
RDFNode
public Model duplicate()
duplicate
in interface Model
public java.lang.Object clone()
clone
in class java.lang.Object
public Model create()
create
in interface Model
public NodeFactory getNodeFactory()
Model
getNodeFactory
in interface Model
public java.lang.String getLabel() throws ModelException
RDFNode
getLabel
in interface RDFNode
public java.lang.String getNamespace()
Resource
getNamespace
in interface Resource
org.w3c.rdf.model.Resource
Statement
,
Model
public java.lang.String getLocalName() throws ModelException
Resource
getLocalName
in interface Resource
org.w3c.rdf.model.Resource
Statement
,
Model
public Digest getDigest()
getDigest
in interface Digestable
org.w3c.rdf.digest.Digestable
public boolean isMutable()
Model
isMutable
in interface Model
public java.lang.String getURI() throws ModelException
Resource
getURI
in interface Resource
org.w3c.rdf.model.Resource
Statement
,
Model
public java.lang.String getDigestAlgorithm()
getDigestAlgorithm
in interface Digest
public byte[] getDigestBytes() throws DigestException
getDigestBytes
in interface Digest
public 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 |