simtools.data.async
Class TimeStampedDataSourceCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by simtools.data.DataSourceCollection
                  extended by simtools.data.async.TimeStampedDataSourceCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Direct Known Subclasses:
AsynchronousMergeDSCollection, StreamingTSDataSourceCollection

public abstract class TimeStampedDataSourceCollection
extends DataSourceCollection

Class description ...

Author:
Claude Cazenave
See Also:
Serialized Form

Nested Class Summary
static class TimeStampedDataSourceCollection.InvalidFormatException
          An exception to handle file/stream parsing errors
 
Nested classes/interfaces inherited from class simtools.data.DataSourceCollection
DataSourceCollection.Container
 
Field Summary
protected  simtools.data.async.TimeStampedDataSourceCollection.CollectionContainer _container
           
protected  java.util.Date _end
           
protected  java.util.Date _start
           
static java.lang.String ID_DATE_FORMAT
           
static java.lang.String ID_MARKER
           
static java.text.SimpleDateFormat timeStampedDateFormat
           
 
Fields inherited from class simtools.data.DataSourceCollection
buffers, endNotificationListeners, lastIndex, listeners, map, startIndex
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
TimeStampedDataSourceCollection()
           
TimeStampedDataSourceCollection(java.util.Date start, java.util.Date end)
           
 
Method Summary
 java.lang.Object computeMax(int i)
           
 java.lang.Object computeMin(int i)
           
 java.util.Collection getCollectionContainers()
          If the data source collection is compound return the first level collection of containers used to organize the data sources
abstract  double getDoubleValue(int i, long index)
          Optimized accessor for double values.
 java.util.Date getEnd()
           
abstract  DataInfo getInformation()
           
 DataInfo getInformation(int i)
           
 java.lang.Object getMax(int i)
           
 java.lang.Object getMin(int i)
           
 java.util.Date getStart()
           
abstract  java.lang.Object getValue(int i, long index)
          Methods for subclasses to specialize
 boolean isCompound()
          Checks if a data source collection is compound, i.e. if it provides containers to organize the data source hierarchically
protected  void setEnd(java.util.Date end)
           
protected  void setStart(java.util.Date start)
           
 java.lang.Class valueClass(int i)
          Returns the more specialized superclass of all objects returned by the i-th data source.
 
Methods inherited from class simtools.data.DataSourceCollection
addEndNotificationListener, addListener, attachBuffer, bufferize, bufferize, bufferize, computeLastIndex, computeLastIndex, computeStartIndex, computeStartIndex, get, getByteMax, getByteMin, getByteValue, getDoubleMax, getDoubleMin, getFloatMax, getFloatMin, getFloatValue, getIntegerMax, getIntegerMin, getIntegerValue, getKind, getLastIndex, getLastIndex, getLongMax, getLongMin, getLongValue, getShortMax, getShortMin, getShortValue, getStartIndex, getStartIndex, hashCode, isComparable, notifyEndNotificationListeners, notifyListenersForCollectionRemoved, notifyListenersForDataSourceAdded, notifyListenersForDataSourceRemoved, notifyListenersForInfoChange, removeAllElements, removeEndNotificationListener, removeListener, setSlice, sortedOrder
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

ID_MARKER

public static final java.lang.String ID_MARKER
See Also:
Constant Field Values

ID_DATE_FORMAT

public static final java.lang.String ID_DATE_FORMAT
See Also:
Constant Field Values

_start

protected java.util.Date _start

_end

protected java.util.Date _end

_container

protected simtools.data.async.TimeStampedDataSourceCollection.CollectionContainer _container

timeStampedDateFormat

public static java.text.SimpleDateFormat timeStampedDateFormat
Constructor Detail

TimeStampedDataSourceCollection

public TimeStampedDataSourceCollection(java.util.Date start,
                                       java.util.Date end)
                                throws java.io.IOException,
                                       TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException

TimeStampedDataSourceCollection

public TimeStampedDataSourceCollection()
                                throws java.io.IOException,
                                       TimeStampedDataSourceCollection.InvalidFormatException
Throws:
java.io.IOException
TimeStampedDataSourceCollection.InvalidFormatException
Method Detail

computeMax

public java.lang.Object computeMax(int i)
                            throws UnsupportedOperation
Overrides:
computeMax in class DataSourceCollection
Throws:
UnsupportedOperation

computeMin

public java.lang.Object computeMin(int i)
                            throws UnsupportedOperation
Overrides:
computeMin in class DataSourceCollection
Throws:
UnsupportedOperation

getMax

public java.lang.Object getMax(int i)
                        throws UnsupportedOperation
Overrides:
getMax in class DataSourceCollection
Throws:
UnsupportedOperation

getMin

public java.lang.Object getMin(int i)
                        throws UnsupportedOperation
Overrides:
getMin in class DataSourceCollection
Throws:
UnsupportedOperation

getValue

public abstract java.lang.Object getValue(int i,
                                          long index)
                                   throws DataException
Description copied from class: DataSourceCollection
Methods for subclasses to specialize

Specified by:
getValue in class DataSourceCollection
Throws:
DataException

getDoubleValue

public abstract double getDoubleValue(int i,
                                      long index)
                               throws DataException
Description copied from class: DataSourceCollection
Optimized accessor for double values. Works the same way as provider functions.

Overrides:
getDoubleValue in class DataSourceCollection
Throws:
DataException

valueClass

public java.lang.Class valueClass(int i)
Description copied from class: DataSourceCollection
Returns the more specialized superclass of all objects returned by the i-th data source. Returns Object by default in the base implementation, subclass should specialize if possible.

Overrides:
valueClass in class DataSourceCollection

getInformation

public abstract DataInfo getInformation()
Overrides:
getInformation in class DataSourceCollection

getInformation

public DataInfo getInformation(int i)
Overrides:
getInformation in class DataSourceCollection

setStart

protected void setStart(java.util.Date start)
Parameters:
start - The start to set.

getStart

public java.util.Date getStart()
Returns:
Returns the _start.

setEnd

protected void setEnd(java.util.Date end)
Parameters:
end - The end to set.

getEnd

public java.util.Date getEnd()
Returns:
Returns the _end.

getCollectionContainers

public java.util.Collection getCollectionContainers()
Description copied from class: DataSourceCollection
If the data source collection is compound return the first level collection of containers used to organize the data sources

Overrides:
getCollectionContainers in class DataSourceCollection
Returns:
the first level collection of containers or null

isCompound

public boolean isCompound()
Description copied from class: DataSourceCollection
Checks if a data source collection is compound, i.e. if it provides containers to organize the data source hierarchically

Overrides:
isCompound in class DataSourceCollection
Returns:
true if it is compound