gate.creole.ontology
Class OntologyUtilities

java.lang.Object
  extended by gate.creole.ontology.OntologyUtilities

Deprecated. the use of this class and all its methods should be avoided in the future. See the individual methods for replacements.

@Deprecated
public class OntologyUtilities
extends Object

This class provides various Utility methods that can be used to perform some generic options. For more information see javadoc of each individual static method.

Author:
Niraj Aswani, Johann Petrak

Field Summary
private static HashMap<String,DataType> datatypeMap
          Deprecated. Map containing uri and respective instance of datatypes
private static HashMap<String,Locale> localsMap
          Deprecated. Map containing language codes and their respective locales
 
Constructor Summary
OntologyUtilities()
          Deprecated.  
 
Method Summary
static URI createURI(Ontology ontology, String aResourceName, boolean isAnonymousResource)
          Deprecated. - use Ontology.createOURI(String) and related methods instead.
static DataType getDataType(String datatypeURI)
          Deprecated. use DataType.getDataType(java.lang.String) instead
static Locale getLocale(String languageCode)
          Deprecated. use DataType.getLocale(java.lang.String) instead
static Ontology getOntology(URL url)
          Deprecated. - this method should be avoided
static String getResourceName(String uri)
          Deprecated. use ONodeID.getResourceName() instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

datatypeMap

private static HashMap<String,DataType> datatypeMap
Deprecated. 
Map containing uri and respective instance of datatypes


localsMap

private static HashMap<String,Locale> localsMap
Deprecated. 
Map containing language codes and their respective locales

Constructor Detail

OntologyUtilities

public OntologyUtilities()
Deprecated. 
Method Detail

getOntology

@Deprecated
public static Ontology getOntology(URL url)
                            throws ResourceInstantiationException
Deprecated. - this method should be avoided

Checks the availability of an existing instance of the Ontology with the given URL in the GATE's CreoleRegister. If found, returns the first available one (doesn't guranttee in which order). If not found, attempts to create one using OWLIM implementation with RDF/XML as ontology type and if successful returns the newly created instance of the ontology.

Parameters:
url -
Returns:
Throws:
ResourceInstantiationException

getResourceName

@Deprecated
public static String getResourceName(String uri)
Deprecated. use ONodeID.getResourceName() instead

Given a URI, this methord returns the name part

Parameters:
uri -
Returns:

getDataType

@Deprecated
public static DataType getDataType(String datatypeURI)
Deprecated. use DataType.getDataType(java.lang.String) instead

Gets the respective datatype for the given datatype URI. If the URI is invalid, the method returns null.

Parameters:
datatypeURI -
Returns:

getLocale

@Deprecated
public static Locale getLocale(String languageCode)
Deprecated. use DataType.getLocale(java.lang.String) instead

Gets the respective locale for the given 2 character language code. If the code doesn't match, the method returns null.

Parameters:
languageCode -
Returns:

createURI

@Deprecated
public static URI createURI(Ontology ontology,
                                       String aResourceName,
                                       boolean isAnonymousResource)
Deprecated. - use Ontology.createOURI(String) and related methods instead.

This method by using the default name space and the provided ontology resource name, creates a new instance of URI. If isAnonymousResource is set to true, an anonymous URI only using the resource name is created.

Parameters:
ontology -
aResourceName -
isAnonymousResource -
Returns:
an instance of URI