|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.impl.ADataset
org.openanzo.model.impl.Dataset
org.openanzo.model.impl.ContainerDataset
public class ContainerDataset
ContainerDataset is a Dataset that gets stores its data in an IContainer. ContainerDataset is dynamic in nature in terms to graph creation, which means if a graph is asked for with a getNamedGraph or getDefaultNamedGraph method call, and the graph isn't currently in the dataset, the graph is created and added.
| Constructor Summary | |
|---|---|
ContainerDataset(IContainer container)
Create a new ContainerDataset with the given container as the data source |
|
| Method Summary | |
|---|---|
void |
add(java.util.Iterator<org.openrdf.model.Statement> statements)
Add statements to their given NamedGraph. |
void |
add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource namedGraphUri)
Add a statement to the given NamedGraph if said NamedGraph is contained within this dataset. |
void |
add(org.openrdf.model.Statement... statements)
Add statements to the given NamedGraph if said NamedGraph is contained within this dataset. |
void |
clear()
Delete all statements in container |
void |
clear(org.openrdf.model.Resource... context)
Delete all statements in container for given contexts |
boolean |
contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUris)
Return true if the container contains atleast 1 statement that matches the pattern of subj,prop,obj,context |
boolean |
contains(org.openrdf.model.Statement statement)
Return true if the container contains atleast 1 statement that matches the statement provided |
void |
delete(java.util.Iterator<org.openrdf.model.Statement> statements)
Delete statements from their given NamedGraph. |
void |
delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource namedGraphUri)
Delete statements from the given NamedGraph if said NamedGraph is contained within this dataset. |
void |
delete(org.openrdf.model.Statement... statements)
Delete statements from the given NamedGraph if said NamedGraph is contained within this dataset. |
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 |
QueryResult |
executeQuery(java.lang.String query)
Execute a SPARQL query against the data within this dataset, using the dataset's DefaultGraph and NameGraph sets |
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... namedGraphUris)
Return an iterator over all statements that match the pattern of subj,prop,obj |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
findAll(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUris)
Return an iterator of all statements that match the pattern of subj,prop,obj Difference between find, and findall, is that with findAll, if contexts are provided, they are used to sort results, but not limit results, ie the results contains all statements that match the subj,prop,obj, with matching statements within the given contexts earlier in the iterator than statements not in the provided contexts. |
INamedGraph |
getDefaultNamedGraph(org.openrdf.model.URI uri)
Get the INamedGraph for the given URI if it is within this dataset's default model |
INamedGraphEventManager |
getEventManager()
Return INamedGraphEventManager for this container |
INamedGraph |
getNamedGraph(org.openrdf.model.URI uri)
Remove named graph from set of graphs |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
getStatements()
Get an iterator over all statements within this container |
int |
size()
Return number of statements in container |
int |
size(org.openrdf.model.Resource... context)
Return number of statements in container |
| Methods inherited from class org.openanzo.model.impl.Dataset |
|---|
addDefaultGraphUri, addDefaultNamedGraph, addNamedGraph, addNamedGraphUri, close, containsDefaultNamedGraph, containsNamedGraph, getDefaulNamedGraphsSize, getDefaultNamedGraphs, getNamedGraphs, getNamedGraphsSize, getTransactionManager, removeDefaultGraphUri, removeDefaultNamedGraph, removeNamedGraph, removeNamedGraphUri, setDefaultGraphs, setEventManager, setNamedGraphs, setTransactionManager |
| Methods inherited from class org.openanzo.model.impl.ADataset |
|---|
connect, getContexts, getURI, isClosed, isConnected, isEmpty, isEmpty, setDatasetURI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContainerDataset(IContainer container)
container - containing data| Method Detail |
|---|
public INamedGraph getDefaultNamedGraph(org.openrdf.model.URI uri)
IDataset
getDefaultNamedGraph in interface IDatasetgetDefaultNamedGraph in class Dataseturi - URI of INamedGraph
public INamedGraph getNamedGraph(org.openrdf.model.URI uri)
Dataset
getNamedGraph in interface IDatasetgetNamedGraph in class Dataseturi - of graph to remove
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 IContainerexecuteQuery in class DatasetdefaultNamedGraphsIn - 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 QueryResult executeQuery(java.lang.String query)
throws AnzoException
IDataset
executeQuery in interface IDatasetexecuteQuery in class Datasetquery - SPARQL query string
AnzoException
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> findAll(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUris)
IDataset
findAll in interface IDatasetfindAll in class ADatasetsubj - Subject resource to match, or null for anyprop - Predicate uri to match, or null for anyobj - Object value to match, or null for anynamedGraphUris - Set of contexts to search first, before searching the rest of the dataset
public void add(java.util.Iterator<org.openrdf.model.Statement> statements)
ADataset
add in interface IContaineradd in class ADatasetstatements - Iterator of statement to add
public void add(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource namedGraphUri)
ADataset
add in interface IContaineradd in class ADatasetsubj - Subject of statementpred - Property of statementobj - Object of statementnamedGraphUri - URI of NamedGraph to which statement is to be addedpublic void add(org.openrdf.model.Statement... statements)
ADataset
add in interface IContaineradd in class ADatasetstatements - to addpublic void clear()
IContainer
clear in interface IContainerclear in class ADatasetpublic void clear(org.openrdf.model.Resource... context)
IContainer
clear in interface IContainerclear in class ADatasetcontext - Contexts to clear from container
public boolean contains(org.openrdf.model.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... namedGraphUris)
IContainer
contains in interface IContainercontains in class ADatasetsubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullnamedGraphUris - Context values to match, or wildcard if null
public boolean contains(org.openrdf.model.Statement statement)
IContainer
contains in interface IContainercontains in class ADatasetstatement - Statement to check for existence in container
public void delete(java.util.Iterator<org.openrdf.model.Statement> statements)
ADataset
delete in interface IContainerdelete in class ADatasetstatements - Iterator of statement to delete
public void delete(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource namedGraphUri)
ADataset
delete in interface IContainerdelete in class ADatasetsubj - Subject of statementpred - Property of statementobj - Object of statementnamedGraphUri - URI of NamedGraph to which statement is to be deletedpublic void delete(org.openrdf.model.Statement... statements)
ADataset
delete in interface IContainerdelete in class ADatasetstatements - statements to remove
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... namedGraphUris)
IContainer
find in interface IContainerfind in class ADatasetsubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullnamedGraphUris - Context values to match, or wildcard if null
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> getStatements()
IContainer
getStatements in interface IContainergetStatements in class ADatasetpublic int size()
IContainer
size in interface IContainersize in class ADatasetpublic int size(org.openrdf.model.Resource... context)
IContainer
size in interface IContainersize in class ADatasetcontext - Contexts of statements to count
public INamedGraphEventManager getEventManager()
IContainer
getEventManager in interface IContainergetEventManager in class Dataset
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||