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>() |
Definition at line 6 of file OWLThing.java.
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.
iri | Identifier of this thing. |
label | Optional natural-language label. |
Definition at line 70 of file OWLThing.java.
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.
str | String with or without single quotes at the beginning and end |
Definition at line 244 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.
o | OWLThing 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
b | OWLThing to compare to |
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.
String edu.tum.cs.ias.knowrob.owl.OWLThing.getIRI | ( | ) | [inline] |
Get the IRI of this OWLThing
Definition at line 114 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 ('#')
Definition at line 173 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 ('#')
Definition at line 150 of file OWLThing.java.
String edu.tum.cs.ias.knowrob.owl.OWLThing.getLabel | ( | ) | [inline] |
Get the 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.
iri | Identifier of this thing. |
label | Optional natural-language label. |
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
iri | |
label |
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.
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 ('#')
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 ('#')
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.
iri | Base IRI to be extended |
Definition at line 299 of file OWLThing.java.
boolean edu.tum.cs.ias.knowrob.owl.OWLThing.isReadFromProlog | ( | ) | [inline] |
Definition at line 313 of file OWLThing.java.
boolean edu.tum.cs.ias.knowrob.owl.OWLThing.needsSaveToProlog | ( | ) | [inline] |
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.
iri | IRI 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.
str | String with or 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
iri | IRI 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
label | Label 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.
String edu.tum.cs.ias.knowrob.owl.OWLThing.toString | ( | ) | [inline] |
Print as the IRI
Definition at line 211 of file OWLThing.java.
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.
String edu.tum.cs.ias.knowrob.owl.OWLThing.iri [protected] |
Unique identifier of this Thing
Definition at line 17 of file OWLThing.java.
String edu.tum.cs.ias.knowrob.owl.OWLThing.label [protected] |
Natural-language label
Definition at line 22 of file OWLThing.java.
boolean edu.tum.cs.ias.knowrob.owl.OWLThing.readFromProlog = false [protected] |
Flag indicating if the properties of this Thing have been read from Prolog
Definition at line 27 of file OWLThing.java.
boolean edu.tum.cs.ias.knowrob.owl.OWLThing.saveToProlog = false [protected] |
Flag indicating if local modifications need to be synchronized with Prolog
Definition at line 33 of file OWLThing.java.