eu.larkc.core.data
Interface RdfStoreConnection

All Superinterfaces:
SPARQLEndpoint
All Known Implementing Classes:
RdfStoreConnectionImpl

public interface RdfStoreConnection
extends SPARQLEndpoint

RdfStoreConnection is database-like connection to RDF repository. The connection is functional super set of SPARQL endpoint with write support.

Author:
vassil

Method Summary
 org.openrdf.model.Statement addStatement(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph)
          Adds a new statement.
 org.openrdf.model.Statement addStatement(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph, org.openrdf.model.URI... ts)
          Adds a new statement and associated it with a collection of labels.
 boolean associateStatements(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph, org.openrdf.model.URI... label)
          Associates a statements with a labeled group.
 boolean associateStatements(SPARQLQuery query, org.openrdf.model.URI... label)
          Associates the statements result of SPARQL CONSTRUCT or DESCRIBE query to a labeled group.
 void close()
          Closes the connection and free all allocated resources.
 LabelledGroupOfStatements createLabelledGroupOfStatements()
          Creates a handle to a labeled group of statements with random name.
 LabelledGroupOfStatements createLabelledGroupOfStatements(org.openrdf.model.URI label)
          Creates a handle to a labeled group of statements.
 boolean deassociateStatements(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph, org.openrdf.model.URI label)
          Deassociates one or more statements from a labeled group.
 org.openrdf.model.ValueFactory getValueFactory()
          Get a factory to create values.
 boolean isClosed()
          Verifies if the current connection is closed.
 int removeStatement(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph)
          Removes statements from the RDF store.
 CloseableIterator<org.openrdf.model.Statement> search(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, org.openrdf.model.URI graph, org.openrdf.model.URI label)
          Creates a statement iterator based on simple pattern matching .
 
Methods inherited from interface eu.larkc.core.data.SPARQLEndpoint
createDataSet, createRdfGraph, executeAsk, executeConstruct, executeSelect
 

Method Detail

addStatement

org.openrdf.model.Statement addStatement(org.openrdf.model.Resource subj,
                                         org.openrdf.model.URI pred,
                                         org.openrdf.model.Value obj,
                                         org.openrdf.model.URI graph)
Adds a new statement.

Parameters:
subj -
pred -
obj -
graph -
Returns:
the newly added statement to the store

addStatement

org.openrdf.model.Statement addStatement(org.openrdf.model.Resource subj,
                                         org.openrdf.model.URI pred,
                                         org.openrdf.model.Value obj,
                                         org.openrdf.model.URI graph,
                                         org.openrdf.model.URI... ts)
Adds a new statement and associated it with a collection of labels.

Parameters:
subj -
pred -
obj -
graph -
ts -
Returns:
the newly added statement to the store

removeStatement

int removeStatement(org.openrdf.model.Resource subj,
                    org.openrdf.model.URI pred,
                    org.openrdf.model.Value obj,
                    org.openrdf.model.URI graph)
Removes statements from the RDF store.

Parameters:
subj - is subject of the statement to be removed (may be null)
pred - is predicate of the statement to be removed (may be null)
obj - is object of the statement to be removed (may be null)
graph - is graph of the statement to be removed (may be null)
Returns:
the number of removed statements

search

CloseableIterator<org.openrdf.model.Statement> search(org.openrdf.model.Resource subj,
                                                      org.openrdf.model.URI pred,
                                                      org.openrdf.model.Value obj,
                                                      org.openrdf.model.URI graph,
                                                      org.openrdf.model.URI label)
Creates a statement iterator based on simple pattern matching .

Parameters:
subj - is subject of the statements to be matched (may be null)
pred - is predicate of the statements to be matched (may be null)
obj - is object of the statements to be matched (may be null)
graph - is graph of the statements to be matched (may be null)
label - is label of the statements to be matched (may be null)
Returns:
closeable statement iterator

createLabelledGroupOfStatements

LabelledGroupOfStatements createLabelledGroupOfStatements(org.openrdf.model.URI label)
Creates a handle to a labeled group of statements.

Parameters:
label - to be used as name for the new group
Returns:
labeled group of statements

createLabelledGroupOfStatements

LabelledGroupOfStatements createLabelledGroupOfStatements()
Creates a handle to a labeled group of statements with random name.

Returns:
label is a group of statements

associateStatements

boolean associateStatements(org.openrdf.model.Resource subj,
                            org.openrdf.model.URI pred,
                            org.openrdf.model.Value obj,
                            org.openrdf.model.URI graph,
                            org.openrdf.model.URI... label)
Associates a statements with a labeled group.

Parameters:
subj - is subject of the statement to be associated (may be null)
pred - is predicate of the statement to be associated (may be null)
obj - is object of the statement to be associated (may be null)
graph - is graph of the statement to be associated (may be null)
label - is label of the group to be associated to
Returns:
true if the operation associated at least one statement

associateStatements

boolean associateStatements(SPARQLQuery query,
                            org.openrdf.model.URI... label)
Associates the statements result of SPARQL CONSTRUCT or DESCRIBE query to a labeled group.

Parameters:
query - is construct or describe SPARQL query
label - is label of the group
Returns:
true if the operation associated at least one statement

deassociateStatements

boolean deassociateStatements(org.openrdf.model.Resource subj,
                              org.openrdf.model.URI pred,
                              org.openrdf.model.Value obj,
                              org.openrdf.model.URI graph,
                              org.openrdf.model.URI label)
Deassociates one or more statements from a labeled group.

Parameters:
subj - is subject of the statement to be deassociated (may be null)
pred - is predicate of the statement to be deassociated (may be null)
obj - is object of the statement to be deassociated (may be null)
graph - is graph of the statement to be deassociated (may be null)
label - is label of the statement to be deassociated (may be null)
Returns:
true if the operation deassociated at least one statement

close

void close()
Closes the connection and free all allocated resources. All subsequent operations will generate exception.


isClosed

boolean isClosed()
Verifies if the current connection is closed.

Returns:
true or false

getValueFactory

org.openrdf.model.ValueFactory getValueFactory()
Get a factory to create values.

Returns:
value factory.