mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 16:42:27 +00:00
Comments
Added a couple of comments to help SDSU folk get off the ground
This commit is contained in:
parent
1c11e3da15
commit
5b649edc19
@ -60,19 +60,6 @@ public class TethysControl extends PamControlledUnit {
|
|||||||
return tethysExportParams;
|
return tethysExportParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a nilus deployment document, as full populated as possible.
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public Deployment getDeployment() {
|
|
||||||
Deployment deployment = new Deployment();
|
|
||||||
Deployment.Instrument instrument = new Instrument();
|
|
||||||
// instrument.
|
|
||||||
// deployment.
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll probably want to
|
* We'll probably want to
|
||||||
* @param parentFrame
|
* @param parentFrame
|
||||||
|
@ -5,6 +5,11 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
import PamguardMVC.PamDataBlock;
|
import PamguardMVC.PamDataBlock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parameters for controlling export of Tethys data.
|
||||||
|
* @author dg50
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class TethysExportParams implements Serializable, Cloneable{
|
public class TethysExportParams implements Serializable, Cloneable{
|
||||||
|
|
||||||
public static final long serialVersionUID = 1L;
|
public static final long serialVersionUID = 1L;
|
||||||
|
@ -16,6 +16,7 @@ import PamController.settings.output.xml.PamguardXMLWriter;
|
|||||||
import PamUtils.PamCalendar;
|
import PamUtils.PamCalendar;
|
||||||
import PamguardMVC.PamDataBlock;
|
import PamguardMVC.PamDataBlock;
|
||||||
import PamguardMVC.PamDataUnit;
|
import PamguardMVC.PamDataUnit;
|
||||||
|
import PamguardMVC.dataSelector.DataSelector;
|
||||||
import generalDatabase.DBSchemaWriter;
|
import generalDatabase.DBSchemaWriter;
|
||||||
import generalDatabase.SQLLogging;
|
import generalDatabase.SQLLogging;
|
||||||
import metadata.MetaDataContol;
|
import metadata.MetaDataContol;
|
||||||
@ -234,9 +235,36 @@ public class TethysExporter {
|
|||||||
// do it with a data copy which can avoid synchronising the entire block for what may be a long time
|
// do it with a data copy which can avoid synchronising the entire block for what may be a long time
|
||||||
// the copy function is itself synched, and is quite fast, so easier and safe this way
|
// the copy function is itself synched, and is quite fast, so easier and safe this way
|
||||||
ArrayList<PamDataUnit> dataCopy = aDataBlock.getDataCopy();
|
ArrayList<PamDataUnit> dataCopy = aDataBlock.getDataCopy();
|
||||||
|
DataSelector dataSelector = aDataBlock.getDataSelector(tethysControl.getDataSelectName(), false);
|
||||||
|
int nSkipped = 0;
|
||||||
|
int nExport = 0;
|
||||||
|
|
||||||
for (PamDataUnit aData : dataCopy) {
|
for (PamDataUnit aData : dataCopy) {
|
||||||
// then we do whatever we need to do to convert this into
|
/*
|
||||||
|
* see if we want this data unit. PAMGuard has a complicated system of data selectors specific to
|
||||||
|
* each data type. These are centrally managed so you don't need to worry too much about them. They
|
||||||
|
* are identified by name for each data stream and the behaviour here should follow the selections you
|
||||||
|
* made in the dialog.
|
||||||
|
* the data selection system allows different displays to show different data, so a stream can have many differently
|
||||||
|
* named selectors active at any one time, all doing different things in different parts of PAMGuard.
|
||||||
|
*/
|
||||||
|
if (dataSelector != null) {
|
||||||
|
if (dataSelector.scoreData(aData) <= 0) {
|
||||||
|
nSkipped++;
|
||||||
|
continue; // don't want this one.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* then we do whatever we need to do to convert this into something for Tethys
|
||||||
|
* this might happen in the tethysSchema object for each data stream ????
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
nExport ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.printf("Exported %d data units and skipped %d in %s", nExport, nSkipped, aDataBlock.getLongDataName());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user