org.semwebcentral.sweetrules.sweetonto
Class SweetOWL2DLPCompilerTranslator

java.lang.Object
  extended byorg.semwebcentral.sweetrules.infrastructure.AbstractSweetTranslator
      extended byorg.semwebcentral.sweetrules.sweetonto.SweetOWL2DLPCompilerTranslator
All Implemented Interfaces:
java.lang.Cloneable, ISweetTranslator
Direct Known Subclasses:
SweetOWL2RuleMLTranslator, SweetOWL2SWRLXMLTranslator

public abstract class SweetOWL2DLPCompilerTranslator
extends AbstractSweetTranslator

This class is a utility class which given an OWL ontology translates to the DLP internal format. This can then be used to write the output in either SWRL or RuleML. Helps reuse code from OWL to SWRL/RuleML translation.

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

Field Summary
private  java.lang.String serializerMethodName
          The method name of the serializer to invoke
 
Fields inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetTranslator
logger, sourceKBDescriptor, targetKBDescriptor, translatorDescriptor
 
Constructor Summary
SweetOWL2DLPCompilerTranslator(ISweetTranslatorDescriptor descriptor, ISweetKBDescriptor sourceKBDescriptor, ISweetKBDescriptor targetKBDescriptor, java.lang.String serializerMethod)
          Constructor for the abstract class
 
Method Summary
protected  java.lang.String translateUtil()
          Performs the translation to either SWRL or RuleML based on the target KB descriptor
 
Methods inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetTranslator
clone, getSourceData, getTranslatorDescriptor, loadAllNamespacesAndEntities, print, setSourceData, setSourceKBDescriptor, setTargetKBDescriptor, setTranslatorDescriptor, trace, writeToTargetKB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semwebcentral.sweetrules.infrastructure.ISweetTranslator
translate
 

Field Detail

serializerMethodName

private java.lang.String serializerMethodName
The method name of the serializer to invoke

Constructor Detail

SweetOWL2DLPCompilerTranslator

public SweetOWL2DLPCompilerTranslator(ISweetTranslatorDescriptor descriptor,
                                      ISweetKBDescriptor sourceKBDescriptor,
                                      ISweetKBDescriptor targetKBDescriptor,
                                      java.lang.String serializerMethod)
Constructor for the abstract class

Parameters:
descriptor - The descriptor of the class which extends this translator
sourceKBDescriptor - The source KB to be translated
targetKBDescriptor - The target KB to store the result of translation
serializerMethod - The method to be used for serialization, must be an static member of SweetDLPSerializer class For RuleML it is "writeAsRuleML" and for SWRL it is "writeAsSWRL
Method Detail

translateUtil

protected java.lang.String translateUtil()
                                  throws SweetTranslatorException
Performs the translation to either SWRL or RuleML based on the target KB descriptor

Returns:
The result of translation
Throws:
SweetTranslatorException - if an error occurs