|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.common.rdb.container.RDBNamedGraphContainer
public class RDBNamedGraphContainer
| Constructor Summary | |
|---|---|
RDBNamedGraphContainer(java.util.Properties properties)
Create new RDBNamedGraphContainer with the given properties |
|
| Method Summary | |
|---|---|
void |
abort()
Abort database transaction |
void |
add(java.util.Iterator<org.openrdf.model.Statement> statements)
Add a set of statements from container |
void |
add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
Add a new statement with given subj,pred,obj,context |
void |
add(org.openrdf.model.Statement... statements)
Add one or more statements to container |
void |
begin()
Begin database transaction Note:Database already in transaction |
void |
clear()
Delete all statements in container |
void |
clear(org.openrdf.model.Resource... context)
Delete all statements in container for given contexts |
void |
close()
Disconnect container from its source and close the container Note: Once a container is closed, it is based on the source of the container's data whether or not subsequent calls to connect will return the same data |
void |
commit()
Commit database transaction |
void |
connect()
Connect container to its source |
boolean |
contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
Tests if a statement is contained in the specialized graph. |
boolean |
contains(org.openrdf.model.Statement match)
Tests if a statement is contained in the container |
void |
delete(java.util.Iterator<org.openrdf.model.Statement> statements)
Delete a set of statements from container |
void |
delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
Delete a statement from container |
void |
delete(org.openrdf.model.Statement... statements)
Delete a set of statements from container |
void |
deleteInferedObject(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI object,
org.openrdf.model.URI inferedObject)
Delete an inferred object definition into the DB |
void |
deleteInferedProperty(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI inferedProperty)
Delete an inferred property definition into the DB |
QueryResult |
executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
java.lang.String query)
Execute a SPARQL query against the data within this container |
QueryResults |
executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
java.lang.String query,
boolean includeInferredStatements,
org.openrdf.model.URI ontology)
Execute a SPARQL query against the data within this container |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
find(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUri)
Return an iterator over all statements that match the pattern of subj,prop,obj |
java.util.Collection<org.openrdf.model.URI> |
getContexts()
Get the set of Context URIs that are container within this Container |
INamedGraphEventManager |
getEventManager()
Get the eventManager for this container |
Engine |
getGlitter()
Get the Glitter engine for this container |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
getStatements()
Get an iterator over all statements within this container |
ITransactionManager |
getTransactionManager()
Return ITransactionManager for this container |
org.openrdf.model.URI |
getURI()
Get URI of IContainer |
RDBConnection |
getWriteConnection()
Get the writeConnection for this container |
void |
insertInferedObject(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI object,
org.openrdf.model.URI inferedObject)
Insert an inferred object definition into the DB |
void |
insertInferedProperty(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI inferedProperty)
Insert an inferred property definition into the DB |
boolean |
isClosed()
Return if container is closed |
boolean |
isConnected()
Return if the container is connected to its source |
boolean |
isEmpty()
Return if container is empty |
boolean |
isEmpty(org.openrdf.model.Resource... context)
Return if container is empty for given contexts |
boolean |
isLocked()
Determine if currently in a transaction |
void |
purgeOntology(org.openrdf.model.URI ontology)
Purge inferred object definitions from db for a given ontology |
void |
setEventManager(INamedGraphEventManager eventManager)
Set INamedGraphEventManager for this container |
void |
setTransactionManager(ITransactionManager transactionManager)
Set ITransactionManager for this container |
int |
size()
Return number of statements in container |
int |
size(org.openrdf.model.Resource... namedGraphUri)
Return number of statements in container |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RDBNamedGraphContainer(java.util.Properties properties)
properties - configuration properties for this container| Method Detail |
|---|
public boolean isConnected()
IContainer
isConnected in interface IContainerpublic void connect()
IContainer
connect in interface IContainerpublic org.openrdf.model.URI getURI()
IContainer
getURI in interface IContainerpublic void close()
IContainer
close in interface IContainerpublic boolean isClosed()
IContainer
isClosed in interface IContainerpublic void add(java.util.Iterator<org.openrdf.model.Statement> statements)
IContainer
add in interface IContainerstatements - statements to add to container
public void add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
IContainer
add in interface IContainersubj - Subject of statementpred - Predicate of statementobj - Object of statementcontext - Context of statementpublic void clear()
IContainer
clear in interface IContainerpublic void clear(org.openrdf.model.Resource... context)
IContainer
clear in interface IContainercontext - Contexts to clear from container
public void delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
IContainer
delete in interface IContainersubj - Subject resource to match, or wildcard if nullpred - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - Context values to match, or wildcard if nullpublic void add(org.openrdf.model.Statement... statements)
IContainer
add in interface IContainerstatements - statements to add to containerpublic void delete(org.openrdf.model.Statement... statements)
IContainer
delete in interface IContainerstatements - statements to delete from containerpublic void delete(java.util.Iterator<org.openrdf.model.Statement> statements)
IContainer
delete in interface IContainerstatements - statements to delete from containerpublic info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
IContainer
getStatements in interface IContainer
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> find(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUri)
IContainer
find in interface IContainersubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullnamedGraphUri - Context values to match, or wildcard if null
public int size()
IContainer
size in interface IContainerpublic int size(org.openrdf.model.Resource... namedGraphUri)
IContainer
size in interface IContainernamedGraphUri - Contexts of statements to count
public boolean isEmpty()
IContainer
isEmpty in interface IContainerpublic boolean isEmpty(org.openrdf.model.Resource... context)
IContainer
isEmpty in interface IContainercontext - Contexts of statements to count
public boolean contains(org.openrdf.model.Statement match)
contains in interface IContainermatch - is the statement to be tested
public boolean contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
contains in interface IContainersubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontexts - Context values to match, or wildcard if null
public boolean isLocked()
public void begin()
throws AnzoException
AnzoException
public void abort()
throws AnzoException
AnzoException
public void commit()
throws AnzoException
AnzoException
public QueryResult executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
java.lang.String query)
throws AnzoException
IContainer
executeQuery in interface IContainerdefaultNamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the default graph for this querynamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the NamedGraphs for this queryquery - SPARQL query string
AnzoException
public QueryResults executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphsIn,
java.util.Set<org.openrdf.model.URI> namedGraphsIn,
java.lang.String query,
boolean includeInferredStatements,
org.openrdf.model.URI ontology)
throws AnzoException
defaultNamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the default graph for this querynamedGraphsIn - Set<URI> of URIs for NamedGraphs that will make up the NamedGraphs for this queryquery - SPARQL query stringincludeInferredStatements - should query include inferred statements in resultsontology - URI of ontology to use to determine inferred statements
AnzoExceptionpublic ITransactionManager getTransactionManager()
IContainer
getTransactionManager in interface IContainerpublic void setTransactionManager(ITransactionManager transactionManager)
IContainer
setTransactionManager in interface IContainertransactionManager - set ITransactionManager for this containerpublic Engine getGlitter()
public void purgeOntology(org.openrdf.model.URI ontology)
throws AnzoException
ontology - whose object definitions should be removed
AnzoException - if there was an error purging objects from db
public void insertInferedProperty(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI inferedProperty)
throws AnzoException
ontology - ontology to which the definition belongsproperty - property nameinferedProperty - inferred property
AnzoException - if there was an error inserting definition into the db
public void deleteInferedProperty(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI inferedProperty)
throws AnzoException
ontology - ontology to which the definition belongsproperty - property nameinferedProperty - inferred property
AnzoException - if there was an error deleting definition into the db
public void insertInferedObject(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI object,
org.openrdf.model.URI inferedObject)
throws AnzoException
ontology - ontology to which the definition belongsproperty - property nameobject - object valueinferedObject - inferred object value
AnzoException - if there was an error inserting definition into the db
public void deleteInferedObject(org.openrdf.model.URI ontology,
org.openrdf.model.URI property,
org.openrdf.model.URI object,
org.openrdf.model.URI inferedObject)
throws AnzoException
ontology - ontology to which the definition belongsproperty - property nameobject - object valueinferedObject - inferred object value
AnzoException - if there was an error deleting definition into the dbpublic java.util.Collection<org.openrdf.model.URI> getContexts()
IContainer
getContexts in interface IContainerpublic INamedGraphEventManager getEventManager()
getEventManager in interface IContainerpublic void setEventManager(INamedGraphEventManager eventManager)
IContainer
setEventManager in interface IContainereventManager - the eventManager to setpublic RDBConnection getWriteConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||