$search

edu::tum::cs::ias::knowrob::owl::OWLThing Class Reference

Inheritance diagram for edu::tum::cs::ias::knowrob::owl::OWLThing:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int compareTo (OWLThing o)
boolean equals (Object b)
String getIRI ()
String getIRIFilename ()
String getIRIPrefix ()
String getLabel ()
String getShortName ()
boolean isReadFromProlog ()
boolean needsSaveToProlog ()
void setIri (String iri)
void setLabel (String label)
void setReadFromProlog (boolean readFromProlog)
void setSaveToProlog (boolean saveToProlog)
String toString ()

Static Public Member Functions

static String addSingleQuotes (String str)
static String getFilenameOfIRI (String iri)
static OWLThing getOWLThing (String iri, String label)
static OWLThing getOWLThingByShortname (String shortname)
static String getPrefixOfIRI (String iri)
static String getShortNameOfIRI (String iri)
static void removeOWLThing (String iri)
static String removeSingleQuotes (String str)

Protected Member Functions

 OWLThing (String iri, String label)

Protected Attributes

String iri
String label
boolean readFromProlog = false
boolean saveToProlog = false

Static Protected Attributes

static Hashtable< String,
OWLThing
identifiers = new Hashtable<String, OWLThing>()

Detailed Description

Definition at line 5 of file OWLThing.java.


Constructor & Destructor Documentation

edu::tum::cs::ias::knowrob::owl::OWLThing::OWLThing ( String  iri,
String  label 
) [inline, protected]

Constructor. Set the IRI and optionally a label. If none is given, it is initialized with the IRI's short name.

Parameters:
iri Identifier of this thing.
label Optional natural-language label.

Definition at line 69 of file OWLThing.java.


Member Function Documentation

static String edu::tum::cs::ias::knowrob::owl::OWLThing::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:
str String with or without single quotes at the beginning and end
Returns:
String with single quotes at the beginning and end

Definition at line 243 of file OWLThing.java.

int edu::tum::cs::ias::knowrob::owl::OWLThing::compareTo ( OWLThing  o  )  [inline]

Implement the Comparable interface. OWLThing are compared based on their IRI.

Parameters:
o OWLThing to compare to

Definition at line 185 of file OWLThing.java.

boolean edu::tum::cs::ias::knowrob::owl::OWLThing::equals ( Object  b  )  [inline]

Equality of OWL classes is defined as equality of their IRIs

Parameters:
b OWLThing to compare to
Returns:
true if the IRIs are equal

Definition at line 196 of file OWLThing.java.

static String edu::tum::cs::ias::knowrob::owl::OWLThing::getFilenameOfIRI ( String  iri  )  [inline, static]

Definition at line 275 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::getIRI (  )  [inline]

Get the IRI of this OWLThing

Returns:
IRI of this OWLThing

Definition at line 113 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::getIRIFilename (  )  [inline]

Get the filename part of the IRI, the one after the last slash '/' and before the hash sign ('#')

Returns:
Filename part of the IRI

Definition at line 172 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::getIRIPrefix (  )  [inline]

Get the IRI prefix, i.e. the part of the IRI in front of the hash sign ('#')

Returns:
Prefix of the IRI

Definition at line 149 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::getLabel (  )  [inline]

Get the Label of this OWLThing

Returns:
Label of this OWLThing

Definition at line 130 of file OWLThing.java.

static OWLThing edu::tum::cs::ias::knowrob::owl::OWLThing::getOWLThing ( String  iri,
String  label 
) [inline, static]

OWLThing factory. Return existing instance, if available, and create new OWLThing instance if necessary. Avoids duplicate instances with the same IRI.

Parameters:
iri Identifier of this thing.
label Optional natural-language label.
Returns:
Instance of an OWLThing with the specified IRI

Definition at line 45 of file OWLThing.java.

static OWLThing edu::tum::cs::ias::knowrob::owl::OWLThing::getOWLThingByShortname ( String  shortname  )  [inline, static]

Search the IRI map for IRIs that end with the given short name, return the object or null if not found

Parameters:
iri 
label 
Returns:

Definition at line 89 of file OWLThing.java.

static String edu::tum::cs::ias::knowrob::owl::OWLThing::getPrefixOfIRI ( String  iri  )  [inline, static]

Definition at line 265 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::getShortName (  )  [inline]

Get the thing's short name, i.e. the part of the IRI after the hash sign ('#')

Returns:
Short name of the OWLThing

Definition at line 161 of file OWLThing.java.

static String edu::tum::cs::ias::knowrob::owl::OWLThing::getShortNameOfIRI ( String  iri  )  [inline, static]

Get the short name of the provided IRI, i.e. the part of the IRI after the hash sign ('#')

Returns:
Short name of the IRI

Definition at line 254 of file OWLThing.java.

boolean edu::tum::cs::ias::knowrob::owl::OWLThing::isReadFromProlog (  )  [inline]

Definition at line 293 of file OWLThing.java.

boolean edu::tum::cs::ias::knowrob::owl::OWLThing::needsSaveToProlog (  )  [inline]

Definition at line 303 of file OWLThing.java.

static void edu::tum::cs::ias::knowrob::owl::OWLThing::removeOWLThing ( String  iri  )  [inline, static]

Remove the IRI from the internal buffer.

Parameters:
iri IRI of the Thing to be removed

Definition at line 104 of file OWLThing.java.

static String edu::tum::cs::ias::knowrob::owl::OWLThing::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:
str String with or without single quotes at the beginning and end
Returns:
String without single quotes at the beginning and end

Definition at line 224 of file OWLThing.java.

void edu::tum::cs::ias::knowrob::owl::OWLThing::setIri ( String  iri  )  [inline]

Set the IRI of this OWLThing

Parameters:
iri IRI of this OWLThing

Definition at line 122 of file OWLThing.java.

void edu::tum::cs::ias::knowrob::owl::OWLThing::setLabel ( String  label  )  [inline]

Set the Label of this OWLThing

Parameters:
label Label of this OWLThing

Definition at line 138 of file OWLThing.java.

void edu::tum::cs::ias::knowrob::owl::OWLThing::setReadFromProlog ( boolean  readFromProlog  )  [inline]

Definition at line 298 of file OWLThing.java.

void edu::tum::cs::ias::knowrob::owl::OWLThing::setSaveToProlog ( boolean  saveToProlog  )  [inline]

Definition at line 308 of file OWLThing.java.

String edu::tum::cs::ias::knowrob::owl::OWLThing::toString (  )  [inline]

Print as the IRI

Definition at line 210 of file OWLThing.java.


Member Data Documentation

Hashtable<String, OWLThing> edu::tum::cs::ias::knowrob::owl::OWLThing::identifiers = new Hashtable<String, OWLThing>() [static, protected]

Map containing references to all existing OWL identifiers to avoid duplicate creation

Definition at line 11 of file OWLThing.java.

Unique identifier of this Thing

Definition at line 16 of file OWLThing.java.

Natural-language label

Definition at line 21 of file OWLThing.java.

Flag indicating if the properties of this Thing have been read from Prolog

Definition at line 26 of file OWLThing.java.

Flag indicating if local modifications need to be synchronized with Prolog

Definition at line 32 of file OWLThing.java.


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


knowrob_common
Author(s): Moritz Tenorth
autogenerated on Tue Mar 5 12:14:08 2013