Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
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 String getUniqueID (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 6 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:
iriIdentifier of this thing.
labelOptional natural-language label.

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

Definition at line 244 of file OWLThing.java.

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

Parameters:
oOWLThing to compare to

Definition at line 186 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:
bOWLThing to compare to
Returns:
true if the IRIs are equal

Definition at line 197 of file OWLThing.java.

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

Definition at line 276 of file OWLThing.java.

Get the IRI of this OWLThing

Returns:
IRI of this OWLThing

Definition at line 114 of file OWLThing.java.

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 173 of file OWLThing.java.

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 150 of file OWLThing.java.

Get the Label of this OWLThing

Returns:
Label of this OWLThing

Definition at line 131 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:
iriIdentifier of this thing.
labelOptional natural-language label.
Returns:
Instance of an OWLThing with the specified IRI

Definition at line 46 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 90 of file OWLThing.java.

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

Definition at line 266 of file OWLThing.java.

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 162 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 255 of file OWLThing.java.

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

Generate unique identifiers by adding a quasi-unique suffix to an IRI.

Parameters:
iriBase IRI to be extended
Returns:
Concatenation of iri with unique suffix

Definition at line 299 of file OWLThing.java.

Definition at line 313 of file OWLThing.java.

Definition at line 323 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:
iriIRI of the Thing to be removed

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

Definition at line 225 of file OWLThing.java.

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

Set the IRI of this OWLThing

Parameters:
iriIRI of this OWLThing

Definition at line 123 of file OWLThing.java.

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

Set the Label of this OWLThing

Parameters:
labelLabel of this OWLThing

Definition at line 139 of file OWLThing.java.

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

Definition at line 318 of file OWLThing.java.

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

Definition at line 328 of file OWLThing.java.

Print as the IRI

Definition at line 211 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 12 of file OWLThing.java.

Unique identifier of this Thing

Definition at line 17 of file OWLThing.java.

Natural-language label

Definition at line 22 of file OWLThing.java.

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

Definition at line 27 of file OWLThing.java.

Flag indicating if local modifications need to be synchronized with Prolog

Definition at line 33 of file OWLThing.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