Static Public Member Functions | Static Private Attributes
edu.tum.cs.ias.knowrob.prolog.PrologInterface Class Reference

List of all members.

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

Detailed Description

Definition at line 16 of file PrologInterface.java.


Member Function Documentation

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.

Parameters:
strString with or without single quotes at the beginning and end
Returns:
String with 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

Parameters:
rest
Returns:

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

Parameters:
queryA query string in common SWI Prolog syntax
Returns:
A HashMap<VariableName, ResultsVector>

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

Parameters:
iriIRI of the form http://.../file.name
Returns:
The filename file.name
Deprecated:
use OWLThing fileNameFromIRI instead

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

Parameters:
typedValueValue that potentially has a literal() spec around it
Returns:
IRI of the datatype or null if it cannot be determined

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

Parameters:
initPackageString 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

Parameters:
initFileString with the path of the file to be used for initialization

Definition at line 60 of file PrologInterface.java.

Check if Prolog engine has been initialized.

Returns:
true if 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 '#'

Parameters:
iriIRI of the form http://...#value
Returns:
The IRI base
Deprecated:
use OWLThing prefixFromIRI instead

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.

Parameters:
strString with or without single quotes at the beginning and end
Returns:
String 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.

Parameters:
initializedtrue 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

Parameters:
typedValueValue that potentially has a literal() spec around it
Returns:
cleaned value

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 '#'

Parameters:
iriIRI of the form http://...#value
Returns:
The identifier value
Deprecated:
use OWLThing valueFromIRI instead

Definition at line 207 of file PrologInterface.java.


Member Data Documentation

Definition at line 18 of file PrologInterface.java.


The documentation for this class was generated from the following file:


knowrob_common
Author(s): Moritz Tenorth
autogenerated on Sat Dec 28 2013 17:09:28