public class RoccaSightingDataUnit extends PamDetection<PamDetection,PamDetection>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NONE |
AMPLITUDE_SCALE_DBREMPA, AMPLITUDE_SCALE_LINREFSD
Constructor and Description |
---|
RoccaSightingDataUnit(long timeMilliseconds,
int channelBitmap,
long startSample,
long duration)
Create a new RoccaSightingDataUnit.
|
RoccaSightingDataUnit(long timeMilliseconds,
int channelBitmap,
long startSample,
long duration,
java.lang.String sNum,
javax.swing.JLabel[] speciesList)
Create a new RoccaSightingDataUnit
|
RoccaSightingDataUnit(long timeMilliseconds,
int channelBitmap,
long startSample,
long duration,
java.lang.String sNum,
java.lang.String[] speciesList)
Create a new RoccaSightingDataUnit
|
Modifier and Type | Method and Description |
---|---|
void |
addSpeciesTreeVotes(double[] newTreeVotes)
Adds the passed array of tree votes to the current array.
|
double[] |
calculateTimeParams()
Calculate sighting parameters based on time data.
|
static java.lang.String[] |
checkForAmbig(java.lang.String[] speciesAsString)
Checks the passed String array for 'Ambig' (RoccaClassifier.AMBIG).
|
double |
classifySighting()
classify the sighting, based on the tree votes.
|
void |
classifySighting(int threshold)
classify the sighting, based on the tree votes.
|
void |
clearCounts()
clear the counts for the species list
|
int |
countWhistles() |
java.lang.String |
createClassCountList()
Create a single string containing the species class counts, using
the '-' character separating the values
|
java.lang.String |
createSpList()
Create a single string containing the species, using
the '-' character separating the values
|
java.lang.String |
createVoteList()
Create a single string containing the tree votes, using
the '-' character separating the values.
|
int |
getClassCount(int speciesNum)
Returns the classification count for a single species
|
java.lang.String |
getSightClass() |
java.lang.String |
getSightNum() |
javax.swing.JLabel[] |
getSpecies()
returns the species list as a JLabel array
|
java.lang.String[] |
getSpeciesAsString()
returns the species list as a String array
|
int[] |
getSpeciesClassCount()
Returns the classification counts for the current species list
|
double[] |
getSpeciesTreeVotes()
returns the array of tree votes
|
void |
incSpeciesCount(int speciesToInc)
Increments a specific species classification count
|
void |
incSpeciesCount(int speciesToInc,
double startTime)
Increment a specific species classification count, and save the starting
time.
|
void |
incSpeciesCount(java.lang.String speciesToInc)
Increments a specific species classification count
|
void |
incSpeciesCount(java.lang.String speciesToInc,
double startTime)
Increments a specific species classification count and save the starting
time.
|
boolean |
isSightingSaved() |
boolean |
isWhistleClassified()
checks to see if any whistles have been classified yet
|
void |
parseAndSetClassCountList(java.lang.String classCountListSingleString)
Reads the class counts from the passed string and sets the tally.
|
void |
parseAndSetSpList(java.lang.String spListSingleString)
Reads the species from the passed string and sets the species list.
|
void |
parseAndSetVoteList(java.lang.String voteListSingleString)
Reads the class counts from the passed string and sets the tally.
|
void |
setSightClass(java.lang.String sightClass)
Sets the sighting classification to the passed string
|
void |
setSightingSaved(boolean sightingSaved) |
void |
setSightNum(java.lang.String sightNum) |
void |
setSpecies(java.lang.String[] speciesAsString)
Creates a new list of species and sets the counts to 0.
|
void |
setSpeciesClassCount(int[] speciesClassCount)
Sets all the species counts.
|
addSubDetection, addSuperDetection, findSubDetection, getDetectionType, getEventEndTime, getPeakTime, getSubDetection, getSubDetectionsCount, getSubDetectionSyncronisation, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, removeSubDetection, removeSuperDetection, replaceSubDetection, setDetectionType, setEventEndTime, setPeakTime, setUniqueSuperDetection
amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, compareTo, getAmplitudeDB, getCalculatedAmlitudeDB, getDuration, getFrequency, getFrequencyOverlap, getLastSample, getMeasuredAmplitude, getMeasuredAmplitudeType, getSeconds, getStartSample, getSummaryString, getTimeOverlap, setCalculatedAmlitudeDB, setDuration, setFrequency, setInfo, setMeasuredAmplitude, setMeasuredAmplitude, setMeasuredAmplitudeType, setStartSample
addDataAnnotation, clearOandAngles, clearUpdateCount, findDataAnnotation, getAbsBlockIndex, getChannelBitmap, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDetectionMatch, getDetectionMatch, getHydrophoneHeading, getLastUpdateTime, getLocalisation, getNumDataAnnotations, getOriginLatLong, getPairAngle, getParentDataBlock, getTimeMilliseconds, getUpdateCount, removeDataAnnotation, removeDataAnnotation, setAbsBlockIndex, setChannelBitmap, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setLastUpdateTime, setLocalisation, setOriginLatLong, setParentDataBlock, setTimeMilliseconds, updateDataUnit
public static final java.lang.String NONE
public RoccaSightingDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration, java.lang.String sNum, javax.swing.JLabel[] speciesList)
timeMilliseconds
- channelBitmap
- startSample
- duration
- sNum
- the current sighting numberspeciesList
- a JLabel array containing the species list.public RoccaSightingDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration, java.lang.String sNum, java.lang.String[] speciesList)
timeMilliseconds
- channelBitmap
- startSample
- duration
- sNum
- the current sighting numberspeciesList
- a String array containing the species list.public RoccaSightingDataUnit(long timeMilliseconds, int channelBitmap, long startSample, long duration)
timeMilliseconds
- channelBitmap
- startSample
- duration
- public java.lang.String getSightNum()
public void setSightNum(java.lang.String sightNum)
public void setSpecies(java.lang.String[] speciesAsString)
speciesAsString
- a string array of species names (max 5 characters).public static java.lang.String[] checkForAmbig(java.lang.String[] speciesAsString)
Note that this method is static, so calls to it do not need a specific RoccaSightingDataUnit instance. This was done to make it easier to call from the RoccaSpecPopUp object, which does not see any instances.
speciesAsString
- public void clearCounts()
public javax.swing.JLabel[] getSpecies()
public java.lang.String[] getSpeciesAsString()
public int[] getSpeciesClassCount()
public int getClassCount(int speciesNum)
speciesNum
- the index of the desired species countpublic void setSpeciesClassCount(int[] speciesClassCount)
speciesClassCount
- an int array with the counts for each species.
The length of the array must match the length of the species listpublic void incSpeciesCount(int speciesToInc)
speciesToInc
- the index of the species to incrementpublic void incSpeciesCount(int speciesToInc, double startTime)
speciesToInc
- startTime
- the starting time of the whistle, in millisecondspublic void incSpeciesCount(java.lang.String speciesToInc)
speciesToInc
- the index of the species to incrementpublic void incSpeciesCount(java.lang.String speciesToInc, double startTime)
speciesToInc
- the index of the species to incrementstartTime
- the starting time of the whistle, in millisecondspublic java.lang.String getSightClass()
public void setSightClass(java.lang.String sightClass)
sightClass
- a string containing the classpublic void classifySighting(int threshold)
the
- threshold to compare the tree votes againstpublic double classifySighting()
public int countWhistles()
public double[] getSpeciesTreeVotes()
public void addSpeciesTreeVotes(double[] newTreeVotes)
newTreeVotes
- a double array of tree votespublic boolean isSightingSaved()
public void setSightingSaved(boolean sightingSaved)
public boolean isWhistleClassified()
public java.lang.String createSpList()
public void parseAndSetSpList(java.lang.String spListSingleString)
spListSingleString
- the String to parse. See method description
for the String format requiredpublic java.lang.String createClassCountList()
public void parseAndSetClassCountList(java.lang.String classCountListSingleString)
classCountListSingleString
- the String to parse. See method
description for the String format requiredpublic java.lang.String createVoteList()
public void parseAndSetVoteList(java.lang.String voteListSingleString)
classCountListSingleString
- the String to parse. See method
description for the String format requiredpublic double[] calculateTimeParams()