edu.udo.cs.miningmart.m4.core
Class ConceptualDatatypes

java.lang.Object
  extended byedu.udo.cs.miningmart.m4.core.ConceptualDatatypes
All Implemented Interfaces:
java.io.Serializable

public class ConceptualDatatypes
extends java.lang.Object
implements java.io.Serializable

This class represents the conceptual datatypes stored in the M4 model and takes care of mapping between the ID and name representations. One instance of this class (e.g. static in class BaseAttribute is sufficient, adding/changing the predefined set of conceptual datatypes at runtime is not supported.

Version:
$Id: ConceptualDatatypes.java,v 1.3 2006/04/11 14:10:14 euler Exp $
Author:
Martin Scholz
See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIB_DATATYPE_ID
          Database attribute name storing the datatype IDs
static java.lang.String ATTRIB_DATATYPE_NAME
          Database attribute name storing the datatype names
static java.lang.String M4_TABLE_NAME
          Name of the M4 table mapping IDs to conceptual datatype names
 
Constructor Summary
ConceptualDatatypes(DB db)
           
 
Method Summary
 long getIdForName(java.lang.String name)
           
 java.lang.String getNameForId(long id)
           
static java.lang.String guessConceptualTypeGivenRelationalType(java.lang.String relationalTypeName)
          Static method to guess the conceptual datatype given a relational datatype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

M4_TABLE_NAME

public static final java.lang.String M4_TABLE_NAME
Name of the M4 table mapping IDs to conceptual datatype names

See Also:
Constant Field Values

ATTRIB_DATATYPE_ID

public static final java.lang.String ATTRIB_DATATYPE_ID
Database attribute name storing the datatype IDs

See Also:
Constant Field Values

ATTRIB_DATATYPE_NAME

public static final java.lang.String ATTRIB_DATATYPE_NAME
Database attribute name storing the datatype names

See Also:
Constant Field Values
Constructor Detail

ConceptualDatatypes

public ConceptualDatatypes(DB db)
                    throws M4Exception,
                           DbConnectionClosed
Method Detail

guessConceptualTypeGivenRelationalType

public static java.lang.String guessConceptualTypeGivenRelationalType(java.lang.String relationalTypeName)
                                                               throws M4Exception
Static method to guess the conceptual datatype given a relational datatype.

Parameters:
relationalTypeName - the M4 relational data type name
Returns:
the M4 conceptual data type name that is guessed by default
Throws:
M4Exception

getIdForName

public long getIdForName(java.lang.String name)
Parameters:
name - the name of a conceptual datatype (case senitive)
Returns:
the id representing this datatype or 0 if not found

getNameForId

public java.lang.String getNameForId(long id)
Parameters:
id - the ID of a conceptual datatype
Returns:
the conceptual datatype's name


Copyright © 2001-2005