org.drools.smf
Class SimpleSemanticsRepository

java.lang.Object
  |
  +--org.drools.smf.SimpleSemanticsRepository
All Implemented Interfaces:
SemanticsRepository

public class SimpleSemanticsRepository
extends java.lang.Object
implements SemanticsRepository

Simple in-memory repository of semantic modules.

Author:
bob mcwhirter

Constructor Summary
SimpleSemanticsRepository()
          Construct an empty repository.
 
Method Summary
 SemanticModule[] getSemanticModules()
          Retieve all SemanticModules.
 SemanticModule lookupSemanticModule(java.lang.String uri)
          Lookup a SemanticModule by URI.
 void registerSemanticModule(SemanticModule module)
          Register a SemanticModule with a URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSemanticsRepository

public SimpleSemanticsRepository()
Construct an empty repository.

Method Detail

registerSemanticModule

public void registerSemanticModule(SemanticModule module)
Register a SemanticModule with a URI.

Parameters:
module - The SemanticModule.

lookupSemanticModule

public SemanticModule lookupSemanticModule(java.lang.String uri)
                                    throws NoSuchSemanticModuleException
Description copied from interface: SemanticsRepository
Lookup a SemanticModule by URI.

Specified by:
lookupSemanticModule in interface SemanticsRepository
Parameters:
uri - The URI.
Returns:
The bound SemanticModule.
Throws:
NoSuchSemanticModuleException - If no module is bound to the URI.
See Also:
SemanticsRepository

getSemanticModules

public SemanticModule[] getSemanticModules()
Description copied from interface: SemanticsRepository
Retieve all SemanticModules.

Specified by:
getSemanticModules in interface SemanticsRepository
Returns:
All semantic modules.
See Also:
SemanticsRepository