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:
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Data
      Get data name.
      Specified by:
      getName in interface Data
      Returns:
      the name of the data
    • getFormat

      public DataFormat getFormat()
      Description copied from interface: Data
      Get the data format of the data.
      Specified by:
      getFormat in interface Data
      Returns:
      a DataFormat object
    • getPart

      public int getPart()
      Description copied from interface: Data
      Get the part of the data.
      Specified by:
      getPart in interface Data
      Returns:
      the part of the data or -1 if data has not been split
    • getMetadata

      public DataMetadata getMetadata()
      Description copied from interface: Data
      Get metadata about the data.
      Specified by:
      getMetadata in interface Data
      Returns:
      a map with the metadata entries
    • isList

      public boolean isList()
      Description copied from interface: Data
      Test if the data is a list.
      Specified by:
      isList in interface Data
      Returns:
      true 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 interface Data
      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.
      Specified by:
      size in interface Data
      Returns:
      the number of the element 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.
      Specified by:
      isEmpty in interface Data
      Returns:
      true f 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 interface Data
      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 interface Data
      Parameters:
      name - name of the data
      part - 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 interface Data
      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 interface Data
      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 interface Data
      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 interface Data
      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 interface Data
      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 interface Data
      Parameters:
      existingFiles - if true return the number of files that really exists
      Returns:
      the number of multi-file for the DataFormat and the sample
    • toString

      public String toString()
      Overrides:
      toString in class Object