public class JIPipeDataSlotInfo extends Object implements JIPipeParameterCollection
JIPipeGraphNode
data slot.
This class is used within JIPipeSlotConfiguration
Modifier and Type | Class and Description |
---|---|
static class |
JIPipeDataSlotInfo.Deserializer
Deserializes an
JIPipeDataSlotInfo |
static class |
JIPipeDataSlotInfo.Serializer
Serializes an
JIPipeDataSlotInfo |
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent
Modifier | Constructor and Description |
---|---|
protected |
JIPipeDataSlotInfo() |
|
JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass,
JIPipeSlotType slotType) |
|
JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass,
JIPipeSlotType slotType,
String name,
String description) |
|
JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass,
JIPipeSlotType slotType,
String name,
String description,
String inheritedSlot) |
|
JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass,
JIPipeSlotType slotType,
String name,
String description,
String inheritedSlot,
boolean optional) |
|
JIPipeDataSlotInfo(JIPipeDataSlotInfo other)
Copies the definition
|
|
JIPipeDataSlotInfo(JIPipeInputSlot slot) |
|
JIPipeDataSlotInfo(JIPipeOutputSlot slot) |
Modifier and Type | Method and Description |
---|---|
static Class<? extends JIPipeData> |
applyInheritanceConversion(JIPipeDataSlotInfo definition,
Class<? extends JIPipeData> dataClass)
Applies inheritance conversion.
|
static Map<JIPipeDataInfo,JIPipeDataInfo> |
composeInheritanceConversions(Map<JIPipeDataInfo,JIPipeDataInfo> outer,
Map<JIPipeDataInfo,JIPipeDataInfo> inner)
Creates the composition of two inheritance conversions.
|
static Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> |
composeRawInheritanceConversions(Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> outer,
Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> inner)
Creates the composition of two inheritance conversions.
|
void |
copyMetadata(JIPipeDataSlotInfo other)
Copies additional parameters such as custom names from the other slot
|
JIPipeDataSlot |
createInstance(JIPipeGraphNode node) |
boolean |
equals(Object o) |
String |
getCustomName() |
Class<? extends JIPipeData> |
getDataClass() |
String |
getDescription() |
EventBus |
getEventBus()
Gets the event bus that posts events about the parameters
|
Map<JIPipeDataInfo,JIPipeDataInfo> |
getInheritanceConversions() |
String |
getInheritedSlot()
Gets slot to inherit the data type from
If null or empty, this slot does not inherit
If it equals '*', the first available input slot is chosen
|
String |
getName() |
JIPipeDataSlotRole |
getRole() |
JIPipeSlotType |
getSlotType() |
int |
hashCode() |
boolean |
isInput() |
boolean |
isOptional() |
boolean |
isOutput() |
boolean |
isSaveOutputs() |
boolean |
isUserModifiable()
Additional control variable to make a slot not removable/editable.
|
static boolean |
isValidName(String slotName)
Returns true if the provided string is a valid slot name
|
boolean |
isVirtual() |
JIPipeDataSlotInfo |
renamedCopy(String newName) |
void |
setCustomName(String customName)
Overrides the name displayed in the UI
|
void |
setDescription(String description) |
void |
setInheritanceConversions(Map<JIPipeDataInfo,JIPipeDataInfo> inheritanceConversions) |
void |
setInheritanceConversionsFromRaw(Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> inheritanceConversions) |
void |
setOptional(boolean optional) |
void |
setRole(JIPipeDataSlotRole role) |
void |
setSaveOutputs(boolean saveOutputs) |
void |
setUserModifiable(boolean userModifiable)
Set this variable to make a slot not removable/editable.
|
void |
setVirtual(boolean virtual) |
JIPipeInputSlot |
toInputSlotAnnotation()
Converts this info into the annotation form.
|
JIPipeOutputSlot |
toOutputSlotAnnotation()
Converts this info into the annotation form.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, isParameterUIVisible, isParameterUIVisible, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChange
protected JIPipeDataSlotInfo()
public JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass, JIPipeSlotType slotType, String name, String description, String inheritedSlot, boolean optional)
dataClass
- slot data classslotType
- slot typename
- unique slot namedescription
- description of the slotinheritedSlot
- only relevant if output slot. Can be an input slot name or '*' to automatically select the first input slotoptional
- only relevant if an input slot. marks the slot as optional input if truepublic JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass, JIPipeSlotType slotType, String name, String description, String inheritedSlot)
dataClass
- slot data classslotType
- slot typename
- unique slot namedescription
- description of the slotinheritedSlot
- only relevant if output slot. Can be an input slot name or '*' to automatically select the first input slotpublic JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass, JIPipeSlotType slotType, String name, String description)
dataClass
- slot data classslotType
- slot typename
- unique slot namedescription
- description of the slotpublic JIPipeDataSlotInfo(Class<? extends JIPipeData> dataClass, JIPipeSlotType slotType)
dataClass
- slot data classslotType
- slot typepublic JIPipeDataSlotInfo(JIPipeInputSlot slot)
slot
- Imported annotationpublic JIPipeDataSlotInfo(JIPipeOutputSlot slot)
slot
- Imported annotationpublic JIPipeDataSlotInfo(JIPipeDataSlotInfo other)
other
- The originalpublic static Class<? extends JIPipeData> applyInheritanceConversion(JIPipeDataSlotInfo definition, Class<? extends JIPipeData> dataClass)
definition
- The slot definitiondataClass
- The slot datapublic static Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> composeRawInheritanceConversions(Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> outer, Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> inner)
outer
- the outer conversioninner
- the inner conversionpublic static Map<JIPipeDataInfo,JIPipeDataInfo> composeInheritanceConversions(Map<JIPipeDataInfo,JIPipeDataInfo> outer, Map<JIPipeDataInfo,JIPipeDataInfo> inner)
outer
- the outer conversioninner
- the inner conversionpublic static boolean isValidName(String slotName)
slotName
- the namepublic JIPipeInputSlot toInputSlotAnnotation()
UnsupportedOperationException
if the info describes an output.public JIPipeOutputSlot toOutputSlotAnnotation()
UnsupportedOperationException
if the info describes an output.public JIPipeDataSlot createInstance(JIPipeGraphNode node)
public boolean isInput()
public boolean isOutput()
public JIPipeDataSlotInfo renamedCopy(String newName)
newName
- new namepublic Class<? extends JIPipeData> getDataClass()
public JIPipeSlotType getSlotType()
public String getName()
public String getInheritedSlot()
public Map<JIPipeDataInfo,JIPipeDataInfo> getInheritanceConversions()
public void setInheritanceConversions(Map<JIPipeDataInfo,JIPipeDataInfo> inheritanceConversions)
public void setInheritanceConversionsFromRaw(Map<Class<? extends JIPipeData>,Class<? extends JIPipeData>> inheritanceConversions)
public String getCustomName()
public void setCustomName(String customName)
customName
- a custom name or null to reset the custom namepublic String getDescription()
public void setDescription(String description)
public boolean isVirtual()
public void setVirtual(boolean virtual)
public boolean isSaveOutputs()
public void setSaveOutputs(boolean saveOutputs)
public boolean isOptional()
public void setOptional(boolean optional)
public boolean isUserModifiable()
public void setUserModifiable(boolean userModifiable)
userModifiable
- if the slot is removable/editablepublic void copyMetadata(JIPipeDataSlotInfo other)
other
- other slotpublic EventBus getEventBus()
JIPipeParameterCollection
getEventBus
in interface JIPipeParameterCollection
JIPipeParameterCollection.ParameterChangedEvent
and JIPipeParameterCollection.ParameterStructureChangedEvent
public JIPipeDataSlotRole getRole()
public void setRole(JIPipeDataSlotRole role)
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.