Static Public Member Functions | |
static String | addSingleQuotes (String str) |
static ArrayList< String[]> | dottedPairsToArrayList (String rest) |
static HashMap< String, Vector < String > > | executeQuery (String query) |
static String | fileNameFromIRI (String iri) |
static String | getLiteralType (String typedValue) |
static void | initJPLProlog (String initPackage) |
static void | initLocalProlog (String initFile) |
static boolean | isInitialized () |
static String | prefixFromIRI (String iri) |
static String | removeSingleQuotes (String str) |
static void | setInitialized (boolean initialized) |
static String | stripLiteralType (String typedValue) |
static String | valueFromIRI (String iri) |
Static Private Attributes | |
static boolean | initialized = false |
Definition at line 16 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.addSingleQuotes | ( | String | str | ) | [inline, static] |
Adds single quotes at the start and end of a string if applicable.
Useful when dealing with OWL IRI identifiers that need to be in single quotes in Prolog.
str | String with or without single quotes at the beginning and end |
Definition at line 194 of file PrologInterface.java.
static ArrayList<String[]> edu.tum.cs.ias.knowrob.prolog.PrologInterface.dottedPairsToArrayList | ( | String | rest | ) | [inline, static] |
Convert Prolog list (dotted pairs) into a Java ArrayList
rest |
Definition at line 142 of file PrologInterface.java.
static HashMap<String, Vector<String> > edu.tum.cs.ias.knowrob.prolog.PrologInterface.executeQuery | ( | String | query | ) | [inline, static] |
Wrapper around the JPL Prolog query interface. Assumes a Prolog engine to be initialized, e.g. using initJPLProlog
query | A query string in common SWI Prolog syntax |
Definition at line 89 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.fileNameFromIRI | ( | String | iri | ) | [inline, static] |
Splits an IRI to extract the filename after the last slash
iri | IRI of the form http://.../file.name |
Definition at line 242 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.getLiteralType | ( | String | typedValue | ) | [inline, static] |
Retrieve the datatype / unit of measure from the literal(...) spec
typedValue | Value that potentially has a literal() spec around it |
Definition at line 286 of file PrologInterface.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologInterface.initJPLProlog | ( | String | initPackage | ) | [inline, static] |
Initialize a local Prolog engine with the ROS package given as argument
initPackage | String with the name of the package to be used for initialization |
Definition at line 28 of file PrologInterface.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologInterface.initLocalProlog | ( | String | initFile | ) | [inline, static] |
Initialize a local Prolog engine with the init file given as argument
initFile | String with the path of the file to be used for initialization |
Definition at line 60 of file PrologInterface.java.
static boolean edu.tum.cs.ias.knowrob.prolog.PrologInterface.isInitialized | ( | ) | [inline, static] |
Check if Prolog engine has been initialized.
Definition at line 308 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.prefixFromIRI | ( | String | iri | ) | [inline, static] |
Splits an IRI to extract the base IRI part before the hash sign '#'
iri | IRI of the form http://...#value |
Definition at line 224 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.removeSingleQuotes | ( | String | str | ) | [inline, static] |
Removes single quotes at the start and end of a string if applicable.
Useful when dealing with OWL IRI identifiers that need to be in single quotes in Prolog.
str | String with or without single quotes at the beginning and end |
Definition at line 174 of file PrologInterface.java.
static void edu.tum.cs.ias.knowrob.prolog.PrologInterface.setInitialized | ( | boolean | initialized | ) | [inline, static] |
Set initialization status of the Prolog engine, for example if it has been initialized using external methods.
initialized | true if initialized |
Definition at line 319 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.stripLiteralType | ( | String | typedValue | ) | [inline, static] |
Remove the literal(type('...', )) wrapper around literals coming from Prolog
typedValue | Value that potentially has a literal() spec around it |
Definition at line 260 of file PrologInterface.java.
static String edu.tum.cs.ias.knowrob.prolog.PrologInterface.valueFromIRI | ( | String | iri | ) | [inline, static] |
Splits an IRI to extract the identifier part after the hash sign '#'
iri | IRI of the form http://...#value |
Definition at line 207 of file PrologInterface.java.
boolean edu.tum.cs.ias.knowrob.prolog.PrologInterface.initialized = false [static, private] |
Definition at line 18 of file PrologInterface.java.