Class DLAnnotationSQL
java.lang.Object
rawDeepLearningClassifier.logging.DLAnnotationSQL
- All Implemented Interfaces:
 SQLLoggingAddon
Log deep learning annotation to the database
- Author:
 - Jamie Macaulay
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddTableItems(EmptyTableDefinition pamTableDefinition) Add a load of columns to an existing table definitiongetName()Get a name for the SQLLogging Addon.booleanloadData(SQLTypes sqlTypes, EmptyTableDefinition pamTableDefinition, PamDataUnit pamDataUnit) Load data - that is read data from the table definition and turn it into something sensible within or attached to the data unit.static Stringprediction2String(ArrayList<PredictionResult> arrayList) Create a JSON compatible matrix from a string.booleansaveData(SQLTypes sqlTypes, EmptyTableDefinition pamTableDefinition, PamDataUnit pamDataUnit) Save data - that is transfer data from the pamDataUnit to the data objects within the table definitionstatic ArrayList<PredictionResult> string2Predictions(String predictionsString, int predicitonType) Create a list of predictions from a JSON string stored in a database table. 
- 
Constructor Details
- 
DLAnnotationSQL
 
 - 
 - 
Method Details
- 
addTableItems
Description copied from interface:SQLLoggingAddonAdd a load of columns to an existing table definition- Specified by:
 addTableItemsin interfaceSQLLoggingAddon- Parameters:
 pamTableDefinition-
 - 
saveData
public boolean saveData(SQLTypes sqlTypes, EmptyTableDefinition pamTableDefinition, PamDataUnit pamDataUnit) Description copied from interface:SQLLoggingAddonSave data - that is transfer data from the pamDataUnit to the data objects within the table definition- Specified by:
 saveDatain interfaceSQLLoggingAddon- Parameters:
 pamTableDefinition- table definitionpamDataUnit- data unit- Returns:
 - true if successful
 
 - 
loadData
public boolean loadData(SQLTypes sqlTypes, EmptyTableDefinition pamTableDefinition, PamDataUnit pamDataUnit) Description copied from interface:SQLLoggingAddonLoad data - that is read data from the table definition and turn it into something sensible within or attached to the data unit.- Specified by:
 loadDatain interfaceSQLLoggingAddon- Parameters:
 pamTableDefinition- table definitionpamDataUnit- data unit- Returns:
 - true if successful
 
 - 
getName
Description copied from interface:SQLLoggingAddonGet a name for the SQLLogging Addon. this is used in identifying the Addon meaning that it should be possible to have two Addon's with the same class, but different fields.- Specified by:
 getNamein interfaceSQLLoggingAddon- Returns:
 - the name of the Logging Addon
 
 - 
string2Predictions
public static ArrayList<PredictionResult> string2Predictions(String predictionsString, int predicitonType) Create a list of predictions from a JSON string stored in a database table.- Parameters:
 predictionsString- - JSON stringpredicitonType- - the prediction object type e.g.ModelResultBinaryFactory.GENERIC- Returns:
 - a list of prediction objects.
 
 - 
prediction2String
Create a JSON compatible matrix from a string.- Parameters:
 predictions- - the spectrum.- Returns:
 - string representation for the predictions in JSON format
 
 
 -