holoedit.data
Class HoloSDIFdata

java.lang.Object
  extended by holoedit.data.HoloExternalData
      extended by holoedit.data.HoloSDIFdata

public class HoloSDIFdata
extends HoloExternalData


Field Summary
 java.util.Vector<HoloSDIFdata> children
           
 java.util.Vector<HoloSDIFdata> createdSDIFvector
           
 int cutBeg
           
 int cutEnd
           
private  boolean dirty
           
private  int drawStyle
           
private  double endTime
          Date de fin des donnŽes
private  java.lang.String[] fields
           
 java.util.HashMap<java.lang.String,java.lang.String[]> fieldsImportOptions
           
private  HoloSDIFdataStat holoDataStat
           
 java.util.HashMap<java.lang.String,int[]> indexImportOptions
           
 int initialTreeMapSize
           
 int listID
           
 float maximum
           
private  float maxY
           
private  float minY
           
private  HoloSDIFdata parent
           
 boolean reversed
           
private  int sdifNbrFrame
          nbre de frames dŽcrites pr le SDIF
 java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> sdifTreeMap
           
private  double startTime
          Date de dŽbut des donnŽes (firstKey of this HoloSDIFdata sdifTreeMap)
private  int valuesToDrawIndex
          Index sur les values des treeMap dont on se sert pour dessiner.
 
Fields inherited from class holoedit.data.HoloExternalData
dataType, extDataFile
 
Constructor Summary
HoloSDIFdata(java.io.File f)
          Constructs an holoSDIFData from a file and sets its dataType by default to "SDIF".
HoloSDIFdata(java.io.File f, java.lang.String dataType)
          Constructs an holoSDIFData from a file and sets its dataType to the given dataType.
HoloSDIFdata(HoloSDIFdata h, HoloSDIFdata parent)
          Constructs an holoSDIFData from an existing holoSDIFData, and sets its parent to the given parent.
 
Method Summary
 void addChild(HoloSDIFdata child)
          Adds a child to the HoloSDIFdata instance.
 void autoreverse()
          Reverse the key order of the holoSDIFdata's sdifTreeMap.
private  void createList(javax.media.opengl.GL gl, HoloSDIFdata holoSDIFdata)
          Create the lists to draw in the soundPool
 HoloSDIFdata cut(int dateBegin, int dateEnd)
          on enleve tous les points entre dateBegin & dateEnd on retourne la fin du sdif.
 boolean cutBegin(double dateBegin)
          on enleve tous les points jusqu'ˆ dateBegin.
 boolean cutEnd(double dateEnd)
          on enleve tous les points ˆ partir de dateEnd.
 int drawSoundPool(javax.media.opengl.GL gl, float[] color, int ID)
          Pour l'affichage dans la soundpool
 boolean equals(java.lang.Object o)
          Surcharge de la mŽthode equals qui avait ŽtŽ redŽfinie dans la classe mere HoloExternalData
 java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getBetweenTimes(double timeBeg, double timeEnd)
          Returns a sub-treeMap whose keys are greater than or equal to timeBeg, and less than or equals to timeEnd.
 HoloSDIFdata getChild(int index)
          Returns the child at the specified position in the children Vector.
 int getChildIndex(HoloSDIFdata child)
          return the index of a child
 int getChildrenCount()
          Returns the number of children of the HoloSDIFdata instance.
 java.util.Vector<java.util.Vector<java.lang.Double>> getDataAtTime(double time)
          Returns the values corresponding to the given time.
 double getDataAtTimeField(double time, int field)
          Returns the field value corresponding to this key if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
 double getDataLength()
          Returns the length of this holoSDIFdata in milliseconds
 double getDataLengthCS()
          Returns the length of this holoSDIFdata in centiseconds
 int getDrawStyle()
           
 double getEndTime()
           
 java.util.Vector<java.lang.Double> getFieldAtTime(double time, int fieldIndex)
          Returns the field corresponding to the given time.
 java.lang.String[] getFields()
           
 java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getFromTime(double timeBeg)
          Returns a sub-treeMap whose keys are greater than or equal to timeBeg.
 HoloSDIFdataStat getHoloDataStat()
           
 java.lang.String getInfo()
          Return a String containing some informations about the holoSDIFdata.
 HoloSDIFdata getLastChild()
          Returns the last child of the children Vector.
 float getMaxY()
           
 float getMinY()
           
 HoloSDIFdata getParent()
          Returns the parent of the HoloSDIFdata instance.
static float getRescaleYallSDIF(HoloSDIFdata[] _hsdifdt)
          Calcule et retourne la valeur permettant de remettre les ordonnŽes ˆ l'Žchelle pour le dessin
 double getSDIFendTime()
          retourne le endTime du SDIF, donc du plus grand parent
 int getSDIFnbrFrame()
          retourne le nombre de frame du SDIF, donc du plus grand parent
 double getSDIFstartTime()
          retourne le startTime du SDIF, donc du plus grand parent
 java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getSDIFtreeMap()
           
 double getStartTime()
          Returns the startTime of this holoSDIFdata.
 java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getToTime(double timeEnd)
          Returns a sub-treeMap whose keys are less than or equals to timeEnd.
 int getValuesToDrawIndex()
           
 boolean hasDataAtTime(double time)
          Returns false is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.
 boolean hasTime(double time)
          Returns true if the holoSDIFdata contains a value for the given time.
 void init(double startTime, java.lang.String type, int drawCol, int drawStyle, java.lang.String[] sdifFields)
          Pour l'initialisation des parametres de la holoSDIFdata
 boolean isEmpty()
          Returns false if this holoSDIFmap or if one of this holoSDIFdata's child sdifTreeMap contains some key-value mappings.
 boolean removeChild(HoloSDIFdata child)
          Removes a child of the HoloSDIFdata instance.
 void setDirty(boolean dirt)
           
 void setEndTime(double endTime)
           
 void setHoloDataStat()
           
 void setParent(HoloSDIFdata parent)
          Sets the parent of the HoloSDIFdata instance.
 void setSDIFnbrFrame(int sdifNbrFrame)
           
 void setSDIFtreeMap(java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> sdifTreeMap)
           
 void setValuesToDrawIndex(int index)
           
 void stretchDates(int oldBegin, int oldEnd, int newBegin, int newEnd)
          Stretching des keys du sdifTreeMap de l'intervalle [oldBegin,oldEnd] vers [newBegin,newEnd]
 java.lang.String toString()
          Returns a String representation of this holoSDIFdata.
 double updateEndTime()
          UtilisŽ pour la mise ˆ jour des diffŽrents temps, apres un strech par exemple.
private  void updateMinYMaxY()
           
 double updateStartTime()
          UtilisŽ pour la mise ˆ jour des diffŽrents temps, apres un strech par exemple.
 
Methods inherited from class holoedit.data.HoloExternalData
getDataType, getExtDataLength, getExtDataLengthCS, getFileName, getFileType, isFine, setExtDataLength, setFine, toString2
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

startTime

private double startTime
Date de dŽbut des donnŽes (firstKey of this HoloSDIFdata sdifTreeMap)


endTime

private double endTime
Date de fin des donnŽes


sdifNbrFrame

private int sdifNbrFrame
nbre de frames dŽcrites pr le SDIF


valuesToDrawIndex

private int valuesToDrawIndex
Index sur les values des treeMap dont on se sert pour dessiner.


drawStyle

private int drawStyle

parent

private HoloSDIFdata parent

sdifTreeMap

public java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> sdifTreeMap

children

public java.util.Vector<HoloSDIFdata> children

fields

private java.lang.String[] fields

minY

private float minY

maxY

private float maxY

listID

public int listID

maximum

public float maximum

cutBeg

public int cutBeg

cutEnd

public int cutEnd

reversed

public boolean reversed

initialTreeMapSize

public int initialTreeMapSize

dirty

private boolean dirty

indexImportOptions

public java.util.HashMap<java.lang.String,int[]> indexImportOptions

fieldsImportOptions

public java.util.HashMap<java.lang.String,java.lang.String[]> fieldsImportOptions

createdSDIFvector

public java.util.Vector<HoloSDIFdata> createdSDIFvector

holoDataStat

private HoloSDIFdataStat holoDataStat
Constructor Detail

HoloSDIFdata

public HoloSDIFdata(java.io.File f)
Constructs an holoSDIFData from a file and sets its dataType by default to "SDIF".


HoloSDIFdata

public HoloSDIFdata(java.io.File f,
                    java.lang.String dataType)
Constructs an holoSDIFData from a file and sets its dataType to the given dataType.


HoloSDIFdata

public HoloSDIFdata(HoloSDIFdata h,
                    HoloSDIFdata parent)
Constructs an holoSDIFData from an existing holoSDIFData, and sets its parent to the given parent.

Method Detail

init

public void init(double startTime,
                 java.lang.String type,
                 int drawCol,
                 int drawStyle,
                 java.lang.String[] sdifFields)
Pour l'initialisation des parametres de la holoSDIFdata

Parameters:
startTime -
type -
drawCol -
drawStyle -
sdifFields -

drawSoundPool

public int drawSoundPool(javax.media.opengl.GL gl,
                         float[] color,
                         int ID)
Pour l'affichage dans la soundpool


createList

private void createList(javax.media.opengl.GL gl,
                        HoloSDIFdata holoSDIFdata)
Create the lists to draw in the soundPool


setSDIFtreeMap

public void setSDIFtreeMap(java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> sdifTreeMap)

getSDIFtreeMap

public java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getSDIFtreeMap()

isEmpty

public boolean isEmpty()
Returns false if this holoSDIFmap or if one of this holoSDIFdata's child sdifTreeMap contains some key-value mappings. Returns true otherwise.


addChild

public void addChild(HoloSDIFdata child)
Adds a child to the HoloSDIFdata instance.

Parameters:
child - The child to be added.

removeChild

public boolean removeChild(HoloSDIFdata child)
Removes a child of the HoloSDIFdata instance.

Parameters:
child - The child to be removed.

getChild

public HoloSDIFdata getChild(int index)
Returns the child at the specified position in the children Vector.


getLastChild

public HoloSDIFdata getLastChild()
Returns the last child of the children Vector.


getChildIndex

public int getChildIndex(HoloSDIFdata child)
return the index of a child


getChildrenCount

public int getChildrenCount()
Returns the number of children of the HoloSDIFdata instance.


getParent

public HoloSDIFdata getParent()
Returns the parent of the HoloSDIFdata instance.


setParent

public void setParent(HoloSDIFdata parent)
Sets the parent of the HoloSDIFdata instance.


getStartTime

public double getStartTime()
Returns the startTime of this holoSDIFdata.


getSDIFstartTime

public double getSDIFstartTime()
retourne le startTime du SDIF, donc du plus grand parent


setEndTime

public void setEndTime(double endTime)

getEndTime

public double getEndTime()

setSDIFnbrFrame

public void setSDIFnbrFrame(int sdifNbrFrame)

getSDIFnbrFrame

public int getSDIFnbrFrame()
retourne le nombre de frame du SDIF, donc du plus grand parent


updateEndTime

public double updateEndTime()
UtilisŽ pour la mise ˆ jour des diffŽrents temps, apres un strech par exemple.


updateStartTime

public double updateStartTime()
UtilisŽ pour la mise ˆ jour des diffŽrents temps, apres un strech par exemple.


getSDIFendTime

public double getSDIFendTime()
retourne le endTime du SDIF, donc du plus grand parent


getDataLengthCS

public double getDataLengthCS()
Returns the length of this holoSDIFdata in centiseconds


getDataLength

public double getDataLength()
Returns the length of this holoSDIFdata in milliseconds


getDrawStyle

public int getDrawStyle()

setValuesToDrawIndex

public void setValuesToDrawIndex(int index)

getValuesToDrawIndex

public int getValuesToDrawIndex()

updateMinYMaxY

private void updateMinYMaxY()

getMaxY

public float getMaxY()

getMinY

public float getMinY()

getInfo

public java.lang.String getInfo()
Return a String containing some informations about the holoSDIFdata.


toString

public java.lang.String toString()
Returns a String representation of this holoSDIFdata. NB : la String retournŽe par toString est affichŽe dans le Tree de la soundpool.

Overrides:
toString in class java.lang.Object

getRescaleYallSDIF

public static float getRescaleYallSDIF(HoloSDIFdata[] _hsdifdt)
Calcule et retourne la valeur permettant de remettre les ordonnŽes ˆ l'Žchelle pour le dessin


equals

public boolean equals(java.lang.Object o)
Surcharge de la mŽthode equals qui avait ŽtŽ redŽfinie dans la classe mere HoloExternalData

Overrides:
equals in class HoloExternalData
Parameters:
o - - the reference object with which to compare.

getFields

public java.lang.String[] getFields()

setHoloDataStat

public void setHoloDataStat()

getHoloDataStat

public HoloSDIFdataStat getHoloDataStat()

hasTime

public boolean hasTime(double time)
Returns true if the holoSDIFdata contains a value for the given time.
i.e. if one key of the holoSDIFdata's treeMap is equal to the given time.


getDataAtTime

public java.util.Vector<java.util.Vector<java.lang.Double>> getDataAtTime(double time)
Returns the values corresponding to the given time.
if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
If the given time is not equal to a key, it returns an interpolation of the two values corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getDataAtTimeField

public double getDataAtTimeField(double time,
                                 int field)
Returns the field value corresponding to this key if the given time is equal to a key of the holoSDIFdata's sdiftreeMap. If the given time is not equal to a key, it returns an interpolation of the two values corresponding to the two closest key. 'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


hasDataAtTime

public boolean hasDataAtTime(double time)
Returns false is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getFieldAtTime

public java.util.Vector<java.lang.Double> getFieldAtTime(double time,
                                                         int fieldIndex)
Returns the field corresponding to the given time.
if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
If the given time is not equal to a key, it returns an interpolation of the two field corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getBetweenTimes

public java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getBetweenTimes(double timeBeg,
                                                                                                                double timeEnd)
Returns a sub-treeMap whose keys are greater than or equal to timeBeg, and less than or equals to timeEnd.

Parameters:
timeBeg - - low endpoint (inclusive) of the subMap.
timeEnd - - high endpoint (inclusive) of the subMap.

getToTime

public java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getToTime(double timeEnd)
Returns a sub-treeMap whose keys are less than or equals to timeEnd. If timeEnd is greater than the last key of the holoSDIFdata's sdifTreeMap, then it returns the holoSDIFdata's sdifTreeMap.

Parameters:
timeEnd - - high endpoint (inclusive) of the subMap.

getFromTime

public java.util.TreeMap<java.lang.Double,java.util.Vector<java.util.Vector<java.lang.Double>>> getFromTime(double timeBeg)
Returns a sub-treeMap whose keys are greater than or equal to timeBeg. If timeBeg is less than the first key of the holoSDIFdata's sdifTreeMap, then it returns the holoSDIFdata's sdifTreeMap.

Parameters:
timeBeg - - low endpoint (inclusive) of the subMap.

stretchDates

public void stretchDates(int oldBegin,
                         int oldEnd,
                         int newBegin,
                         int newEnd)
Stretching des keys du sdifTreeMap de l'intervalle [oldBegin,oldEnd] vers [newBegin,newEnd]


autoreverse

public void autoreverse()
Reverse the key order of the holoSDIFdata's sdifTreeMap. The greatest becomes the smallest, etc..


cut

public HoloSDIFdata cut(int dateBegin,
                        int dateEnd)
on enleve tous les points entre dateBegin & dateEnd on retourne la fin du sdif.


cutEnd

public boolean cutEnd(double dateEnd)
on enleve tous les points ˆ partir de dateEnd.

Returns:
true if the resulting sdifTreeMap is empty, false otherwise.

cutBegin

public boolean cutBegin(double dateBegin)
on enleve tous les points jusqu'ˆ dateBegin.

Returns:
true if the resulting sdifTreeMap is empty, false otherwise.

setDirty

public void setDirty(boolean dirt)