dk.vajhoej.model.core
Class ExtModel

java.lang.Object
  extended by dk.vajhoej.model.core.ExtModel
All Implemented Interfaces:
Persistable, SeparatePersistable

public class ExtModel
extends java.lang.Object
implements SeparatePersistable

Class ExtModel represents an architectural model extended with visual information.


Constructor Summary
ExtModel()
          Create instance of ExtModel.
ExtModel(Model real, java.util.List<Location> locations, int dimX, int dimY)
          Create instance of ExtModel.
 
Method Summary
 NameValuePairList getAttributes()
          Get all single value fields.
 java.util.List<java.util.List<Persistable>> getChildren()
          Get all multi value fields.
 int getDimX()
          Get grid width.
 int getDimY()
          Get grid height.
 java.lang.String getId()
          Get id identifying object.
 java.util.List<Location> getLocations()
          Get locations.
 Model getReal()
          Get the model.
 java.lang.String getStore()
          Get store.
 java.lang.String getType()
          Get type (XML element name / database table name not Java class name).
 void setAttributes(NameValuePairList attr)
          Set all single value fields.
 void setChildren(java.util.List<java.util.List<Persistable>> childs)
          Set all multi value fields.
 void setDimX(int dimX)
          Set grid width.
 void setDimY(int dimY)
          Set grid height.
 void setLocations(java.util.List<Location> locations)
          Set locations.
 void setStore(java.lang.String store)
          Set store.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtModel

public ExtModel()
Create instance of ExtModel.


ExtModel

public ExtModel(Model real,
                java.util.List<Location> locations,
                int dimX,
                int dimY)
Create instance of ExtModel.

Parameters:
real - the model
locations - locations of boxes and connections
dimX - grid width
dimY - grid height
Method Detail

getReal

public Model getReal()
Get the model.

Returns:
the model

getLocations

public java.util.List<Location> getLocations()
Get locations.

Returns:
list of locations

setLocations

public void setLocations(java.util.List<Location> locations)
Set locations.

Parameters:
locations - list of locations

getDimX

public int getDimX()
Get grid width.

Returns:
grid width

setDimX

public void setDimX(int dimX)
Set grid width.

Parameters:
dimX - grid width

getDimY

public int getDimY()
Get grid height.

Returns:
grid height

setDimY

public void setDimY(int dimY)
Set grid height.

Parameters:
dimY - grid height

getId

public java.lang.String getId()
Description copied from interface: Persistable
Get id identifying object.

Specified by:
getId in interface Persistable
Returns:
id

getType

public java.lang.String getType()
Description copied from interface: Persistable
Get type (XML element name / database table name not Java class name).

Specified by:
getType in interface Persistable
Returns:
type

getStore

public java.lang.String getStore()
Description copied from interface: SeparatePersistable
Get store.

Specified by:
getStore in interface SeparatePersistable
Returns:
store

setStore

public void setStore(java.lang.String store)
Description copied from interface: SeparatePersistable
Set store.

Specified by:
setStore in interface SeparatePersistable
Parameters:
store - store

getAttributes

public NameValuePairList getAttributes()
Description copied from interface: Persistable
Get all single value fields.

Specified by:
getAttributes in interface Persistable
Returns:
name value pair list

getChildren

public java.util.List<java.util.List<Persistable>> getChildren()
Description copied from interface: Persistable
Get all multi value fields.

Specified by:
getChildren in interface Persistable
Returns:
list of list of persistable objects

setAttributes

public void setAttributes(NameValuePairList attr)
                   throws ModelException
Description copied from interface: Persistable
Set all single value fields.

Specified by:
setAttributes in interface Persistable
Parameters:
attr - value pair list
Throws:
ModelException - if problems

setChildren

public void setChildren(java.util.List<java.util.List<Persistable>> childs)
                 throws ModelException
Description copied from interface: Persistable
Set all multi value fields.

Specified by:
setChildren in interface Persistable
Parameters:
childs - list of list of persistable objects
Throws:
ModelException - if problems

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object