|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to a triple store.
Method Summary | |
void |
add(Statement s)
Add a statement to the store |
void |
close()
Close the store and free up resources held. |
boolean |
contains(Resource s,
Property p)
test whether the store contains a statement with a given subject and predicate |
boolean |
contains(Statement s)
test whether the store contains a statement |
Alt |
createAlt(Model m)
|
Alt |
createAlt(java.lang.String uri,
Model m)
|
Bag |
createBag(Model m)
|
Bag |
createBag(java.lang.String uri,
Model m)
|
Property |
createProperty(java.lang.String uri,
Model m)
|
Property |
createProperty(java.lang.String namespace,
java.lang.String localPart,
Model m)
|
Resource |
createResource(Model m)
|
Resource |
createResource(java.lang.String uri,
Model m)
|
Seq |
createSeq(Model m)
|
Seq |
createSeq(java.lang.String uri,
Model m)
|
Statement |
createStatement(Resource s,
Property p,
RDFNode o,
Model m)
|
Alt |
getAlt(Resource r,
Model m)
|
Alt |
getAlt(java.lang.String uri,
Model m)
|
Bag |
getBag(Resource r,
Model m)
|
Bag |
getBag(java.lang.String uri,
Model m)
|
Property |
getProperty(Property p)
|
Property |
getProperty(java.lang.String uri,
Model m)
|
Property |
getProperty(java.lang.String namespace,
java.lang.String localPart,
Model m)
|
Resource |
getResource(java.lang.String uri,
Model m)
|
Seq |
getSeq(Resource r,
Model m)
|
Seq |
getSeq(java.lang.String uri,
Model m)
|
Statement |
getStatement(Resource s,
Property p,
RDFNode o,
Model m)
|
java.util.Iterator |
list()
return an iterator on all the statements in the store |
java.util.Iterator |
list(Resource subject,
Property predicate,
RDFNode object)
return an iterator over all the statements which match the given subject predicate and object. |
java.util.Iterator |
listByObject(RDFNode object)
list all the statements in the store with a given object |
java.util.Iterator |
listByPredicate(Property property)
list all the statements in the store with a given predicate |
java.util.Iterator |
listBySubject(Resource subject)
return an iterator over all the statements with a given subject |
NsIterator |
listNameSpaces()
list namespaces of the predicates of all the statements in ths store. |
ResIterator |
listSubjects()
list all the subjects of statements in the store |
void |
remove(Statement s)
remove a statement from the store |
int |
size()
the number of statements in the store |
Method Detail |
public Resource createResource(Model m) throws RDFException
public Resource createResource(java.lang.String uri, Model m) throws RDFException
public Property createProperty(java.lang.String uri, Model m) throws RDFException
public Property createProperty(java.lang.String namespace, java.lang.String localPart, Model m) throws RDFException
public Statement createStatement(Resource s, Property p, RDFNode o, Model m) throws RDFException
public Bag createBag(Model m) throws RDFException
public Bag createBag(java.lang.String uri, Model m) throws RDFException
public Alt createAlt(Model m) throws RDFException
public Alt createAlt(java.lang.String uri, Model m) throws RDFException
public Seq createSeq(Model m) throws RDFException
public Seq createSeq(java.lang.String uri, Model m) throws RDFException
public Resource getResource(java.lang.String uri, Model m) throws RDFException
public Property getProperty(java.lang.String uri, Model m) throws RDFException
public Property getProperty(java.lang.String namespace, java.lang.String localPart, Model m) throws RDFException
public Property getProperty(Property p) throws RDFException
public Statement getStatement(Resource s, Property p, RDFNode o, Model m) throws RDFException
public Bag getBag(java.lang.String uri, Model m) throws RDFException
public Bag getBag(Resource r, Model m) throws RDFException
public Alt getAlt(java.lang.String uri, Model m) throws RDFException
public Alt getAlt(Resource r, Model m) throws RDFException
public Seq getSeq(java.lang.String uri, Model m) throws RDFException
public Seq getSeq(Resource r, Model m) throws RDFException
public void add(Statement s) throws RDFException
s
- the statement to addpublic void remove(Statement s) throws RDFException
s
- the statement to removepublic int size() throws RDFException
public boolean contains(Statement s) throws RDFException
s
- the statement to test forpublic boolean contains(Resource s, Property p) throws RDFException
s
- the subject of the statement to test forp
- the predicate of the statement to test forpublic java.util.Iterator list() throws RDFException
public java.util.Iterator list(Resource subject, Property predicate, RDFNode object) throws RDFException
The store is searched for all statements which match the given subject predicate and object. A null arguement matches anything.
subject
- the subject of the statements to be returned or nullpredicate
- the predicate of the statments to be returned or nullobject
- the object of the statements to be returned or nullpublic java.util.Iterator listBySubject(Resource subject) throws RDFException
subject
- the subject of the statements to be returnedpublic java.util.Iterator listByPredicate(Property property) throws RDFException
property
- the predicate to search forpublic java.util.Iterator listByObject(RDFNode object) throws RDFException
object
- the object to search forpublic ResIterator listSubjects() throws RDFException
Each subject is listed only once.
public NsIterator listNameSpaces() throws RDFException
Each namespace is listed only once.
public void close()
Not all implementations of Store require this method to be called. But some do, so in general its best to call it when done with the object, rather than leave it to the finalizer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |