Class SWRLRuleTranslator

java.lang.Object
com.github.owlcs.ontapi.internal.BaseSearcher
com.github.owlcs.ontapi.internal.AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
com.github.owlcs.ontapi.internal.axioms.SWRLRuleTranslator
All Implemented Interfaces:
ObjectsSearcher<org.semanticweb.owlapi.model.SWRLRule>

public class SWRLRuleTranslator extends AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
A translator that provides SWRLRule implementations. All of them have type AxiomType.SWRL_RULE. Specification: SWRL: A Semantic Web Rule Language Combining OWL and RuleML.

Created @ssz on 20.10.2016.

  • Constructor Details

    • SWRLRuleTranslator

      public SWRLRuleTranslator()
  • Method Details

    • write

      public void write(org.semanticweb.owlapi.model.SWRLRule axiom, org.apache.jena.ontapi.model.OntModel model)
      Description copied from class: AxiomTranslator
      Writes the given axiom to the model.
      Specified by:
      write in class AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
      Parameters:
      axiom - OWL-API axiom object
      model - ONT-API Jena Model
    • listStatements

      public org.apache.jena.util.iterator.ExtendedIterator<org.apache.jena.ontapi.model.OntStatement> listStatements(org.apache.jena.ontapi.model.OntModel model, AxiomsSettings config)
      Description copied from class: AxiomTranslator
      Lists all statements from the base graph of the given model that match this axiom definition.
      Specified by:
      listStatements in class AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
      Parameters:
      model - Ontology Jena Model, not null
      config - AxiomsSettings control settings, not null
      Returns:
      ExtendedIterator of OntStatements
    • testStatement

      public boolean testStatement(org.apache.jena.ontapi.model.OntStatement statement, AxiomsSettings config)
      Description copied from class: AxiomTranslator
      Tests if the specified statement answers the axiom definition.
      Specified by:
      testStatement in class AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
      Parameters:
      statement - OntStatement any statement, not necessarily local
      config - AxiomsSettings control settings
      Returns:
      true if the statement corresponds the axiom type
    • toAxiomImpl

      public ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomImpl(org.apache.jena.ontapi.model.OntStatement statement, ModelObjectFactory factory, AxiomsSettings config)
      Description copied from class: AxiomTranslator
      Creates an OWL Axiom impl from a statement. Impl note: the method returns ONTAxiomImpl instance that is attached to the model.
      Specified by:
      toAxiomImpl in class AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
      Parameters:
      statement - OntStatement the statement which determines the axiom
      factory - ModelObjectFactory the data factory to create OWL-API objects
      config - AxiomsSettings to control the process
      Returns:
      ONTObject around OWLAxiom
    • toAxiomWrap

      public ONTObject<org.semanticweb.owlapi.model.SWRLRule> toAxiomWrap(org.apache.jena.ontapi.model.OntStatement statement, ONTObjectFactory factory, AxiomsSettings config)
      Description copied from class: AxiomTranslator
      Creates an OWL Axiom wrapper from a statement. Impl note: the method returns a simple ONT Wrapper with an actual AxiomTranslator instance inside, that is created by the system-wide Data Factory.
      Specified by:
      toAxiomWrap in class AxiomTranslator<org.semanticweb.owlapi.model.SWRLRule>
      Parameters:
      statement - OntStatement the statement which determines the axiom
      factory - ONTObjectFactory the data factory to create OWL-API objects
      config - AxiomsSettings to control the process
      Returns:
      ONTObject around OWLAxiom