procope.data.networks
Class CombinationRules

java.lang.Object
  extended by procope.data.networks.CombinationRules

public class CombinationRules
extends Object

A set of combination rules defines how the combination of two networks is accomplished. Here is a list of all settings and what effect they have on the combination procedure:

See Also:
ProteinNetwork.combineWith(ProteinNetwork, CombinationRules)

Nested Class Summary
static class CombinationRules.CombinationType
          Defines how the nodes of both source networks are combined into a new set of nodes
static class CombinationRules.WeightMergePolicy
          Defines how the weights of identical edges are combined for the resulting network
 
Constructor Summary
CombinationRules(CombinationRules.CombinationType type)
          Creates a combination rule object using the given CombinationRules.CombinationType
 
Method Summary
 CombinationRules.CombinationType getCombinationType()
          Returns the combination type of this rules set.
 ProteinNetwork getMapping()
          Returns the mapping network of this rules set.
 String getNodeMergeSeparator()
          Returns the node label merge separator
 String getWeightMergeKey1()
          Returns the first weight merge key.
 String getWeightMergeKey2()
          Returns the second weight merge key.
 CombinationRules.WeightMergePolicy getWeightMergePolicy()
          Returns the weight merge policy of this rules set.
 void setMapping(ProteinNetwork mapping)
          Sets a mapping, mapped nodes will be merged into single nodes in the resulting network.
 void setNodeMergeSeparator(String separator)
          Defines how the labels of merged nodes are separated.
 void setWeightMergePolicy(CombinationRules.WeightMergePolicy weightMerge)
          Sets how the weights of identical edges are merged in the resulting network.
 void setWeightMergePolicy(CombinationRules.WeightMergePolicy weightMerge, String key1, String key2)
          Sets how the weights of identical edges are merged in the resulting network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinationRules

public CombinationRules(CombinationRules.CombinationType type)
Creates a combination rule object using the given CombinationRules.CombinationType

Parameters:
type - combination type to be used
Method Detail

setMapping

public void setMapping(ProteinNetwork mapping)
Sets a mapping, mapped nodes will be merged into single nodes in the resulting network. Note: If this is not a bipartite graph the merging behaviour is undefined.


setWeightMergePolicy

public void setWeightMergePolicy(CombinationRules.WeightMergePolicy weightMerge)
Sets how the weights of identical edges are merged in the resulting network.

Parameters:
weightMerge - weight merge policy for the combination

setWeightMergePolicy

public void setWeightMergePolicy(CombinationRules.WeightMergePolicy weightMerge,
                                 String key1,
                                 String key2)
Sets how the weights of identical edges are merged in the resulting network.

Parameters:
weightMerge - weight merge policy for the combination
key1 - annotation key used for the weights from the first network
key2 - annotation key used for the weights from the second network

getWeightMergeKey1

public String getWeightMergeKey1()
Returns the first weight merge key.

Returns:
first weight merge key
See Also:
setWeightMergePolicy(procope.data.networks.CombinationRules.WeightMergePolicy, String, String)

getWeightMergeKey2

public String getWeightMergeKey2()
Returns the second weight merge key.

Returns:
second weight merge key
See Also:
setWeightMergePolicy(procope.data.networks.CombinationRules.WeightMergePolicy, String, String)

getCombinationType

public CombinationRules.CombinationType getCombinationType()
Returns the combination type of this rules set.

Returns:
conbination type of this rules set

getMapping

public ProteinNetwork getMapping()
Returns the mapping network of this rules set.

Returns:
mapping network of this rules set or null if no mapping network is set

getWeightMergePolicy

public CombinationRules.WeightMergePolicy getWeightMergePolicy()
Returns the weight merge policy of this rules set.

Returns:
weight merge policy of this rules set.

setNodeMergeSeparator

public void setNodeMergeSeparator(String separator)
Defines how the labels of merged nodes are separated. Only relevant if you are merging two networks with a mapping.

Parameters:
separator - separator string which will be put between the source protein labels

getNodeMergeSeparator

public String getNodeMergeSeparator()
Returns the node label merge separator

Returns:
node label merge separator