jcolibri.datatypes
Class ConceptType

java.lang.Object
  extended by jcolibri.datatypes.ConceptType
All Implemented Interfaces:
TypeAdaptor

public class ConceptType
extends java.lang.Object
implements TypeAdaptor

Represents a Concept of an ontology.

This class uses OntoBridge to connect with the ontology.

It can manage both short or long names to localize a concept:
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.

Version:
2.0
Author:
Juan A. Recio-García.
See Also:
TypeAdaptor

Constructor Summary
ConceptType()
           
ConceptType(java.lang.String concept)
          Creates a ConceptType connected with the concept in the ontology.
ConceptType(java.lang.String concept, boolean useShortName)
          Creates a ConceptType looking for the concept in the ontology with the same name.
 
Method Summary
 void fromString(java.lang.String content)
          Reads the type from a string.
 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jcolibri.connector.TypeAdaptor
equals
 

Constructor Detail

ConceptType

public ConceptType()

ConceptType

public ConceptType(java.lang.String concept,
                   boolean useShortName)
            throws OntologyAccessException
Creates a ConceptType looking for the concept in the ontology with the same name.

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.

Parameters:
concept - Name of the concept in the ontology
useShortName - Use long or short name
Throws:
OntologyAccessException

ConceptType

public ConceptType(java.lang.String concept)
            throws OntologyAccessException
Creates a ConceptType connected with the concept in the ontology. It uses a short name format.

Parameters:
concept - Name of the concept in the ontology
Throws:
OntologyAccessException
Method Detail

fromString

public void fromString(java.lang.String content)
                throws OntologyAccessException
Description copied from interface: TypeAdaptor
Reads the type from a string.

Specified by:
fromString in interface TypeAdaptor
Throws:
OntologyAccessException

toString

public java.lang.String toString()
Description copied from interface: TypeAdaptor
Returns a string representation of the type.

Specified by:
toString in interface TypeAdaptor
Overrides:
toString in class java.lang.Object

useShortName

public void useShortName(boolean yesno)
Indicates if using a long or short name.

Parameters:
yesno -