Class NodeConnection
- java.lang.Object
-
- de.unirostock.sems.bives.algorithm.NodeConnection
-
- All Implemented Interfaces:
de.unirostock.sems.xmlutils.comparison.Connection
public class NodeConnection extends Object implements de.unirostock.sems.xmlutils.comparison.Connection
- Author:
- Martin Scharm
-
-
Constructor Summary
Constructors Constructor Description NodeConnection(NodeConnection toCopy)
Instantiates a new connection as a copy of toCopy.NodeConnection(de.unirostock.sems.xmlutils.ds.TreeNode a, de.unirostock.sems.xmlutils.ds.TreeNode b)
Instantiates a new connection, implicitly setting the weight to 1.NodeConnection(de.unirostock.sems.xmlutils.ds.TreeNode a, de.unirostock.sems.xmlutils.ds.TreeNode b, double weight)
Instantiates a new connection, explicitly defining a weight.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(org.apache.jena.rdf.model.Property predicate, org.apache.jena.rdf.model.RDFNode object)
Adds an annotation describing this node connection.void
addWeight(double u)
List<Map.Entry<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>>
getAnnotations()
Gets the annotations of this mapping.de.unirostock.sems.xmlutils.ds.TreeNode
getPartnerOf(de.unirostock.sems.xmlutils.ds.TreeNode node)
de.unirostock.sems.xmlutils.ds.TreeNode
getTreeA()
Gets the corresponding node in tree a.de.unirostock.sems.xmlutils.ds.TreeNode
getTreeB()
Gets the corresponding node in tree b.double
getWeight()
void
scaleWeight(double u)
void
setWeight(double u)
String
toString()
-
-
-
Constructor Detail
-
NodeConnection
public NodeConnection(de.unirostock.sems.xmlutils.ds.TreeNode a, de.unirostock.sems.xmlutils.ds.TreeNode b)
Instantiates a new connection, implicitly setting the weight to 1.- Parameters:
a
- the node of tree 1b
- the node of tree 2
-
NodeConnection
public NodeConnection(NodeConnection toCopy)
Instantiates a new connection as a copy of toCopy.- Parameters:
toCopy
- the connection to copy
-
NodeConnection
public NodeConnection(de.unirostock.sems.xmlutils.ds.TreeNode a, de.unirostock.sems.xmlutils.ds.TreeNode b, double weight)
Instantiates a new connection, explicitly defining a weight.- Parameters:
a
- the node of tree 1b
- the node of tree 2weight
- the weight of this connection
-
-
Method Detail
-
getAnnotations
public List<Map.Entry<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>> getAnnotations()
Gets the annotations of this mapping. The annotation list is a list of predicates and objects.- Returns:
- the annotations
-
addAnnotation
public void addAnnotation(org.apache.jena.rdf.model.Property predicate, org.apache.jena.rdf.model.RDFNode object)
Adds an annotation describing this node connection.- Parameters:
predicate
- the predicate that relates to an objectobject
- the actual object describing this element
-
getTreeA
public de.unirostock.sems.xmlutils.ds.TreeNode getTreeA()
Gets the corresponding node in tree a.- Specified by:
getTreeA
in interfacede.unirostock.sems.xmlutils.comparison.Connection
- Returns:
- the node in tree a
-
getTreeB
public de.unirostock.sems.xmlutils.ds.TreeNode getTreeB()
Gets the corresponding node in tree b.- Specified by:
getTreeB
in interfacede.unirostock.sems.xmlutils.comparison.Connection
- Returns:
- the node in tree b
-
setWeight
public void setWeight(double u)
- Specified by:
setWeight
in interfacede.unirostock.sems.xmlutils.comparison.Connection
-
addWeight
public void addWeight(double u)
- Specified by:
addWeight
in interfacede.unirostock.sems.xmlutils.comparison.Connection
-
scaleWeight
public void scaleWeight(double u)
- Specified by:
scaleWeight
in interfacede.unirostock.sems.xmlutils.comparison.Connection
-
getWeight
public double getWeight()
- Specified by:
getWeight
in interfacede.unirostock.sems.xmlutils.comparison.Connection
-
getPartnerOf
public de.unirostock.sems.xmlutils.ds.TreeNode getPartnerOf(de.unirostock.sems.xmlutils.ds.TreeNode node)
- Specified by:
getPartnerOf
in interfacede.unirostock.sems.xmlutils.comparison.Connection
-
-