|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for access to a single Sesame repository. This interface defines a generic entry point for application developers to Sesame repositories. Implementations of this interface exist that supply client-server access, as well as local access.
| Method Summary | |
void |
addData(File dataFile,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds RDF data from the specified file to the repository. |
void |
addData(InputStream data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds RDF data from an InputStream to the repository. |
void |
addData(Reader data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds RDF data from a Reader to the repository. |
void |
addData(SesameRepository repository,
AdminListener listener)
Adds the contents of the supplied SesameRepository to this repository. |
void |
addData(String data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds an RDF document to the repository. |
void |
addData(URL dataURL,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds the RDF data that can be found at the specified URL to the repository. |
void |
addGraph(Graph graph)
Adds the contents of the supplied graph to the repository. |
void |
addGraph(Graph graph,
boolean joinBlankNodes)
Adds the contents of the supplied graph to the repository. |
void |
addGraph(QueryLanguage language,
String query)
Adds the contents of the graph specified by the supplied graph query to the repository. |
void |
addGraph(QueryLanguage language,
String query,
boolean joinBlankNodes)
Adds the contents of the graph specified by the supplied graph query to the repository. |
void |
clear(AdminListener listener)
Clears the repository. |
InputStream |
extractRDF(RDFFormat format,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
Extracts data from the repository and returns it in the requested format. |
String |
getRepositoryId()
retrieves the repository id string for this repository. |
Graph |
performGraphQuery(QueryLanguage language,
String query)
Evaluates a graph query and reports the resulting statements to the specified listener. |
void |
performGraphQuery(QueryLanguage language,
String query,
GraphQueryResultListener listener)
Evaluates a graph query and reports the resulting statements to the specified listener. |
QueryResultsTable |
performTableQuery(QueryLanguage language,
String query)
Evaluates a query and returns the results in a QueryResultsTable. |
void |
performTableQuery(QueryLanguage language,
String query,
TableQueryResultListener listener)
Evaluates a query and reports the results as rows in a table to the supplied listener. |
void |
removeGraph(Graph graph)
Removes the contents of the supplied graph from the repository. |
void |
removeGraph(QueryLanguage language,
String query)
Removes the contents of the graph specified by the supplied graph query from the repository. |
void |
removeStatements(Resource subject,
URI predicate,
Value object,
AdminListener listener)
Removes statements from the repository. |
| Method Detail |
public void performTableQuery(QueryLanguage language,
String query,
TableQueryResultListener listener)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
language - the query language in which the query is
formulated.query - the query.listener - the result listener
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.
MalformedQueryException - If the supplied query is malformed.
QueryEvaluationException - If a problem occurs during
evaluation of the query.
AccessDeniedException - In case the current user does not have
read access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.QueryLanguage
public QueryResultsTable performTableQuery(QueryLanguage language,
String query)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
language - The query language in which the query is formulated.query - The query.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.
MalformedQueryException - If the supplied query is malformed.
QueryEvaluationException - If a problem occurs during
evaluation of the query.
AccessDeniedException - In case the current user does not have
read access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.QueryLanguage
public void performGraphQuery(QueryLanguage language,
String query,
GraphQueryResultListener listener)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
language - The query language in which the query is formulated.
Currently, only SeRQL supports graph queries and
QueryLanguage.SERQL is the only legal value.query - The query.listener - A listener for the query result.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.
MalformedQueryException - If the supplied query is malformed.
QueryEvaluationException - If a problem occurs during
evaluation of the query.
AccessDeniedException - In case the current user does not have
read access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.QueryLanguage
public Graph performGraphQuery(QueryLanguage language,
String query)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
language - The query language in which the query is formulated.
Currently, only SeRQL supports graph queries and
QueryLanguage.SERQL is the only legal value.query - The query.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.
MalformedQueryException - If the supplied query is malformed.
QueryEvaluationException - If a problem occurs during
evaluation of the query.
AccessDeniedException - In case the current user does not have
read access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.QueryLanguage
public void addData(URL dataURL,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
dataURL - the URL of the RDF data.baseURI - the base URI to resolve any relative URIs against.
This defaults to the value of dataURL if the value is set
to null.format - the serialization format of the data (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES).verifyData - if set to 'true', the RDF parser will verify the
data before adding it to the repository.listener - an AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addData(File dataFile,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws FileNotFoundException,
IOException,
AccessDeniedException
dataFile - a file containing RDF data.baseURI - the base URI to resolve any relative URIs against.format - the serialization format of the data (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES).verifyData - if set to 'true', the RDF parser will verify the
data before adding it to the repository.listener - an AdminListener that will receive error- and
progress messages.
FileNotFoundException - In case the file could not be found.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addData(String data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
data - an RDF document.baseURI - the base URI to resolve any relative URIs against.format - the serialization format of the data (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES).verifyData - if set to 'true', the RDF parser will verify the
data before adding it to the repository.listener - an AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addData(SesameRepository repository,
AdminListener listener)
throws IOException,
AccessDeniedException
repository - a SesameRepository.listener - an AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addData(Reader data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
data - a Reader from which RDF data can be read.baseURI - the base URI to resolve any relative URIs against.format - the serialization format of the data (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES).verifyData - if set to 'true', the RDF parser will verify the
data before adding it to the repository.listener - an AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addData(InputStream data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
data - an InputStream from which RDF data can be read.baseURI - the base URI to resolve any relative URIs against.format - the serialization format of the data (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES).verifyData - if set to 'true', the RDF parser will verify the
data before adding it to the repository.listener - an AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void addGraph(Graph graph)
throws IOException,
AccessDeniedException
graph - a Graph containing the RDF statements to be added.
IOException - in case an I/O error occurs.
AccessDeniedException - In case the current user does not have write access on
this repository.
UnsupportedOperationException - If this repository does not support the
specified action.Graph
public void addGraph(Graph graph,
boolean joinBlankNodes)
throws IOException,
AccessDeniedException
graph - a Graph containing the RDF statements to be added.joinBlankNodes - indicates adding behavior. If set to true, blank nodes
in the supplied graph that originate from this repository are reused. If set to false,
new blank nodes are created for each blank node in the supplied graph.
IOException - in case an I/O error occurs.
AccessDeniedException - In case the current user does not have write access on
this repository.
UnsupportedOperationException - If this repository does not support the
specified action.Graph
public void addGraph(QueryLanguage language,
String query)
throws IOException,
AccessDeniedException
language - the query language in which the query is formulated.query - the query. Note that the query must be of a form that has
an RDF graph as its result (e.g. a SeRQL CONSTRUCT query)
IOException - in case an I/O error occurs
AccessDeniedException - in case the current user does not have write access on
this repository.
MalformedQueryException - In case the supplied query is incorrect.
QueryEvaluationException - In case an error occurs during query evaluation.
public void addGraph(QueryLanguage language,
String query,
boolean joinBlankNodes)
throws IOException,
AccessDeniedException
language - the query language in which the query is formulated.query - the query. Note that the query must be of a form that has
an RDF graph as its result (e.g. a SeRQL CONSTRUCT query)joinBlankNodes - indicates adding behavior. If set to true, blank nodes
in the supplied graph that originate from this repository are reused. If set to false,
new blank nodes are created for each blank node in the supplied graph.
IOException - in case an I/O error occurs
AccessDeniedException - in case the current user does not have write access on
this repository.
MalformedQueryException - In case the supplied query is incorrect.
QueryEvaluationException - In case an error occurs during query evaluation.
public void removeGraph(Graph graph)
throws IOException,
AccessDeniedException
graph - a Graph containing RDF statements that are to be removed.
IOException - in case an I/O error occurs.
AccessDeniedException - In case the current user does not have write access on
this repository.
UnsupportedOperationException - If this repository does not support the
specified action.Graph
public void removeGraph(QueryLanguage language,
String query)
throws IOException,
AccessDeniedException
language - the query language in which the query is formulated.query - the query. Note that the query must be of a form that has
an RDF graph as its result (e.g. a SeRQL CONSTRUCT query)
IOException - in case an I/O error occurs
AccessDeniedException - in case the current user does not have write access on
this repository.
public InputStream extractRDF(RDFFormat format,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
throws IOException,
AccessDeniedException
format - The serialization format that should be used (one of
RDFFormat.RDFXML, RDFFormat.NTRIPLES, RDFFormat.N3).ontology - If true, the ontological part of the data will be
extracted.instances - If true, the instances part of the data will be
extracted.explicitOnly - If true, only explicitely added statements will
be extracted, i.e. the inferred statements will be skipped.niceOutput - If true, the server will try its best to make the
data as much readable for humans as possible. Note that this will
cost extra processing time, and it should be set to 'false' if not
necessary.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
read access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.RDFFormat
public void removeStatements(Resource subject,
URI predicate,
Value object,
AdminListener listener)
throws IOException,
AccessDeniedException
subject - The subject of the statements that should be removed, or
null if the subject is allowed to be anything.predicate - The predicate of the statements that should be removed, or
null if the predicate is allowed to be anything.object - The object of the statements that should be removed, or
null if the object is allowed to be anything.listener - An AdminListener that will receive error- and progress
messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.
public void clear(AdminListener listener)
throws IOException,
AccessDeniedException
listener - An AdminListener that will receive error- and
progress messages.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
UnsupportedOperationException - If this repository does not
support the specified action.public String getRepositoryId()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||