public interface JIPipeData extends Closeable, AutoCloseable
JIPipeReadDataStorage
, JIPipeProgressInfo) that imports the data from a row storage folder.
Additionally, there must be an annotation of type JIPipeDataStorageDocumentation
that describes the structure of a valid row storage folder for humans.
The static importData(@link org.hkijena.jipipe.api.data.storage.JIPipeReadDataStorage}, JIPipeProgressInfo) method and the JIPipeDataStorageDocumentation
annotation can be omitted for abstract data types or interfaces.
JIPipeDataStorageDocumentation
can be inherited from parent classes.
Update: 1.74.0: The class is now closable, which is useful for handling external resources. JIPipeDataTable
and JIPipeDataItemStore
were adapted to handle the close() automatically.
Modifier and Type | Method and Description |
---|---|
default void |
close() |
default JIPipeThumbnailData |
createThumbnail(int width,
int height,
JIPipeProgressInfo progressInfo)
This function generates a thumbnail for this data
Can return null
|
JIPipeData |
duplicate(JIPipeProgressInfo progressInfo)
Duplicates the data
|
void |
exportData(JIPipeWriteDataStorage storage,
String name,
boolean forceName,
JIPipeProgressInfo progressInfo)
Saves the data to a folder
|
default void |
exportThumbnails(JIPipeWriteDataStorage storage,
Path target,
List<Dimension> sizes,
JIPipeProgressInfo progressInfo)
Exports the thumbnails/previews of this data into the provided storage
|
static String |
getDescriptionOf(Class<? extends JIPipeData> klass)
Returns the description of a data type
|
static String |
getMenuPathOf(Class<? extends JIPipeData> klass)
Returns the menu path of the data type
|
static String |
getNameOf(Class<? extends JIPipeData> klass)
Returns the name of a data type
|
static List<Class<? extends JIPipeData>> |
getSortedList(Collection<Class<? extends JIPipeData>> classes)
Gets name sorted list of data classes
|
static HTMLText |
getStorageDocumentation(Class<? extends JIPipeData> klass)
Returns the storage documentation for the data type or null if none was provided.
|
static String |
getStorageSchema(Class<? extends JIPipeData> klass)
Returns the URL pointing to a JSON schema that describes the storage of the data type.
|
static Map<String,Set<Class<? extends JIPipeData>>> |
groupByMenuPath(Collection<Class<? extends JIPipeData>> classes)
Groups the data types by their menu path
|
static boolean |
isCommon(Class<? extends JIPipeData> klass)
Returns true if this data is commonly used (only for UI)
|
static boolean |
isHeavy(Class<? extends JIPipeData> klass)
Returns true if this data is considered as having a large size
|
static boolean |
isHidden(Class<? extends JIPipeData> klass)
Returns true if this data should be be accessible by the user
|
default Component |
preview(int width,
int height)
Deprecated.
|
default String |
toDetailedString()
This method returns a detailed string description (with multi-line, etc.) of the data.
|
static String getNameOf(Class<? extends JIPipeData> klass)
klass
- The data classstatic String getDescriptionOf(Class<? extends JIPipeData> klass)
klass
- The data classstatic String getMenuPathOf(Class<? extends JIPipeData> klass)
klass
- The data classstatic boolean isHidden(Class<? extends JIPipeData> klass)
klass
- Data classstatic boolean isHeavy(Class<? extends JIPipeData> klass)
klass
- Data classstatic boolean isCommon(Class<? extends JIPipeData> klass)
klass
- Data classstatic HTMLText getStorageDocumentation(Class<? extends JIPipeData> klass)
klass
- the classstatic String getStorageSchema(Class<? extends JIPipeData> klass)
klass
- the classstatic List<Class<? extends JIPipeData>> getSortedList(Collection<Class<? extends JIPipeData>> classes)
classes
- The data classesstatic Map<String,Set<Class<? extends JIPipeData>>> groupByMenuPath(Collection<Class<? extends JIPipeData>> classes)
classes
- The data classesvoid exportData(JIPipeWriteDataStorage storage, String name, boolean forceName, JIPipeProgressInfo progressInfo)
storage
- The storage where the data should be writtenname
- A name reference that can be used to generate filename(s)forceName
- If enabled, the data is saved potentially destructively. Generated files must always contain the name parameter. This is used to collect results for humans or other algorithms.progressInfo
- the progressJIPipeData duplicate(JIPipeProgressInfo progressInfo)
progressInfo
- the progress of duplicating the data@Deprecated default Component preview(int width, int height)
width
- the target widthheight
- the target heightdefault JIPipeThumbnailData createThumbnail(int width, int height, JIPipeProgressInfo progressInfo)
width
- the widthheight
- the heightprogressInfo
- the progress infodefault String toDetailedString()
default void close()
close
in interface AutoCloseable
close
in interface Closeable
default void exportThumbnails(JIPipeWriteDataStorage storage, Path target, List<Dimension> sizes, JIPipeProgressInfo progressInfo)
storage
- the storagetarget
- the location of the data (as internal path within the data table) that is described by the thumbnailssizes
- the sizes to save (in pixels)progressInfo
- the progress infoCopyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.