Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.swrl.bridge.impl
Class AbstractSWRLRuleEngineBridge

    java.lang.Object
      edu.stanford.smi.protegex.owl.swrl.bridge.impl.AbstractSWRLRuleEngineBridge

All Implemented Interfaces:
  SWRLRuleEngineBridge, SQWRLQueryEngine, SWRLRuleEngine

    public abstract class AbstractSWRLRuleEngineBridge

extends Object
implements SWRLRuleEngineBridge

This class provides an implementation of some of the core functionality required by a SWRL rule engine bridge. Implementations for a target rule engine should subclass this class. Detailed documentation for this process can be found here.

Field Summary
`protected OWLModel` | `owlModel`

Constructor Summary
`protected` | `AbstractSWRLRuleEngineBridge(OWLModel owlModel)`

Method Summary
`OWLClass` | `createOWLAnonymousClass()`
`void` | `createOWLAxiom(OWLAxiom axiom)`
`void` | `createOWLClass(String className)`
`void` | `createOWLClass(String className, String superclassName)`
`OWLDatatypePropertyAssertionAxiom` | `createOWLDatatypePropertyAssertionAxiom(OWLDatatypePropertyAssertionAxiom axiom)`
`OWLDatatypePropertyAssertionAxiom` | `createOWLDatatypePropertyAssertionAxiom(OWLIndividual subject, OWLProperty property, OWLDatatypeValue object)`
`void` | `createOWLDatatypePropertyAssertionAxioms(Set<OWLDatatypePropertyAssertionAxiom> axioms)`
`OWLIndividual` | `createOWLIndividual()` Method used to create a bridge individual of type owl:Thing.
`OWLIndividual` | `createOWLIndividual(OWLClass owlClass)`
`void` | `createOWLIndividual(OWLIndividual owlIndividual)`
`void` | `createOWLIndividuals(Set<OWLIndividual> individuals)`
`OWLObjectPropertyAssertionAxiom` | `createOWLObjectPropertyAssertionAxiom(OWLIndividual subject, OWLProperty property, OWLIndividual object)`
`OWLObjectPropertyAssertionAxiom` | `createOWLObjectPropertyAssertionAxiom(OWLObjectPropertyAssertionAxiom axiom)`
`void` | `createOWLObjectPropertyAssertionAxioms(Set<OWLObjectPropertyAssertionAxiom> axioms)`
`void` | `createOWLRestriction(OWLRestriction restriction)`
`Set<OWLClass>` | `getCreatedAnonymousClasses()`
`Set<OWLAxiom>` | `getCreatedAxioms()`
`Set<OWLClass>` | `getCreatedClasses()`
`Set<OWLIndividual>` | `getCreatedIndividuals()`
`Set<OWLRestriction>` | `getCreatedRestrictions()`
`Set<OWLAxiom>` | `getImportedAxioms()`
`Set<OWLClass>` | `getImportedClasses()`
`Set<OWLIndividual>` | `getImportedIndividuals()`
`Set<SWRLRule>` | `getImportedSWRLRules()`
`Set<OWLAxiom>` | `getInferredAxioms()`
`Set<OWLIndividual>` | `getInferredIndividuals()`
`Mapper` | `getMapper()`
`int` | `getNumberOfCreatedAxioms()`
`int` | `getNumberOfCreatedClasses()`
`int` | `getNumberOfCreatedIndividuals()`
`int` | `getNumberOfCreatedRestrictions()`
`int` | `getNumberOfImportedAxioms()`
`int` | `getNumberOfImportedClasses()`
`int` | `getNumberOfImportedIndividuals()`
`int` | `getNumberOfImportedSWRLRules()`
`int` | `getNumberOfInferredAxioms()`
`int` | `getNumberOfInferredIndividuals()`
`OWLModel` | `getOWLModel()` Get the OWL model associated with this bridge.
`SWRLRule` | `getRule(String ruleName)`
`SQWRLResult` | `getSQWRLResult(String queryName)` Get the results from a SQWRL query.
`boolean` | `hasMapper()`
`void` | `importSWRLRulesAndOWLKnowledge()` Load rules and knowledge from OWL into bridge.
`void` | `importSWRLRulesAndOWLKnowledge(Set<String> ruleGroupNames)` Load rules from all the named rule groups and associated knowledge from OWL into bridge.
`void` | `importSWRLRulesAndOWLKnowledge(String ruleGroupName)` Load rules from a particular rule group and associated knowledge from OWL into bridge.
`void` | `infer()` Load rules and knowledge from OWL into bridge, send them to a rule engine, run the rule engine, and write any inferred knowledge back to OWL.
`void` | `infer(Set<String> ruleGroupNames)` Load rules and knowledge from OWL into bridge, send them to a rule engine, run the rule engine, and write any inferred knowledge back to OWL.
`void` | `infer(String ruleGroupName)`
`void` | `inferIndividual(OWLIndividual owlIndividual)` Assert an OWL individual from a rule engine
`void` | `inferPropertyAssertionAxiom(OWLPropertyAssertionAxiom owlPropertyAssertionAxiom)` Infer an OWL property assertion axiom from a rule engine
`boolean` | `invokeSWRLBuiltIn(String ruleName, String builtInName, int builtInIndex, boolean isInConsequent, List<BuiltInArgument> arguments)` Invoke a SWRL built-in from a rule engine.
`boolean` | `isClass(String className)`
`boolean` | `isCreatedAnonymousClass(String className)`
`boolean` | `isCreatedAxiom(OWLAxiom axiom)`
`boolean` | `isCreatedClass(String className)`
`boolean` | `isCreatedIndividual(String individualName)`
`boolean` | `isCreatedRestriction(OWLRestriction restriction)`
`boolean` | `isIndividual(String individualName)`
`boolean` | `isProperty(String propertyName)`
`void` | `reset()` Clear all knowledge from bridge.
`void` | `run()` Run the rule engine.
`void` | `runSQWRLQueries()` Run all the SWRL rules and SQWRL queries in an ontology.
`void` | `setMapper(Mapper mapper)`
`void` | `writeInferredKnowledge2OWL()` Write knowledge inferred by rule engine back to OWL.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge
`defineAxiom, defineClass, defineIndividual, defineRestriction, defineRule, generateBuiltInBinding, resetRuleEngine, runRuleEngine`

Field Detail

### owlModel

    protected OWLModel owlModel

Constructor Detail

### AbstractSWRLRuleEngineBridge

    protected AbstractSWRLRuleEngineBridge(OWLModel owlModel)
                                    throws SWRLRuleEngineBridgeException

Throws:
  `SWRLRuleEngineBridgeException`

Method Detail

### importSWRLRulesAndOWLKnowledge

    public void importSWRLRulesAndOWLKnowledge()
                                        throws SWRLRuleEngineBridgeException

  Load rules and knowledge from OWL into bridge. All existing bridge rules and knowledge will first be cleared and the associated rule engine will be reset.

  Specified by:
    `importSWRLRulesAndOWLKnowledge` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### importSWRLRulesAndOWLKnowledge

    public void importSWRLRulesAndOWLKnowledge(String ruleGroupName)
                                        throws SWRLRuleEngineBridgeException

  Load rules from a particular rule group and associated knowledge from OWL into bridge. All existing bridge rules and knowledge will first be cleared and the associated rule engine will be reset.

  Specified by:
    `importSWRLRulesAndOWLKnowledge` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### importSWRLRulesAndOWLKnowledge

    public void importSWRLRulesAndOWLKnowledge(Set<String> ruleGroupNames)
                                        throws SWRLRuleEngineBridgeException

  Load rules from all the named rule groups and associated knowledge from OWL into bridge. All existing bridge rules and knowledge will first be cleared and the associated rule engine will be reset.

  Specified by:
    `importSWRLRulesAndOWLKnowledge` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### run

    public void run()
             throws SWRLRuleEngineBridgeException

  Run the rule engine.

  Specified by:
    `run` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### writeInferredKnowledge2OWL

    public void writeInferredKnowledge2OWL()
                                    throws SWRLRuleEngineBridgeException

  Write knowledge inferred by rule engine back to OWL.

  Specified by:
    `writeInferredKnowledge2OWL` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### reset

    public void reset()
               throws SWRLRuleEngineBridgeException

  Clear all knowledge from bridge.

  Specified by:
    `reset` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### infer

    public void infer(Set<String> ruleGroupNames)
               throws SWRLRuleEngineBridgeException

  Load rules and knowledge from OWL into bridge, send them to a rule engine, run the rule engine, and write any inferred knowledge back to OWL.

  Specified by:
    `infer` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### infer

    public void infer(String ruleGroupName)
               throws SWRLRuleEngineBridgeException

  Specified by:
    `infer` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### infer

    public void infer()
               throws SWRLRuleEngineBridgeException

  Description copied from interface: `SWRLRuleEngine`
  Load rules and knowledge from OWL into bridge, send them to a rule engine, run the rule engine, and write any inferred knowledge back to OWL.

  Specified by:
    `infer` in interface `SWRLRuleEngine`
  Throws:
    `SWRLRuleEngineBridgeException`

### runSQWRLQueries

    public void runSQWRLQueries()
                         throws SQWRLException

  Description copied from interface: `SQWRLQueryEngine`
  Run all the SWRL rules and SQWRL queries in an ontology.

  Specified by:
    `runSQWRLQueries` in interface `SQWRLQueryEngine`
  Throws:
    `SQWRLException`

### getSQWRLResult

    public SQWRLResult getSQWRLResult(String queryName)
                               throws SQWRLException

  Get the results from a SQWRL query.

  Specified by:
    `getSQWRLResult` in interface `SQWRLQueryEngine`
  Throws:
    `SQWRLException`

### getRule

    public SWRLRule getRule(String ruleName)
                     throws InvalidRuleNameException

  Specified by:
    `getRule` in interface `SWRLRuleEngine`
  Throws:
    `InvalidRuleNameException`

### getOWLModel

    public OWLModel getOWLModel()

  Get the OWL model associated with this bridge.

  Specified by:
    `getOWLModel` in interface `SWRLRuleEngineBridge`

### getNumberOfImportedSWRLRules

    public int getNumberOfImportedSWRLRules()

  Specified by:
    `getNumberOfImportedSWRLRules` in interface `SWRLRuleEngineBridge`

### getNumberOfImportedClasses

    public int getNumberOfImportedClasses()

  Specified by:
    `getNumberOfImportedClasses` in interface `SWRLRuleEngineBridge`

### getNumberOfImportedIndividuals

    public int getNumberOfImportedIndividuals()

  Specified by:
    `getNumberOfImportedIndividuals` in interface `SWRLRuleEngineBridge`

### getNumberOfImportedAxioms

    public int getNumberOfImportedAxioms()

  Specified by:
    `getNumberOfImportedAxioms` in interface `SWRLRuleEngineBridge`

### getNumberOfInferredIndividuals

    public int getNumberOfInferredIndividuals()

  Specified by:
    `getNumberOfInferredIndividuals` in interface `SWRLRuleEngineBridge`
  Specified by:
    `getNumberOfInferredIndividuals` in interface `SWRLRuleEngine`

### getNumberOfInferredAxioms

    public int getNumberOfInferredAxioms()

  Specified by:
    `getNumberOfInferredAxioms` in interface `SWRLRuleEngineBridge`
  Specified by:
    `getNumberOfInferredAxioms` in interface `SWRLRuleEngine`

### getNumberOfCreatedClasses

    public int getNumberOfCreatedClasses()

  Specified by:
    `getNumberOfCreatedClasses` in interface `SWRLRuleEngineBridge`

### getNumberOfCreatedIndividuals

    public int getNumberOfCreatedIndividuals()

  Specified by:
    `getNumberOfCreatedIndividuals` in interface `SWRLRuleEngineBridge`

### getNumberOfCreatedAxioms

    public int getNumberOfCreatedAxioms()

  Specified by:
    `getNumberOfCreatedAxioms` in interface `SWRLRuleEngineBridge`

### getNumberOfCreatedRestrictions

    public int getNumberOfCreatedRestrictions()

  Specified by:
    `getNumberOfCreatedRestrictions` in interface `SWRLRuleEngineBridge`

### isClass

    public boolean isClass(String className)

  Specified by:
    `isClass` in interface `SWRLRuleEngineBridge`

### isProperty

    public boolean isProperty(String propertyName)

### isIndividual

    public boolean isIndividual(String individualName)

### isCreatedClass

    public boolean isCreatedClass(String className)

  Specified by:
    `isCreatedClass` in interface `SWRLRuleEngineBridge`

### isCreatedAnonymousClass

    public boolean isCreatedAnonymousClass(String className)

  Specified by:
    `isCreatedAnonymousClass` in interface `SWRLRuleEngineBridge`

### isCreatedIndividual

    public boolean isCreatedIndividual(String individualName)

  Specified by:
    `isCreatedIndividual` in interface `SWRLRuleEngineBridge`

### isCreatedAxiom

    public boolean isCreatedAxiom(OWLAxiom axiom)

  Specified by:
    `isCreatedAxiom` in interface `SWRLRuleEngineBridge`

### isCreatedRestriction

    public boolean isCreatedRestriction(OWLRestriction restriction)

### getImportedSWRLRules

    public Set<SWRLRule> getImportedSWRLRules()

  Specified by:
    `getImportedSWRLRules` in interface `SWRLRuleEngineBridge`

### getImportedClasses

    public Set<OWLClass> getImportedClasses()

  Specified by:
    `getImportedClasses` in interface `SWRLRuleEngineBridge`

### getImportedIndividuals

    public Set<OWLIndividual> getImportedIndividuals()

  Specified by:
    `getImportedIndividuals` in interface `SWRLRuleEngineBridge`

### getImportedAxioms

    public Set<OWLAxiom> getImportedAxioms()

  Specified by:
    `getImportedAxioms` in interface `SWRLRuleEngineBridge`

### getInferredIndividuals

    public Set<OWLIndividual> getInferredIndividuals()

  Specified by:
    `getInferredIndividuals` in interface `SWRLRuleEngineBridge`
  Specified by:
    `getInferredIndividuals` in interface `SWRLRuleEngine`

### getInferredAxioms

    public Set<OWLAxiom> getInferredAxioms()

  Specified by:
    `getInferredAxioms` in interface `SWRLRuleEngineBridge`
  Specified by:
    `getInferredAxioms` in interface `SWRLRuleEngine`

### getCreatedClasses

    public Set<OWLClass> getCreatedClasses()

  Specified by:
    `getCreatedClasses` in interface `SWRLRuleEngineBridge`

### getCreatedAnonymousClasses

    public Set<OWLClass> getCreatedAnonymousClasses()

### getCreatedIndividuals

    public Set<OWLIndividual> getCreatedIndividuals()

  Specified by:
    `getCreatedIndividuals` in interface `SWRLRuleEngineBridge`

### getCreatedAxioms

    public Set<OWLAxiom> getCreatedAxioms()

  Specified by:
    `getCreatedAxioms` in interface `SWRLRuleEngineBridge`

### getCreatedRestrictions

    public Set<OWLRestriction> getCreatedRestrictions()

  Specified by:
    `getCreatedRestrictions` in interface `SWRLRuleEngineBridge`

### inferPropertyAssertionAxiom

    public void inferPropertyAssertionAxiom(OWLPropertyAssertionAxiom owlPropertyAssertionAxiom)
                                     throws SWRLRuleEngineBridgeException

  Infer an OWL property assertion axiom from a rule engine

  Specified by:
    `inferPropertyAssertionAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### inferIndividual

    public void inferIndividual(OWLIndividual owlIndividual)
                         throws SWRLRuleEngineBridgeException

  Assert an OWL individual from a rule engine

  Specified by:
    `inferIndividual` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### invokeSWRLBuiltIn

    public boolean invokeSWRLBuiltIn(String ruleName,
                                     String builtInName,
                                     int builtInIndex,
                                     boolean isInConsequent,
                                     List<BuiltInArgument> arguments)
                              throws BuiltInException

  Invoke a SWRL built-in from a rule engine.

  See here for documentaton.

  Specified by:
    `invokeSWRLBuiltIn` in interface `SWRLRuleEngineBridge`
  Throws:
    `BuiltInException`

### setMapper

    public void setMapper(Mapper mapper)

  Specified by:
    `setMapper` in interface `SWRLRuleEngineBridge`

### hasMapper

    public boolean hasMapper()

  Specified by:
    `hasMapper` in interface `SWRLRuleEngineBridge`

### getMapper

    public Mapper getMapper()

  Specified by:
    `getMapper` in interface `SWRLRuleEngineBridge`

### createOWLAnonymousClass

    public OWLClass createOWLAnonymousClass()
                                     throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLAnonymousClass` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLClass

    public void createOWLClass(String className)
                        throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLClass` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLClass

    public void createOWLClass(String className,
                               String superclassName)
                        throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLClass` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLIndividual

    public OWLIndividual createOWLIndividual()
                                      throws SWRLRuleEngineBridgeException

  Method used to create a bridge individual of type owl:Thing. This method will typically be invoked from within a built-in. An OWL individual is not created at this point - instead an object is generated for the individual in the bridge and the individual is exported to the rule engine. The individual is given a unique name that can be used later if an OWL individual is created for it.

  Specified by:
    `createOWLIndividual` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLIndividual

    public void createOWLIndividual(OWLIndividual owlIndividual)
                             throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLIndividual` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLIndividual

    public OWLIndividual createOWLIndividual(OWLClass owlClass)
                                      throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLIndividual` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLIndividuals

    public void createOWLIndividuals(Set<OWLIndividual> individuals)
                              throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLIndividuals` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLDatatypePropertyAssertionAxiom

    public OWLDatatypePropertyAssertionAxiom createOWLDatatypePropertyAssertionAxiom(OWLIndividual subject,
                                                                                     OWLProperty property,
                                                                                     OWLDatatypeValue object)
                                                                              throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLDatatypePropertyAssertionAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLDatatypePropertyAssertionAxiom

    public OWLDatatypePropertyAssertionAxiom createOWLDatatypePropertyAssertionAxiom(OWLDatatypePropertyAssertionAxiom axiom)
                                                                              throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLDatatypePropertyAssertionAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLDatatypePropertyAssertionAxioms

    public void createOWLDatatypePropertyAssertionAxioms(Set<OWLDatatypePropertyAssertionAxiom> axioms)
                                                  throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLDatatypePropertyAssertionAxioms` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLObjectPropertyAssertionAxiom

    public OWLObjectPropertyAssertionAxiom createOWLObjectPropertyAssertionAxiom(OWLIndividual subject,
                                                                                 OWLProperty property,
                                                                                 OWLIndividual object)
                                                                          throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLObjectPropertyAssertionAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLObjectPropertyAssertionAxiom

    public OWLObjectPropertyAssertionAxiom createOWLObjectPropertyAssertionAxiom(OWLObjectPropertyAssertionAxiom axiom)
                                                                          throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLObjectPropertyAssertionAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLAxiom

    public void createOWLAxiom(OWLAxiom axiom)
                        throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLAxiom` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLRestriction

    public void createOWLRestriction(OWLRestriction restriction)
                              throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLRestriction` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

### createOWLObjectPropertyAssertionAxioms

    public void createOWLObjectPropertyAssertionAxioms(Set<OWLObjectPropertyAssertionAxiom> axioms)
                                                throws SWRLRuleEngineBridgeException

  Specified by:
    `createOWLObjectPropertyAssertionAxioms` in interface `SWRLRuleEngineBridge`
  Throws:
    `SWRLRuleEngineBridgeException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.