public class JIPipeDataTableMetadata extends Object implements TableModel, List<JIPipeDataTableMetadataRow>
JIPipeDataTable
Constructor and Description |
---|
JIPipeDataTableMetadata() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
JIPipeDataTableMetadataRow element) |
boolean |
add(JIPipeDataTableMetadataRow row) |
boolean |
addAll(@NotNull Collection<? extends JIPipeDataTableMetadataRow> c) |
boolean |
addAll(int index,
@NotNull Collection<? extends JIPipeDataTableMetadataRow> c) |
void |
addTableModelListener(TableModelListener l) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(@NotNull Collection<?> c) |
JIPipeDataTableMetadataRow |
get(int index) |
String |
getAcceptedDataTypeId() |
List<String> |
getAnnotationColumns() |
Class<?> |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex) |
List<String> |
getDataAnnotationColumns() |
JIPipeDataInfo |
getDataTypeOf(int rowIndex)
Returns the true data type (if available) or the accepted data type of the given row
|
int |
getFormatVersion()
Returns the format version for storage in the JSON file.
|
int |
getRowCount() |
List<JIPipeDataTableMetadataRow> |
getRowList() |
Path |
getRowStoragePath(Path storagePath,
int row)
Gets the storage path of the specified row
|
Object |
getValueAt(int rowIndex,
int columnIndex) |
int |
indexOf(Object o) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
boolean |
isEmpty() |
@NotNull Iterator<JIPipeDataTableMetadataRow> |
iterator() |
int |
lastIndexOf(Object o) |
@NotNull ListIterator<JIPipeDataTableMetadataRow> |
listIterator() |
@NotNull ListIterator<JIPipeDataTableMetadataRow> |
listIterator(int index) |
static JIPipeDataTableMetadata |
loadFromJson(Path fileName)
Loads the table from JSON
|
JIPipeDataTableMetadataRow |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(@NotNull Collection<?> c) |
void |
removeTableModelListener(TableModelListener l) |
boolean |
retainAll(@NotNull Collection<?> c) |
void |
saveAsCSV(Path fileName)
Saves the table to CSV
|
void |
saveAsJson(Path fileName)
Saves the table to JSON
|
JIPipeDataTableMetadataRow |
set(int index,
JIPipeDataTableMetadataRow element) |
void |
setAcceptedDataTypeId(String id)
Sets the accepted datatype ID
|
void |
setRowList(List<JIPipeDataTableMetadataRow> rowList)
Sets list of rows
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
int |
size() |
@NotNull List<JIPipeDataTableMetadataRow> |
subList(int fromIndex,
int toIndex) |
int |
toAnnotationColumnIndex(int columnIndex)
Converts the column index to an annotation column index, or returns -1 if the column is not one
|
AnnotationTableData |
toAnnotationTable()
Converts the data table into an annotation table
|
@NotNull Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int |
toDataAnnotationColumnIndex(int columnIndex)
Converts the column index to a data annotation column index, or returns -1 if the column is not one
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public static JIPipeDataTableMetadata loadFromJson(Path fileName)
fileName
- JSON filepublic int getFormatVersion()
public String getAcceptedDataTypeId()
public void setAcceptedDataTypeId(String id)
id
- Datatype IDpublic List<JIPipeDataTableMetadataRow> getRowList()
public void setRowList(List<JIPipeDataTableMetadataRow> rowList)
rowList
- Row listpublic void saveAsJson(Path fileName) throws IOException
fileName
- JSON fileIOException
- Triggered by ObjectMapper
public Path getRowStoragePath(Path storagePath, int row)
storagePath
- the storage path that contains the data tablerow
- the row indexpublic void saveAsCSV(Path fileName) throws IOException
fileName
- CSV fileIOException
- Triggered by ResultsTable
public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public int toAnnotationColumnIndex(int columnIndex)
columnIndex
- absolute column indexpublic int toDataAnnotationColumnIndex(int columnIndex)
columnIndex
- absolute column indexpublic String getColumnName(int columnIndex)
getColumnName
in interface TableModel
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public JIPipeDataInfo getDataTypeOf(int rowIndex)
rowIndex
- the rowpublic void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
public void addTableModelListener(TableModelListener l)
addTableModelListener
in interface TableModel
public void removeTableModelListener(TableModelListener l)
removeTableModelListener
in interface TableModel
public AnnotationTableData toAnnotationTable()
public int size()
size
in interface Collection<JIPipeDataTableMetadataRow>
size
in interface List<JIPipeDataTableMetadataRow>
public boolean isEmpty()
isEmpty
in interface Collection<JIPipeDataTableMetadataRow>
isEmpty
in interface List<JIPipeDataTableMetadataRow>
public boolean contains(Object o)
contains
in interface Collection<JIPipeDataTableMetadataRow>
contains
in interface List<JIPipeDataTableMetadataRow>
@NotNull public @NotNull Iterator<JIPipeDataTableMetadataRow> iterator()
iterator
in interface Iterable<JIPipeDataTableMetadataRow>
iterator
in interface Collection<JIPipeDataTableMetadataRow>
iterator
in interface List<JIPipeDataTableMetadataRow>
@NotNull public @NotNull Object[] toArray()
toArray
in interface Collection<JIPipeDataTableMetadataRow>
toArray
in interface List<JIPipeDataTableMetadataRow>
@NotNull public <T> T[] toArray(@NotNull T[] a)
toArray
in interface Collection<JIPipeDataTableMetadataRow>
toArray
in interface List<JIPipeDataTableMetadataRow>
public boolean add(JIPipeDataTableMetadataRow row)
add
in interface Collection<JIPipeDataTableMetadataRow>
add
in interface List<JIPipeDataTableMetadataRow>
public boolean remove(Object o)
remove
in interface Collection<JIPipeDataTableMetadataRow>
remove
in interface List<JIPipeDataTableMetadataRow>
public boolean containsAll(@NotNull @NotNull Collection<?> c)
containsAll
in interface Collection<JIPipeDataTableMetadataRow>
containsAll
in interface List<JIPipeDataTableMetadataRow>
public boolean addAll(@NotNull @NotNull Collection<? extends JIPipeDataTableMetadataRow> c)
addAll
in interface Collection<JIPipeDataTableMetadataRow>
addAll
in interface List<JIPipeDataTableMetadataRow>
public boolean addAll(int index, @NotNull @NotNull Collection<? extends JIPipeDataTableMetadataRow> c)
addAll
in interface List<JIPipeDataTableMetadataRow>
public boolean removeAll(@NotNull @NotNull Collection<?> c)
removeAll
in interface Collection<JIPipeDataTableMetadataRow>
removeAll
in interface List<JIPipeDataTableMetadataRow>
public boolean retainAll(@NotNull @NotNull Collection<?> c)
retainAll
in interface Collection<JIPipeDataTableMetadataRow>
retainAll
in interface List<JIPipeDataTableMetadataRow>
public void clear()
clear
in interface Collection<JIPipeDataTableMetadataRow>
clear
in interface List<JIPipeDataTableMetadataRow>
public JIPipeDataTableMetadataRow get(int index)
get
in interface List<JIPipeDataTableMetadataRow>
public JIPipeDataTableMetadataRow set(int index, JIPipeDataTableMetadataRow element)
set
in interface List<JIPipeDataTableMetadataRow>
public void add(int index, JIPipeDataTableMetadataRow element)
add
in interface List<JIPipeDataTableMetadataRow>
public JIPipeDataTableMetadataRow remove(int index)
remove
in interface List<JIPipeDataTableMetadataRow>
public int indexOf(Object o)
indexOf
in interface List<JIPipeDataTableMetadataRow>
public int lastIndexOf(Object o)
lastIndexOf
in interface List<JIPipeDataTableMetadataRow>
@NotNull public @NotNull ListIterator<JIPipeDataTableMetadataRow> listIterator()
listIterator
in interface List<JIPipeDataTableMetadataRow>
@NotNull public @NotNull ListIterator<JIPipeDataTableMetadataRow> listIterator(int index)
listIterator
in interface List<JIPipeDataTableMetadataRow>
@NotNull public @NotNull List<JIPipeDataTableMetadataRow> subList(int fromIndex, int toIndex)
subList
in interface List<JIPipeDataTableMetadataRow>
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.