org.semwebcentral.sweetrules.infrastructure
Class AbstractSweetKRDescriptor

java.lang.Object
  extended byorg.semwebcentral.sweetrules.infrastructure.AbstractSweetKRDescriptor
All Implemented Interfaces:
java.lang.Cloneable, ISweetKRDescriptor
Direct Known Subclasses:
SweetBRMLCR33Descriptor, SweetCLIPSDescriptor, SweetCLPCR33Descriptor, SweetJenaDescriptor, SweetJessDescriptor, SweetKIFDescriptor, SweetKRDescriptor, SweetOWLDescriptor, SweetRuleMLDescriptor, SweetSmodelsDescriptor, SweetSWRLRDFDescriptor, SweetSWRLXMLDescriptor, SweetXSBDescriptor

public abstract class AbstractSweetKRDescriptor
extends java.lang.Object
implements ISweetKRDescriptor

The Abstract Knowledge Representation descriptor class implementation with some simple constructors The abstract class promotes code reuse for the simple get/set and the constructors NB: For now just a name, type and version are stored, can enhance it later with fields like preferredInferenceEngine etc

Author:
Shashidhara G.K, Dr. Benjamin Grosof, Dr. Said Tabet, Chitranvanu Neogy

Field Summary
protected  java.lang.String krName
          The name of the Knowledge Representation mechanism this class describes
protected  java.lang.String krType
          The krType like "RuleML", "XML", "BRML", "CLP", "OWL" etc
protected  ISweetCanonicalVersionNumber krVersionNumber
          The version number of the KR, for e.g.
protected  Logger logger
          The logger object
 
Constructor Summary
AbstractSweetKRDescriptor(java.lang.String krName, java.lang.String krType, ISweetCanonicalVersionNumber versionNumber)
          Constructor with the name of the KR as a parameter
 
Method Summary
 java.lang.Object clone()
          The clone method to clone this object
 java.lang.String getKRName()
          API to retreive the KR name
 java.lang.String getKRType()
          get method for KR type
 ISweetCanonicalVersionNumber getKRVersionNumber()
          get method for KR version number
 void trace()
          Trace API implementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

krName

protected java.lang.String krName
The name of the Knowledge Representation mechanism this class describes


krType

protected java.lang.String krType
The krType like "RuleML", "XML", "BRML", "CLP", "OWL" etc


krVersionNumber

protected ISweetCanonicalVersionNumber krVersionNumber
The version number of the KR, for e.g. RuleML 0.8 will have 0.8


logger

protected Logger logger
The logger object

Constructor Detail

AbstractSweetKRDescriptor

public AbstractSweetKRDescriptor(java.lang.String krName,
                                 java.lang.String krType,
                                 ISweetCanonicalVersionNumber versionNumber)
Constructor with the name of the KR as a parameter

Parameters:
krName - name(friendly?) of the Knowledge representation mechanism
krType - type of the KR (e.g. RuleML)
versionNumber - version number of the KR (e.g. RuleML 0.8 where 0.8 is version)
Method Detail

getKRName

public java.lang.String getKRName()
API to retreive the KR name

Specified by:
getKRName in interface ISweetKRDescriptor
Returns:
name of the KR

getKRType

public java.lang.String getKRType()
Description copied from interface: ISweetKRDescriptor
get method for KR type

Specified by:
getKRType in interface ISweetKRDescriptor
Returns:
The krType which may be "RuleML", "BRML", "OWL", "XML"

getKRVersionNumber

public ISweetCanonicalVersionNumber getKRVersionNumber()
Description copied from interface: ISweetKRDescriptor
get method for KR version number

Specified by:
getKRVersionNumber in interface ISweetKRDescriptor
Returns:
The version number of the KR (e.g. RuleML 0.8 where 0.8 is version)

trace

public void trace()
Trace API implementation


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
The clone method to clone this object

Specified by:
clone in interface ISweetKRDescriptor
Returns:
The cloned object
Throws:
java.lang.CloneNotSupportedException - if an error occurs