com.hp.hpl.jena.rdf.model
Interface ModelCon

All Known Subinterfaces:
InfModel, Model, OntModel
All Known Implementing Classes:
com.hp.hpl.jena.rdf.model.impl.ModelCom, ModelRDB

public interface ModelCon

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.

Version:
Release='$Name: $' Revision='$Revision: 1.7 $' Date='$Date: 2003/07/15 14:44:17 $'
Author:
bwm

Method Summary
 Model add(Resource s, Property p, boolean o)
          add a statement to this model.
 Model add(Resource s, Property p, char o)
          add a statement to this model.
 Model add(Resource s, Property p, double o)
          add a statement to this model.
 Model add(Resource s, Property p, float o)
          add a statement to this model.
 Model add(Resource s, Property p, long o)
          add a statement to this model.
 Model add(Resource s, Property p, java.lang.Object o)
          add a statement to this model.
 Model add(Resource s, Property p, RDFNode o)
          add a statement to this model.
 Model add(Resource s, Property p, java.lang.String o)
          add a statement to this model.
 Model add(Resource s, Property p, java.lang.String o, boolean wellFormed)
          add a statement to this model.
 Model add(Resource s, Property p, java.lang.String o, java.lang.String l)
          add a statement to this model.
 Model add(Resource s, Property p, java.lang.String o, java.lang.String l, boolean wellFormed)
          add a statement to this model.
 boolean contains(Resource s, Property p, boolean o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, char o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, double o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, float o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, long o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, java.lang.Object o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, java.lang.String o)
          Determine if a statement is present in this model.
 boolean contains(Resource s, Property p, java.lang.String o, java.lang.String l)
          Determine if a statement is present in this model.
 Alt createAlt()
          Create a new anonymous alt.
 Alt createAlt(java.lang.String uri)
          Create a new alt.
 Bag createBag()
          Create a new anonymous bag.
 Bag createBag(java.lang.String uri)
          Create a new bag.
 Literal createLiteral(boolean v)
          create a literal from a boolean value.
 Literal createLiteral(char v)
          create a literal from a char value.
 Literal createLiteral(double v)
          create a literal from a double value.
 Literal createLiteral(float v)
          create a literal from a float value.
 Literal createLiteral(long v)
          create a literal from an integer value.
 Literal createLiteral(java.lang.Object v)
          create a literal from an Object.
 Literal createLiteral(java.lang.String v)
          create a literal from a String value.
 Property createProperty(java.lang.String uri)
          Create a property.
 Resource createResource(Resource type)
          Create a new anonymous resource with a given type.
 Resource createResource(ResourceF f)
          Create a new anonymous resource using the supplied factory.
 Resource createResource(java.lang.String uri, Resource type)
          Create a new resource with a given type.
 Resource createResource(java.lang.String uri, ResourceF f)
          Create a new resource using the supplied factory.
 Seq createSeq()
          Create a new anonymous seq.
 Seq createSeq(java.lang.String uri)
          Create a new seq.
 Statement createStatement(Resource s, Property p, boolean o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, char o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, double o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, float o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, long o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, java.lang.Object o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, java.lang.String o)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, java.lang.String o, boolean wellFormed)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, java.lang.String o, java.lang.String l)
          Create a Statement instance.
 Statement createStatement(Resource s, Property p, java.lang.String o, java.lang.String l, boolean wellFormed)
          Create a Statement instance.
 Literal createTypedLiteral(boolean v)
          create a type literal from a boolean value.
 Literal createTypedLiteral(char v)
          create a typed literal from a char value.
 Literal createTypedLiteral(double v)
          create a typed literal from a double value.
 Literal createTypedLiteral(float v)
          create a typed literal from a float value.
 Literal createTypedLiteral(int v)
          create a typed literal from an integer value.
 Literal createTypedLiteral(long v)
          create a typed literal from an integer value.
 Literal createTypedLiteral(java.lang.Object v)
          create a literal from an Object.
 Literal createTypedLiteral(java.lang.Object value, java.lang.String lang, java.lang.String typeURI)
          Build a typed literal from its value form.
 Literal createTypedLiteral(java.lang.String v)
          create a typed literal from a String value.
 Literal createTypedLiteral(java.lang.String lex, java.lang.String lang, java.lang.String typeURI)
          Build a typed literal from its lexical form.
 Alt getAlt(Resource r)
          Return an Alt instance based on a given resource.
 Alt getAlt(java.lang.String uri)
          Return an Alt instance in this model.
 Bag getBag(Resource r)
          Return a bag instance based on a given resource.
 Bag getBag(java.lang.String uri)
          Return a Bag instance in this model.
 Property getProperty(java.lang.String uri)
          Return a Property instance in this model.
 RDFNode getRDFNode(Node n)
          create or find a Resource from a graph Node.
 Resource getResource(java.lang.String uri, ResourceF f)
          Return a Resource instance in this model.
 Seq getSeq(Resource r)
          Return a Seq instance based on a given resource.
 Seq getSeq(java.lang.String uri)
          Return a Seq instance in this model.
 StmtIterator listStatements(Resource subject, Property predicate, boolean object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, char object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, double object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, float object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, long object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, java.lang.String object)
          Find all the statements matching a pattern.
 StmtIterator listStatements(Resource subject, Property predicate, java.lang.String object, java.lang.String lang)
          Find all the statements matching a pattern.
 ResIterator listSubjectsWithProperty(Property p, boolean o)
          List all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, char o)
          List all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, double o)
          lists all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, float o)
          List all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, long o)
          List all the subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, java.lang.Object o)
          List all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, java.lang.String o)
          lists all subjects with a given property and property value.
 ResIterator listSubjectsWithProperty(Property p, java.lang.String o, java.lang.String l)
          lists all subjects with a given property and property value.
 Model remove(Model m)
          Remove all the Statements in a given model.
 Model remove(StmtIterator iter)
          Remove all the Statements returned by an iterator.
 

Method Detail

getResource

public Resource getResource(java.lang.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. If it does not, createResource should be used instead.

Parameters:
uri - the URI of the resource
f - the factory object
Returns:
a resource instance created by the factory provided

getProperty

public Property getProperty(java.lang.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. If it does not, createProperty should be used instead.

Parameters:
uri - the URI of the property
Returns:
a property object

getBag

public Bag getBag(java.lang.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. If it does not, createBag should be used instead.

Parameters:
uri - the URI of the bag.
Returns:
a bag instance

getBag

public 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. If it does not, createBag should be used instead.

Parameters:
r - an untyped Resource instance
Returns:
a bag instance

getAlt

public Alt getAlt(java.lang.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. If it does not, createAlt should be used instead.

Parameters:
uri - the URI of the alt
Returns:
an alt instance

getAlt

public 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. If it does not, createAlt should be used instead.

Parameters:
r - an untyped Resource instance
Returns:
an Alt instance

getSeq

public Seq getSeq(java.lang.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. If it does not, createSeq should be used instead.

Parameters:
uri - the URI of the seq
Returns:
a seq instance

getSeq

public 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. If it does not, createAlt should be used instead.

Parameters:
r - an untyped Resource instance
Returns:
an Alt instance

createResource

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.

Parameters:
type - the type of the resource to be created.
Returns:
a new anonymous resource linked to this model.

getRDFNode

public RDFNode getRDFNode(Node n)
create or find a Resource 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
Returns:
a suitable RDFNode

createResource

public Resource createResource(java.lang.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.

Parameters:
type - the type of the resource to be created.
uri - The URI of the new resource.
Returns:
a new resource linked to this model.

createResource

public Resource createResource(ResourceF f)
Create a new anonymous resource using the supplied factory.

Subsequent operations on the returned resource may modify this model.

Parameters:
f - A factory object to create the returned object. .
Returns:
a new anonymous resource linked to this model.

createResource

public Resource createResource(java.lang.String uri,
                               ResourceF f)
Create a new resource using the supplied factory.

Subsequent operations on the returned resource may modify this model.

Parameters:
uri - the URI of the resource
f - A factory to create the returned object. .
Returns:
a new resource linked to this model.

createProperty

public Property createProperty(java.lang.String uri)
Create a property.

Subsequent operations on the returned property may modify this model.

Parameters:
uri - the URI of the property
Returns:
a property instance

createLiteral

public Literal createLiteral(boolean v)
create a literal from a boolean value.

The value is converted to a string using its toString method.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(long v)
create a literal from an integer value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(char v)
create a literal from a char value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(float v)
create a literal from a float value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(double v)
create a literal from a double value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(java.lang.String v)
create a literal from a String value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createLiteral

public Literal createLiteral(java.lang.Object v)
create a literal from an Object.

Parameters:
v - the value of the literal.
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(boolean v)
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
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(int v)
create a typed literal from an integer value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(long v)
create a typed literal from an integer value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(char v)
create a typed literal from a char value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(float v)
create a typed literal from a float value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(double v)
create a typed literal from a double value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(java.lang.String v)
create a typed literal from a String value.

Parameters:
v - the value of the literal
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(java.lang.Object v)
create a literal from an Object.

Parameters:
v - the value of the literal.
Returns:
a new literal representing the value v

createTypedLiteral

public Literal createTypedLiteral(java.lang.String lex,
                                  java.lang.String lang,
                                  java.lang.String typeURI)
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.

Parameters:
lex - the lexical form of the literal
lang - the optional language tag
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(java.lang.Object value,
                                  java.lang.String lang,
                                  java.lang.String typeURI)
Build a typed literal from its value form.

Parameters:
value - the value of the literal
lang - the optional language tag
typeURI - the URI of the type of the literal, null for old style "plain" literals

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 boolean 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 long 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 char 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 float 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 double 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 java.lang.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.

The Object o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 java.lang.String o,
                                 java.lang.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.

The Object o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
l - the language associated with the object
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 java.lang.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.

The Object o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
wellFormed - true if the string is well formed XML
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 java.lang.String o,
                                 java.lang.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.

The Object o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
l - the language associated with the object
wellFormed - true of the string is well formed XML
Returns:
the new statement

createStatement

public Statement createStatement(Resource s,
                                 Property p,
                                 java.lang.Object 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.

The value o will be converted to a Literal.

Parameters:
s - the subject of the statement
p - the predicate of the statement
o - is the value to be the object of the statement
Returns:
the new statement

createBag

public Bag createBag()
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.

Returns:
a new anonymous bag.

createBag

public Bag createBag(java.lang.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.
Returns:
a new bag.

createAlt

public Alt createAlt()
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.

Returns:
a new anonymous alt.

createAlt

public Alt createAlt(java.lang.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.
Returns:
a new alt.

createSeq

public Seq createSeq()
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.

Returns:
a new anonymous seq.

createSeq

public Seq createSeq(java.lang.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.
Returns:
a new seq.

add

public Model add(Resource s,
                 Property p,
                 RDFNode o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 boolean o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 long o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 char o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 float o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 double o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 java.lang.String o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 java.lang.String o,
                 boolean wellFormed)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
wellFormed - true if o is well formed XML
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 java.lang.String o,
                 java.lang.String l)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
l - the language associated with the object
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 java.lang.String o,
                 java.lang.String l,
                 boolean wellFormed)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
l - the language associated with the object
wellFormed - true if o is well formed XML
Returns:
this model

add

public Model add(Resource s,
                 Property p,
                 java.lang.Object o)
add a statement to this model.

Parameters:
s - the subject of the statement to add
p - the predicate of the statement to add
o - the object of the statement to add
Returns:
this model

remove

public Model remove(StmtIterator iter)
Remove all the Statements returned by an iterator.

Parameters:
iter - the iterator which returns the statements to be removed.
Returns:
this model

remove

public Model remove(Model m)
Remove all the Statements in a given model.

Parameters:
m - the model containing the statements to be removed.
Returns:
this model

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   boolean object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   long object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   char object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   float object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   double object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   java.lang.String object)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
Returns:
an iterator over the subjects

listStatements

public StmtIterator listStatements(Resource subject,
                                   Property predicate,
                                   java.lang.String object,
                                   java.lang.String lang)
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.

Parameters:
subject - The subject sought
predicate - The predicate sought
object - The value sought
lang - The lang code ofthe string.
Returns:
an iterator over the subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            boolean o)
List all subjects with a given property and property value.

Parameters:
p - The predicate sought
o - The value sought
Returns:
an iterator over the subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            long o)
List all the subjects with a given property and property value.

Parameters:
p - The predicate sought
o - The value sought
Returns:
an iterator over the subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            char o)
List all subjects with a given property and property value.

Parameters:
p - The predicate sought
o - The value sought
Returns:
an iterator over the subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            float o)
List all subjects with a given property and property value.

Parameters:
p - The predicate sought
o - The value sought
Returns:
an iterator over the subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            double o)
lists all subjects with a given property and property value.

Parameters:
p - The property sought.
o - The property value sought.
Returns:
an iterator over the set of subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            java.lang.String o)
lists all subjects with a given property and property value.

Parameters:
p - The predicate sought.
o - The property value sought.
Returns:
an iterator over the set of subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            java.lang.String o,
                                            java.lang.String l)
lists all subjects with a given property and property value.

Parameters:
p - The predicate sought.
o - The property value sought.
l - the language associated with the object
Returns:
an iterator over the set of subjects

listSubjectsWithProperty

public ResIterator listSubjectsWithProperty(Property p,
                                            java.lang.Object o)
List all subjects with a given property and property value.

Parameters:
p - The predicate sought
o - The value sought
Returns:
an iterator over the subjects

contains

public boolean contains(Resource s,
                        Property p,
                        boolean o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        long o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        char o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        float o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        double o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        java.lang.String o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        java.lang.String o,
                        java.lang.String l)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
l - the language associated with the object
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise

contains

public boolean contains(Resource s,
                        Property p,
                        java.lang.Object o)
Determine if a statement is present in this model.

Parameters:
s - The subject of the statment tested.
p - The predicate of the statement tested.
o - The object of the statement tested.
Returns:
true if the statement with subject s, property p and object o is in the model, false otherwise


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.