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
protected  ClassFactory createClassFactory(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()
           
 File getBehaviourJar()
          The jar location of the compiled behaviours, if any.
 File getConceptJar()
          The jar location of the compiled concepts, if any.
 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()
           
 void setBehaviourClassPath(URL[] cp)
          Additional classpath that should be included after the model is compiled.
 void setMemberPrefix(String prefix)
          Assigns the member prefix to use when compiling classes.
 void setPackagePrefix(String prefix)
          Assigns a name prefix prepended to the beginning of all compiled packages.
 void setSchema(Model schema)
          The RDFS/OWL model that should be compiled when initialised.
 void setSchemaNamespaces(Map<URI,Map<String,String>> map)
          graph -> prefix -> namespace
 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.


setSchemaNamespaces

public void setSchemaNamespaces(Map<URI,Map<String,String>> map)
graph -> prefix -> namespace


setSchema

public void setSchema(Model schema)
The RDFS/OWL model that should be compiled when initialised.


setBehaviourClassPath

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


initialize

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

getConceptJar

public File getConceptJar()
The jar location of the compiled concepts, if any.


getBehaviourJar

public File getBehaviourJar()
The jar location of the compiled behaviours, if any.


getURIFactory

public ValueFactory getURIFactory()

getLiteralFactory

public ValueFactory getLiteralFactory()

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(ClassLoader cl)


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