Class UnmodifiableData
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.workflow.UnmodifiableData
-
- All Implemented Interfaces:
Data
,Serializable
public class UnmodifiableData extends Object implements Data, Serializable
This class define an unmodifiable data- Since:
- 2.0
- Author:
- Laurent Jourdren
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Data
addDataToList(String name)
Add a data to the list of data.Data
addDataToList(String name, int part)
Add a data to the list of data.DataFile
getDataFile()
Get the DataFile for an input DataType and a Sample.DataFile
getDataFile(int fileIndex)
Get the DataFile for an input DataType and a Sample.int
getDataFileCount()
Count the number for DataFile available for a multi-file DataFormat and a Sample.int
getDataFileCount(boolean existingFiles)
Count the number for DataFile available for a multi-file DataFormat and a Sample.String
getDataFilename()
Get the pathname for the data.String
getDataFilename(int fileIndex)
Get the pathname for the data.DataFormat
getFormat()
Get the data format of the data.List<Data>
getListElements()
Get the the list of data.DataMetadata
getMetadata()
Get metadata about the data.String
getName()
Get data name.int
getPart()
Get the part of the data.boolean
isEmpty()
Test if the number of the elements of the data is equals to 0.boolean
isList()
Test if the data is a list.int
size()
Get the size of the data.String
toString()
-
-
-
Method Detail
-
getFormat
public DataFormat getFormat()
Description copied from interface:Data
Get the data format of the data.
-
getPart
public int getPart()
Description copied from interface:Data
Get the part of the data.
-
getMetadata
public DataMetadata getMetadata()
Description copied from interface:Data
Get metadata about the data.- Specified by:
getMetadata
in interfaceData
- Returns:
- a map with the metadata entries
-
isList
public boolean isList()
Description copied from interface:Data
Test if the data is a list.
-
getListElements
public List<Data> getListElements()
Description copied from interface:Data
Get the the list of data.- Specified by:
getListElements
in interfaceData
- Returns:
- a list even if the data is not a list
-
size
public int size()
Description copied from interface:Data
Get the size of the data.
-
isEmpty
public boolean isEmpty()
Description copied from interface:Data
Test if the number of the elements of the data is equals to 0.
-
addDataToList
public Data addDataToList(String name)
Description copied from interface:Data
Add a data to the list of data.- Specified by:
addDataToList
in interfaceData
- Parameters:
name
- name of the data- Returns:
- the data object added to the list
-
addDataToList
public Data addDataToList(String name, int part)
Description copied from interface:Data
Add a data to the list of data.- Specified by:
addDataToList
in interfaceData
- Parameters:
name
- name of the datapart
- split part number (-1 for no part)- Returns:
- the data object added to the list
-
getDataFilename
public String getDataFilename()
Description copied from interface:Data
Get the pathname for the data.- Specified by:
getDataFilename
in interfaceData
- Returns:
- a String with the pathname
-
getDataFilename
public String getDataFilename(int fileIndex)
Description copied from interface:Data
Get the pathname for the data. This method works only for a multi-file DataFormat.- Specified by:
getDataFilename
in interfaceData
- Parameters:
fileIndex
- file index for multi-file data- Returns:
- a String with the pathname
-
getDataFile
public DataFile getDataFile()
Description copied from interface:Data
Get the DataFile for an input DataType and a Sample.- Specified by:
getDataFile
in interfaceData
- Returns:
- a new DataFile object
-
getDataFile
public DataFile getDataFile(int fileIndex)
Description copied from interface:Data
Get the DataFile for an input DataType and a Sample. This method works only for a multi-file DataFormat.- Specified by:
getDataFile
in interfaceData
- Parameters:
fileIndex
- file index for multi-file data- Returns:
- a new DataFile object
-
getDataFileCount
public int getDataFileCount()
Description copied from interface:Data
Count the number for DataFile available for a multi-file DataFormat and a Sample. This method works only for a multi-file DataFormat.- Specified by:
getDataFileCount
in interfaceData
- Returns:
- the number of multi-file for the DataFormat and the sample
-
getDataFileCount
public int getDataFileCount(boolean existingFiles)
Description copied from interface:Data
Count the number for DataFile available for a multi-file DataFormat and a Sample. This method works only for a multi-file DataFormat.- Specified by:
getDataFileCount
in interfaceData
- Parameters:
existingFiles
- if true return the number of files that really exists- Returns:
- the number of multi-file for the DataFormat and the sample
-
-