Package org.knime.gateway.api.entity
Class NodeIDEnt
java.lang.Object
org.knime.gateway.api.entity.NodeIDEnt
Represents a node id as used by gateway entities and services (and the UI in general). Equivalent to the core's
NodeID.- Author:
- Martin Horn, KNIME GmbH, Konstanz, Germany
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendNodeID(int id) Appends the given single node id to this id and returns a copy.booleanint[]static NodeIDEntThe id representing the root node (i.e.inthashCode()booleanorg.knime.core.node.workflow.NodeIDtoNodeID(org.knime.core.node.workflow.NodeID rootID) Converts the entity into aNodeIDobject.toString()
-
Constructor Details
-
NodeIDEnt
public NodeIDEnt(int... ids) Creates the node id from a list of hierarchical node ids.- Parameters:
ids- the ids of the single nodes that form the node hierarchy
-
NodeIDEnt
public NodeIDEnt(org.knime.core.node.workflow.NodeID nodeID) - Parameters:
nodeID- the node id to create the entity from
-
NodeIDEnt
public NodeIDEnt(org.knime.core.node.workflow.NodeID nodeID, boolean hasComponentProjectParent) - Parameters:
nodeID- the node id to create the entity fromhasComponentProjectParent- if the node with the given id is part of a component project; if so, an unnecessary '0' is removed; e.g. instead of 'root:0:4:5', 'root:4:5' is used
-
NodeIDEnt
Deserialization constructor.- Parameters:
s- string representation as returned bytoString()
-
-
Method Details
-
getRootID
The id representing the root node (i.e. the node that 'contains' the root workflow).- Returns:
- the node id entity
-
appendNodeID
Appends the given single node id to this id and returns a copy.- Parameters:
id- the id to append- Returns:
- a new node id entity
-
toNodeID
public org.knime.core.node.workflow.NodeID toNodeID(org.knime.core.node.workflow.NodeID rootID) Converts the entity into aNodeIDobject.- Parameters:
rootID- the root node id to be prepended- Returns:
- the node id object
-
getNodeIDs
public int[] getNodeIDs()- Returns:
- the individual nested node ids
-
toString
-
isEqualOrParentOf
- Parameters:
id- the id to check agains- Returns:
trueif this node id is equal or a parent node id of the passed id; otherwisefalse
-
hashCode
public int hashCode() -
equals
-