| com.hp.hpl.jena.rdf.model.ModelCon
ModelCon | public interface ModelCon (Code) | | Convenience methods which extend the
Model interface.
The
Model interface provides a set of primitive operations on
an RDF model. This interface extends those methods with a
set of convenience methods.
This interface provides methods supporting typed literals. This means
that methods are provided which will translate a built in type, or an
object to an RDF Literal. This translation is done by invoking the
toString() method of the object, or its built in equivalent.
The reverse translation is also supported. This is built in for built
in types. Factory objects, provided by the application, are used
for application objects.
This interface provides methods for supporting enhanced resources. An
enhanced resource is a resource to which the application has added
behaviour. RDF containers are examples of enhanced resources built in
to this package. Enhanced resources are supported by encapsulating a
resource created by an implementation in another class which adds
the extra behaviour. Factory objects are used to construct such
enhanced resources.
author: bwm version: Release='$Name: $' version: Revision='$Revision: 1.30 $' version: Date='$Date: 2008/01/02 12:05:48 $' |
Method Summary | |
Model | add(Resource s, Property p, RDFNode o) add a statement to this model. | Model | add(Resource s, Property p, String o) add a statement to this model. | Model | add(Resource s, Property p, String lex, RDFDatatype datatype) add a statement to this model. | Model | add(Resource s, Property p, String o, boolean wellFormed) add a statement to this model. | Model | add(Resource s, Property p, String o, String l) add a statement to this model. | Model | add(Resource s, Property p, String o, String l, boolean wellFormed) | Model | addLiteral(Resource s, Property p, boolean o) Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model. | Model | addLiteral(Resource s, Property p, long o) Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model. | Model | addLiteral(Resource s, Property p, int o) Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model. | Model | addLiteral(Resource s, Property p, char o) Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model. | Model | addLiteral(Resource s, Property p, float o) Add the statement (s, p, o') to the model, where o' is the typed
literal corresponding to o. | Model | addLiteral(Resource s, Property p, double o) Add the statement (s, p, o') to the model, where o' is the typed
literal corresponding to o. | Model | addLiteral(Resource s, Property p, Object o) add a statement to this model. | boolean | contains(Resource s, Property p, String o) Determine if a statement is present in this model. | boolean | contains(Resource s, Property p, String o, String l) Determine if a statement is present in this model. | boolean | containsLiteral(Resource s, Property p, boolean o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | boolean | containsLiteral(Resource s, Property p, long o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | boolean | containsLiteral(Resource s, Property p, int o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | boolean | containsLiteral(Resource s, Property p, char o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | boolean | containsLiteral(Resource s, Property p, float o) Answer true iff this model contains (s, p, o') where o' is the typed
literal corresponding to o. | boolean | containsLiteral(Resource s, Property p, double o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | boolean | containsLiteral(Resource s, Property p, Object o) Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o. | public Alt | createAlt() Create a new anonymous alt. | public Alt | createAlt(String uri) Create a new alt.
Subsequent operations on the alt or any of its parts may
modify this model.
A statement defining the type of the new alt is added to this model.
Parameters: uri - The URI of the new alt. | public Bag | createBag() Create a new anonymous bag. | public Bag | createBag(String uri) Create a new bag.
Subsequent operations on the bag or any of its parts may
modify this model.
A statement defining the type of the new bag is added to this model.
Parameters: uri - The URI of the new Bag. | public Literal | createLiteral(String v) create a literal from a String value. | public Statement | createLiteralStatement(Resource s, Property p, boolean o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, float o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, double o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, long o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, int o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, char o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Statement | createLiteralStatement(Resource s, Property p, Object o) Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral. | public Property | createProperty(String uri) Create a property. | public Resource | createResource(Resource type) Create a new anonymous resource with a given type.
Subsequent operations on the returned resource may modify this model.
The resource is created and an rdf:type property added to the model
to specify its type. | public Resource | createResource(String uri, Resource type) Create a new resource with a given type.
Subsequent operations on the returned resource may modify this model.
The resource is created and an rdf:type property added to the model
to specify its type. | public Resource | createResource(ResourceF f) Create a new anonymous resource using the supplied factory. | public Resource | createResource(String uri, ResourceF f) Create a new resource using the supplied factory. | public Seq | createSeq() Create a new anonymous seq. | public Seq | createSeq(String uri) Create a new seq.
Subsequent operations on the seq or any of its parts may
modify this model.
A statement defining the type of the new seq is added to this model.
Parameters: uri - The URI of the new seq. | public Statement | createStatement(Resource s, Property p, String o) Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model. | public Statement | createStatement(Resource s, Property p, String o, String l) Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model. | public Statement | createStatement(Resource s, Property p, String o, boolean wellFormed) Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model. | public Statement | createStatement(Resource s, Property p, String o, String l, boolean wellFormed) Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model. | public Literal | createTypedLiteral(boolean v) create a type literal from a boolean value.
The value is converted to a string using its toString
method. | public Literal | createTypedLiteral(int v) create a typed literal from an integer value. | public Literal | createTypedLiteral(long v) create a typed literal from an integer value. | public Literal | createTypedLiteral(Calendar d) Create a typed literal of type xsd:dateTime from a Calendar object. | public Literal | createTypedLiteral(char v) create a typed literal from a char value. | public Literal | createTypedLiteral(float v) create a typed literal from a float value. | public Literal | createTypedLiteral(double v) create a typed literal from a double value. | public Literal | createTypedLiteral(String v) create a typed literal from a String value. | public Literal | createTypedLiteral(Object v) create a literal from an Object. | public Literal | createTypedLiteral(String lex, String typeURI) Build a typed literal from its lexical form. | public Literal | createTypedLiteral(Object value, String typeURI) Build a typed literal from its value form.
Note that in preview releases of Jena2 it was also possible to specify
a language type. | Alt | getAlt(String uri) Return an Alt instance in this model.
Subsequent operations on the returned object may modify this model.
The alt is assumed to already exist in the model. | Alt | getAlt(Resource r) Return an Alt instance based on a given resource.
This method enables an application to treat any resource as an Alt.
It is in effect an unsafe downcast.
Subsequent operations on the returned Alt may modify this model.
The bag is assumed to already exist in the model. | Bag | getBag(String uri) Return a Bag instance in this model.
Subsequent operations on the returned bag may modify this model.
The bag is assumed to already exist in the model. | Bag | getBag(Resource r) Return a bag instance based on a given resource.
This method enables an application to treat any resource as a bag.
It is in effect an unsafe downcast.
Subsequent operations on the returned bag may modify this model.
The bag is assumed to already exist in the model. | Property | getProperty(String uri) Return a Property instance in this model.
Subsequent operations on the returned property may modify this model.
The property is assumed to already exist in the model. | public RDFNode | getRDFNode(Node n) Create or find an RDFNode
(a
Resource or a
Literal )
from a graph Node. | Resource | getResource(String uri, ResourceF f) Return a Resource instance in this model.
Subsequent operations on the returned object may modify this model.
The resource is assumed to already exist in the model. | Seq | getSeq(String uri) Return a Seq instance in this model.
Subsequent operations on the returned bag may modify this model.
The seq is assumed to already exist in the model. | Seq | getSeq(Resource r) Return a Seq instance based on a given resource.
This method enables an application to treat any resource as a Seq.
It is in effect an unsafe downcast.
Subsequent operations on the returned Seq may modify this model.
The Seq is assumed to already exist in the model. | StmtIterator | listLiteralStatements(Resource subject, Property predicate, boolean object) Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object . | StmtIterator | listLiteralStatements(Resource subject, Property predicate, char object) Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object . | StmtIterator | listLiteralStatements(Resource subject, Property predicate, long object) Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object . | StmtIterator | listLiteralStatements(Resource subject, Property predicate, double object) Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object . | ResIterator | listResourcesWithProperty(Property p, boolean o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | ResIterator | listResourcesWithProperty(Property p, long o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | ResIterator | listResourcesWithProperty(Property p, char o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | ResIterator | listResourcesWithProperty(Property p, float o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | ResIterator | listResourcesWithProperty(Property p, double o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | ResIterator | listResourcesWithProperty(Property p, Object o) Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o. | StmtIterator | listStatements(Resource subject, Property predicate, String object) Find all the statements matching a pattern.
Return an iterator over all the statements in a model
that match a pattern. | StmtIterator | listStatements(Resource subject, Property predicate, String object, String lang) Find all the statements matching a pattern.
Return an iterator over all the statements in a model
that match a pattern. | ResIterator | listSubjectsWithProperty(Property p, String o) lists all subjects with a given property and property value. | ResIterator | listSubjectsWithProperty(Property p, String o, String l) lists all subjects with a given property and property value. | StmtIterator | listlLiteralStatements(Resource subject, Property predicate, float object) Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object . | Model | remove(Resource s, Property p, RDFNode o) remove the statement (s, p, o) from this model and
answer this model. | Model | remove(StmtIterator iter) Remove all the Statements returned by an iterator. | Model | remove(Model m) | Model | remove(Model m, boolean suppressReifications) Remove from this model all the statements found in the given model. |
add | Model add(Resource s, Property p, RDFNode o)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: o - the object of the statement to add |
add | Model add(Resource s, Property p, String o)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: o - the object of the statement to add |
add | Model add(Resource s, Property p, String lex, RDFDatatype datatype)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: lex - the lexcial form of the literal Parameters: datatype - the datatype of the literal |
add | Model add(Resource s, Property p, String o, boolean wellFormed)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: o - the object of the statement to add Parameters: wellFormed - true if o is well formed XML |
add | Model add(Resource s, Property p, String o, String l)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: o - the object of the statement to add Parameters: l - the language associated with the object |
addLiteral | Model addLiteral(Resource s, Property p, boolean o)(Code) | | Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, long o)(Code) | | Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, int o)(Code) | | Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, char o)(Code) | | Add the statement (s, p, createTypedLiteral( o )) to this model and
answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, float o)(Code) | | Add the statement (s, p, o') to the model, where o' is the typed
literal corresponding to o. Answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, double o)(Code) | | Add the statement (s, p, o') to the model, where o' is the typed
literal corresponding to o. Answer this model.
|
addLiteral | Model addLiteral(Resource s, Property p, Object o)(Code) | | add a statement to this model.
this model Parameters: s - the subject of the statement to add Parameters: p - the predicate of the statement to add Parameters: o - the object of the statement to adddeprecated Applications should use typed literals |
contains | boolean contains(Resource s, Property p, String o)(Code) | | Determine if a statement is present in this model.
true if the statement with subject s, property p and object ois in the model, false otherwise Parameters: s - The subject of the statment tested. Parameters: p - The predicate of the statement tested. Parameters: o - The object of the statement tested. |
contains | boolean contains(Resource s, Property p, String o, String l)(Code) | | Determine if a statement is present in this model.
true if the statement with subject s, property p and object ois in the model, false otherwise Parameters: s - The subject of the statment tested. Parameters: p - The predicate of the statement tested. Parameters: o - The object of the statement tested. Parameters: l - the language associated with the object |
containsLiteral | boolean containsLiteral(Resource s, Property p, boolean o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, long o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, int o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, char o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, float o)(Code) | | Answer true iff this model contains (s, p, o') where o' is the typed
literal corresponding to o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, double o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
containsLiteral | boolean containsLiteral(Resource s, Property p, Object o)(Code) | | Answer true iff this model contains the statement (s, p, o') where
o' is the typed literal corresponding to the value o.
|
createAlt | public Alt createAlt()(Code) | | Create a new anonymous alt.
Subsequent operations on the alt or any of its parts may
modify this model.
A statement defining the type of the new alt is added to this model.
a new anonymous alt. |
createAlt | public Alt createAlt(String uri)(Code) | | Create a new alt.
Subsequent operations on the alt or any of its parts may
modify this model.
A statement defining the type of the new alt is added to this model.
Parameters: uri - The URI of the new alt. a new alt. |
createBag | public Bag createBag()(Code) | | Create a new anonymous bag.
Subsequent operations on the bag or any of its parts may
modify this model.
A statement defining the type of the new bag is added to this model.
a new anonymous bag. |
createBag | public Bag createBag(String uri)(Code) | | Create a new bag.
Subsequent operations on the bag or any of its parts may
modify this model.
A statement defining the type of the new bag is added to this model.
Parameters: uri - The URI of the new Bag. a new bag. |
createLiteral | public Literal createLiteral(String v)(Code) | | create a literal from a String value.
Parameters: v - the value of the literal a new literal representing the value v |
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, boolean o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, float o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, double o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, long o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, int o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, char o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createLiteralStatement | public Statement createLiteralStatement(Resource s, Property p, Object o)(Code) | | Answer a new Statement object (s, p, o') where o' is the typed literal
corresponding to o using createTypedLiteral.
|
createProperty | public Property createProperty(String uri)(Code) | | Create a property.
Subsequent operations on the returned property may modify this model.
Parameters: uri - the URI of the property a property instance |
createResource | public Resource createResource(Resource type)(Code) | | Create a new anonymous resource with a given type.
Subsequent operations on the returned resource may modify this model.
The resource is created and an rdf:type property added to the model
to specify its type.
Parameters: type - the type of the resource to be created. a new anonymous resource linked to this model. |
createResource | public Resource createResource(String uri, Resource type)(Code) | | Create a new resource with a given type.
Subsequent operations on the returned resource may modify this model.
The resource is created and an rdf:type property added to the model
to specify its type.
Parameters: type - the type of the resource to be created. a new resource linked to this model. Parameters: uri - The URI of the new resource. |
createResource | public Resource createResource(ResourceF f)(Code) | | Create a new anonymous resource using the supplied factory.
Subsequent operations on the returned resource may modify this model.
a new anonymous resource linked to this model. Parameters: f - A factory object to create the returned object.. |
createResource | public Resource createResource(String uri, ResourceF f)(Code) | | Create a new resource using the supplied factory.
Subsequent operations on the returned resource may modify this model.
a new resource linked to this model. Parameters: uri - the URI of the resource Parameters: f - A factory to create the returned object.. |
createSeq | public Seq createSeq()(Code) | | Create a new anonymous seq.
Subsequent operations on the seq or any of its parts may
modify this model.
A statement defining the type of the new seq is added to this model.
a new anonymous seq. |
createSeq | public Seq createSeq(String uri)(Code) | | Create a new seq.
Subsequent operations on the seq or any of its parts may
modify this model.
A statement defining the type of the new seq is added to this model.
Parameters: uri - The URI of the new seq. a new seq. |
createStatement | public Statement createStatement(Resource s, Property p, String o)(Code) | | Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model.
The Object o will be converted to a Literal.
Parameters: s - the subject of the statement Parameters: p - the predicate of the statement Parameters: o - is the value to be the object of the statement the new statement |
createStatement | public Statement createStatement(Resource s, Property p, String o, String l)(Code) | | Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model.
The Object o will be converted to a Literal.
Parameters: s - the subject of the statement Parameters: p - the predicate of the statement Parameters: o - is the value to be the object of the statement Parameters: l - the language associated with the object the new statement |
createStatement | public Statement createStatement(Resource s, Property p, String o, boolean wellFormed)(Code) | | Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model.
The Object o will be converted to a Literal.
Parameters: s - the subject of the statement Parameters: p - the predicate of the statement Parameters: o - is the value to be the object of the statement Parameters: wellFormed - true if the string is well formed XML the new statement |
createStatement | public Statement createStatement(Resource s, Property p, String o, String l, boolean wellFormed)(Code) | | Create a Statement instance.
Subsequent operations on the statement or any of its parts may
modify this model.
Creating a statement does not add it to the set of statements in the
model.
The Object o will be converted to a Literal.
Parameters: s - the subject of the statement Parameters: p - the predicate of the statement Parameters: o - is the value to be the object of the statement Parameters: l - the language associated with the object Parameters: wellFormed - true of the string is well formed XML the new statement |
createTypedLiteral | public Literal createTypedLiteral(boolean v)(Code) | | create a type literal from a boolean value.
The value is converted to a string using its toString
method.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(int v)(Code) | | create a typed literal from an integer value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(long v)(Code) | | create a typed literal from an integer value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(Calendar d)(Code) | | Create a typed literal of type xsd:dateTime from a Calendar object.
|
createTypedLiteral | public Literal createTypedLiteral(char v)(Code) | | create a typed literal from a char value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(float v)(Code) | | create a typed literal from a float value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(double v)(Code) | | create a typed literal from a double value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(String v)(Code) | | create a typed literal from a String value.
Parameters: v - the value of the literal a new literal representing the value v |
createTypedLiteral | public Literal createTypedLiteral(Object v)(Code) | | create a literal from an Object.
a new literal representing the value v Parameters: v - the value of the literal. |
createTypedLiteral | public Literal createTypedLiteral(String lex, String typeURI)(Code) | | 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
Model.createLiteral(StringString) createLiteral .
Parameters: lex - the lexical form of the literal Parameters: typeURI - the uri of the type of the literal, null for old style "plain" literals throws: DatatypeFormatException - if lex is not a legal form of dtype |
createTypedLiteral | public Literal createTypedLiteral(Object value, String typeURI)(Code) | | 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
Model.createLiteral(StringString) createLiteral .
Parameters: value - the value of the literal Parameters: typeURI - the URI of the type of the literal, null for old style "plain" literals |
getAlt | Alt getAlt(String uri)(Code) | | Return an Alt instance in this model.
Subsequent operations on the returned object may modify this model.
The alt is assumed to already exist in the model. If it does not,
createAlt should be used instead.
an alt instance Parameters: uri - the URI of the alt |
getAlt | Alt getAlt(Resource r)(Code) | | Return an Alt instance based on a given resource.
This method enables an application to treat any resource as an Alt.
It is in effect an unsafe downcast.
Subsequent operations on the returned Alt may modify this model.
The bag is assumed to already exist in the model. If it does not,
createAlt should be used instead.
an Alt instance Parameters: r - an untyped Resource instance |
getBag | Bag getBag(String uri)(Code) | | Return a Bag instance in this model.
Subsequent operations on the returned bag may modify this model.
The bag is assumed to already exist in the model. If it does not,
createBag should be used instead.
a bag instance Parameters: uri - the URI of the bag. |
getBag | Bag getBag(Resource r)(Code) | | Return a bag instance based on a given resource.
This method enables an application to treat any resource as a bag.
It is in effect an unsafe downcast.
Subsequent operations on the returned bag may modify this model.
The bag is assumed to already exist in the model. If it does not,
createBag should be used instead.
a bag instance Parameters: r - an untyped Resource instance |
getProperty | Property getProperty(String uri)(Code) | | Return a Property instance in this model.
Subsequent operations on the returned property may modify this model.
The property is assumed to already exist in the model. If it does not,
createProperty should be used instead.
a property object Parameters: uri - the URI of the property |
getRDFNode | public RDFNode getRDFNode(Node n)(Code) | | Create or find an RDFNode
(a
Resource or a
Literal )
from a graph Node. This is provided for users and
developers operating at the API/SPI interface, where Resources are
constructed from Nodes. Providing this method allows each Model
the opportunity to cache node-to-resource maps if it requires.
Parameters: n - the graph.Node on which to base the Model.RDFNode a suitable RDFNode |
getResource | Resource getResource(String uri, ResourceF f)(Code) | | Return a Resource instance in this model.
Subsequent operations on the returned object may modify this model.
The resource is assumed to already exist in the model. If it does not,
createResource should be used instead.
a resource instance created by the factory provided Parameters: uri - the URI of the resource Parameters: f - the factory object |
getSeq | Seq getSeq(String uri)(Code) | | Return a Seq instance in this model.
Subsequent operations on the returned bag may modify this model.
The seq is assumed to already exist in the model. If it does not,
createSeq should be used instead.
a seq instance Parameters: uri - the URI of the seq |
getSeq | Seq getSeq(Resource r)(Code) | | Return a Seq instance based on a given resource.
This method enables an application to treat any resource as a Seq.
It is in effect an unsafe downcast.
Subsequent operations on the returned Seq may modify this model.
The Seq is assumed to already exist in the model. If it does not,
createAlt should be used instead.
an Alt instance Parameters: r - an untyped Resource instance |
listLiteralStatements | StmtIterator listLiteralStatements(Resource subject, Property predicate, boolean object)(Code) | | Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object .
|
listLiteralStatements | StmtIterator listLiteralStatements(Resource subject, Property predicate, char object)(Code) | | Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object .
|
listLiteralStatements | StmtIterator listLiteralStatements(Resource subject, Property predicate, long object)(Code) | | Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object .
|
listLiteralStatements | StmtIterator listLiteralStatements(Resource subject, Property predicate, double object)(Code) | | Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object .
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, boolean o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, long o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, char o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, float o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, double o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listResourcesWithProperty | ResIterator listResourcesWithProperty(Property p, Object o)(Code) | | Answer an iterator [without duplicates] over all the resources in this
model which have value o' for property p, where o' is the typed literal
corresponding to o.
|
listStatements | StmtIterator listStatements(Resource subject, Property predicate, String object)(Code) | | 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 subject argument,
whose predicate matches the predicate argument
and whose object matchesthe object argument.
an iterator over the subjects Parameters: subject - The subject sought Parameters: predicate - The predicate sought Parameters: object - The value sought |
listStatements | StmtIterator listStatements(Resource subject, Property predicate, String object, String lang)(Code) | | 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 subject argument,
whose predicate matches the predicate argument
and whose object matchesthe object argument.
If an argument is null it matches anything.
an iterator over the subjects Parameters: subject - The subject sought Parameters: predicate - The predicate sought Parameters: object - The value sought Parameters: lang - The lang code ofthe string. |
listSubjectsWithProperty | ResIterator listSubjectsWithProperty(Property p, String o)(Code) | | lists all subjects with a given property and property value.
an iterator over the set of subjects Parameters: p - The predicate sought. Parameters: o - The property value sought. |
listSubjectsWithProperty | ResIterator listSubjectsWithProperty(Property p, String o, String l)(Code) | | lists all subjects with a given property and property value.
an iterator over the set of subjects Parameters: p - The predicate sought. Parameters: o - The property value sought. Parameters: l - the language associated with the object |
listlLiteralStatements | StmtIterator listlLiteralStatements(Resource subject, Property predicate, float object)(Code) | | Answer a statement iterator that will iterate over all the statements
(S, P, O) in this model where S matches subject , P
matches predicate , and O matches the typed literal
corresponding to object .
|
remove | Model remove(Resource s, Property p, RDFNode o)(Code) | | remove the statement (s, p, o) from this model and
answer this model. None of s, p, o are permitted to
be null : for wildcard removal, see removeAll .
|
remove | Model remove(StmtIterator iter)(Code) | | Remove all the Statements returned by an iterator.
this model Parameters: iter - the iterator which returns the statements to be removed. |
remove | Model remove(Model m)(Code) | | Remove all the Statements in a given model, including reified statements
this model Parameters: m - the model containing the statements to be removed. |
remove | Model remove(Model m, boolean suppressReifications)(Code) | | Remove from this model all the statements found in the given model.
If suppressreifications is true, remove the reified statements of m as well.
Parameters: m - the model containing the statements to remove Parameters: suppressReifications - true to remove reified statements too this model for cascading |
|
|