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

Nested Class Summary
static class ObjectRepository.CompileTrigger
           
 
Constructor Summary
ObjectRepository(RoleMapper mapper, LiteralManager literals, ClassLoader cl)
           
 
Method Summary
 void addSchemaDataset(URI graphURI)
           
 boolean addSchemaListener(Runnable action)
           
protected  void closed(ObjectConnection con)
           
protected  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()
           
 Set<URI> getSchemaDataset()
           
 ValueFactory getURIFactory()
           
 void init(File dataDir)
          Called by ObjectRepositoryFactory when the delegate repository has already been initialized.
 void initialize()
           
 boolean isCompileRepository()
           
 void removeSchemaDataset(URI graphURI)
           
 boolean removeSchemaListener(Runnable action)
           
 void resetSchemaDataset()
           
 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.
 
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, shutDown, 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)

getSchemaDataset

public Set<URI> getSchemaDataset()

addSchemaDataset

public void addSchemaDataset(URI graphURI)
                      throws RepositoryException
Throws:
RepositoryException

removeSchemaDataset

public void removeSchemaDataset(URI graphURI)
                         throws RepositoryException
Throws:
RepositoryException

resetSchemaDataset

public void resetSchemaDataset()
                        throws RepositoryException
Throws:
RepositoryException

addSchemaListener

public boolean addSchemaListener(Runnable action)

removeSchemaListener

public boolean removeSchemaListener(Runnable action)

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)
                          throws ObjectStoreConfigException,
                                 RepositoryException,
                                 AssertionError
Throws:
ObjectStoreConfigException
RepositoryException
AssertionError

init

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

Throws:
RepositoryException
ObjectStoreConfigException

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

compileAfter

protected void compileAfter(ObjectConnection con)

closed

protected void closed(ObjectConnection con)
               throws RepositoryException
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-2011 James Leigh Services Inc.. All Rights Reserved.