org.openrdf.elmo
Class ElmoModule

java.lang.Object
  extended by org.openrdf.elmo.ElmoModule

public class ElmoModule
extends Object

Defines the Scope of an ElmoManager and its factory. This includes roles, literals, factories, datasets, and contexts.

Author:
James Leigh

Nested Class Summary
static class ElmoModule.Association
           
 
Constructor Summary
ElmoModule()
           
ElmoModule(ClassLoader cl)
           
 
Method Summary
 ElmoModule addBehaviour(Class<?> behaviour)
          Associates this behaviour with its default subject type.
 ElmoModule addBehaviour(Class<?> behaviour, String type)
          Associates this behaviour with the given subject type.
 ElmoModule addConcept(Class<?> concept)
          Associates this concept with its default subject type.
 ElmoModule addConcept(Class<?> concept, String type)
          Associates this concept with the given subject type.
 ElmoModule addDataset(URL dataset)
          Marks this dataset to be loaded into the repository under a context of the same URL.
 ElmoModule addDataset(URL dataset, String context)
          Marks this dataset to be loaded and replace any data in the given context.
 ElmoModule addDatatype(Class<?> type, String uri)
          Associates this datatype with the given uri within this factory.
 ElmoModule addFactory(Class<?> factory)
          Associates this factory with its default subject type.
 ElmoModule addFactory(Class<?> factory, String type)
          Associates this factory with the given subject type.
 ElmoModule addJarFileUrl(URL jarFile)
           
 ElmoModule addLiteral(Class<?> type, String uri)
          Deprecated. 
 ElmoModule addResources(String path)
          Load a resource listing datasets - optionally assigned to a context
 ElmoModule addRole(Class<?> role)
          Deprecated. 
 ElmoModule addRole(Class<?> role, String type)
          Deprecated. 
 boolean equals(Object obj)
           
 List<ElmoModule.Association> getBehaviours()
           
 ClassLoader getClassLoader()
           
 List<ElmoModule.Association> getConcepts()
           
 Map<URL,String> getDatasets()
           
 List<ElmoModule.Association> getDatatypes()
           
 List<ElmoModule.Association> getFactories()
           
 QName getGraph()
           
 Set<QName> getIncludedGraphs()
           
 List<URL> getJarFileUrls()
           
 List<String> getResources()
           
 int hashCode()
           
 ElmoModule includeModule(ElmoModule module)
          Include all the information from the given module in this module.
 ElmoModule setContext(QName graph)
          Deprecated. 
 ElmoModule setGraph(QName graph)
          Sets the primary graph of this module.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElmoModule

public ElmoModule()

ElmoModule

public ElmoModule(ClassLoader cl)
Method Detail

getClassLoader

public ClassLoader getClassLoader()

getGraph

public QName getGraph()

setGraph

public ElmoModule setGraph(QName graph)
Sets the primary graph of this module. This limits the readable scope to this and other included graphs and causes any add operations to be added to this graph.

Parameters:
graph -
Returns:
this

setContext

@Deprecated
public ElmoModule setContext(QName graph)
Deprecated. 


includeModule

public ElmoModule includeModule(ElmoModule module)
Include all the information from the given module in this module.

Parameters:
module - to be included
Returns:
this

getIncludedGraphs

public Set<QName> getIncludedGraphs()

getDatatypes

public List<ElmoModule.Association> getDatatypes()

addDatatype

public ElmoModule addDatatype(Class<?> type,
                              String uri)
Associates this datatype with the given uri within this factory.

Parameters:
type - serializable class
datatype - URI

addLiteral

@Deprecated
public ElmoModule addLiteral(Class<?> type,
                                        String uri)
Deprecated. 


addRole

@Deprecated
public ElmoModule addRole(Class<?> role)
Deprecated. 

Associates this role with its default subject type.

Parameters:
role - concept or behaviour

addRole

@Deprecated
public ElmoModule addRole(Class<?> role,
                                     String type)
Deprecated. 

Associates this role with the given subject type.

Parameters:
role - concept or behaviour
type - URI

getConcepts

public List<ElmoModule.Association> getConcepts()

addConcept

public ElmoModule addConcept(Class<?> concept)
Associates this concept with its default subject type.

Parameters:
concept - interface or class

addConcept

public ElmoModule addConcept(Class<?> concept,
                             String type)
Associates this concept with the given subject type.

Parameters:
concept - interface or class
type - URI

getBehaviours

public List<ElmoModule.Association> getBehaviours()

addBehaviour

public ElmoModule addBehaviour(Class<?> behaviour)
Associates this behaviour with its default subject type.

Parameters:
behaviour - class

addBehaviour

public ElmoModule addBehaviour(Class<?> behaviour,
                               String type)
Associates this behaviour with the given subject type.

Parameters:
behaviour - class
type - URI

getFactories

public List<ElmoModule.Association> getFactories()

addFactory

public ElmoModule addFactory(Class<?> factory)
Associates this factory with its default subject type.

Parameters:
factory - class

addFactory

public ElmoModule addFactory(Class<?> factory,
                             String type)
Associates this factory with the given subject type.

Parameters:
factory - class
type - URI

getDatasets

public Map<URL,String> getDatasets()

addDataset

public ElmoModule addDataset(URL dataset)
Marks this dataset to be loaded into the repository under a context of the same URL.

Parameters:
dataset -
Returns:
this

addDataset

public ElmoModule addDataset(URL dataset,
                             String context)
Marks this dataset to be loaded and replace any data in the given context.

Parameters:
dataset -
context -
Returns:
this

getResources

public List<String> getResources()

addResources

public ElmoModule addResources(String path)
Load a resource listing datasets - optionally assigned to a context

Parameters:
path -
Returns:

getJarFileUrls

public List<URL> getJarFileUrls()

addJarFileUrl

public ElmoModule addJarFileUrl(URL jarFile)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2008 Aduna. All Rights Reserved.