Class DataFormatRegistry
java.lang.Object
fr.ens.biologie.genomique.eoulsan.data.DataFormatRegistry
this class register DataFormat to allow get the DataFormat of a file from its filename.
- Since:
- 1.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionGet all the registered formats.Get the DataFormat that define a metadata entry in the design file.Get the DataFormat that define a metadata entry of a sample in the design file.getDataFormatFromAlias(String dataFormatAlias) Get a DataFormat from its alias.getDataFormatFromFilename(String filename) Get the DataFormat of a file from its filenamegetDataFormatFromFilename(String prefix, String extension) Get a DataFormat From a file prefix and extensiongetDataFormatFromGalaxyFormatName(String formatName) Get DataFormat from an Galaxy format name.Get a DataFormat from its Galaxy format name or its name or alias.getDataFormatFromName(String dataFormatName) Get a DataFormat from its name.Get a DataFormat from its alias.getDataFormatsFromExtension(String extension) Get DataFormats from an extension.getDesignMetadataKeyForDataFormat(Design design, DataFormat dataformat) Get the field name in a Design object that correspond to a dataformat.static DataFormatRegistryGet the singleton instance of DataFormatRegistrygetSampleMetadataKeyForDataFormat(Sample sample, DataFormat dataformat) Get the field name in a Sample object that correspond to a dataformat.voidregister(DataFormat df) Register a DataFormat.voidregister(DataFormat[] array) Register DataFormats.voidreload()Reload the list of the available data types.
-
Method Details
-
register
Register a DataFormat.- Parameters:
df- the DataFormat to register- Throws:
EoulsanException- if the DataFormat is not valid
-
register
Register DataFormats.- Parameters:
array- Array with DataFormats to register- Throws:
EoulsanException- if the DataFormat is not valid
-
getDataFormatFromFilename
Get a DataFormat From a file prefix and extension- Parameters:
prefix- the prefix of the fileextension- the extension of the file without compression extension- Returns:
- a DataFormat or null if the DataFormat was not found
-
getDataFormatFromFilename
Get the DataFormat of a file from its filename- Parameters:
filename- the filename of the file- Returns:
- a DataFormat or null if the DataFormat was not found
-
getDataFormatFromName
Get a DataFormat from its name.- Parameters:
dataFormatName- the name of the DataFormat to get- Returns:
- a DataFormat if found or null
-
getDataFormatFromAlias
Get a DataFormat from its alias.- Parameters:
dataFormatAlias- the name of the DataFormat to get- Returns:
- a DataFormat if found or null
-
getDataFormatFromGalaxyFormatName
Get DataFormat from an Galaxy format name.- Parameters:
formatName- Galaxy name extension.- Returns:
- DataFormat
-
getDataFormatFromNameOrAlias
Get a DataFormat from its alias.- Parameters:
name- the name of the DataFormat to get- Returns:
- a DataFormat if found or null
-
getDataFormatFromGalaxyFormatNameOrNameOrAlias
Get a DataFormat from its Galaxy format name or its name or alias.- Parameters:
name- the name of the DataFormat to get- Returns:
- a DataFormat if found or null
-
getDataFormatsFromExtension
Get DataFormats from an extension.- Parameters:
extension- the extension of the file without compression extension- Returns:
- a set of DataFormat
-
getAllFormats
Get all the registered formats.- Returns:
- a set with all the registered formats
-
getDataFormatForDesignMetadata
Get the DataFormat that define a metadata entry in the design file.- Parameters:
key- the name of the metadata key- Returns:
- a DataFormat
-
getDataFormatForSampleMetadata
Get the DataFormat that define a metadata entry of a sample in the design file.- Parameters:
key- the name of the metadata key- Returns:
- a DataFormat
-
getDesignMetadataKeyForDataFormat
Get the field name in a Design object that correspond to a dataformat.- Parameters:
design- design objectdataformat- dataformat to search- Returns:
- the field name if found or null
-
getSampleMetadataKeyForDataFormat
Get the field name in a Sample object that correspond to a dataformat.- Parameters:
sample- sample objectdataformat- dataformat to search- Returns:
- the field name if found or null
-
reload
public void reload()Reload the list of the available data types. -
getInstance
Get the singleton instance of DataFormatRegistry- Returns:
- the DataFormatRegistry singleton
-