|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge
public abstract class SWRLRuleEngineBridge
The SWRL Rule Engine Bridge provides a mechanism to incorporate rule engines into Protege-OWL to execute SWRL rules.
Detailed documentation for this class can be found here.
Field Summary | |
---|---|
protected OWLModel |
owlModel
|
Constructor Summary | |
---|---|
protected |
SWRLRuleEngineBridge(OWLModel owlModel)
|
Method Summary | |
---|---|
protected void |
assertIndividual(IndividualInfo individualInfo)
Assert an OWL individual from a rule engine. |
protected void |
assertProperty(PropertyInfo propertyInfo)
Assert an OWL property from a rule engine. |
IndividualInfo |
createIndividual()
Method used to create a bridge individual of type owl:Thing. |
protected abstract void |
defineClass(ClassInfo classInfo)
|
protected abstract void |
defineIndividual(IndividualInfo individualInfo)
|
protected abstract void |
defineProperty(PropertyInfo propertyInfo)
|
protected abstract void |
defineRestriction(RestrictionInfo restrictionInfo)
|
protected abstract void |
defineRule(RuleInfo ruleInfo)
|
void |
exportOWLKnowledge()
Send knowledge (excluding SWRL rules) stored in bridge to a rule engine. |
void |
exportSWRLRule(String ruleName)
|
void |
exportSWRLRules()
|
void |
exportSWRLRules(Set<String> ruleNames)
|
void |
exportSWRLRulesAndOWLKnowledge()
Send rules and knowledge stored in bridge to a rule engine. |
protected abstract void |
generateBuiltInBinding(String ruleName,
String builtInName,
int builtInIndex,
List<Argument> arguments)
|
protected Set<IndividualInfo> |
getAssertedIndividuals()
|
protected Set<PropertyInfo> |
getAssertedProperties()
|
protected Set<IndividualInfo> |
getCreatedIndividuals()
|
protected Set<ClassInfo> |
getImportedClasses()
|
protected Set<IndividualInfo> |
getImportedIndividuals()
|
protected Set<PropertyInfo> |
getImportedProperties()
|
protected Set<RestrictionInfo> |
getImportedRestrictions()
|
protected Set<RuleInfo> |
getImportedSWRLRules()
|
int |
getNumberOfAssertedIndividuals()
|
int |
getNumberOfAssertedProperties()
|
int |
getNumberOfCreatedIndividuals()
|
int |
getNumberOfImportedClasses()
|
int |
getNumberOfImportedIndividuals()
|
int |
getNumberOfImportedProperties()
|
int |
getNumberOfImportedRestrictions()
|
int |
getNumberOfImportedSWRLRules()
|
OWLModel |
getOWLModel()
Get the OWL model associated with this bridge. |
Result |
getQueryResult(String ruleName)
Get the results from a rule containing query built-ins. |
RuleInfo |
getRuleInfo(String ruleName)
|
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. |
protected abstract void |
initializeRuleEngine()
|
protected boolean |
invokeSWRLBuiltIn(String ruleName,
String builtInName,
int builtInIndex,
List<Argument> arguments)
Invoke a SWRL built-in from a rule engine. |
boolean |
isCreatedIndividual(String individualName)
|
void |
resetBridge()
Clear all knowledge from bridge. |
void |
resetRuleEngine()
Clear all knowledge from rule engine, deleted asserted knowledge from the bridge, and leave imported bridge knowledge intact. |
void |
run()
Run the rule engine. |
abstract void |
runRuleEngine()
|
void |
writeAssertedIndividualsAndProperties2OWL()
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 |
Field Detail |
---|
protected OWLModel owlModel
Constructor Detail |
---|
protected SWRLRuleEngineBridge(OWLModel owlModel) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
Method Detail |
---|
protected abstract void defineRule(RuleInfo ruleInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void defineClass(ClassInfo classInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void defineProperty(PropertyInfo propertyInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void defineIndividual(IndividualInfo individualInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void defineRestriction(RestrictionInfo restrictionInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void initializeRuleEngine() throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected abstract void generateBuiltInBinding(String ruleName, String builtInName, int builtInIndex, List<Argument> arguments) throws BuiltInException
BuiltInException
public abstract void runRuleEngine() throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public void infer() throws SWRLRuleEngineBridgeException
infer
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void importSWRLRulesAndOWLKnowledge() throws SWRLRuleEngineBridgeException
importSWRLRulesAndOWLKnowledge
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void importSWRLRulesAndOWLKnowledge(String ruleGroupName) throws SWRLRuleEngineBridgeException
importSWRLRulesAndOWLKnowledge
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void importSWRLRulesAndOWLKnowledge(Set<String> ruleGroupNames) throws SWRLRuleEngineBridgeException
importSWRLRulesAndOWLKnowledge
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void exportSWRLRulesAndOWLKnowledge() throws SWRLRuleEngineBridgeException
exportSWRLRulesAndOWLKnowledge
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void exportOWLKnowledge() throws SWRLRuleEngineBridgeException
exportOWLKnowledge
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void run() throws SWRLRuleEngineBridgeException
run
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void writeAssertedIndividualsAndProperties2OWL() throws SWRLRuleEngineBridgeException
writeAssertedIndividualsAndProperties2OWL
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public void resetBridge() throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public void resetRuleEngine() throws SWRLRuleEngineBridgeException
resetRuleEngine
in interface SWRLRuleEngine
SWRLRuleEngineBridgeException
public Result getQueryResult(String ruleName) throws ResultException
getQueryResult
in interface SWRLRuleEngine
ResultException
public OWLModel getOWLModel()
public int getNumberOfImportedSWRLRules()
public int getNumberOfImportedClasses()
public int getNumberOfImportedIndividuals()
public int getNumberOfImportedProperties()
public int getNumberOfImportedRestrictions()
public int getNumberOfAssertedIndividuals()
public int getNumberOfAssertedProperties()
public int getNumberOfCreatedIndividuals()
public boolean isCreatedIndividual(String individualName)
protected Set<RuleInfo> getImportedSWRLRules()
protected Set<ClassInfo> getImportedClasses()
protected Set<IndividualInfo> getImportedIndividuals()
protected Set<PropertyInfo> getImportedProperties()
protected Set<RestrictionInfo> getImportedRestrictions()
protected Set<IndividualInfo> getAssertedIndividuals()
protected Set<PropertyInfo> getAssertedProperties()
protected Set<IndividualInfo> getCreatedIndividuals()
protected void assertProperty(PropertyInfo propertyInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected void assertIndividual(IndividualInfo individualInfo) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
protected boolean invokeSWRLBuiltIn(String ruleName, String builtInName, int builtInIndex, List<Argument> arguments) throws BuiltInException
See here for documentaton.
BuiltInException
public IndividualInfo createIndividual() throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public void exportSWRLRules() throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public void exportSWRLRules(Set<String> ruleNames) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public void exportSWRLRule(String ruleName) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
public RuleInfo getRuleInfo(String ruleName) throws SWRLRuleEngineBridgeException
SWRLRuleEngineBridgeException
|
Protégé-OWL 3.3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |