org.openrdf.repository.sparql
Class ConnectionBase

java.lang.Object
  extended by org.openrdf.repository.sparql.ConnectionBase
All Implemented Interfaces:
RepositoryConnection
Direct Known Subclasses:
ReadOnlyConnection

public abstract class ConnectionBase
extends Object
implements RepositoryConnection

Rewrites some connection into other connection calls.

Author:
James Leigh

Constructor Summary
ConnectionBase(Repository repository)
           
 
Method Summary
 void close()
           
 void export(RDFHandler handler, Resource... contexts)
           
 String getNamespace(String prefix)
           
 RepositoryResult<Namespace> getNamespaces()
           
 Repository getRepository()
           
 ValueFactory getValueFactory()
           
 boolean hasStatement(Statement st, boolean inf, Resource... contexts)
           
 boolean isEmpty()
           
 boolean isOpen()
           
 BooleanQuery prepareBooleanQuery(QueryLanguage ql, String query)
           
 GraphQuery prepareGraphQuery(QueryLanguage ql, String query)
           
 Query prepareQuery(QueryLanguage ql, String query)
           
 TupleQuery prepareTupleQuery(QueryLanguage ql, String query)
           
 long size(Resource... contexts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.repository.RepositoryConnection
add, add, add, add, add, add, add, add, clear, clearNamespaces, commit, exportStatements, getContextIDs, getStatements, hasStatement, isAutoCommit, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, remove, remove, remove, remove, removeNamespace, rollback, setAutoCommit, setNamespace
 

Constructor Detail

ConnectionBase

public ConnectionBase(Repository repository)
Method Detail

close

public void close()
           throws RepositoryException
Specified by:
close in interface RepositoryConnection
Throws:
RepositoryException

export

public void export(RDFHandler handler,
                   Resource... contexts)
            throws RepositoryException,
                   RDFHandlerException
Specified by:
export in interface RepositoryConnection
Throws:
RepositoryException
RDFHandlerException

getNamespace

public String getNamespace(String prefix)
                    throws RepositoryException
Specified by:
getNamespace in interface RepositoryConnection
Throws:
RepositoryException

getNamespaces

public RepositoryResult<Namespace> getNamespaces()
                                          throws RepositoryException
Specified by:
getNamespaces in interface RepositoryConnection
Throws:
RepositoryException

getRepository

public Repository getRepository()
Specified by:
getRepository in interface RepositoryConnection

getValueFactory

public ValueFactory getValueFactory()
Specified by:
getValueFactory in interface RepositoryConnection

hasStatement

public boolean hasStatement(Statement st,
                            boolean inf,
                            Resource... contexts)
                     throws RepositoryException
Specified by:
hasStatement in interface RepositoryConnection
Throws:
RepositoryException

isEmpty

public boolean isEmpty()
                throws RepositoryException
Specified by:
isEmpty in interface RepositoryConnection
Throws:
RepositoryException

isOpen

public boolean isOpen()
               throws RepositoryException
Specified by:
isOpen in interface RepositoryConnection
Throws:
RepositoryException

prepareBooleanQuery

public BooleanQuery prepareBooleanQuery(QueryLanguage ql,
                                        String query)
                                 throws RepositoryException,
                                        MalformedQueryException
Specified by:
prepareBooleanQuery in interface RepositoryConnection
Throws:
RepositoryException
MalformedQueryException

prepareGraphQuery

public GraphQuery prepareGraphQuery(QueryLanguage ql,
                                    String query)
                             throws RepositoryException,
                                    MalformedQueryException
Specified by:
prepareGraphQuery in interface RepositoryConnection
Throws:
RepositoryException
MalformedQueryException

prepareQuery

public Query prepareQuery(QueryLanguage ql,
                          String query)
                   throws RepositoryException,
                          MalformedQueryException
Specified by:
prepareQuery in interface RepositoryConnection
Throws:
RepositoryException
MalformedQueryException

prepareTupleQuery

public TupleQuery prepareTupleQuery(QueryLanguage ql,
                                    String query)
                             throws RepositoryException,
                                    MalformedQueryException
Specified by:
prepareTupleQuery in interface RepositoryConnection
Throws:
RepositoryException
MalformedQueryException

size

public long size(Resource... contexts)
          throws RepositoryException
Specified by:
size in interface RepositoryConnection
Throws:
RepositoryException


Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.