Package tethys.pamdata
Class TethysDataProvider
java.lang.Object
tethys.pamdata.TethysDataProvider
- Direct Known Subclasses:
AutoTethysProvider
Any PAMGuard data stream which can provide Detection data to PAMGuard will
be able to return one of these. It will provide a schema and a function which
can turn individual data units into data formatted for Tethys. The nature of how these
work TBD.
- Author:
- dg50
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddUserDefined(nilus.Detection.Parameters parameters, String parameterName, String parameterValue) abstract booleancanExportLocalisations(nilus.GranularityEnumType granularityType) See if it's possible for this block to export localisations.abstract nilus.DetectioncreateDetection(PamDataUnit dataUnit, TethysExportParams tethysExportParams, StreamExportParams streamExportParams) Create a Tethys Detection object from a PamDataUnit.
It's OK for this to return null if for some reason the unit shouldn't be stored.abstract nilus.AlgorithmTypegetAlgorithm(Collection collection) Get Algorithm information for a Tethys Detections documentabstract nilus.AlgorithmType.ParametersGet the algorithm parameters.abstract nilus.GranularityEnumType[]Get a list of allowed granularity types for this outputabstract nilus.DescriptionTypegetDescription(nilus.Deployment deployment, TethysExportParams tethysExportParams) Get DescriptionType object to include in a Tethys Detections document.abstract StringGet a standard Method string for each detector.abstract StringGet a name for the detections documents.abstract voidgetEffortKinds(PDeployment pDeployment, List<nilus.DetectionEffortKind> effortKinds, StreamExportParams exportParams) Fill in the effort kind list for the top of a Detections document.nilus.Helperabstract LocalisationAlgorithmGet the localisation algorithm (if there is one).abstract TethysLocalisationInfoGet localisation info for the datablock.abstract booleanTrue if the datablock is detections.abstract booleanwantExportDialogCard(ExportWizardCard wizPanel) See if a particular card should be used in the export wizard.
-
Constructor Details
-
TethysDataProvider
public TethysDataProvider()
-
-
Method Details
-
addUserDefined
-
getDetectionsMethod
Get a standard Method string for each detector. This can be a bit verbose and might even have a reference to a paper ? Is this the best place for this ?- Returns:
-
getDescription
public abstract nilus.DescriptionType getDescription(nilus.Deployment deployment, TethysExportParams tethysExportParams) Get DescriptionType object to include in a Tethys Detections document.- Parameters:
deployment-tethysExportParams-- Returns:
- Tethys DescriptionType object, which contains infromation about detections
-
getAlgorithm
Get Algorithm information for a Tethys Detections document- Parameters:
collection- Detections or Localisations may have different parameter sets.- Returns:
- Algorithm information
-
getAllowedGranularities
public abstract nilus.GranularityEnumType[] getAllowedGranularities()Get a list of allowed granularity types for this output- Returns:
- list of granularities.
-
getDetectionsName
Get a name for the detections documents. This will be appended to the Deployment name and may also have a number after it.
Note that the name isn't really important since all the matching between different documents is done internally, but it helps to make everything human readable.- Returns:
- A name, similar to datablock.getLongDataName(), but no spaces.
-
hasDetections
public abstract boolean hasDetections()True if the datablock is detections. This will (nearly) always be true or the block wouldn't have a TethysDataProvider, however there may be one or two localisers that should really only output localisation information.- Returns:
-
canExportLocalisations
public abstract boolean canExportLocalisations(nilus.GranularityEnumType granularityType) See if it's possible for this block to export localisations. This may depend on the selected granularity.- Parameters:
granularityType-- Returns:
-
createDetection
public abstract nilus.Detection createDetection(PamDataUnit dataUnit, TethysExportParams tethysExportParams, StreamExportParams streamExportParams) Create a Tethys Detection object from a PamDataUnit.
It's OK for this to return null if for some reason the unit shouldn't be stored.- Parameters:
dataUnit- PAMGuard data unittethysExportParams-streamExportParams-- Returns:
- Detection Tethys Detection object.
-
getAlgorithmParameters
public abstract nilus.AlgorithmType.Parameters getAlgorithmParameters()Get the algorithm parameters.- Returns:
-
getEffortKinds
public abstract void getEffortKinds(PDeployment pDeployment, List<nilus.DetectionEffortKind> effortKinds, StreamExportParams exportParams) Fill in the effort kind list for the top of a Detections document. This must contain a list of every species that's going to be output within this effort period. Any species assigned to an actual detection must be in this list, or the document will be rejected.- Parameters:
pDeployment-effortKinds- tethys object list to add to.exportParams-
-
wantExportDialogCard
See if a particular card should be used in the export wizard. This may not be the best way of doing this, but will do for now.- Parameters:
wizPanel-- Returns:
-
getLocalisationAlgorithm
Get the localisation algorithm (if there is one). This is generally found automatically from the datablock, but it may be necessary to override.- Returns:
- Localisation Algorithm, or null.
-
getLocalisationInfo
Get localisation info for the datablock. Can be null, but probably never is. More likely to have a zero of available types;- Returns:
-
getHelper
public nilus.Helper getHelper()- Returns:
- the helper
-