|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
simtools.data.DataSourceCollection
simtools.data.merge.SynchronousMergeDSCollection
public class SynchronousMergeDSCollection
Synchronize data sources according to a frequency and a time range. This class provides a 0 and and 1-order interpolation of data
Following steps have to be performed to synchronize data together:
| Nested Class Summary | |
|---|---|
class |
SynchronousMergeDSCollection.DirectSynchronousMergedDataSource
A data source dedicated to manage aperiodical data sources. |
class |
SynchronousMergeDSCollection.IndirectParameter
This optimization is no longer used at the moment. |
class |
SynchronousMergeDSCollection.IndirectSynchronousMergedDataSource
This optimization is no longer used at the moment. |
class |
SynchronousMergeDSCollection.MergedCollectionContainer
|
class |
SynchronousMergeDSCollection.TimeSource
|
| Nested classes/interfaces inherited from class simtools.data.DataSourceCollection |
|---|
DataSourceCollection.Container |
| Field Summary | |
|---|---|
protected java.lang.String |
collectionName
|
protected SynchronousMergeDSCollection.MergedCollectionContainer |
collectionRoot
|
protected static int |
HUGEREPERTORYSIZE
|
static java.lang.String |
ID_MARKER
|
protected int |
interpolationOrder
Interpolation order can be 0 or 1 |
static double |
MAX_T_DRIFT
We do accept this drift when checking a data source period |
protected java.nio.DoubleBuffer |
mergedTimeBuffer
|
protected DataSource |
mergedTimeDs
|
protected double |
mergedTimeFreq
Merged time frequency |
protected long |
mergedTimeLength
The number of merged time values |
protected double |
mergedTimeStart
The first merged time value |
protected boolean |
timeRefIsRelative
If true mergedTime is a number of seconds, otherwise this is a number of milliseconds since 01/01/1970 00:00:00: |
| 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 | |
|---|---|
SynchronousMergeDSCollection(java.lang.String collectionName,
int interpolationOrder,
boolean timeRefIsRelative,
DataSource mergedTimeReferenceDs,
boolean mergedTimeReferenceDsIsRelative,
double mergedTimeReferenceDsOffset,
double mergedTimeReferenceDsInitData)
|
|
| Method Summary | |
|---|---|
void |
add(DataSourceCollection dsc,
DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
Merge a synchronous collection to the mergeDSCollection. |
void |
add(DataSource ds,
DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
Merge a synchronous data to the mergeDSCollection. |
void |
add(java.util.List dataList)
|
void |
add(TimeStampedDataSourceCollection tsdsc,
double offset,
double initialDate)
Merge a time stamped collection to the mergeDSCollection |
void |
add(TimeStampedDataSource ds,
double offset,
double initialDate)
Merge a time stamped data to the mergeDSCollection |
protected void |
addToCollectionArborescence(java.lang.String name,
DataSource d)
|
java.lang.Object |
computeMax(int i)
|
protected void |
computeMergedTimeFrequency(DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
Compute merged time frequency |
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 |
java.lang.String |
getCollectionName()
|
double |
getDoubleValue(int i,
long index)
Optimized accessor for double values. |
DataInfo |
getInformation()
|
DataInfo |
getInformation(int i)
|
java.lang.Object |
getMax(int i)
|
java.lang.Object |
getMin(int i)
|
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 |
void |
mergeData()
Apply merge on all collection elements. |
protected void |
sortHugeRepertories()
|
protected void |
sortHugeRepertory(SynchronousMergeDSCollection.MergedCollectionContainer repertory,
int proof)
|
protected void |
updateMergedTimeBounds(DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
Update merged time bounds |
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 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 |
|---|
public static final java.lang.String ID_MARKER
protected static final int HUGEREPERTORYSIZE
protected SynchronousMergeDSCollection.MergedCollectionContainer collectionRoot
protected java.lang.String collectionName
protected java.nio.DoubleBuffer mergedTimeBuffer
protected DataSource mergedTimeDs
protected double mergedTimeStart
protected long mergedTimeLength
protected double mergedTimeFreq
protected boolean timeRefIsRelative
protected int interpolationOrder
public static final double MAX_T_DRIFT
| Constructor Detail |
|---|
public SynchronousMergeDSCollection(java.lang.String collectionName,
int interpolationOrder,
boolean timeRefIsRelative,
DataSource mergedTimeReferenceDs,
boolean mergedTimeReferenceDsIsRelative,
double mergedTimeReferenceDsOffset,
double mergedTimeReferenceDsInitData)
throws MergeDataException
MergeDataException| Method Detail |
|---|
protected void computeMergedTimeFrequency(DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
throws MergeDataException
timeDs - isRelative - offset - initialDate -
DataException
MergeDataException
protected void updateMergedTimeBounds(DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
throws MergeDataException
timeDs - isRelative - offset - initialDate -
DataException
MergeDataException
public void add(java.util.List dataList)
throws MergeDataException
dataList -
MergeDataException
public void add(TimeStampedDataSourceCollection tsdsc,
double offset,
double initialDate)
throws MergeDataException
MergeDSCollection
add in interface MergeDSCollectioninitialDate - An initial absolute date for relative <-> absolute consersion
MergeDataException
public void add(DataSourceCollection dsc,
DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
throws MergeDataException
MergeDSCollection
add in interface MergeDSCollectiontimeDs - true is timeRef is expressed with relative time.initialDate - An initial absolute date for relative <-> absolute consersion
MergeDataException
public void add(DataSource ds,
DataSource timeDs,
boolean isRelative,
double offset,
double initialDate)
throws MergeDataException
MergeDSCollection
add in interface MergeDSCollectionisRelative - true is timeRef is expressed with relative time.initialDate - An initial absolute date for relative <-> absolute consersion
MergeDataException
public void add(TimeStampedDataSource ds,
double offset,
double initialDate)
throws MergeDataException
MergeDSCollection
add in interface MergeDSCollectioninitialDate - An initial absolute date for relative <-> absolute consersion
MergeDataException
public void mergeData()
throws MergeDataException
MergeDataExceptionpublic boolean isCompound()
DataSourceCollection
isCompound in class DataSourceCollectionpublic java.util.Collection getCollectionContainers()
DataSourceCollection
getCollectionContainers in class DataSourceCollection
protected void addToCollectionArborescence(java.lang.String name,
DataSource d)
protected void sortHugeRepertories()
protected void sortHugeRepertory(SynchronousMergeDSCollection.MergedCollectionContainer repertory,
int proof)
repertory - , where data source have to be structuredproof, - number of prefixes to remove from all data sources names, in order to compute the new structure.
Ex : if PL.TM.variable -> proof = 2
public java.lang.Object getMax(int i)
throws UnsupportedOperation
getMax in class DataSourceCollectionUnsupportedOperation
public java.lang.Object getMin(int i)
throws UnsupportedOperation
getMin in class DataSourceCollectionUnsupportedOperation
public java.lang.Object computeMax(int i)
throws UnsupportedOperation
computeMax in class DataSourceCollectionUnsupportedOperation
public java.lang.Object computeMin(int i)
throws UnsupportedOperation
computeMin in class DataSourceCollectionUnsupportedOperation
public java.lang.Object getValue(int i,
long index)
throws DataException
DataSourceCollection
getValue in class DataSourceCollectionDataException
public double getDoubleValue(int i,
long index)
throws DataException
DataSourceCollection
getDoubleValue in class DataSourceCollectionDataExceptionpublic DataInfo getInformation(int i)
getInformation in class DataSourceCollectionpublic java.lang.Class valueClass(int i)
DataSourceCollection
valueClass in class DataSourceCollectionpublic DataInfo getInformation()
getInformation in class DataSourceCollectionpublic java.lang.String getCollectionName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||