|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.datatypes.Instance
public class Instance
Represents an Instance of an ontology.
This class uses OntoBridge to connect with the ontology.
It can manage both short or long names to localize an instance:
For example: In the gaia.fdi.ucm.es/ontologies/Restaurant.owl ontology, the long name of the concept "wine" is
"gaia.fdi.ucm.es/ontologies/Restaurant.owl#wine.
The short name is just "wine" or "restaurant:wine" if "restaurant" is a defined prefix for that ontology.
TypeAdaptor
Constructor Summary | |
---|---|
Instance()
|
|
Instance(java.lang.String instance)
Creates an instance connected with the instance in the ontology. |
|
Instance(java.lang.String instance,
boolean useShortName)
Creates an Instance looking for the instance in the ontology with the same name. |
Method Summary | |
---|---|
static Instance |
createInstance(java.lang.String instanceName,
java.lang.String parentConcept)
|
boolean |
equals(java.lang.Object o)
You must define this method to avoid problems with the data base connector (Hibernate) |
void |
fromString(java.lang.String content)
Reads the type from a string. |
int |
hashCode()
|
java.lang.String |
toString()
Returns a string representation of the type. |
void |
useShortName(boolean yesno)
Indicates if using a long or short name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Instance()
public Instance(java.lang.String instance, boolean useShortName) throws OntologyAccessException
The useShortName param allows using short or long names. For example:
In the gaia.fdi.ucm.es/ontologies/Restaurant.owl ontology, the long name of the concept "wine" is "gaia.fdi.ucm.es/ontologies/Restaurant.owl#wine.
The short name is just "wine" or "restaurant:wine" if "restaurant" is a defined prefix for that ontology.
instance
- Name of the concept in the ontologyuseShortName
- Use long or short name
OntologyAccessException
public Instance(java.lang.String instance) throws OntologyAccessException
instance
- Name of the concept in the ontology
OntologyAccessException
Method Detail |
---|
public static Instance createInstance(java.lang.String instanceName, java.lang.String parentConcept)
public void fromString(java.lang.String content) throws OntologyAccessException
TypeAdaptor
fromString
in interface TypeAdaptor
OntologyAccessException
public java.lang.String toString()
TypeAdaptor
toString
in interface TypeAdaptor
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
TypeAdaptor
equals
in interface TypeAdaptor
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void useShortName(boolean yesno)
yesno
-
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |