org.openrdf.repository.object
Class ObjectRepository

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

public class ObjectRepository
extends ContextAwareRepository

Creates the ObjectConnection used to interact with the repository. Use ObjectRepositoryFactory to create this.

Author:
James Leigh

Constructor Summary
ObjectRepository(RoleMapper mapper, LiteralManager literals, ClassLoader cl)
           
 
Method Summary
 void closed(ObjectConnection con)
           
 void compileAfter(ObjectConnection con)
           
protected  ClassFactory createClassFactory(File composed, ClassLoader cl)
           
protected  ClassResolver createClassResolver(ClassFactory definer, RoleMapper mapper, PropertyMapper pm)
           
protected  ObjectFactory createObjectFactory(RoleMapper mapper, PropertyMapper pm, LiteralManager literalManager, ClassResolver resolver, ClassLoader cl)
           
protected  PropertyMapper createPropertyMapper(ClassLoader cl)
           
protected  TypeManager createTypeManager()
           
 ObjectConnection getConnection()
          Creates a new ObjectConnection that will need to be closed by the caller.
 ValueFactory getLiteralFactory()
           
 ValueFactory getURIFactory()
           
 void init(File dataDir)
          Called by ObjectRepositoryFactory when the delegate repository has already been initialized.
 void initialize()
           
 boolean isCompileRepository()
           
 void setBehaviourClassPath(URL[] cp)
          Additional classpath that should be included after the model is compiled.
 void setCompileRepository(boolean compileRepository)
           
 void setFollowImports(boolean followImports)
           
 void setMemberPrefix(String prefix)
          Assigns the member prefix to use when compiling classes.
 void setOWLImports(List<URL> imports)
           
 void setPackagePrefix(String prefix)
          Assigns a name prefix prepended to the beginning of all compiled packages.
 void shutDown()
           
 
Methods inherited from class org.openrdf.repository.contextaware.ContextAwareRepository
getAddContexts, getArchiveContexts, getMaxQueryTime, getQueryLanguage, getReadContexts, getRemoveContexts, isIncludeInferred, setAddContexts, setArchiveContexts, setIncludeInferred, setMaxQueryTime, setQueryLanguage, setReadContexts, setRemoveContexts
 
Methods inherited from class org.openrdf.repository.base.RepositoryWrapper
getDataDir, getDelegate, getValueFactory, isWritable, setDataDir, setDelegate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectRepository

public ObjectRepository(RoleMapper mapper,
                        LiteralManager literals,
                        ClassLoader cl)
Method Detail

setPackagePrefix

public void setPackagePrefix(String prefix)
Assigns a name prefix prepended to the beginning of all compiled packages.

Parameters:
prefix - such as "compiled."

setMemberPrefix

public void setMemberPrefix(String prefix)
Assigns the member prefix to use when compiling classes.


setBehaviourClassPath

public void setBehaviourClassPath(URL[] cp)
Additional classpath that should be included after the model is compiled.


setFollowImports

public void setFollowImports(boolean followImports)

setOWLImports

public void setOWLImports(List<URL> imports)

initialize

public void initialize()
                throws RepositoryException
Specified by:
initialize in interface Repository
Overrides:
initialize in class RepositoryWrapper
Throws:
RepositoryException

getURIFactory

public ValueFactory getURIFactory()

getLiteralFactory

public ValueFactory getLiteralFactory()

isCompileRepository

public boolean isCompileRepository()

setCompileRepository

public void setCompileRepository(boolean compileRepository)

compileAfter

public void compileAfter(ObjectConnection con)

closed

public void closed(ObjectConnection con)
            throws RepositoryException
Throws:
RepositoryException

init

public void init(File dataDir)
          throws RepositoryException,
                 ObjectStoreConfigException
Called by ObjectRepositoryFactory when the delegate repository has already been initialized.

Throws:
RepositoryException
ObjectStoreConfigException

shutDown

public void shutDown()
              throws RepositoryException
Specified by:
shutDown in interface Repository
Overrides:
shutDown in class RepositoryWrapper
Throws:
RepositoryException

getConnection

public ObjectConnection getConnection()
                               throws RepositoryException
Creates a new ObjectConnection that will need to be closed by the caller.

Specified by:
getConnection in interface Repository
Overrides:
getConnection in class ContextAwareRepository
Throws:
RepositoryException

createTypeManager

protected TypeManager createTypeManager()

createObjectFactory

protected ObjectFactory createObjectFactory(RoleMapper mapper,
                                            PropertyMapper pm,
                                            LiteralManager literalManager,
                                            ClassResolver resolver,
                                            ClassLoader cl)

createClassResolver

protected ClassResolver createClassResolver(ClassFactory definer,
                                            RoleMapper mapper,
                                            PropertyMapper pm)

createPropertyMapper

protected PropertyMapper createPropertyMapper(ClassLoader cl)

createClassFactory

protected ClassFactory createClassFactory(File composed,
                                          ClassLoader cl)


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