Interface Data
-
- All Known Implementing Classes:
DataList,UnmodifiableData
public interface DataThis interface define data used by ports.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataaddDataToList(String name)Add a data to the list of data.DataaddDataToList(String name, int part)Add a data to the list of data.DataFilegetDataFile()Get the DataFile for an input DataType and a Sample.DataFilegetDataFile(int fileIndex)Get the DataFile for an input DataType and a Sample.intgetDataFileCount()Count 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.StringgetDataFilename()Get the pathname for the data.StringgetDataFilename(int fileIndex)Get the pathname for the data.DataFormatgetFormat()Get the data format of the data.List<Data>getListElements()Get the the list of data.DataMetadatagetMetadata()Get metadata about the data.StringgetName()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 Detail
-
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
List<Data> 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
Data addDataToList(String name)
Add a data to the list of data.- Parameters:
name- name of the data- Returns:
- the data object added to the list
-
addDataToList
Data addDataToList(String name, int part)
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
String getDataFilename(int fileIndex)
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
DataFile getDataFile(int fileIndex)
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
-
-