Interface Data
- All Known Implementing Classes:
DataList,UnmodifiableData
public interface Data
This interface define data used by ports.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionaddDataToList(String name) Add a data to the list of data.addDataToList(String name, int part) Add a data to the list of data.Get the DataFile for an input DataType and a Sample.getDataFile(int fileIndex) Get the DataFile for an input DataType and a Sample.intCount the number for DataFile available for a multi-file DataFormat and a Sample.intgetDataFileCount(boolean existingFiles) Count the number for DataFile available for a multi-file DataFormat and a Sample.Get the pathname for the data.getDataFilename(int fileIndex) Get the pathname for the data.Get the data format of the data.Get the the list of data.Get metadata about the data.getName()Get data name.intgetPart()Get the part of the data.booleanisEmpty()Test if the number of the elements of the data is equals to 0.booleanisList()Test if the data is a list.intsize()Get the size of the data.
-
Method Details
-
getName
String getName()Get data name.- Returns:
- the name of the data
-
getFormat
DataFormat getFormat()Get the data format of the data.- Returns:
- a DataFormat object
-
getPart
int getPart()Get the part of the data.- Returns:
- the part of the data or -1 if data has not been split
-
getMetadata
DataMetadata getMetadata()Get metadata about the data.- Returns:
- a map with the metadata entries
-
isList
boolean isList()Test if the data is a list.- Returns:
- true if the data is a list
-
getListElements
Get the the list of data.- Returns:
- a list even if the data is not a list
-
size
int size()Get the size of the data.- Returns:
- the number of the element of the data
-
isEmpty
boolean isEmpty()Test if the number of the elements of the data is equals to 0.- Returns:
- true f the number of the elements of the data is equals to 0
-
addDataToList
Add a data to the list of data.- Parameters:
name- name of the data- Returns:
- the data object added to the list
-
addDataToList
Add a data to the list of data.- Parameters:
name- name of the datapart- split part number (-1 for no part)- Returns:
- the data object added to the list
-
getDataFilename
String getDataFilename()Get the pathname for the data.- Returns:
- a String with the pathname
-
getDataFilename
Get the pathname for the data. This method works only for a multi-file DataFormat.- Parameters:
fileIndex- file index for multi-file data- Returns:
- a String with the pathname
- Throws:
EoulsanRuntimeException- if the DataFormat is not multi-file
-
getDataFile
DataFile getDataFile()Get the DataFile for an input DataType and a Sample.- Returns:
- a new DataFile object
-
getDataFile
Get the DataFile for an input DataType and a Sample. This method works only for a multi-file DataFormat.- Parameters:
fileIndex- file index for multi-file data- Returns:
- a new DataFile object
- Throws:
EoulsanRuntimeException- if the DataFormat is not multi-file
-
getDataFileCount
int getDataFileCount()Count the number for DataFile available for a multi-file DataFormat and a Sample. This method works only for a multi-file DataFormat.- Returns:
- the number of multi-file for the DataFormat and the sample
- Throws:
EoulsanRuntimeException- if the DataFormat is not multi-file
-
getDataFileCount
int getDataFileCount(boolean existingFiles) Count the number for DataFile available for a multi-file DataFormat and a Sample. This method works only for a multi-file DataFormat.- Parameters:
existingFiles- if true return the number of files that really exists- Returns:
- the number of multi-file for the DataFormat and the sample
- Throws:
EoulsanRuntimeException- if the DataFormat is not multi-file
-