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
All Methods Instance Methods Abstract 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.
-
-
-
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
-
-