public class SPARQLConnection extends RepositoryConnectionBase
RepositoryConnection interface to any SPARQL endpoint.logger| Constructor and Description |
|---|
SPARQLConnection(SPARQLRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(File file,
String baseURI,
RDFFormat dataFormat,
Resource... contexts) |
void |
add(InputStream in,
String baseURI,
RDFFormat dataFormat,
Resource... contexts) |
void |
add(Iterable<? extends Statement> statements,
Resource... contexts) |
void |
add(Reader reader,
String baseURI,
RDFFormat dataFormat,
Resource... contexts) |
void |
add(Statement st,
Resource... contexts) |
void |
add(URL url,
String baseURI,
RDFFormat dataFormat,
Resource... contexts) |
protected void |
addWithoutCommit(Resource subject,
URI predicate,
Value object,
Resource... contexts) |
void |
begin() |
void |
clear(Resource... contexts) |
void |
clearNamespaces() |
void |
commit() |
void |
exportStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts) |
RepositoryResult<Resource> |
getContextIDs() |
String |
getNamespace(String prefix) |
RepositoryResult<Namespace> |
getNamespaces() |
SPARQLRepository |
getRepository() |
RepositoryResult<Statement> |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts) |
boolean |
hasStatement(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts) |
boolean |
isActive() |
BooleanQuery |
prepareBooleanQuery(QueryLanguage ql,
String query,
String base) |
GraphQuery |
prepareGraphQuery(QueryLanguage ql,
String query,
String base) |
Query |
prepareQuery(QueryLanguage ql,
String query,
String base) |
TupleQuery |
prepareTupleQuery(QueryLanguage ql,
String query,
String base) |
Update |
prepareUpdate(QueryLanguage ql,
String update,
String baseURI) |
void |
remove(Iterable<? extends Statement> statements,
Resource... contexts) |
void |
remove(Statement st,
Resource... contexts) |
void |
removeNamespace(String prefix) |
protected void |
removeWithoutCommit(Resource subject,
URI predicate,
Value object,
Resource... contexts) |
void |
rollback() |
void |
setNamespace(String prefix,
String name) |
long |
size(Resource... contexts) |
String |
toString() |
add, add, addWithoutCommit, close, conditionalCommit, conditionalRollback, export, getParserConfig, getValueFactory, hasStatement, isAutoCommit, isEmpty, isOpen, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, prepareUpdate, remove, remove, removeWithoutCommit, setAutoCommit, setParserConfig, startLocalTransactionpublic SPARQLConnection(SPARQLRepository repository)
public void exportStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException
public RepositoryResult<Resource> getContextIDs() throws RepositoryException
RepositoryExceptionpublic String getNamespace(String prefix) throws RepositoryException
RepositoryExceptionpublic RepositoryResult<Namespace> getNamespaces() throws RepositoryException
RepositoryExceptionpublic long size(Resource... contexts) throws RepositoryException
RepositoryExceptionpublic RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws RepositoryException
RepositoryExceptionpublic boolean hasStatement(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws RepositoryException
hasStatement in interface RepositoryConnectionhasStatement in class RepositoryConnectionBaseRepositoryExceptionpublic SPARQLRepository getRepository()
getRepository in interface RepositoryConnectiongetRepository in class RepositoryConnectionBasepublic Query prepareQuery(QueryLanguage ql, String query, String base) throws RepositoryException, MalformedQueryException
public BooleanQuery prepareBooleanQuery(QueryLanguage ql, String query, String base) throws RepositoryException, MalformedQueryException
public GraphQuery prepareGraphQuery(QueryLanguage ql, String query, String base) throws RepositoryException, MalformedQueryException
public TupleQuery prepareTupleQuery(QueryLanguage ql, String query, String base) throws RepositoryException, MalformedQueryException
public void commit()
throws RepositoryException
RepositoryExceptionpublic void rollback()
throws RepositoryException
RepositoryExceptionpublic void begin()
throws RepositoryException
RepositoryExceptionpublic void add(File file, String baseURI, RDFFormat dataFormat, Resource... contexts) throws IOException, RDFParseException, RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseIOExceptionRDFParseExceptionRepositoryExceptionpublic void add(URL url, String baseURI, RDFFormat dataFormat, Resource... contexts) throws IOException, RDFParseException, RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseIOExceptionRDFParseExceptionRepositoryExceptionpublic void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts) throws IOException, RDFParseException, RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseIOExceptionRDFParseExceptionRepositoryExceptionpublic void add(Reader reader, String baseURI, RDFFormat dataFormat, Resource... contexts) throws IOException, RDFParseException, RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseIOExceptionRDFParseExceptionRepositoryExceptionpublic void add(Statement st, Resource... contexts) throws RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseRepositoryExceptionpublic void add(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException
add in interface RepositoryConnectionadd in class RepositoryConnectionBaseRepositoryExceptionpublic void clear(Resource... contexts) throws RepositoryException
clear in interface RepositoryConnectionclear in class RepositoryConnectionBaseRepositoryExceptionpublic void clearNamespaces()
throws RepositoryException
RepositoryExceptionpublic void remove(Statement st, Resource... contexts) throws RepositoryException
remove in interface RepositoryConnectionremove in class RepositoryConnectionBaseRepositoryExceptionpublic void remove(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException
remove in interface RepositoryConnectionremove in class RepositoryConnectionBaseRepositoryExceptionpublic void removeNamespace(String prefix) throws RepositoryException
RepositoryExceptionpublic void setNamespace(String prefix, String name) throws RepositoryException
RepositoryExceptionpublic Update prepareUpdate(QueryLanguage ql, String update, String baseURI) throws RepositoryException, MalformedQueryException
public boolean isActive()
throws UnknownTransactionStateException,
RepositoryException
protected void addWithoutCommit(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException
addWithoutCommit in class RepositoryConnectionBaseRepositoryExceptionprotected void removeWithoutCommit(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException
removeWithoutCommit in class RepositoryConnectionBaseRepositoryExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.