public class SimpleConnectionManager extends Object implements de.unirostock.sems.xmlutils.comparison.ConnectionManager
Constructor and Description |
---|
SimpleConnectionManager(SimpleConnectionManager toCopy)
Instantiates a new connection manager as a copy of toCopy.
|
SimpleConnectionManager(de.unirostock.sems.xmlutils.ds.TreeDocument docA,
de.unirostock.sems.xmlutils.ds.TreeDocument docB)
Instantiates a new simple connection manager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addConnection(NodeConnection c)
Adds a new connection unless connection exists.
|
void |
addWeightToAllConnections(double value)
Add weight to all connections.
|
void |
deleteMatchedNodes(List<de.unirostock.sems.xmlutils.ds.TreeNode> vec)
Delete nodes of a vector which have connections.
|
void |
dropConnection(de.unirostock.sems.xmlutils.comparison.Connection c)
Drop a certain connection.
|
void |
dropConnection(de.unirostock.sems.xmlutils.ds.TreeNode node)
Drop all connections of a node.
|
de.unirostock.sems.xmlutils.comparison.Connection |
getConnectionForNode(de.unirostock.sems.xmlutils.ds.TreeNode node)
Gets the connections for node.
|
de.unirostock.sems.xmlutils.comparison.Connection |
getConnectionOfNodes(de.unirostock.sems.xmlutils.ds.TreeNode a,
de.unirostock.sems.xmlutils.ds.TreeNode b)
Gets the connection of two certain nodes.
|
List<de.unirostock.sems.xmlutils.ds.TreeNode> |
getUnmatched(de.unirostock.sems.xmlutils.ds.TreeNode subtree,
List<de.unirostock.sems.xmlutils.ds.TreeNode> unmatched)
Gets the unmatched nodes in a subtree.
|
SimpleConnectionManager |
intersection(SimpleConnectionManager cmgmt)
Create a ConnectionManager that contains only connections from this ConnectionManager and_another instance.
|
boolean |
parentsConnected(de.unirostock.sems.xmlutils.comparison.Connection c)
Check if parents connected.
|
void |
scaleWeightOfAllConnections(double value)
Scale the weight of all connections.
|
SimpleConnectionManager |
setDiff(SimpleConnectionManager cmgmt)
Create a ConnectionManager that contains only connections from this ConnectionManager which are not included in another instance.
|
void |
setWeightOfAllConnections(double value)
Sets the weight of all connections.
|
SimpleConnectionManager |
symDiff(SimpleConnectionManager cmgmt)
Create a ConnectionManager that contains only connections from this ConnectionManager and another instance and are not included in both managers.
|
String |
toString() |
SimpleConnectionManager |
union(SimpleConnectionManager cmgmt)
Create a ConnectionManager that combines all connections from this ConnectionManager and another instance.
|
public SimpleConnectionManager(de.unirostock.sems.xmlutils.ds.TreeDocument docA, de.unirostock.sems.xmlutils.ds.TreeDocument docB)
docA
- the original documentdocB
- the modified documentpublic SimpleConnectionManager(SimpleConnectionManager toCopy) throws BivesConnectionException
toCopy
- the connection manager to copyBivesConnectionException
public void scaleWeightOfAllConnections(double value)
value
- the scalepublic void addWeightToAllConnections(double value)
value
- the value to addpublic void setWeightOfAllConnections(double value)
value
- the new weight of all connectionspublic boolean addConnection(NodeConnection c) throws BivesConnectionException
c
- the c connection to addBivesConnectionException
public SimpleConnectionManager union(SimpleConnectionManager cmgmt)
cmgmt
- the ConnectionManager to joinpublic SimpleConnectionManager intersection(SimpleConnectionManager cmgmt)
cmgmt
- the cmgmtpublic SimpleConnectionManager setDiff(SimpleConnectionManager cmgmt)
cmgmt
- the cmgmtpublic SimpleConnectionManager symDiff(SimpleConnectionManager cmgmt)
cmgmt
- the cmgmtpublic void dropConnection(de.unirostock.sems.xmlutils.ds.TreeNode node)
node
- the node to liberatepublic void dropConnection(de.unirostock.sems.xmlutils.comparison.Connection c)
c
- the connectionpublic de.unirostock.sems.xmlutils.comparison.Connection getConnectionForNode(de.unirostock.sems.xmlutils.ds.TreeNode node)
getConnectionForNode
in interface de.unirostock.sems.xmlutils.comparison.ConnectionManager
node
- the nodepublic de.unirostock.sems.xmlutils.comparison.Connection getConnectionOfNodes(de.unirostock.sems.xmlutils.ds.TreeNode a, de.unirostock.sems.xmlutils.ds.TreeNode b)
a
- the ab
- the bpublic List<de.unirostock.sems.xmlutils.ds.TreeNode> getUnmatched(de.unirostock.sems.xmlutils.ds.TreeNode subtree, List<de.unirostock.sems.xmlutils.ds.TreeNode> unmatched)
subtree
- the subtreeunmatched
- the vector in which the unmatched nodes are collectedpublic void deleteMatchedNodes(List<de.unirostock.sems.xmlutils.ds.TreeNode> vec)
vec
- the vector of nodes to modifypublic boolean parentsConnected(de.unirostock.sems.xmlutils.comparison.Connection c)
parentsConnected
in interface de.unirostock.sems.xmlutils.comparison.ConnectionManager
c
- the cCopyright © 2019 SEMS project @ University of Rostock. All rights reserved.