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 Coordinates

    java.lang.Object
      edu.udo.cs.miningmart.m4.core.M4Object
          edu.udo.cs.miningmart.m4.core.M4Data
              edu.udo.cs.miningmart.m4.core.Coordinates

All Implemented Interfaces:
  java.lang.Comparable, M4Object, M4Table, java.io.Serializable, XmlInfo

public class Coordinates
extends M4Data
implements java.io.Serializable, XmlInfo

This class corresponds to one row in the table HCI_COORD_T.

Version:
  $Id: Coordinates.java,v 1.6 2006/04/11 14:10:14 euler Exp $
Author:
  Timm Euler
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATTRIB_CONTEXT_ID` DB level: The attribute storing the coord-entry's context object IDs.
`static java.lang.String` | `ATTRIB_CONTEXT_NAME` DB level: The attribute storing the coord-entry's context object names.
`static java.lang.String` | `ATTRIB_CONTEXT_TYPE` DB level: The attribute storing the context object types.
`static java.lang.String` | `ATTRIB_OBJECT_ID` DB level: The attribute storing the coord-entry's object IDs.
`static java.lang.String` | `ATTRIB_OBJECT_NAME` DB level: The attribute storing the coord-entry's object names.
`static java.lang.String` | `ATTRIB_OBJECT_TYPE` DB level: The attribute storing the object types.
`static java.lang.String` | `ATTRIB_X_COORD` DB level: The attribute storing the coord-entry's X coordinates.
`static java.lang.String` | `ATTRIB_Y_COORD` DB level: The attribute storing the coord-entry's Y coordinates.
`static java.lang.String` | `M4_TABLE_NAME` The M4 table name storing graphical information.
`static M4Info` | `m4Info` Cache for getM4Info()
`static java.lang.String` | `TAG_MAIN`

Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`myDocumentation`

Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Object
`myId, myName`

Fields inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`M4_XML_VERSION, TAG_COLLECTION, TAG_DOUBLE, TAG_INTEGER, TAG_LONG, TAG_M4_ID, TAG_SHORT, TAG_STRING, TAG_XML_ID`

Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table
`NOT_NULL`

Constructor Summary
`Coordinates(DB db)`

Method Summary
`void` | `delete()` Helper method of delete() and store().
`void` | `doPrint(java.lang.Exception ex)` Method to be used by all subclasses to print exception messages to the screen or log file.
`void` | `doPrint(java.util.logging.Level verbosity, java.lang.String message)` Method to be used by all subclasses to print messages to the screen or log file.
`java.util.Collection` | `exportLocal(java.io.Writer out, java.util.Collection dependent)` This method is called during exporting objects.
`java.util.Collection` | `getDependentObjects()` This method is part of the XML-serialization and needs to be implemented by all `M4Data` sub-classes that need to be serialized.
`java.lang.String` | `getIdAttributeName()`
`java.awt.Point` | `getLocation()` Returns the Location.
`M4Info` | `getM4Info()`
`java.lang.String` | `getM4TableName()`
`GraphicalM4Object` | `getMyM4Object()` Returns the Object that this Coordinates belongs to.
`java.lang.String` | `getName()` Get the name of this M4 object.
`java.util.Collection` | `getObjectsInNamespace(java.lang.Class namespace)` This method returns the objects of the specified type that form a namespace in the scope of this M4Data object.
`java.lang.String` | `getObjectTag()`
`java.lang.String` | `getType()`
`int` | `getX()` Get the X coordinate.
`java.lang.String` | `getXmlIdTag()`
`M4Info` | `getXmlInfo()`
`java.lang.String` | `getXmlVersion()` For compatibility reasons the version of the M4-XML is available here.
`int` | `getY()` Get the Y coordinate.
`void` | `importLocal(java.lang.String tag, java.lang.String embedded)` Method for importing local fields (recognized by unknown tags) from XML.
`void` | `primitiveSetMyM4Object(GraphicalM4Object m4Object)` Do not use.
`void` | `print()` Print this M4 object's parameters.
`void` | `readFromDb()` Unfortunately we must overwrite the superclass method because we want to be compatible with old coordinates data!
`protected void` | `removeAllM4References()` This method needs to be implemented by all `M4Data` objects.
`void` | `setLocation(java.awt.Point theLocation)` Sets the Location.
`void` | `setMyM4Object(GraphicalM4Object theM4Object)` Set the object that this Coordinates belongs to.
`void` | `setName(java.lang.String name)` Overrides the super-method just to set the dirty-flag
`void` | `setType(java.lang.String type)`
`void` | `setX(int x_coord)` Set the x coordinate.
`void` | `setY(int y_coord)` Set the y coordinate.
`void` | `store()` This method writes back the information that is present to the database table, regardless of whether the local dirty-Flag is set or not.

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`deleteLocal, deleteSoon, genericGetter, genericSetter, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getValidName, hasDeleteStatus, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, storeLocal, updateObjectsFromTable`

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object
`compareTo, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`genericGetter, genericSetter`

Field Detail

### TAG_MAIN

    public static java.lang.String TAG_MAIN

### M4_TABLE_NAME

    public static final java.lang.String M4_TABLE_NAME

  The M4 table name storing graphical information.

  See Also:
    Constant Field Values

### ATTRIB_OBJECT_ID

    public static final java.lang.String ATTRIB_OBJECT_ID

  DB level: The attribute storing the coord-entry's object IDs.

  See Also:
    Constant Field Values

### ATTRIB_OBJECT_NAME

    public static final java.lang.String ATTRIB_OBJECT_NAME

  DB level: The attribute storing the coord-entry's object names.

  See Also:
    Constant Field Values

### ATTRIB_OBJECT_TYPE

    public static final java.lang.String ATTRIB_OBJECT_TYPE

  DB level: The attribute storing the object types.

  See Also:
    Constant Field Values

### ATTRIB_CONTEXT_ID

    public static final java.lang.String ATTRIB_CONTEXT_ID

  DB level: The attribute storing the coord-entry's context object IDs.

  See Also:
    Constant Field Values

### ATTRIB_CONTEXT_NAME

    public static final java.lang.String ATTRIB_CONTEXT_NAME

  DB level: The attribute storing the coord-entry's context object names.

  See Also:
    Constant Field Values

### ATTRIB_CONTEXT_TYPE

    public static final java.lang.String ATTRIB_CONTEXT_TYPE

  DB level: The attribute storing the context object types.

  See Also:
    Constant Field Values

### ATTRIB_X_COORD

    public static final java.lang.String ATTRIB_X_COORD

  DB level: The attribute storing the coord-entry's X coordinates.

  See Also:
    Constant Field Values

### ATTRIB_Y_COORD

    public static final java.lang.String ATTRIB_Y_COORD

  DB level: The attribute storing the coord-entry's Y coordinates.

  See Also:
    Constant Field Values

### m4Info

    public static M4Info m4Info

  Cache for getM4Info()

Constructor Detail

### Coordinates

    public Coordinates(DB db)

Method Detail

### getM4TableName

    public java.lang.String getM4TableName()

  Specified by:
    `getM4TableName` in interface `M4Table`
  See Also:
    `M4Table.getM4TableName()`

### getDependentObjects

    public java.util.Collection getDependentObjects()

  Description copied from class: `M4Data`
  This method is part of the XML-serialization and needs to be implemented by all `M4Data` sub-classes that need to be serialized.

  Specified by:
    `getDependentObjects` in interface `XmlInfo`
  Overrides:
    `getDependentObjects` in class `M4Data`
  Returns:
    a `Collection` of all `M4Data` Java objects holding a foreign key reference to `this` object. This method must never return `null`.

### getXmlVersion

    public java.lang.String getXmlVersion()

  Description copied from interface: `XmlInfo`
  For compatibility reasons the version of the M4-XML is available here. The substring after the last 'V' has to be numeric.

  Specified by:
    `getXmlVersion` in interface `XmlInfo`
  Overrides:
    `getXmlVersion` in class `M4Data`
  See Also:
    `XmlInfo.getXmlVersion()`

### getXmlIdTag

    public java.lang.String getXmlIdTag()

  Specified by:
    `getXmlIdTag` in interface `XmlInfo`
  Overrides:
    `getXmlIdTag` in class `M4Data`
  See Also:
    `XmlInfo.getXmlIdTag()`

### getObjectTag

    public java.lang.String getObjectTag()

  Specified by:
    `getObjectTag` in interface `XmlInfo`
  Overrides:
    `getObjectTag` in class `M4Data`
  See Also:
    `XmlInfo.getXmlIdTag()`

### getIdAttributeName

    public java.lang.String getIdAttributeName()

  Specified by:
    `getIdAttributeName` in interface `M4Table`
  See Also:
    `M4Table.getIdAttributeName()`

### getM4Info

    public M4Info getM4Info()

  Specified by:
    `getM4Info` in interface `M4Table`
  See Also:
    `M4Data.getM4Info()`

### getXmlInfo

    public M4Info getXmlInfo()

  Specified by:
    `getXmlInfo` in interface `XmlInfo`
  Returns:
    a `M4Info` object with the information of all XML fields of `this` object.
  See Also:
    `XmlInfo.getXmlInfo()`

### getMyM4Object

    public GraphicalM4Object getMyM4Object()

  Returns the Object that this Coordinates belongs to.

  Returns:
    GraphicalM4Object

### getName

    public java.lang.String getName()

  Description copied from class: `M4Object`
  Get the name of this M4 object.

  Specified by:
    `getName` in interface `M4Object`
  Overrides:
    `getName` in class `M4Object`
  Returns:
    The M4 name

### setName

    public void setName(java.lang.String name)

  Description copied from class: `M4Data`
  Overrides the super-method just to set the dirty-flag

  Specified by:
    `setName` in interface `M4Object`
  Overrides:
    `setName` in class `M4Data`
  See Also:
    `M4Object.setName(String)`

### setType

    public void setType(java.lang.String type)

### getType

    public java.lang.String getType()
                             throws M4Exception

  Throws:
    `M4Exception`

### getObjectsInNamespace

    public java.util.Collection getObjectsInNamespace(java.lang.Class namespace)

  Description copied from class: `M4Data`
  This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. For example, a Concept's namespace for the type BaseAttribute is the Collection of all BaseAttributes for this Concept. Many M4Data objects never have a namespace, they return `null`. If a namespace could exist but doesn't, an empty Collection is returned.

  Specified by:
    `getObjectsInNamespace` in class `M4Data`
  Parameters:
    `namespace` - the type of objects that form the namespace
  Returns:
    a Collection of objects of type `typeOfObjects`, or `null`.

### setMyM4Object

    public void setMyM4Object(GraphicalM4Object theM4Object)
                       throws M4Exception

  Set the object that this Coordinates belongs to.

  Parameters:
    `theM4Object` - the object
  Throws:
    `M4Exception`

### primitiveSetMyM4Object

    public void primitiveSetMyM4Object(GraphicalM4Object m4Object)

  Do not use.

  Parameters:
    `m4Object` -

### getLocation

    public java.awt.Point getLocation()
                               throws M4Exception

  Returns the Location.

  Returns:
    Point
  Throws:
    `M4Exception`

### setLocation

    public void setLocation(java.awt.Point theLocation)

  Sets the Location.

  Parameters:
    `theLocation` - The Location to set

### setX

    public void setX(int x_coord)

  Set the x coordinate.

  Parameters:
    `x_coord` - the x coordinate

### setY

    public void setY(int y_coord)

  Set the y coordinate.

  Parameters:
    `y_coord` - the y coordinate

### getX

    public int getX()

  Get the X coordinate.

  Returns:
    int the x coordinate

### getY

    public int getY()

  Get the Y coordinate.

  Returns:
    int the y coordinate

### exportLocal

    public java.util.Collection exportLocal(java.io.Writer out,
                                            java.util.Collection dependent)

  Description copied from class: `M4Data`
  This method is called during exporting objects. It should be overridden by classes that have local changes to the generic loading and storing of fields. Any additional field should be returned as an XML-`String` in the collection, starting with openning and ending with the closing tag. If the object to be stored needs to be serialized itself (as a separate object), then the method `export` of that method needs to be used, which needs to have the specified `Writer` and `Collection` as parameters. The parameters should never be used in any other way!

  Specified by:
    `exportLocal` in interface `XmlInfo`
  Overrides:
    `exportLocal` in class `M4Data`
  Parameters:
    `out` - a `Writer` to be passed to `export` methods of embedded objects
    `dependent` - a `Collection` to be passed to `export` methods of embedded objects
  Returns:
    a `Collection` of XML-`String`s specifying the additional attributes of this object

### importLocal

    public void importLocal(java.lang.String tag,
                            java.lang.String embedded)

  Description copied from class: `M4Data`
  Method for importing local fields (recognized by unknown tags) from XML.

  Specified by:
    `importLocal` in interface `XmlInfo`
  Overrides:
    `importLocal` in class `M4Data`
  Parameters:
    `tag` - the tag indicating the local field to be imported
    `embedded` - the `String` between the opening and closing tag

### doPrint

    public void doPrint(java.util.logging.Level verbosity,
                        java.lang.String message)

  Description copied from class: `M4Object`
  Method to be used by all subclasses to print messages to the screen or log file.

  Specified by:
    `doPrint` in interface `XmlInfo`
  Overrides:
    `doPrint` in class `M4Object`
  Parameters:
    `verbosity` - A verbosity level. Use one of the public static variables of the class `Print`.
    `message` - The string with the message.
  See Also:
    `edu.udo.cs.miningmart.m4.core.utils.Print`

### doPrint

    public void doPrint(java.lang.Exception ex)

  Description copied from class: `M4Object`
  Method to be used by all subclasses to print exception messages to the screen or log file.

  Specified by:
    `doPrint` in interface `XmlInfo`
  Overrides:
    `doPrint` in class `M4Object`
  Parameters:
    `ex` - An exception object. Its message string will be printed.

### delete

    public void delete()
                throws M4Exception

  Helper method of delete() and store().

  Throws:
    `M4Exception`

### store

    public void store()
               throws M4Exception

  This method writes back the information that is present to the database table, regardless of whether the local dirty-Flag is set or not.

  Throws:
    `M4Exception`

### removeAllM4References

    protected void removeAllM4References()
                                  throws M4Exception

  Description copied from class: `M4Data`
  This method needs to be implemented by all `M4Data` objects. It has to remove all references to other `M4Object`s.

  Specified by:
    `removeAllM4References` in class `M4Data`
  Throws:
    `M4Exception`

### print

    public void print()

  Description copied from class: `M4Object`
  Print this M4 object's parameters. Must be implemented by all subclasses.

  Specified by:
    `print` in interface `M4Object`
  Specified by:
    `print` in class `M4Object`
  See Also:
    `M4Object.print()`

### readFromDb

    public void readFromDb()
                    throws M4Exception

  Unfortunately we must overwrite the superclass method because we want to be compatible with old coordinates data! Once all coordinates of all objects in all cases have been stored with the new version, we hope to be able to remove this method so that the generic mechanism applies.

  Overrides:
    `readFromDb` in class `M4Data`
  Throws:
    `M4Exception`
  See Also:
    `M4Object.readFromDb()`

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