org.semwebcentral.sweetrules.swrl
Class SweetSWRLRDF2SWRLXMLTranslator

java.lang.Object
  extended byorg.semwebcentral.sweetrules.infrastructure.AbstractSweetTranslator
      extended byorg.semwebcentral.sweetrules.swrl.SweetSWRLRDF2SWRLXMLTranslator
All Implemented Interfaces:
java.lang.Cloneable, ISweetTranslator

public class SweetSWRLRDF2SWRLXMLTranslator
extends AbstractSweetTranslator

Class representing the SWRL RDF to SWRL XML translator

Author:
Mike Dean

Field Summary
 javax.xml.bind.JAXBContext jc
           
(package private)  org.w3._2003._05.owl_xml.ObjectFactory owlxObjectFactory
           
(package private)  org.w3._2003._11.ruleml.ObjectFactory rulemlObjectFactory
           
(package private)  org.w3._2003._11.swrlx.ObjectFactory swrlxObjectFactory
           
(package private)  java.util.TreeSet variables
           
 
Fields inherited from class org.semwebcentral.sweetrules.infrastructure.AbstractSweetTranslator
logger, sourceKBDescriptor, targetKBDescriptor, translatorDescriptor
 
Constructor Summary
SweetSWRLRDF2SWRLXMLTranslator()
          Constructor for the SWRL RDF to SWRL XML translator
 
Method Summary
(package private)  java.lang.String getFragment(com.hp.hpl.jena.rdf.model.Resource resource)
           
(package private)  com.hp.hpl.jena.rdf.model.Resource getPropertyResource(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property property)
           
(package private)  com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource resource)
           
(package private)  boolean isVariable(com.hp.hpl.jena.rdf.model.Resource resource)
           
(package private)  void processArgument(java.util.List args, com.hp.hpl.jena.rdf.model.Resource list)
           
(package private)  void processAtom(com.hp.hpl.jena.rdf.model.Resource atom, java.util.List list)
           
(package private)  void processAtomList(com.hp.hpl.jena.rdf.model.Resource in, java.util.List out)
           
(package private)  java.lang.Object processChild(com.hp.hpl.jena.rdf.model.Resource subject, com.hp.hpl.jena.rdf.model.Property property)
           
(package private)  org.w3._2003._11.ruleml.Imp processImp(com.hp.hpl.jena.rdf.model.Resource imp)
           
 java.lang.String translate()
          Performs translation from the specified source format to the target format
 org.w3._2003._11.swrlx.Ontology translate(com.hp.hpl.jena.rdf.model.Model model)
           
 
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
 

Field Detail

variables

java.util.TreeSet variables

jc

public javax.xml.bind.JAXBContext jc

swrlxObjectFactory

org.w3._2003._11.swrlx.ObjectFactory swrlxObjectFactory

rulemlObjectFactory

org.w3._2003._11.ruleml.ObjectFactory rulemlObjectFactory

owlxObjectFactory

org.w3._2003._05.owl_xml.ObjectFactory owlxObjectFactory
Constructor Detail

SweetSWRLRDF2SWRLXMLTranslator

public SweetSWRLRDF2SWRLXMLTranslator()
Constructor for the SWRL RDF to SWRL XML translator

Method Detail

translate

public java.lang.String translate()
                           throws SweetTranslatorException
Performs translation from the specified source format to the target format

Returns:
The translated string in the target format
Throws:
SweetTranslatorException - If translation cannot be performed then an exception is thrown

translate

public org.w3._2003._11.swrlx.Ontology translate(com.hp.hpl.jena.rdf.model.Model model)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

isVariable

boolean isVariable(com.hp.hpl.jena.rdf.model.Resource resource)

processAtomList

void processAtomList(com.hp.hpl.jena.rdf.model.Resource in,
                     java.util.List out)
               throws java.lang.Exception
Throws:
java.lang.Exception

processImp

org.w3._2003._11.ruleml.Imp processImp(com.hp.hpl.jena.rdf.model.Resource imp)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

processArgument

void processArgument(java.util.List args,
                     com.hp.hpl.jena.rdf.model.Resource list)
               throws java.lang.Exception
Throws:
java.lang.Exception

getPropertyResource

com.hp.hpl.jena.rdf.model.Resource getPropertyResource(com.hp.hpl.jena.rdf.model.Resource subject,
                                                       com.hp.hpl.jena.rdf.model.Property property)

getType

com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Resource resource)

processAtom

void processAtom(com.hp.hpl.jena.rdf.model.Resource atom,
                 java.util.List list)
           throws java.lang.Exception
Throws:
java.lang.Exception

getFragment

java.lang.String getFragment(com.hp.hpl.jena.rdf.model.Resource resource)

processChild

java.lang.Object processChild(com.hp.hpl.jena.rdf.model.Resource subject,
                              com.hp.hpl.jena.rdf.model.Property property)
                        throws java.lang.Exception
Throws:
java.lang.Exception