|
|||||||||
| Home >> All >> com >> hp >> hpl >> jena >> rdf >> [ model overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.hp.hpl.jena.rdf.model
Interface Model

- All Superinterfaces:
- ModelCon, ModelGraphInterface, ModelLock, com.hp.hpl.jena.shared.PrefixMapping, RDFReaderF, RDFWriterF
- All Known Subinterfaces:
- InfModel
- public interface Model
- extends ModelCon, ModelGraphInterface, RDFReaderF, RDFWriterF, com.hp.hpl.jena.shared.PrefixMapping, ModelLock
An RDF Model.
An RDF model is a set of Statements. Methods are provided for creating resources, properties and literals and the Statements which link them, for adding statements to and removing them from a model, for querying a model and set operations for combining models.
Models may create Resources [URI nodes and bnodes]. Creating a Resource does not make the Resource visible to the model; Resources are only "in" Models if Statements about them are added to the Model. Similarly the only way to "remove" a Resource from a Model is to remove all the Statements that mention it.
When a Resource or Literal is created by a Model, the Model is free to re-use an existing Resource or Literal object with the correct values, or it may create a fresh one. [All Jena RDFNodes and Statements are immutable, so this is generally safe.]
This interface defines a set of primitive methods. A set of convenience methods which extends this interface, e.g. performing automatic type conversions and support for enhanced resources, is defined in ModelCon.
System Properties
Firewalls and Proxies
Some of the methods, e.g. the read methods, may have to traverse a firewall. This can be accomplished using the standard java method of setting system properties. To use a socks proxy, include on the java command line:-DsocksProxyHost=[your-proxy-domain-name-or-ip-address]
To use an http proxy, include on the command line:
-DproxySet=true -DproxyHost=[your-proxy] -DproxyPort=[your-proxy-port-number]
Alternatively, these properties can be set programatically, e.g.
System.getProperties().put("proxySet","true");
System.getProperties().put("proxyHost","proxy.hostname");
System.getProperties().put("proxyPort",port_number);
- Version:
- $Name: $ $Revision: 1.59 $Date: 2005/02/21 12:14:05 $'
| Nested Class Summary |
| Nested classes inherited from class com.hp.hpl.jena.shared.PrefixMapping |
com.hp.hpl.jena.shared.PrefixMapping.Factory, com.hp.hpl.jena.shared.PrefixMapping.IllegalPrefixException, com.hp.hpl.jena.shared.PrefixMapping.JenaLockedException |
| Field Summary |
| Fields inherited from interface com.hp.hpl.jena.shared.PrefixMapping |
Extended, Standard |
| Fields inherited from interface com.hp.hpl.jena.rdf.model.ModelLock |
READ, WRITE |
| Method Summary | |
Model |
abort()
Abort the current transaction and abandon any changes in progress. |
Model |
add(java.util.List statements)
add all the statements in the List to this Model, going through the bulk update interface (which means turning them into triples in one form or another). |
Model |
add(Model m)
Add all the statements in another model to this model, including the reified statements. |
Model |
add(Model m,
boolean suppressReifications)
Add all the statements of the given model m to this model. |
Model |
add(Statement s)
Add a statement to this model. |
Model |
add(Statement[] statements)
Add all the statements to the Model, using through the bulk update interface. |
Model |
add(StmtIterator iter)
Add all the statements returned by an iterator to this model. |
Model |
begin()
Begin a new transation. |
void |
close()
Close the Model and free up resources held. |
Model |
commit()
Commit the current transaction. |
boolean |
contains(Resource s,
Property p)
Determine whether this model contains any statements with a given subject and property. |
boolean |
contains(Resource s,
Property p,
RDFNode o)
Determine if an (S, P, O) pattern is present in this model, with null allowed to represent a wildcard match. |
boolean |
contains(Statement s)
Determine if a statement is present in this model. |
boolean |
containsAll(Model model)
Determine if all of the statements in a model are also contained in this model. |
boolean |
containsAll(StmtIterator iter)
Determine if all of the statements returned by an iterator are contained in this model. |
boolean |
containsAny(Model model)
Determine if any of the statements in a model are also contained in this model. |
boolean |
containsAny(StmtIterator iter)
Determine if any of the statements returned by an iterator are contained in this model. |
boolean |
containsResource(RDFNode r)
determine if the RDFNode r appears in any statement of this model. |
RDFList |
createList()
Answer a new empty list. |
RDFList |
createList(java.util.Iterator members)
Answer a new list containing the resources from the given iterator, in order. |
RDFList |
createList(RDFNode[] members)
Answer a new list containing the nodes from the given array, in order |
Literal |
createLiteral(java.lang.String v,
boolean wellFormed)
Create a literal from a String value. |
Literal |
createLiteral(java.lang.String v,
java.lang.String language)
Create an untyped literal from a String value with a specified language. |
Literal |
createLiteral(java.lang.String v,
java.lang.String language,
boolean wellFormed)
Deprecated. since Jena2. It is no longer legal to have a language tag on a well-formed XMLLiteral. Use the 2-argument form of createLiteral 55 instead. Create a literal from a String value with a specified language. An existing literal of the right value may be returned, or a fresh one created. |
Property |
createProperty(java.lang.String nameSpace,
java.lang.String localName)
Create a property with a given URI composed from a namespace part and a localname part by concatenating the strings. |
ReifiedStatement |
createReifiedStatement(Statement s)
Answer a ReifiedStatement that encodes _s_ and belongs to this Model. |
ReifiedStatement |
createReifiedStatement(java.lang.String uri,
Statement s)
answer a ReifiedStatement that encodes _s_, belongs to this Model, and is a Resource with that _uri_. |
Resource |
createResource()
Create a new anonymous resource whose model is this model. |
Resource |
createResource(AnonId id)
Create a blank node resource with a specified identifier. |
Resource |
createResource(java.lang.String uri)
Create a new resource associated with this model. |
Statement |
createStatement(Resource s,
Property p,
RDFNode o)
Create a Statement instance. |
Literal |
createTypedLiteral(java.lang.Object value)
Build a typed literal label from its value form using whatever datatype is currently registered as the the default representation for this java class. |
Literal |
createTypedLiteral(java.lang.Object value,
com.hp.hpl.jena.datatypes.RDFDatatype dtype)
Build a typed literal from its value form. |
Literal |
createTypedLiteral(java.lang.String lex,
com.hp.hpl.jena.datatypes.RDFDatatype dtype)
Build a typed literal from its lexical form. |
Model |
difference(Model model)
Create a new model containing all the statements in this model which are not in another. |
boolean |
equals(java.lang.Object model)
Test whether one model is the equal to another. |
java.lang.Object |
executeInTransaction(com.hp.hpl.jena.shared.Command cmd)
Execute the command cmd inside a transaction. |
Resource |
getAnyReifiedStatement(Statement s)
Find or create a ReifiedStatement corresponding to a Statement. |
ModelLock |
getModelLock()
Get the model lock for this model. |
Statement |
getProperty(Resource s,
Property p)
Answer a statement (s, p, ?O) from this model. |
Property |
getProperty(java.lang.String nameSpace,
java.lang.String localName)
Return a Property instance with the given URI in this model. |
com.hp.hpl.jena.shared.ReificationStyle |
getReificationStyle()
Answer the reification style of the model. |
Statement |
getRequiredProperty(Resource s,
Property p)
Return a statement with given subject and property. |
Resource |
getResource(java.lang.String uri)
Return a Resource instance with the given URI in this model. |
boolean |
independent()
Determine whether this model is independent. |
Model |
intersection(Model model)
Create a new model containing all the statements which are in both this model and another. |
boolean |
isEmpty()
Answer true iff the model contains no explicit statements (ie it's size is zero, listStatements() would deliver the empty iterator). |
boolean |
isIsomorphicWith(Model g)
Compare this Model with another for equality ignoring the labels on bNodes. |
boolean |
isReified(Statement s)
Determine if this Statement has been reified in this Model. |
NsIterator |
listNameSpaces()
List the namespaces used by predicates and types in the model. |
NodeIterator |
listObjects()
List all objects in a model. |
NodeIterator |
listObjectsOfProperty(Property p)
List all objects of a given property. |
NodeIterator |
listObjectsOfProperty(Resource s,
Property p)
List the values of a property of a resource. |
RSIterator |
listReifiedStatements()
answer an iterator delivering all the reified statements "in" this model |
RSIterator |
listReifiedStatements(Statement st)
answer an iterator delivering all the reified statements "in" this model that match the statement _st_. |
StmtIterator |
listStatements()
List all statements. |
StmtIterator |
listStatements(Resource s,
Property p,
RDFNode o)
Find all the statements matching a pattern. |
StmtIterator |
listStatements(Selector s)
List the statements matching a selector. |
ResIterator |
listSubjects()
List all resources which are subjects of statements. |
ResIterator |
listSubjectsWithProperty(Property p)
List all subjects with a given property. |
ResIterator |
listSubjectsWithProperty(Property p,
RDFNode o)
List all subjects with a given property and property value. |
Model |
notifyEvent(java.lang.Object e)
Notify any listeners that the event e has occurred. |
Model |
query(Selector s)
Create a new model containing the statements matching a query. |
Model |
read(java.io.InputStream in,
java.lang.String base)
Add statements from an RDF/XML serialization. |
Model |
read(java.io.InputStream in,
java.lang.String base,
java.lang.String lang)
Add RDF statements represented in language lang to the model. |
Model |
read(java.io.Reader reader,
java.lang.String base)
Using this method is often a mistake. |
Model |
read(java.io.Reader reader,
java.lang.String base,
java.lang.String lang)
Using this method is often a mistake. |
Model |
read(java.lang.String url)
Add the RDF statements from an XML document. |
Model |
read(java.lang.String url,
java.lang.String lang)
Add statements from a serializion in language lang to the
model. |
Model |
read(java.lang.String url,
java.lang.String base,
java.lang.String lang)
Read into this model the RDF at url, using
baseURI as the base URI if it is non-null. |
Model |
register(ModelChangedListener listener)
Register a listener for model-changed events on this model. |
Model |
remove(java.util.List statements)
Remove all the statements in the list from this model, using the bulk update interface. |
Model |
remove(Statement s)
Removes a statement. |
Model |
remove(Statement[] statements)
Remove all the statements from the Model, using the bulk update interface. |
Model |
removeAll()
Remove all the statements from this model. |
Model |
removeAll(Resource s,
Property p,
RDFNode r)
Remove all the statements matching (s, p, o) from this model. |
void |
removeAllReifications(Statement s)
Remove all reifications (ie implicit reification quads) of _s_. |
void |
removeReification(ReifiedStatement rs)
Remove a particular reificiation. |
long |
size()
size will return the number of statements in a concrete model, for a virtualized model such as one created by an inference engine, it will return an estimated lower bound for the numberof statements in the model but it is possible for a subsequent listStatements on such a model to discover more statements than size() indicated. |
boolean |
supportsSetOperations()
Determine whether this model supports set operations. |
boolean |
supportsTransactions()
Determine whether this model supports transactions. |
Model |
union(Model model)
Create a new model containing all the statements in this model together with all of those in another given model. |
Model |
unregister(ModelChangedListener listener)
Unregister a listener from model-changed events on this model. |
Model |
write(java.io.OutputStream out)
Write a serialization of this model as an XML document. |
Model |
write(java.io.OutputStream out,
java.lang.String lang)
Write a serialized represention of this model in a specified language. |
Model |
write(java.io.OutputStream out,
java.lang.String lang,
java.lang.String base)
Write a serialized represention of a model in a specified language. |
Model |
write(java.io.Writer writer)
Write the model as an XML document. |
Model |
write(java.io.Writer writer,
java.lang.String lang)
Write a serialized represention of a model in a specified language. |
Model |
write(java.io.Writer writer,
java.lang.String lang,
java.lang.String base)
Write a serialized represention of a model in a specified language. |
| Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelGraphInterface |
asRDFNode, asStatement, getGraph, queryHandler |
| Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFReaderF |
getReader, getReader, setReaderClassName |
| Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFWriterF |
getWriter, getWriter, setWriterClassName |
| Methods inherited from interface com.hp.hpl.jena.shared.PrefixMapping |
expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, lock, qnameFor, removeNsPrefix, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, usePrefix, withDefaultMappings |
| Methods inherited from interface com.hp.hpl.jena.rdf.model.ModelLock |
enterCriticalSection, leaveCriticalSection |
| Method Detail |
size
public long size()
- size will return the number of statements in a concrete model,
for a virtualized model such as one created by an inference engine,
it will return an estimated lower bound for the numberof statements
in the model but it is possible for a subsequent listStatements on
such a model to discover more statements than size() indicated.
isEmpty
public boolean isEmpty()
- Answer true iff the model contains no explicit statements (ie it's size is zero,
listStatements() would deliver the empty iterator).
listSubjects
public ResIterator listSubjects()
- List all resources which are subjects of statements.
Subsequent operations on those resource may modify this model.
listNameSpaces
public NsIterator listNameSpaces()
- List the namespaces used by predicates and types in the model. This method is
really intended for use by the RDF/XML writer, which needs to know these
namespaces to generate correct and vaguely pretty XML.
The namespaces returned are those of (a) every URI used as a property in the model and (b) those of every URI that appears as the object of an rdf:type statement.
getResource
public Resource getResource(java.lang.String uri)
- Return a Resource instance with the given URI in this model. This method
behaves identically to
createResource(String)and exists as legacy: createResource is now capable of, and allowed to, reuse existing objects.Subsequent operations on the returned object may modify this model.
getProperty
public Property getProperty(java.lang.String nameSpace, java.lang.String localName)
- Return a Property instance with the given URI in this model. This method
behaves identically to
createProperty(String,String)and exists as legacy: createProperty is now capable of, and allowed to, reuse existing objects.Subsequent operations on the returned property may modify this model.
createResource
public Resource createResource()
- Create a new anonymous resource whose model is this model. This bnode will
have a new AnonId distinct from any allocated by any other call of this method.
Subsequent operations on the returned resource may modify this model.
createResource
public Resource createResource(AnonId id)
- Create a blank node resource with a specified identifier. The resulting bnode
will be equal to any other bnode with the same AnonId (even if they are in
separate models - be warned). The intended use for this method is to allow
bnode round-tripping between Jena models and other representations.
This method may return an existing bnode with the correct AnonId and model, or it may construct a fresh one, as it sees fit.
Operations on the result may modify this model
createResource
public Resource createResource(java.lang.String uri)
- Create a new resource associated with this model. If the uri string is null, this creates
a bnode, as per
createResource(). Otherwise it creates a URI node. A URI resource is .equals() to any other URI Resource with the same URI (even in a different model - be warned).This method may return an existing Resource with the correct URI and model, or it may construct a fresh one, as it sees fit.
Operations on the result Resource may change this model.
createProperty
public Property createProperty(java.lang.String nameSpace, java.lang.String localName)
- Create a property with a given URI composed from a namespace part and a
localname part by concatenating the strings.
This method may return an existing property with the correct URI and model, or it may construct a fresh one, as it sees fit.
Subsequent operations on the returned property may modify this model.
createLiteral
public Literal createLiteral(java.lang.String v, java.lang.String language)
- Create an untyped literal from a String value with a specified language.
createLiteral
public Literal createLiteral(java.lang.String v, java.lang.String language, boolean wellFormed)
- Deprecated. since Jena2. It is no longer legal to have a language
tag on a well-formed XMLLiteral. Use the 2-argument form of
createLiteral 55 instead.
Create a literal from a String value with a specified language. An existing literal
of the right value may be returned, or a fresh one created.
createLiteral
public Literal createLiteral(java.lang.String v, boolean wellFormed)
- Create a literal from a String value. An existing literal
of the right value may be returned, or a fresh one created.
The use of the wellFormed flag is to create typed literals of
type rdf:XMLLiteral, without error checking. This should
only be use when the lexical form is known to already be
in exclusive canonical XML.
createTypedLiteral
public Literal createTypedLiteral(java.lang.String lex, com.hp.hpl.jena.datatypes.RDFDatatype dtype)
- Build a typed literal from its lexical form. The
lexical form will be parsed now and the value stored. If
the form is not legal this will throw an exception.
Note that in preview releases of Jena2 it was also possible to specify a language type. Changes to the RDF specification mean that this is no longer legal except for plain literals. To create a plain literal with a language tag use createLiteral 55 .
createTypedLiteral
public Literal createTypedLiteral(java.lang.Object value, com.hp.hpl.jena.datatypes.RDFDatatype dtype)
- Build a typed literal from its value form.
Note that in preview releases of Jena2 it was also possible to specify a language type. Changes to the RDF specification mean that this is no longer legal except for plain literals. To create a plain literal with a language tag use createLiteral 55 .
createTypedLiteral
public Literal createTypedLiteral(java.lang.Object value)
- Build a typed literal label from its value form using
whatever datatype is currently registered as the the default
representation for this java class. No language tag is supplied.
- Specified by:
createTypedLiteralin interfaceModelCon
createStatement
public Statement createStatement(Resource s, Property p, RDFNode o)
- Create a Statement instance. (Creating a statement does not add it to the set of
statements in the model; see Model::add). This method may return an existing
Statement with the correct components and model, or it may construct a fresh one,
as it sees fit.
Subsequent operations on the statement or any of its parts may modify this model.
createList
public RDFList createList()
- Answer a new empty list. This is equivalent to a list consisting only
of
rdf:nil.
createList
public RDFList createList(java.util.Iterator members)
Answer a new list containing the resources from the given iterator, in order.
createList
public RDFList createList(RDFNode[] members)
Answer a new list containing the nodes from the given array, in order
add
public Model add(Statement s)
- Add a statement to this model.
add
public Model add(Statement[] statements)
- Add all the statements to the Model, using through the bulk update interface.
remove
public Model remove(Statement[] statements)
- Remove all the statements from the Model, using the bulk update interface.
add
public Model add(java.util.List statements)
- add all the statements in the List to this Model, going through the bulk
update interface (which means turning them into triples in one form or
another).
remove
public Model remove(java.util.List statements)
- Remove all the statements in the list from this model, using the bulk
update interface.
add
public Model add(StmtIterator iter)
- Add all the statements returned by an iterator to this model.
add
public Model add(Model m)
- Add all the statements in another model to this model, including the
reified statements.
add
public Model add(Model m, boolean suppressReifications)
- Add all the statements of the given model m to this model.
Optionally supress the addition of reified statements.
read
public Model read(java.lang.String url)
- Add the RDF statements from an XML document.
See Model for a description of how to traverse a firewall.
read
public Model read(java.io.InputStream in, java.lang.String base)
- Add statements from an RDF/XML serialization.
read
public Model read(java.io.InputStream in, java.lang.String base, java.lang.String lang)
- Add RDF statements represented in language
langto the model.
Predefined values forlangare "RDF/XML", "N-TRIPLE" and "N3".nullrepresents the default language, "RDF/XML". "RDF/XML-ABBREV" is a synonym for "RDF/XML".
read
public Model read(java.io.Reader reader, java.lang.String base)
- Using this method is often a mistake.
Add statements from an RDF/XML serialization.
It is generally better to use an InputStream if possible.
read(InputStream,String)55 , otherwise there is a danger of a mismatch between the character encoding of say the FileReader and the character encoding of the data in the file.
read
public Model read(java.lang.String url, java.lang.String lang)
- Add statements from a serializion in language
langto the model.
Predefined values forlangare "RDF/XML", "N-TRIPLE" and "N3".nullrepresents the default language, "RDF/XML". "RDF/XML-ABBREV" is a synonym for "RDF/XML".
See Model for a description of how to traverse a firewall.
read
public Model read(java.io.Reader reader, java.lang.String base, java.lang.String lang)
- Using this method is often a mistake.
Add RDF statements represented in language
langto the model.
Predefined values forlangare "RDF/XML", "N-TRIPLE" and "N3".nullrepresents the default language, "RDF/XML". "RDF/XML-ABBREV" is a synonym for "RDF/XML".
It is generally better to use an InputStream if possible.read(InputStream,String)55 , otherwise there is a danger of a mismatch between the character encoding of say the FileReader and the character encoding of the data in the file.
read
public Model read(java.lang.String url, java.lang.String base, java.lang.String lang)
- Read into this model the RDF at
url, usingbaseURIas the base URI if it is non-null. The RDF is assumed to be RDF/XML unlesslangis non-null, in which case it names the language to be used. Answer this model.
write
public Model write(java.io.Writer writer)
Write the model as an XML document. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors.
write
public Model write(java.io.Writer writer, java.lang.String lang)
Write a serialized represention of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors.
The language in which to write the model is specified by the
langargument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented bynullis "RDF/XML".
write
public Model write(java.io.Writer writer, java.lang.String lang, java.lang.String base)
Write a serialized represention of a model in a specified language. It is often better to use an OutputStream rather than a Writer, since this will avoid character encoding errors.
The language in which to write the model is specified by the
langargument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented bynull, is "RDF/XML".
write
public Model write(java.io.OutputStream out)
Write a serialization of this model as an XML document.
The language in which to write the model is specified by the
langargument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value is represented bynullis "RDF/XML".
write
public Model write(java.io.OutputStream out, java.lang.String lang)
Write a serialized represention of this model in a specified language.
The language in which to write the model is specified by the
langargument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented bynull, is "RDF/XML".
write
public Model write(java.io.OutputStream out, java.lang.String lang, java.lang.String base)
Write a serialized represention of a model in a specified language.
The language in which to write the model is specified by the
langargument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value, represented bynull, is "RDF/XML".
remove
public Model remove(Statement s)
- Removes a statement.
The statement with the same subject, predicate and object as that supplied will be removed from the model.
getRequiredProperty
public Statement getRequiredProperty(Resource s, Property p)
- Return a statement with given subject and property.
If more than one statement witht the given subject and property exists in the model, it is undefined which will be returned. If none exist, an exception is thrown.
getProperty
public Statement getProperty(Resource s, Property p)
- Answer a statement (s, p, ?O) from this model. If none exist, return null;
if several exist, pick one arbitrarily.
listSubjectsWithProperty
public ResIterator listSubjectsWithProperty(Property p)
- List all subjects with a given property. .remove() is not implemented on
this iterator.
listSubjectsWithProperty
public ResIterator listSubjectsWithProperty(Property p, RDFNode o)
- List all subjects with a given property and property value. .remove() is not
implemented on this iterator.
listObjects
public NodeIterator listObjects()
- List all objects in a model.
listObjectsOfProperty
public NodeIterator listObjectsOfProperty(Property p)
- List all objects of a given property. .remove() is not implemented on this iterator.
listObjectsOfProperty
public NodeIterator listObjectsOfProperty(Resource s, Property p)
- List the values of a property of a resource.
contains
public boolean contains(Resource s, Property p)
- Determine whether this model contains any statements with a given subject
and property.
containsResource
public boolean containsResource(RDFNode r)
- determine if the RDFNode r appears in any statement of this model.
(containsRDFNode is a horrible name, and in any case, even literals
will be resources one day)
contains
public boolean contains(Resource s, Property p, RDFNode o)
- Determine if an (S, P, O) pattern is present in this model, with null allowed
to represent a wildcard match.
contains
public boolean contains(Statement s)
- Determine if a statement is present in this model.
containsAny
public boolean containsAny(StmtIterator iter)
- Determine if any of the statements returned by an iterator are
contained in this model.
containsAll
public boolean containsAll(StmtIterator iter)
- Determine if all of the statements returned by an iterator are
contained in this model.
containsAny
public boolean containsAny(Model model)
- Determine if any of the statements in a model are also contained
in this model.
containsAll
public boolean containsAll(Model model)
- Determine if all of the statements in a model are also contained
in this model.
isReified
public boolean isReified(Statement s)
- Determine if this Statement has been reified in this Model.
getAnyReifiedStatement
public Resource getAnyReifiedStatement(Statement s)
- Find or create a ReifiedStatement corresponding to a Statement.
removeAllReifications
public void removeAllReifications(Statement s)
- Remove all reifications (ie implicit reification quads) of _s_.
removeReification
public void removeReification(ReifiedStatement rs)
- Remove a particular reificiation.
listStatements
public StmtIterator listStatements()
- List all statements.
Subsequent operations on those statements may modify this model.
listStatements
public StmtIterator listStatements(Selector s)
- List the statements matching a selector.
A statment is considered to match if the
testmethod of s returns true when called on s.
listStatements
public StmtIterator listStatements(Resource s, Property p, RDFNode o)
- Find all the statements matching a pattern.
Return an iterator over all the statements in a model that match a pattern. The statements selected are those whose subject matches the
subjectargument, whose predicate matches thepredicateargument and whose object matches theobjectargument. If an argument isnullit matches anything.
createReifiedStatement
public ReifiedStatement createReifiedStatement(Statement s)
- Answer a ReifiedStatement that encodes _s_ and belongs to this Model.
result.getModel() == this
result.getStatement() .equals ( s )
createReifiedStatement
public ReifiedStatement createReifiedStatement(java.lang.String uri,
JAVADOC