Package de.unirostock.sems.bives.ds.hn
Class HierarchyNetworkVariable
- java.lang.Object
-
- de.unirostock.sems.bives.ds.hn.HierarchyNetworkEntity
-
- de.unirostock.sems.bives.ds.hn.HierarchyNetworkVariable
-
- All Implemented Interfaces:
GraphEntity
public class HierarchyNetworkVariable extends HierarchyNetworkEntity
The Class HierarchyNetworkVariable representing a variable of a HierarchyNetwork.- Author:
- Martin Scharm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
HierarchyNetworkVariable.VarConnection
The Class VarConnection representing a connection of two variables.
-
Field Summary
-
Fields inherited from interface de.unirostock.sems.bives.ds.GraphEntity
DELETE, INSERT, MODIFIED, UNMODIFIED
-
-
Constructor Summary
Constructors Constructor Description HierarchyNetworkVariable(HierarchyNetwork hn, String labelA, String labelB, de.unirostock.sems.xmlutils.ds.DocumentNode docA, de.unirostock.sems.xmlutils.ds.DocumentNode docB, HierarchyNetworkComponent componentA, HierarchyNetworkComponent componentB)
Instantiates a new hierarchy network variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnectionA(HierarchyNetworkVariable var)
Adds a connection as defined in the original document.void
addConnectionB(HierarchyNetworkVariable var)
Adds a connection as defined in the modified document.HierarchyNetworkComponent
getComponent()
Gets the component.HashMap<HierarchyNetworkVariable,HierarchyNetworkVariable.VarConnection>
getConnections()
Gets the connections of this variable to other variables of the hierarchy network.int
getModification()
Gets the modification of this entity.void
setComponentA(HierarchyNetworkComponent component)
Sets the component hosting this variable as defined in the original document.void
setComponentB(HierarchyNetworkComponent component)
Sets the component hosting this variable as defined in the modified document.-
Methods inherited from class de.unirostock.sems.bives.ds.hn.HierarchyNetworkEntity
getA, getB, getId, getLabel, setDocA, setDocB, setLabelA, setLabelB, setSingleDocument
-
-
-
-
Constructor Detail
-
HierarchyNetworkVariable
public HierarchyNetworkVariable(HierarchyNetwork hn, String labelA, String labelB, de.unirostock.sems.xmlutils.ds.DocumentNode docA, de.unirostock.sems.xmlutils.ds.DocumentNode docB, HierarchyNetworkComponent componentA, HierarchyNetworkComponent componentB)
Instantiates a new hierarchy network variable.- Parameters:
hn
- the hierarchy networklabelA
- the label as defined in the original documentlabelB
- the label as defined in the modified documentdocA
- the original documentdocB
- the modified documentcomponentA
- the component in the original documentcomponentB
- the component in the modified document
-
-
Method Detail
-
getConnections
public HashMap<HierarchyNetworkVariable,HierarchyNetworkVariable.VarConnection> getConnections()
Gets the connections of this variable to other variables of the hierarchy network.- Returns:
- the connections
-
addConnectionA
public void addConnectionA(HierarchyNetworkVariable var)
Adds a connection as defined in the original document.- Parameters:
var
- the variable to connect
-
addConnectionB
public void addConnectionB(HierarchyNetworkVariable var)
Adds a connection as defined in the modified document.- Parameters:
var
- the variable to connect
-
setComponentA
public void setComponentA(HierarchyNetworkComponent component)
Sets the component hosting this variable as defined in the original document.- Parameters:
component
- the host in the original version
-
setComponentB
public void setComponentB(HierarchyNetworkComponent component)
Sets the component hosting this variable as defined in the modified document.- Parameters:
component
- the host in the modified version
-
getComponent
public HierarchyNetworkComponent getComponent()
Gets the component. Will return:- the original component, if it's the same component as in the modified version
- null, otherwise
- Returns:
- the component
-
getModification
public int getModification()
Gets the modification of this entity.- Overrides:
getModification
in classHierarchyNetworkEntity
- Returns:
- the modification
-
-