|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.lehigh.swat.obione.KAON2AbstractConnection
edu.lehigh.swat.obione.Reformulator
public class Reformulator
Uses extended PDMS to reformulate a query
| Field Summary | |
|---|---|
private int |
counter
|
private LAVProcessor |
lp
|
private MapKB |
mapKB
|
private RGT |
rgt
|
private java.util.ArrayList<org.semanticweb.kaon2.api.rules.Variable> |
varList
|
| Fields inherited from class edu.lehigh.swat.obione.KAON2AbstractConnection |
|---|
m_connection |
| Constructor Summary | |
|---|---|
Reformulator(MapKB mapKB)
Intializes the Reformulator's Knoweledgebase with the Map Knowledgebase read in from the Source Processor |
|
| Method Summary | |
|---|---|
private org.semanticweb.kaon2.api.rules.Literal |
applySub(java.util.HashMap theta,
org.semanticweb.kaon2.api.rules.Literal l)
|
private org.semanticweb.kaon2.api.rules.Rule |
applySubToRule(java.util.HashMap theta,
org.semanticweb.kaon2.api.rules.Rule r)
|
void |
buildTree(OBI1Query q)
Builds the rule goal tree |
(package private) void |
expand(GoalNode n,
java.lang.String ont)
Recursively expands a goal node to populate the rule goal tree |
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.DataProperty> |
getAllSubDataProps(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.DataProperty dp)
Utility to get all the sub data properties |
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.Description> |
getAllSubDescriptions(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.OWLClass oc)
Utility to get all the sub class |
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.ObjectProperty> |
getAllSubObjectProps(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.ObjectProperty dp)
Utility to get all the sub object property |
private java.util.List<org.semanticweb.kaon2.api.rules.Variable> |
getExistentialVariables(org.semanticweb.kaon2.api.rules.Rule r)
Helper function |
java.util.Vector<org.semanticweb.kaon2.api.rules.Predicate> |
getSubPreds(MapAtom ma)
implementaion of subPreds |
static void |
main(java.lang.String[] args)
|
private org.semanticweb.kaon2.api.rules.Rule |
makeFresh(org.semanticweb.kaon2.api.rules.Rule r)
Helper method, makes all exisistential variables fresh variables existential variables are all non distingusiged variables |
boolean |
match(MapAtom atom1,
java.util.Vector<org.semanticweb.kaon2.api.rules.Predicate> goalNodeSubPreds,
MapAtom atom2,
java.util.HashMap subst)
A modified unify that considers taxonomic reasoning instead of a single atom it attempts to match all the sub predicates Returns true with the substitution if the match is found |
private void |
performGAVExpansion(GoalNode n,
GAVMapView gmv)
GAV definitional expansion of a goal node |
private void |
performLAVExpansion(GoalNode n,
LAVMapView lmv)
Performs a LAV definitional expansion of a goal node |
private void |
showSubst(java.util.HashMap subst)
Utitility to show the value of a substitution |
void |
showTree()
Utility to show the current RGT |
| Methods inherited from class edu.lehigh.swat.obione.KAON2AbstractConnection |
|---|
createOntology, endConnection, loadOntology, makeConnection, showOntologyAxioms, showOntologyEntities |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private RGT rgt
private MapKB mapKB
private LAVProcessor lp
private int counter
private java.util.ArrayList<org.semanticweb.kaon2.api.rules.Variable> varList
| Constructor Detail |
|---|
public Reformulator(MapKB mapKB)
| Method Detail |
|---|
public boolean match(MapAtom atom1,
java.util.Vector<org.semanticweb.kaon2.api.rules.Predicate> goalNodeSubPreds,
MapAtom atom2,
java.util.HashMap subst)
atom1 - goalNodeSubPreds - atom2 - subst -
public java.util.Vector<org.semanticweb.kaon2.api.rules.Predicate> getSubPreds(MapAtom ma)
ma -
void expand(GoalNode n,
java.lang.String ont)
n - public void buildTree(OBI1Query q)
public void showTree()
public static void main(java.lang.String[] args)
throws org.semanticweb.kaon2.api.KAON2Exception,
java.lang.InterruptedException
args -
org.semanticweb.kaon2.api.KAON2Exception
java.lang.InterruptedException
private void performLAVExpansion(GoalNode n,
LAVMapView lmv)
gn - Goal node to be expandedrn - LAVMapView that will be applied
private void performGAVExpansion(GoalNode n,
GAVMapView gmv)
gn - Goal node to be expanded
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.Description> getAllSubDescriptions(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.OWLClass oc)
throws org.semanticweb.kaon2.api.KAON2Exception
ont - oc -
org.semanticweb.kaon2.api.KAON2Exception
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.ObjectProperty> getAllSubObjectProps(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.ObjectProperty dp)
throws org.semanticweb.kaon2.api.KAON2Exception
ont - dp -
org.semanticweb.kaon2.api.KAON2Exception
private java.util.HashSet<org.semanticweb.kaon2.api.owl.elements.DataProperty> getAllSubDataProps(org.semanticweb.kaon2.api.Ontology ont,
org.semanticweb.kaon2.api.owl.elements.DataProperty dp)
throws org.semanticweb.kaon2.api.KAON2Exception
ont - dp -
org.semanticweb.kaon2.api.KAON2Exception
private org.semanticweb.kaon2.api.rules.Rule applySubToRule(java.util.HashMap theta,
org.semanticweb.kaon2.api.rules.Rule r)
private org.semanticweb.kaon2.api.rules.Literal applySub(java.util.HashMap theta,
org.semanticweb.kaon2.api.rules.Literal l)
private org.semanticweb.kaon2.api.rules.Rule makeFresh(org.semanticweb.kaon2.api.rules.Rule r)
-
private java.util.List<org.semanticweb.kaon2.api.rules.Variable> getExistentialVariables(org.semanticweb.kaon2.api.rules.Rule r)
r -
private void showSubst(java.util.HashMap subst)
subst -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||