org.openrdf.repository.contextaware
Class ContextAwareRepository

java.lang.Object
  extended by org.openrdf.repository.base.RepositoryWrapper
      extended by org.openrdf.repository.contextaware.ContextAwareRepository
All Implemented Interfaces:
DelegatingRepository, Repository

public class ContextAwareRepository
extends RepositoryWrapper

Allows contexts to be specified at the repository level.

Author:
James Leigh

Constructor Summary
ContextAwareRepository()
           
ContextAwareRepository(Repository delegate)
           
 
Method Summary
 URI[] getAddContexts()
           
 URI[] getArchiveContexts()
           
 ContextAwareConnection getConnection()
          Opens a connection to this repository that can be used for querying and updating the contents of the repository.
 int getMaxQueryTime()
           
 QueryLanguage getQueryLanguage()
           
 URI[] getReadContexts()
           
 URI[] getRemoveContexts()
           
 boolean isIncludeInferred()
           
 void setAddContexts(URI... addContexts)
           
 void setArchiveContexts(URI... archiveContexts)
           
 void setIncludeInferred(boolean includeInferred)
           
 void setMaxQueryTime(int maxQueryTime)
           
 void setQueryLanguage(QueryLanguage ql)
           
 void setReadContexts(URI... readContexts)
           
 void setRemoveContexts(URI... removeContexts)
           
 
Methods inherited from class org.openrdf.repository.base.RepositoryWrapper
getDataDir, getDelegate, getValueFactory, initialize, isWritable, setDataDir, setDelegate, shutDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContextAwareRepository

public ContextAwareRepository()

ContextAwareRepository

public ContextAwareRepository(Repository delegate)
Method Detail

getMaxQueryTime

public int getMaxQueryTime()

setMaxQueryTime

public void setMaxQueryTime(int maxQueryTime)

getAddContexts

public URI[] getAddContexts()
See Also:
ContextAwareConnection.getAddContexts()

getArchiveContexts

public URI[] getArchiveContexts()
See Also:
ContextAwareConnection.getArchiveContexts()

getQueryLanguage

public QueryLanguage getQueryLanguage()
See Also:
ContextAwareConnection.getQueryLanguage()

getReadContexts

public URI[] getReadContexts()
See Also:
ContextAwareConnection.getReadContexts()

getRemoveContexts

public URI[] getRemoveContexts()
See Also:
ContextAwareConnection.getRemoveContexts()

isIncludeInferred

public boolean isIncludeInferred()
See Also:
ContextAwareConnection.isIncludeInferred()

setAddContexts

public void setAddContexts(URI... addContexts)
See Also:
ContextAwareConnection.setAddContexts(URI[])

setArchiveContexts

public void setArchiveContexts(URI... archiveContexts)
See Also:
ContextAwareConnection.setArchiveContexts(URI[])

setIncludeInferred

public void setIncludeInferred(boolean includeInferred)
See Also:
ContextAwareConnection.setIncludeInferred(boolean)

setQueryLanguage

public void setQueryLanguage(QueryLanguage ql)
See Also:
ContextAwareConnection.setQueryLanguage(QueryLanguage)

setReadContexts

public void setReadContexts(URI... readContexts)
See Also:
ContextAwareConnection.setReadContexts(URI[])

setRemoveContexts

public void setRemoveContexts(URI... removeContexts)
See Also:
ContextAwareConnection.setRemoveContexts(URI[])

getConnection

public ContextAwareConnection getConnection()
                                     throws RepositoryException
Description copied from interface: Repository
Opens a connection to this repository that can be used for querying and updating the contents of the repository. Created connections need to be closed to make sure that any resources they keep hold of are released. The best way to do this is to use a try-finally-block as follows:
 Connection con = repository.getConnection();
 try {
        // perform operations on the connection
 }
 finally {
        con.close();
 }
 

Specified by:
getConnection in interface Repository
Overrides:
getConnection in class RepositoryWrapper
Returns:
A connection that allows operations on this repository.
Throws:
RepositoryException - If something went wrong during the creation of the Connection.


Copyright © 2001-2010 Aduna. All Rights Reserved.