Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      edu.udo.cs.miningmart.m4.core.ConceptualDatatypes

All Implemented Interfaces:
  ConceptualDatatypes

    public class ConceptualDatatypes

extends java.lang.Object
implements ConceptualDatatypes

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.5 2006/09/27 14:59:59 euler Exp $
Author:
  Martin Scholz

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

Fields inherited from interface edu.udo.cs.miningmart.m4.ConceptualDatatypes
`CDT_BINARY, CDT_CATEGORIAL, CDT_CONSTANT, CDT_KEYATTRIB, CDT_NOMINAL, CDT_NUMERIC, CDT_ORDINAL, CDT_SCALAR, CDT_SPATIAL, CDT_TIME, CDT_TIMEGROUP, CDTYPES, datatypeCompatibilities`

Constructor Summary
`ConceptualDatatypes(DB db)`

Method Summary
`static boolean` | `checkDatatypeCompatibility(java.lang.String datatype1, java.lang.String datatype2)` For two given conceptual datatypes, it is checked whether the first is more general than the second.
`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

Throws:
  `M4Exception`
  `DbConnectionClosed`

Method Detail

### checkDatatypeCompatibility

    public static boolean checkDatatypeCompatibility(java.lang.String datatype1,
                                                     java.lang.String datatype2)

  For two given conceptual datatypes, it is checked whether the first is more general than the second.

  Parameters:
    `datatype1` - the first given datatype
    `datatype2` - the second given datatype
  Returns:
    TRUE iff the first datatype is more general than the second.

### 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)

  Specified by:
    `getIdForName` in interface `ConceptualDatatypes`
  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)

  Specified by:
    `getNameForId` in interface `ConceptualDatatypes`
  Parameters:
    `id` - the ID of a conceptual datatype
  Returns:
    the conceptual datatype's name

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005