org.drools.smf
Class SimpleSemanticModule

java.lang.Object
  extended byorg.drools.smf.SimpleSemanticModule
All Implemented Interfaces:
SemanticModule

public class SimpleSemanticModule
extends Object
implements SemanticModule

Simple implementation of a Semantic Module.

Author:
bob mcwhirter
See Also:
org.drools.spi

Field Summary
 
Fields inherited from interface org.drools.smf.SemanticModule
EMPTY_ARRAY
 
Constructor Summary
SimpleSemanticModule(String uri)
          Construct with a URI.
 
Method Summary
 void addApplicationDataFactory(String name, ApplicationDataFactory factory)
           
 void addConditionFactory(String name, ConditionFactory factory)
          Add a semantic ConditionFactory.
 void addConsequenceFactory(String name, ConsequenceFactory factory)
          Add a semantic ConsequenceFactory.
 void addDurationFactory(String name, DurationFactory factory)
           
 void addImportEntryFactory(String name, ImportEntryFactory factory)
           
 void addObjectTypeFactory(String name, ObjectTypeFactory factory)
          Add a semantic ObjectTypeFactory.
 void addRuleFactory(String name, RuleFactory factory)
           
 ApplicationDataFactory getApplicationDataFactory(String name)
           
 Set getApplicationDataFactoryNames()
           
 ConditionFactory getConditionFactory(String name)
          Retrieve a semantic condition by name.
 Set getConditionFactoryNames()
          Retrieve the set of all condition names.
 ConsequenceFactory getConsequenceFactory(String name)
          Retrieve a semantic consequence by name.
 Set getConsequenceFactoryNames()
          Retrieve the set of all consequence names.
 DurationFactory getDurationFactory(String name)
           
 Set getDurationFactoryNames()
           
 ImportEntryFactory getImportEntryFactory(String name)
           
 Set getImportEntryFactoryNames()
           
 ObjectTypeFactory getObjectTypeFactory(String name)
          Retrieve a semantic object type by name.
 Set getObjectTypeFactoryNames()
          Retrieve the set of all object type names.
 RuleFactory getRuleFactory(String name)
           
 Set getRuleFactoryNames()
           
 String getUri()
          Retrieve the URI that identifies this semantic module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSemanticModule

public SimpleSemanticModule(String uri)
Construct with a URI.

Parameters:
uri - The URI the identifies this semantic module.
Method Detail

getUri

public String getUri()
Description copied from interface: SemanticModule
Retrieve the URI that identifies this semantic module.

Specified by:
getUri in interface SemanticModule
Returns:
The URI.
See Also:
SemanticModule

addRuleFactory

public void addRuleFactory(String name,
                           RuleFactory factory)

getRuleFactory

public RuleFactory getRuleFactory(String name)
Specified by:
getRuleFactory in interface SemanticModule
See Also:
SemanticModule

getRuleFactoryNames

public Set getRuleFactoryNames()
Specified by:
getRuleFactoryNames in interface SemanticModule

addObjectTypeFactory

public void addObjectTypeFactory(String name,
                                 ObjectTypeFactory factory)
Add a semantic ObjectTypeFactory.

Parameters:
name - The object type name.
factory - The object type factory.

getObjectTypeFactory

public ObjectTypeFactory getObjectTypeFactory(String name)
Description copied from interface: SemanticModule
Retrieve a semantic object type by name.

Specified by:
getObjectTypeFactory in interface SemanticModule
Parameters:
name - the name.
Returns:
The object type implementation or null if none is bound to the name.
See Also:
SemanticModule

getObjectTypeFactoryNames

public Set getObjectTypeFactoryNames()
Description copied from interface: SemanticModule
Retrieve the set of all object type names.

Specified by:
getObjectTypeFactoryNames in interface SemanticModule
Returns:
The set of names.
See Also:
SemanticModule

addConditionFactory

public void addConditionFactory(String name,
                                ConditionFactory factory)
Add a semantic ConditionFactory.

Parameters:
name - The condition name.
factory - The condition factory.

getConditionFactory

public ConditionFactory getConditionFactory(String name)
Description copied from interface: SemanticModule
Retrieve a semantic condition by name.

Specified by:
getConditionFactory in interface SemanticModule
Parameters:
name - the name.
Returns:
The condition implementation or null if none is bound to the name.
See Also:
SemanticModule

getConditionFactoryNames

public Set getConditionFactoryNames()
Description copied from interface: SemanticModule
Retrieve the set of all condition names.

Specified by:
getConditionFactoryNames in interface SemanticModule
Returns:
The set of names.
See Also:
SemanticModule

addConsequenceFactory

public void addConsequenceFactory(String name,
                                  ConsequenceFactory factory)
Add a semantic ConsequenceFactory.

Parameters:
name - The consequence name.
factory - The consequence factory.

getConsequenceFactory

public ConsequenceFactory getConsequenceFactory(String name)
Description copied from interface: SemanticModule
Retrieve a semantic consequence by name.

Specified by:
getConsequenceFactory in interface SemanticModule
Parameters:
name - the name.
Returns:
The consequence implementation or null if none is bound to the name.
See Also:
SemanticModule

getConsequenceFactoryNames

public Set getConsequenceFactoryNames()
Description copied from interface: SemanticModule
Retrieve the set of all consequence names.

Specified by:
getConsequenceFactoryNames in interface SemanticModule
Returns:
The set of names.
See Also:
SemanticModule

addDurationFactory

public void addDurationFactory(String name,
                               DurationFactory factory)

getDurationFactory

public DurationFactory getDurationFactory(String name)
Specified by:
getDurationFactory in interface SemanticModule

getDurationFactoryNames

public Set getDurationFactoryNames()
Specified by:
getDurationFactoryNames in interface SemanticModule

addImportEntryFactory

public void addImportEntryFactory(String name,
                                  ImportEntryFactory factory)
Specified by:
addImportEntryFactory in interface SemanticModule

getImportEntryFactory

public ImportEntryFactory getImportEntryFactory(String name)
Specified by:
getImportEntryFactory in interface SemanticModule

getImportEntryFactoryNames

public Set getImportEntryFactoryNames()
Specified by:
getImportEntryFactoryNames in interface SemanticModule

addApplicationDataFactory

public void addApplicationDataFactory(String name,
                                      ApplicationDataFactory factory)
Specified by:
addApplicationDataFactory in interface SemanticModule

getApplicationDataFactory

public ApplicationDataFactory getApplicationDataFactory(String name)
Specified by:
getApplicationDataFactory in interface SemanticModule

getApplicationDataFactoryNames

public Set getApplicationDataFactoryNames()
Specified by:
getApplicationDataFactoryNames in interface SemanticModule


Copyright © 2001-2004 The Codehaus. All Rights Reserved.