org.semwebcentral.sweetrules.infrastructure
Class AbstractSweetIEDescriptor

java.lang.Object
  extended byorg.semwebcentral.sweetrules.infrastructure.AbstractSweetIEDescriptor
All Implemented Interfaces:
ISweetIEDescriptor
Direct Known Subclasses:
SweetCR33EngineDescriptor, SweetIEDescriptor, SweetJenaEngineDescriptor, SweetJessEngineDescriptor, SweetXSBEngineDescriptor

public abstract class AbstractSweetIEDescriptor
extends java.lang.Object
implements ISweetIEDescriptor

An abstract class for the inference engine descriptor interface provides the default get/set methods

TODO: 1) Support removal

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy

Field Summary
protected  java.lang.String engineName
          A friendly name for the engine like XSB, Jess etc
protected  SweetIEInferenceType inferenceType
          The type of the inference engine
protected  ISweetKRDescriptor nativeKRDescriptor
          Native KR descriptor of the engine
protected  java.util.Vector supportedInferenceTasks
          The vector of tasks supported by this engine
protected  ISweetCanonicalVersionNumber versionNumber
          Sets the version number of the engine
 
Constructor Summary
AbstractSweetIEDescriptor(java.lang.String name, SweetIEInferenceType inferenceType, ISweetKRDescriptor krDescriptor, ISweetCanonicalVersionNumber version, java.lang.Class[] supportedTasks)
          Constructor for the abstract inference engine descriptor
 
Method Summary
 void addInferenceTaskClass(java.lang.Class taskClass)
          Adds a task to the list of supported tasks
 ISweetCanonicalVersionNumber getEngineVersionNumber()
          Retrieves the version number of the engine
 SweetIEInferenceType getInferenceType()
          Returns the type of the inferencing done by the inference engine for e.g. forward, backward etc
 java.lang.String getName()
          Returns the name of the inference engine
 ISweetKRDescriptor getNativeKRDescriptor()
          Returns the Native KR descriptor of this inference engine
 java.lang.Class[] getSupportedTasks()
          Returns an array containing all supported tasks
 void setEngineVersionNumber(ISweetCanonicalVersionNumber version)
          Sets the version number of the engine
 void setInferenceType(SweetIEInferenceType inferenceType)
          Sets the type of the inferencing done by the inference engine for e.g. forward, backward etc
 void setName(java.lang.String name)
          Sets the name of the inference engine
 void setNativeKRDescriptor(ISweetKRDescriptor krDescriptor)
          Sets the KR descriptor for the inference engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engineName

protected java.lang.String engineName
A friendly name for the engine like XSB, Jess etc


inferenceType

protected SweetIEInferenceType inferenceType
The type of the inference engine


nativeKRDescriptor

protected ISweetKRDescriptor nativeKRDescriptor
Native KR descriptor of the engine


supportedInferenceTasks

protected java.util.Vector supportedInferenceTasks
The vector of tasks supported by this engine


versionNumber

protected ISweetCanonicalVersionNumber versionNumber
Sets the version number of the engine

Constructor Detail

AbstractSweetIEDescriptor

public AbstractSweetIEDescriptor(java.lang.String name,
                                 SweetIEInferenceType inferenceType,
                                 ISweetKRDescriptor krDescriptor,
                                 ISweetCanonicalVersionNumber version,
                                 java.lang.Class[] supportedTasks)
Constructor for the abstract inference engine descriptor

Parameters:
name - Friendly name of the engine
inferenceType - Inference type (forward, backward etc)
krDescriptor - The native KR descriptor of the engine
version - The version number of the engine
supportedTasks - The list of tasks supported by this engine
Method Detail

getName

public java.lang.String getName()
Returns the name of the inference engine

Specified by:
getName in interface ISweetIEDescriptor
Returns:
Name of the inference engine.

setName

public void setName(java.lang.String name)
Sets the name of the inference engine

Specified by:
setName in interface ISweetIEDescriptor
Parameters:
name - The name of the inference engine (for e.g. XSB)

getInferenceType

public SweetIEInferenceType getInferenceType()
Returns the type of the inferencing done by the inference engine for e.g. forward, backward etc

Specified by:
getInferenceType in interface ISweetIEDescriptor
Returns:
The inference type of the engine

setInferenceType

public void setInferenceType(SweetIEInferenceType inferenceType)
Sets the type of the inferencing done by the inference engine for e.g. forward, backward etc

Specified by:
setInferenceType in interface ISweetIEDescriptor
Parameters:
inferenceType - The inference type of the engine

getNativeKRDescriptor

public ISweetKRDescriptor getNativeKRDescriptor()
Returns the Native KR descriptor of this inference engine

Specified by:
getNativeKRDescriptor in interface ISweetIEDescriptor
Returns:
The native kr descriptor of the inference engine

setNativeKRDescriptor

public void setNativeKRDescriptor(ISweetKRDescriptor krDescriptor)
Sets the KR descriptor for the inference engine

Specified by:
setNativeKRDescriptor in interface ISweetIEDescriptor
Parameters:
krDescriptor - The KR descriptor of the inference engine

getEngineVersionNumber

public ISweetCanonicalVersionNumber getEngineVersionNumber()
Retrieves the version number of the engine

Specified by:
getEngineVersionNumber in interface ISweetIEDescriptor
Returns:
Version number of the engine

setEngineVersionNumber

public void setEngineVersionNumber(ISweetCanonicalVersionNumber version)
Sets the version number of the engine

Specified by:
setEngineVersionNumber in interface ISweetIEDescriptor
Parameters:
version - The version number to set

getSupportedTasks

public java.lang.Class[] getSupportedTasks()
Returns an array containing all supported tasks

Specified by:
getSupportedTasks in interface ISweetIEDescriptor
Returns:
The array of supported tasks, null if nothing is supported

addInferenceTaskClass

public void addInferenceTaskClass(java.lang.Class taskClass)
Adds a task to the list of supported tasks

Specified by:
addInferenceTaskClass in interface ISweetIEDescriptor
Parameters:
taskClass - The task to be added as a supported task