Version: 1.1.1

org.biomoby.shared.datatypes
Class MapPrimitiveDataTypes

java.lang.Object
  extended by org.biomoby.shared.datatypes.MapPrimitiveDataTypes

public abstract class MapPrimitiveDataTypes
extends Object

Class containing static mapping between Biomoby primitive data types and names of classes they are represented by.

The class is usually not used by itself (because usually we need more than just primitive data types). Typically, a subclass of this class will be auto-generated from the data type definitions (as they are in a Biomoby registry (e.g. see MoSeS - Moby Services Support).

Version:
$Id: MapPrimitiveDataTypes.java,v 1.5 2008/03/03 11:34:17 senger Exp $
Author:
Martin Senger

Constructor Summary
MapPrimitiveDataTypes()
           
 
Method Summary
 Class getClass(String dataTypeName)
          Return a class that represents given data type.
 String getClassName(String dataTypeName)
          Return a class name that represents given data type.
static String getClassNameForPrimitives(String dataTypeName)
          Return a class name that represents given data type.
 int getMappingSize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPrimitiveDataTypes

public MapPrimitiveDataTypes()
Method Detail

getClass

public Class getClass(String dataTypeName)
               throws MobyException
Return a class that represents given data type.

Parameters:
dataTypeName - whose class is returned (e.g. String, NucleotideSequence,...)
Returns:
a corresponding class or null if the 'dataTypeName' was not found
Throws:
MobyException - if class name was found but class itself was not

getClassName

public String getClassName(String dataTypeName)
Return a class name that represents given data type.

Note that because this class cannot be made static (ask me why not), there is yet another method (getClassNameForPrimitives(java.lang.String) that deals only woth primitive and it is static.

Parameters:
dataTypeName - whose class name is returned (e.g. String, NucleotideSequence,...)
Returns:
a corresponding class name or null if the 'dataTypeName' was not found

getClassNameForPrimitives

public static String getClassNameForPrimitives(String dataTypeName)
Return a class name that represents given data type.

This cannot be overriden - so it works only for the data types stored directly in this class - which are the BioMoby primitive types.

Parameters:
dataTypeName - whose class name is returned (e.g. String, Integer,...); it makes sense only if 'dataTypeName' is a BioMoby primitive type
Returns:
a corresponding class name or null if the 'dataTypeName' was not found

getMappingSize

public int getMappingSize()

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010