edu::tum::cs::ias::knowrob::PlanExporter Class Reference

List of all members.

Public Member Functions

String exportPlanToCPL (String plan_name)
 PlanExporter () throws IOException
JSONObject readCplMapping (String configFile) throws java.io.IOException

Static Public Member Functions

static void main (String[] args)

Static Public Attributes

static final String MAPPING_CONFIG_FILE = "etc/knowrob2cpl.json"

Private Member Functions

String instanceFromClass (String cl)
String knowrobToCpl (String val)
String lispify (String pl)
String locationDesignatorFromOWLclass (String loc, String obj_desig)
String objectDesignatorFromOWLclass (String objdef)

Private Attributes

HashMap< String, String > designators
int inst_counter = 100
JSONObject knowrobToCPL
ArrayList< String > plan

Detailed Description

Definition at line 19 of file PlanExporter.java.


Constructor & Destructor Documentation

edu::tum::cs::ias::knowrob::PlanExporter::PlanExporter (  )  throws IOException [inline]

Definition at line 37 of file PlanExporter.java.


Member Function Documentation

String edu::tum::cs::ias::knowrob::PlanExporter::exportPlanToCPL ( String  plan_name  )  [inline]

Definition at line 44 of file PlanExporter.java.

String edu::tum::cs::ias::knowrob::PlanExporter::instanceFromClass ( String  cl  )  [inline, private]

Create unique identifier from a class description

Parameters:
cl Class description
Returns:
Identifier: class description plus numeric ID

Definition at line 357 of file PlanExporter.java.

String edu::tum::cs::ias::knowrob::PlanExporter::knowrobToCpl ( String  val  )  [inline, private]

Convert KnowRob identifier to CPL

If there is a mapping defined in the knowrobToCPL HashMap, this mapping will be used. Otherwise, the methods returns a 'lispified' string, i.e. a string that is converted from CamelCase to lower-case-hyphenated

Parameters:
val KnowRob identifier
Returns:
Lispified identifier that can be used in CPL

Definition at line 283 of file PlanExporter.java.

String edu::tum::cs::ias::knowrob::PlanExporter::lispify ( String  pl  )  [inline, private]

'Lispify' a string: convert from Java CamelCaseSyntax into hyphenated-lower-case-syntax.

Parameters:
pl String to be lispified
Returns:
Resulting string in lowercase, hyphenated style

Definition at line 310 of file PlanExporter.java.

String edu::tum::cs::ias::knowrob::PlanExporter::locationDesignatorFromOWLclass ( String  loc,
String  obj_desig 
) [inline, private]

Create a location designator based on an OWL class specification

Parameters:
loc OWL class specification of a location
Returns:
ID of the generated designator

Definition at line 199 of file PlanExporter.java.

static void edu::tum::cs::ias::knowrob::PlanExporter::main ( String[]  args  )  [inline, static]

Main function for testing purposes

Parameters:
args 

Definition at line 367 of file PlanExporter.java.

String edu::tum::cs::ias::knowrob::PlanExporter::objectDesignatorFromOWLclass ( String  objdef  )  [inline, private]

Create an object designator based on an OWL class specification

Parameters:
objdef OWL class specification of an object
Returns:
ID of the generated designator

Definition at line 158 of file PlanExporter.java.

JSONObject edu::tum::cs::ias::knowrob::PlanExporter::readCplMapping ( String  configFile  )  throws java.io.IOException [inline]

Read JSON-formatted configuration file to initialize the mapping between KnowRob classes and CPL identifiers

Parameters:
configFile 
Exceptions:
java.io.IOException 

Definition at line 330 of file PlanExporter.java.


Member Data Documentation

HashMap<String, String> edu::tum::cs::ias::knowrob::PlanExporter::designators [private]

Definition at line 34 of file PlanExporter.java.

Definition at line 35 of file PlanExporter.java.

mapping from KnowRob concepts to CPL identifiers

Definition at line 33 of file PlanExporter.java.

final String edu::tum::cs::ias::knowrob::PlanExporter::MAPPING_CONFIG_FILE = "etc/knowrob2cpl.json" [static]

Definition at line 22 of file PlanExporter.java.

List of all action instances of the plan in the correct order, e.g. "action1", "action2", ...

Definition at line 28 of file PlanExporter.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables


knowrob_actions
Author(s): Moritz Tenorth
autogenerated on Fri Jan 11 10:03:58 2013