com.anwrt.hl.model
Class AwtCorrelatedDataContainer

java.lang.Object
  extended by com.anwrt.hl.model.AbstractContainer
      extended by com.anwrt.hl.model.AwtCorrelatedDataContainer

public class AwtCorrelatedDataContainer
extends AbstractContainer

Container which contains a set of correlated data. Data are stored by property type and each data is linked to the same order value of others properties. For example:

TimeStamp Latitude Longtitude
1233786292 43.53 1.518
1233789292 43.54 1.525
1233712292 43.55 1.527

All columns and all cells in a row, must have the same cardinality. Where cardinality of an AwtBasicType object is 1, cardinality of a list is its size and the cardinality of an AwtDeltasVector is the number of elements of the vector.

creation: 10 march 2009

Author:
David FRANCOIS

Constructor Summary
AwtCorrelatedDataContainer(java.lang.String relativePath, java.lang.String[] properties)
          Creates a new CorrelatedDataContainer.
AwtCorrelatedDataContainer(java.lang.String relativePath, java.lang.String[] properties, java.lang.Object[] values)
          Creates a new AwtCorrelatedDataContainer and fills it with given values.
 
Method Summary
 boolean addRow(CorrelatedRow row)
          Add a row to the container.
 boolean addRows(java.util.List rows)
          Add rows to the container.
 void empty()
          Clear the container.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwtCorrelatedDataContainer

public AwtCorrelatedDataContainer(java.lang.String relativePath,
                                  java.lang.String[] properties)
Creates a new CorrelatedDataContainer.

Parameters:
relativePath - Relative path of the container.
properties - Properties of the values.

AwtCorrelatedDataContainer

public AwtCorrelatedDataContainer(java.lang.String relativePath,
                                  java.lang.String[] properties,
                                  java.lang.Object[] values)
                           throws AwtContainerException
Creates a new AwtCorrelatedDataContainer and fills it with given values.

Parameters:
relativePath - Relative path of the container.
properties - Properties of the values.
values - Table of values per columns.
Throws:
AwtContainerException - If parameters are incoherent.
Method Detail

addRow

public boolean addRow(CorrelatedRow row)
               throws AwtContainerException
Add a row to the container.

Parameters:
row - The CorrelatedRow to be added.
Returns:
true if this the values is correctly added. Returns false if the container is locked.
Throws:
AwtContainerException - Throws AwtDataContainerException if values.length is not equal to the number of columns or if the cardinality of column is not equal to the others.

addRows

public boolean addRows(java.util.List rows)
                throws AwtContainerException
Add rows to the container.

Parameters:
rows - List of CorrelatedRow to be added.
Returns:
true if this values are correctly added. Returns false if the container is locked.
Throws:
AwtContainerException - Throws AwtDataContainerException if values.length is not equal to the number of columns or if the cardinality of column is not equal to the others.

empty

public void empty()
Clear the container.

Specified by:
empty in class AbstractContainer