rocca
Class RoccaContourDataBlock

java.lang.Object
  extended by PamguardMVC.PamObservable
      extended by PamguardMVC.PamDataBlock<RoccaContourDataUnit>
          extended by rocca.RoccaContourDataBlock
All Implemented Interfaces:
PanelOverlayDraw

public class RoccaContourDataBlock
extends PamDataBlock<RoccaContourDataUnit>

Author:
Michael Oswald

Nested Class Summary
static class RoccaContourDataBlock.ParamIndx
          Enum class with the names of the contour parameters
 
Field Summary
(package private)  java.lang.String classifiedAs
          the species the block has been classified as
(package private)  java.util.EnumMap<RoccaContourDataBlock.ParamIndx,java.lang.Double> contour
          EnumMap linking the contour parameter to its value
(package private)  java.util.ArrayList<java.lang.String> keyNames
          ArrayList containing the EnumMap key names
(package private)  RoccaProcess roccaProcess
          reference to the roccaProcess object
(package private)  boolean statsRun
          flag indicating whether or not the statistics have been run
 
Fields inherited from class PamguardMVC.PamDataBlock
dataName, ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, naturalLifetime, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, OFFLINE_DATA_CANCEL, OFFLINE_DATA_INTERRUPT, OFFLINE_DATA_WAIT, orderLock, pamDataUnits, parentProcess, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST, unitsAdded, unitsRemoved, unitsUpdated
 
Fields inherited from class PamguardMVC.PamObservable
masterClockSample, objectChanged, overlayDraw, pamObservers, pamProfiler
 
Constructor Summary
RoccaContourDataBlock(PamProcess parentProcess, int channelMap)
           
 
Method Summary
 void calculateStatistics()
          Once the Datablock is filled, this routine will calculate the statistics of the contour.
 java.lang.String createContourStatsHeader()
           
 java.lang.String createContourStatsString()
           
 java.lang.String getClassifiedAs()
           
private  double getMean(double[] array)
           
private  double getMedian(double[] array)
           
private  double getPercentile(double[] array, int percentile)
           
private  double getStdDev(double[] array)
           
 boolean isStatsRun()
           
 void setClassifiedAs(java.lang.String classifiedAs)
           
 void setStatsRun(boolean statsRun)
           
 
Methods inherited from class PamguardMVC.PamDataBlock
addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addPamData, autoSetDataBlockMixMode, clearAll, clearDeletedList, createAnnotations, createAnnotations, dumpBlockContents, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, getAbsoluteDataUnit, getAnnotations, getBinaryDataSource, getCanLog, getChannelMap, getClosestUnitMillis, getCurrentViewDataEnd, getCurrentViewDataStart, getDataGain, getDataName, getDataUnit, getFirstUnit, getFirstUnitAfter, getLastUnit, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNumOfflineDataMaps, getOfflineData, getOfflineData, getOfflineDataMap, getOfflineDataMap, getOrderStatus, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPrevDataEnd, getPrimaryDataMap, getRawSourceDataBlock, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getSampleRate, getSaveRequirements, getShouldLog, getSourceDataBlock, getSourceProcess, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, isLinkGpsData, isRecycling, loadViewerData, masterClockUpdate, noteNewSettings, notifyModelChanged, orderOfflineData, orderOfflineData, remove, remove, removeOldUnitsS, removeOldUnitsT, saveViewerData, setBinaryDataSource, setChannelMap, setDataName, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNaturalLifetime, setNaturalLifetimeMillis, setRecycling, setRecyclingStoreLength, setSampleRate, setShouldLog, shouldNotify, toString, updatePamData
 
Methods inherited from class PamguardMVC.PamObservable
canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getPamObservers, getRequiredHistory, notifyObservers, notifyObservers, setChanged, setOverlayDraw, waitForThreadedObservers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contour

java.util.EnumMap<RoccaContourDataBlock.ParamIndx,java.lang.Double> contour
EnumMap linking the contour parameter to its value


keyNames

java.util.ArrayList<java.lang.String> keyNames
ArrayList containing the EnumMap key names


roccaProcess

RoccaProcess roccaProcess
reference to the roccaProcess object


statsRun

boolean statsRun
flag indicating whether or not the statistics have been run


classifiedAs

java.lang.String classifiedAs
the species the block has been classified as

Constructor Detail

RoccaContourDataBlock

public RoccaContourDataBlock(PamProcess parentProcess,
                             int channelMap)
Method Detail

calculateStatistics

public void calculateStatistics()
Once the Datablock is filled, this routine will calculate the statistics of the contour.


getMean

private double getMean(double[] array)

getStdDev

private double getStdDev(double[] array)

getMedian

private double getMedian(double[] array)

getPercentile

private double getPercentile(double[] array,
                             int percentile)

createContourStatsHeader

public java.lang.String createContourStatsHeader()

createContourStatsString

public java.lang.String createContourStatsString()

getClassifiedAs

public java.lang.String getClassifiedAs()

setClassifiedAs

public void setClassifiedAs(java.lang.String classifiedAs)

isStatsRun

public boolean isStatsRun()

setStatsRun

public void setStatsRun(boolean statsRun)