com.sun.labs.minion.knowledge
Class CombinedKnowledgeSource

java.lang.Object
  extended by com.sun.labs.minion.knowledge.CombinedKnowledgeSource
All Implemented Interfaces:
CompositeKnowledgeSource, KnowledgeSource, com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable

public class CombinedKnowledgeSource
extends java.lang.Object
implements CompositeKnowledgeSource

This class encapsulates a policy whereby the union of variants of all the knowledge sources are combined.


Field Summary
protected  java.util.Set<KnowledgeSource> sources
           
 
Constructor Summary
CombinedKnowledgeSource()
           
 
Method Summary
 void addSource(KnowledgeSource aSource)
          Add a KnowledgeSource.
 void newProperties(com.sun.labs.util.props.PropertySheet ps)
           
 java.util.Set<java.lang.String> variantsOf(java.lang.String term)
          Combine the variants of all the knowledge sources (eliminating duplicates)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sources

protected java.util.Set<KnowledgeSource> sources
Constructor Detail

CombinedKnowledgeSource

public CombinedKnowledgeSource()
Method Detail

addSource

public void addSource(KnowledgeSource aSource)
Description copied from interface: CompositeKnowledgeSource
Add a KnowledgeSource.

Specified by:
addSource in interface CompositeKnowledgeSource

variantsOf

public java.util.Set<java.lang.String> variantsOf(java.lang.String term)
Combine the variants of all the knowledge sources (eliminating duplicates)

Specified by:
variantsOf in interface KnowledgeSource
Returns:
a Set of words that are variations of term.

newProperties

public void newProperties(com.sun.labs.util.props.PropertySheet ps)
                   throws com.sun.labs.util.props.PropertyException
Specified by:
newProperties in interface com.sun.labs.util.props.Configurable
Throws:
com.sun.labs.util.props.PropertyException