Static Public Member Functions | |
static void | assertActionEndTime (String actionInst) |
static void | assertDataPropertyForInst (String inst, String prop, String val, String type) |
static void | assertObjectPropertyForInst (String inst, String prop, String val) |
static void | assertPropertiesForInstance (String inst, HashMap< String, Vector< String >> propVal) |
static void | assertSubClassOf (String subClass, String superClass) |
static void | clearActionStateTransitions (String action) |
static void | clearActionVisHighlight () |
static String | createActionInst (String currentActClass) |
static String | createObjInstWithPose (String objClass, String perceptionMethod, Vector< Float > pose) |
static String | createOWLInst (String owlClass) |
static String | createRestriction (String owlClass, String prop, String value, String restrType, String sourceRef) |
static String | createStateTransition (String fromState, String toState, String causedBy) |
static void | deleteObjectInstance (String iri) |
static void | deleteObjectInstanceWithChildren (String iri) |
static boolean | evaluateCondition (String condition, String objActOn) |
static String | getSemanticMapInstance (String roomNumber, String floorNumber, String streetNumber, String streetName) |
static void | linkActionInTaskContext (String actionInst, String recipeInst) |
static void | loadActionIntoVis (String recipe_class) |
static boolean | owlClassExists (String owlClass) |
static void | parseOwlFile (String filename) |
static Vector< String > | readAllInstancesOfClass (String owlClass) |
static HashMap< String, Vector < String > > | readInformationForClass (String owlClass) |
static HashMap< String, Vector < String > > | readInformationForInstance (String owlInst) |
static String | readLatestDetectionOfObjectClass (String objClass) |
static String | readLatestDetectionOfObjectInst (String objInst) |
static int | readNumObjectInstances (String objClass) |
static Vector< Float > | readObjectClassPose (String objClass) |
static Vector< Float > | readObjectPose (String objInst) |
static String | readOutputOfPrevAction (String currentActInst, String prevActionClass, String prop) |
static Vector< Float > | readPointXYAZPose (String pointInst) |
static Vector< Float > | readPointXYPose (String pointInst) |
static Vector< String > | readPrevActionInTask (String currentActInst) |
static String | readRecipeClass (String command) |
static Vector< String > | readTypesOfInstance (String owlInst) |
static void | setActionVisHighlight (String action_class) |
static void | setObjPose (String objInst, String perceptionMethod, Vector< Float > pose) |
static void | startActionVis (String recipe_class) |
static void | writeActionToOWLFile (String actionClass, String file) |
Prolog query wrapper classes for reading and writing information from/to the belief state in the UNR execution engine.
These classes are to serve as convenience methods to facilitate the access to information in the belief state without having to deal with Prolog statements.
Definition at line 27 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.assertActionEndTime | ( | String | actionInst | ) | [inline, static] |
Sets the endTime of an action to the current time point
actionInst | Action instance whose end time is to be set |
Definition at line 454 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.assertDataPropertyForInst | ( | String | inst, |
String | prop, | ||
String | val, | ||
String | type | ||
) | [inline, static] |
Assert a single property for an instance
inst | OWL identifier of an instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
prop | OWL identifier of a property such as 'http://ias.cs.tum.edu/kb/knowrob.owl#on-Physical' |
val | String value to be asserted |
type | Type of val (usually an XSD type such as 'http://www.w3.org/2001/XMLSchema#string' |
Definition at line 538 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.assertObjectPropertyForInst | ( | String | inst, |
String | prop, | ||
String | val | ||
) | [inline, static] |
Assert a single property for an instance
inst | OWL identifier of an instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
prop | OWL identifier of a property such as 'http://ias.cs.tum.edu/kb/knowrob.owl#on-Physical' |
val | OWL identifier of an instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
Definition at line 519 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.assertPropertiesForInstance | ( | String | inst, |
HashMap< String, Vector< String >> | propVal | ||
) | [inline, static] |
Assert a set of properties for an instance (given as HashMap propName--Vector<values>)
instOWL | identifier of an instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
propVal | HashMap<String, Vector<String> of the form propName --> Vector(propValues) |
Definition at line 498 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.assertSubClassOf | ( | String | subClass, |
String | superClass | ||
) | [inline, static] |
Add a subClassOf axiom for a class
subClass | OWL identifier of the subclass such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
superClass | OWL identifier of the superclass such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Container' |
Definition at line 584 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.clearActionStateTransitions | ( | String | action | ) | [inline, static] |
Clear state transitions asserted for an action (i.e. the transitions between sub-actions)
owlClass | The action whose sub-action transitions are to be cleared |
Definition at line 654 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.clearActionVisHighlight | ( | ) | [inline, static] |
Definition at line 38 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.createActionInst | ( | String | currentActClass | ) | [inline, static] |
Create an instance of the current action, assert startTime
currentActClass | OWL identifier of the current action class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#PickingUpAnObject' |
Definition at line 432 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.createObjInstWithPose | ( | String | objClass, |
String | perceptionMethod, | ||
Vector< Float > | pose | ||
) | [inline, static] |
Create an instance of an object/person incl. pose (and detection of the pose)
objClass | |
perceptionMethod |
Definition at line 684 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.createOWLInst | ( | String | owlClass | ) | [inline, static] |
Create an instance of an OWL Class
owlClass | The class to be instantiated |
Definition at line 599 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.createRestriction | ( | String | owlClass, |
String | prop, | ||
String | value, | ||
String | restrType, | ||
String | sourceRef | ||
) | [inline, static] |
Creates an OWL class restriction in Prolog
owlClass | Object class to which the restriction is to be added |
prop | Property to be restricted |
value | Value definition to be set |
restrType | Type of restriction (owl:someValuesFrom, owl:allValuesFrom or owl:hasValue) |
sourceRef | String to identify the source module of the created triples |
Definition at line 560 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.createStateTransition | ( | String | fromState, |
String | toState, | ||
String | causedBy | ||
) | [inline, static] |
Create an instance of a state transition
owlClass | The class to be instantiated |
Definition at line 620 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.deleteObjectInstance | ( | String | iri | ) | [inline, static] |
Definition at line 829 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.deleteObjectInstanceWithChildren | ( | String | iri | ) | [inline, static] |
Definition at line 834 of file PrologQueryUtils.java.
static boolean edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.evaluateCondition | ( | String | condition, |
String | objActOn | ||
) | [inline, static] |
Check if 'objActOn' fulfills the condition 'condition' (if objActOn is an individual) or if any of its individuals fulfills the condition (it objActOn is a class)
condition | OWL Class specification (usually based on restrictions) |
objActOn | OWL Class or individual |
Definition at line 757 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.getSemanticMapInstance | ( | String | roomNumber, |
String | floorNumber, | ||
String | streetNumber, | ||
String | streetName | ||
) | [inline, static] |
Convenience method to read the (first) instance of a SemanticEnvironmentMap
streetName | |
streetNumber | |
floorNumber | |
roomNumber |
Definition at line 787 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.linkActionInTaskContext | ( | String | actionInst, |
String | recipeInst | ||
) | [inline, static] |
Links action to the higher-level task instance and to the previous action in the task
actionInst | Action instance to be integrated |
recipeinst | Higher-level task that actionInst is part of |
Definition at line 469 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.loadActionIntoVis | ( | String | recipe_class | ) | [inline, static] |
Definition at line 49 of file PrologQueryUtils.java.
static boolean edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.owlClassExists | ( | String | owlClass | ) | [inline, static] |
Checks if an OWL class exists in KnowRob (by checking if it is derived from another class using a subClassOf definition)
owlClass | Identifier of an OWL class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 411 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.parseOwlFile | ( | String | filename | ) | [inline, static] |
Definition at line 54 of file PrologQueryUtils.java.
static Vector<String> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readAllInstancesOfClass | ( | String | owlClass | ) | [inline, static] |
Select all instances of a class
owlClass | Identifier of an OWL class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 88 of file PrologQueryUtils.java.
static HashMap<String, Vector<String> > edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readInformationForClass | ( | String | owlClass | ) | [inline, static] |
Read all information for a class (class_properties)
owlClass | Identifier of an OWL class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 166 of file PrologQueryUtils.java.
static HashMap<String, Vector<String> > edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readInformationForInstance | ( | String | owlInst | ) | [inline, static] |
Read all information for an instance (owl_has)
owlInst | Identifier of an OWL instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
Definition at line 149 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readLatestDetectionOfObjectClass | ( | String | objClass | ) | [inline, static] |
Read the latest detection of an object/person/... class
objClass | Identifier of an OWL class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 129 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readLatestDetectionOfObjectInst | ( | String | objInst | ) | [inline, static] |
Read the latest detection of an object/person/... instance
objInst | OWL identifier of an object instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
Definition at line 109 of file PrologQueryUtils.java.
static int edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readNumObjectInstances | ( | String | objClass | ) | [inline, static] |
Read the number of instances that exist for one class, e.g. to check if there are at least N instances
objClass | Identifier of an OWL class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 66 of file PrologQueryUtils.java.
static Vector<Float> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readObjectClassPose | ( | String | objClass | ) | [inline, static] |
Read the 6D pose matrix of the first instance of the class objClass that can be found.
'Object' is thereby defined in a very wide sense (knowrob:'EnduringThing-Localized') and also includes people and robots.
TODO: switch from the hacky vector format to RLS or something cleaner and better-defined
objClass | OWL identifier of an object class such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup' |
Definition at line 371 of file PrologQueryUtils.java.
static Vector<Float> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readObjectPose | ( | String | objInst | ) | [inline, static] |
Read the 6D pose matrix of a given object instance
'Object' is thereby defined in a very wide sense (knowrob:'EnduringThing-Localized') and also includes people and robots.
TODO: switch from the hacky vector format to RLS or something cleaner and better-defined
objInst | OWL identifier of an object instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Cup123' |
Definition at line 336 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readOutputOfPrevAction | ( | String | currentActInst, |
String | prevActionClass, | ||
String | prop | ||
) | [inline, static] |
Read output 'prop' of an earlier action 'actionClass' performed in the task
currentActInst | OWL identifier of an action instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Pick123' |
prevActionClass | Type of the previous action whose output is to be read |
prop | Property of that action whose value is to be read |
Definition at line 238 of file PrologQueryUtils.java.
static Vector<Float> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readPointXYAZPose | ( | String | pointInst | ) | [inline, static] |
Read the XY-position plus AZ-orientation of a given point instance
TODO: switch from the hacky vector format to RLS or something cleaner and better-defined
pointInst | OWL identifier of a point such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Point123' |
Definition at line 301 of file PrologQueryUtils.java.
static Vector<Float> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readPointXYPose | ( | String | pointInst | ) | [inline, static] |
Read the XY-position of a given point instance
TODO: switch from the hacky vector format to RLS or something cleaner and better-defined
pointInst | OWL identifier of a point such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Point123' |
Definition at line 271 of file PrologQueryUtils.java.
static Vector<String> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readPrevActionInTask | ( | String | currentActInst | ) | [inline, static] |
Read prior actions performed in the task
currentActInst | OWL identifier of an action instance such as 'http://ias.cs.tum.edu/kb/knowrob.owl#Pick123' |
Definition at line 216 of file PrologQueryUtils.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readRecipeClass | ( | String | command | ) | [inline, static] |
Read the main action class for the command to be performed (using the forCommand specification)
command | The command the recipe is to execute, e.g. 'serve a drink' |
IOException |
Definition at line 197 of file PrologQueryUtils.java.
static Vector<String> edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.readTypesOfInstance | ( | String | owlInst | ) | [inline, static] |
Definition at line 176 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.setActionVisHighlight | ( | String | action_class | ) | [inline, static] |
Definition at line 31 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.setObjPose | ( | String | objInst, |
String | perceptionMethod, | ||
Vector< Float > | pose | ||
) | [inline, static] |
Set the pose of an instance by adding a detection to it
objInst | |
perceptionMethod | |
pose |
Definition at line 721 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.startActionVis | ( | String | recipe_class | ) | [inline, static] |
Definition at line 44 of file PrologQueryUtils.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologQueryUtils.writeActionToOWLFile | ( | String | actionClass, |
String | file | ||
) | [inline, static] |
Definition at line 824 of file PrologQueryUtils.java.