Class XMLDataFormat
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.data.XMLDataFormat
-
- All Implemented Interfaces:
DataFormat,Serializable
public final class XMLDataFormat extends Object implements Serializable
This class define a DataFormat from an XML file.- Since:
- 1.2
- Author:
- Laurent Jourdren
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XMLDataFormat(InputStream is, String source)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetAlias()Get the alias of the name of the format.CheckergetChecker()Get the checker needed to check data of this type.StringgetContentType()Get the content type.StringgetDefaultExtension()Get the default extension of the DataType.StringgetDescription()Get the description of the format.StringgetDesignMetadataKeyName()Get the name of the design metadata key of the design file that can provide the DataFile.List<String>getExtensions()Get the extensions for the DataTypeList<String>getGalaxyFormatNames()Get the extension from Galaxy tool file of the DataType.ModulegetGenerator()Get the step needed to generate the DataType from DataTypes provided by the Design file.intgetMaxFilesCount()Get the maximal number of files used to store data of this format.MergergetMerger()Get the merger class related to this type.StringgetName()Get the name of the format.StringgetPrefix()Get DataFormat prefix.StringgetSampleMetadataKeyName()Get the name of the sample metadata key of the design file that can provide the DataFile.SplittergetSplitter()Get the splitter class related to this type.inthashCode()booleanisChecker()Test if a checker is available for this DataFormat.booleanisDataFormatFromDesignFile()Test if the DataFormat is provided by the design file.booleanisGenerator()Test if a generator is available for this DataFormat.booleanisMerger()Test if a merger class is available for this DataFormat.booleanisOneFilePerAnalysis()Test if there is only one file for this DataType per analysis.booleanisSplitter()Test if a splitter class is available for this DataFormat.StringtoString()
-
-
-
Constructor Detail
-
XMLDataFormat
public XMLDataFormat(InputStream is, String source) throws EoulsanException
Public constructor.- Parameters:
is- input stream that contains the value of the data formatsource- source of the format- Throws:
EoulsanException- if an error occurs while reading or parsing XML file
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:DataFormatGet the name of the format.- Specified by:
getNamein interfaceDataFormat- Returns:
- the name of the format
-
getAlias
public String getAlias()
Description copied from interface:DataFormatGet the alias of the name of the format. The alias is optional.- Specified by:
getAliasin interfaceDataFormat- Returns:
- the alias of the format if exist
-
getPrefix
public String getPrefix()
Description copied from interface:DataFormatGet DataFormat prefix.- Specified by:
getPrefixin interfaceDataFormat- Returns:
- the DataFormat prefix
-
isOneFilePerAnalysis
public boolean isOneFilePerAnalysis()
Description copied from interface:DataFormatTest if there is only one file for this DataType per analysis.- Specified by:
isOneFilePerAnalysisin interfaceDataFormat- Returns:
- true if there is only one file for this DataType per analysis
-
isDataFormatFromDesignFile
public boolean isDataFormatFromDesignFile()
Description copied from interface:DataFormatTest if the DataFormat is provided by the design file.- Specified by:
isDataFormatFromDesignFilein interfaceDataFormat- Returns:
- true if the DataType is provided by the design file
-
getDesignMetadataKeyName
public String getDesignMetadataKeyName()
Description copied from interface:DataFormatGet the name of the design metadata key of the design file that can provide the DataFile.- Specified by:
getDesignMetadataKeyNamein interfaceDataFormat- Returns:
- the sample metadata key name
-
getSampleMetadataKeyName
public String getSampleMetadataKeyName()
Description copied from interface:DataFormatGet the name of the sample metadata key of the design file that can provide the DataFile.- Specified by:
getSampleMetadataKeyNamein interfaceDataFormat- Returns:
- the sample metadata key name
-
getDefaultExtension
public String getDefaultExtension()
Description copied from interface:DataFormatGet the default extension of the DataType.- Specified by:
getDefaultExtensionin interfaceDataFormat- Returns:
- the default extension
-
getExtensions
public List<String> getExtensions()
Description copied from interface:DataFormatGet the extensions for the DataType- Specified by:
getExtensionsin interfaceDataFormat- Returns:
- an list of strings with the extension of the DataType
-
getGalaxyFormatNames
public List<String> getGalaxyFormatNames()
Description copied from interface:DataFormatGet the extension from Galaxy tool file of the DataType.- Specified by:
getGalaxyFormatNamesin interfaceDataFormat- Returns:
- extension from Galaxy tool
-
isGenerator
public boolean isGenerator()
Description copied from interface:DataFormatTest if a generator is available for this DataFormat.- Specified by:
isGeneratorin interfaceDataFormat- Returns:
- true if a generator is available for this DataFormat
-
isChecker
public boolean isChecker()
Description copied from interface:DataFormatTest if a checker is available for this DataFormat.- Specified by:
isCheckerin interfaceDataFormat- Returns:
- true if a checker is available for this DataFormat
-
isSplitter
public boolean isSplitter()
Description copied from interface:DataFormatTest if a splitter class is available for this DataFormat.- Specified by:
isSplitterin interfaceDataFormat- Returns:
- true if a splitter class is available for this DataFormat
-
isMerger
public boolean isMerger()
Description copied from interface:DataFormatTest if a merger class is available for this DataFormat.- Specified by:
isMergerin interfaceDataFormat- Returns:
- true if a merger class is available for this DataFormat
-
getGenerator
public Module getGenerator()
Description copied from interface:DataFormatGet the step needed to generate the DataType from DataTypes provided by the Design file.- Specified by:
getGeneratorin interfaceDataFormat- Returns:
- the Step needed to generated the DataType or null if no Step is available for this task
-
getChecker
public Checker getChecker()
Description copied from interface:DataFormatGet the checker needed to check data of this type.- Specified by:
getCheckerin interfaceDataFormat- Returns:
- the Checker or null if no Checker is available for this task
-
getSplitter
public Splitter getSplitter()
Description copied from interface:DataFormatGet the splitter class related to this type.- Specified by:
getSplitterin interfaceDataFormat- Returns:
- The Splitter instanced class of null if no Splitter is available for this task
-
getMerger
public Merger getMerger()
Description copied from interface:DataFormatGet the merger class related to this type.- Specified by:
getMergerin interfaceDataFormat- Returns:
- The Merger instanced class of null if no Merger is available for this task
-
getContentType
public String getContentType()
Description copied from interface:DataFormatGet the content type.- Specified by:
getContentTypein interfaceDataFormat- Returns:
- the content type of this format
-
getMaxFilesCount
public int getMaxFilesCount()
Description copied from interface:DataFormatGet the maximal number of files used to store data of this format. This value cannot be lower than 1. Common values are 1 or 2.- Specified by:
getMaxFilesCountin interfaceDataFormat- Returns:
- the number of maximal of files used to store data.
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
getDescription
public String getDescription()
Description copied from interface:DataFormatGet the description of the format.- Specified by:
getDescriptionin interfaceDataFormat- Returns:
- the name of the format
-
-