|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openrdf.sesame.repository.local.LocalRepository
Entry point for access to a local Sesame repository. Create this object using a LocalService.
LocalService| 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 dataStream,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
Adds RDF data from an InputStream to the repository. |
void |
addData(Reader reader,
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 |
addListener(LocalRepositoryChangedListener listener)
|
void |
clear(AdminListener listener)
Clears the repository. |
void |
extractRDF(RdfDocumentWriter rdfDocWriter,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
Extracts data from the repository and reports the triples to the supplied RdfDocumentWriter. |
InputStream |
extractRDF(RDFFormat format,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
Extracts data from the repository and returns it in the requested format. |
Graph |
getGraph()
Creates a Graph representation of this repository. |
String |
getRepositoryId()
retrieves the repository id string for this repository. |
Sail |
getSail()
Gets the SAIL object of this repository. |
boolean |
hasReadAccess()
Checks whether the current user has read access to this repository. |
boolean |
hasWriteAccess()
Checks whether the current user has write access to this repository. |
void |
mergeGraph(Graph graph)
|
void |
mergeGraph(QueryLanguage language,
String query)
|
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 |
removeListener(LocalRepositoryChangedListener listener)
|
void |
removeStatements(Resource subject,
URI predicate,
Value object,
AdminListener listener)
Removes statements from the repository. |
void |
sailChanged(SailChangedEvent event)
|
void |
shutDown()
Shuts down the repository. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public boolean hasReadAccess()
public boolean hasWriteAccess()
public QueryResultsTable performTableQuery(QueryLanguage language,
String query)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
SesameRepository
performTableQuery in interface SesameRepositorylanguage - The query language in which the query is formulated.query - The query.
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.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.QueryLanguage
public void performTableQuery(QueryLanguage language,
String query,
TableQueryResultListener listener)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
SesameRepository
performTableQuery in interface SesameRepositorylanguage - the query language in which the query is
formulated.query - the query.listener - the result listener
AccessDeniedException - In case the current user does not have
read access on this repository.
QueryEvaluationException - If a problem occurs during
evaluation of the query.
MalformedQueryException - If the supplied query is malformed.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.QueryLanguage
public void performGraphQuery(QueryLanguage language,
String query,
GraphQueryResultListener listener)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
SesameRepository
performGraphQuery in interface SesameRepositorylanguage - 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.
QueryEvaluationException - If a problem occurs during
evaluation of 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.
AccessDeniedException - In case the current user does not have
read access on this repository.QueryLanguage
public Graph performGraphQuery(QueryLanguage language,
String query)
throws IOException,
MalformedQueryException,
QueryEvaluationException,
AccessDeniedException
SesameRepository
performGraphQuery in interface SesameRepositorylanguage - 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.
MalformedQueryException - If the supplied query is malformed.
IOException - In case an I/O error occurs while sending the
query to, or retrieving the result from a Sesame server.
AccessDeniedException - In case the current user does not have
read access on this repository.
QueryEvaluationException - If a problem occurs during
evaluation of the query.QueryLanguage
public void addData(URL dataURL,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositorydataURL - 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.
AccessDeniedException - In case the current user does not have
write access on this repository.
IOException - In case an I/O error occurs.RDFFormat
public void addData(File dataFile,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws FileNotFoundException,
IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositorydataFile - 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.
IOException - In case an I/O error occurs.
AccessDeniedException - In case the current user does not have
write access on this repository.
FileNotFoundException - In case the file could not be found.RDFFormat
public void addData(String data,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositorydata - 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.RDFFormat
public void addData(SesameRepository repository,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositoryrepository - 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.RDFFormat
public void addData(Reader reader,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositoryreader - 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.RDFFormat
public void addData(InputStream dataStream,
String baseURI,
RDFFormat format,
boolean verifyData,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
addData in interface SesameRepositorydataStream - 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.RDFFormat
public InputStream extractRDF(RDFFormat format,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
throws IOException,
AccessDeniedException
SesameRepository
extractRDF in interface SesameRepositoryformat - 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.RDFFormat
public void extractRDF(RdfDocumentWriter rdfDocWriter,
boolean ontology,
boolean instances,
boolean explicitOnly,
boolean niceOutput)
throws IOException,
AccessDeniedException
rdfDocWriter - The RdfDocumentWriter to report the triples to.ontology - If true the ontological statements will be extracted.instances - If true the instance (non-schema) statements will be extracted.explicitOnly - If true, only the explicitly added statements will be extracted.niceOutput - If true, the extracted statements will be sorted by their subject.
IOException
AccessDeniedException
public void removeStatements(Resource subject,
URI predicate,
Value object,
AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
removeStatements in interface SesameRepositorysubject - 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.
public void clear(AdminListener listener)
throws IOException,
AccessDeniedException
SesameRepository
clear in interface SesameRepositorylistener - An AdminListener that will receive error- and
progress messages.
AccessDeniedException - In case the current user does not have
write access on this repository.
IOException - In case an I/O error occurs.public Sail getSail()
public void shutDown()
public void mergeGraph(Graph graph)
throws IOException,
AccessDeniedException
IOException
AccessDeniedException
public void mergeGraph(QueryLanguage language,
String query)
throws IOException,
AccessDeniedException
IOException
AccessDeniedException
public void addGraph(Graph graph)
throws IOException,
AccessDeniedException
SesameRepository
addGraph in interface SesameRepositorygraph - 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.Graph
public void addGraph(Graph graph,
boolean joinBlankNodes)
throws IOException,
AccessDeniedException
SesameRepository
addGraph in interface SesameRepositorygraph - 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.
AccessDeniedException - In case the current user does not have write access on
this repository.
IOException - in case an I/O error occurs.Graph
public void removeGraph(Graph graph)
throws IOException,
AccessDeniedException
SesameRepository
removeGraph in interface SesameRepositorygraph - 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.Graph
public Graph getGraph()
throws AccessDeniedException
AccessDeniedException - In case one does not have both read and
write access on this repository.
public void addGraph(QueryLanguage language,
String query)
throws IOException,
AccessDeniedException
SesameRepository
addGraph in interface SesameRepositorylanguage - 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 void addGraph(QueryLanguage language,
String query,
boolean joinBlankNodes)
throws IOException,
AccessDeniedException
SesameRepository
addGraph in interface SesameRepositorylanguage - 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.
AccessDeniedException - in case the current user does not have write access on
this repository.
IOException - in case an I/O error occurs
public void removeGraph(QueryLanguage language,
String query)
throws IOException,
AccessDeniedException
SesameRepository
removeGraph in interface SesameRepositorylanguage - 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)
AccessDeniedException - in case the current user does not have write access on
this repository.
IOException - in case an I/O error occurspublic String getRepositoryId()
SesameRepository
getRepositoryId in interface SesameRepositorypublic void addListener(LocalRepositoryChangedListener listener)
public void removeListener(LocalRepositoryChangedListener listener)
public void sailChanged(SailChangedEvent event)
sailChanged in interface SailChangedListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||