Class NodeLabels

java.lang.Object
casa.lepton.conf.NodeLabels

public class NodeLabels extends Object
Associations (nodeId,label) and (label,nodeId) loaded from a file that contains "nodeId=label" lines. The labels are used as string representations of the nodes when displaying the graph. If no label is provided, the nodeId is used instead
  • Constructor Details

    • NodeLabels

      public NodeLabels(BufferedReader reader) throws IOException
      Initialization from a properties input stream that contains nodeId,labels associations
      Parameters:
      reader - the input stream
      Throws:
      IOException - if an error occurs while accessing the input stream
  • Method Details

    • getLabel

      public String getLabel(String nodeId)
      Give the label associated to the given nodeId. If this association doesn't exist, return the nodeId
      Parameters:
      nodeId - nodeId
      Returns:
      the label associated to the nodeId
    • getNodeId

      public String getNodeId(String label)
      Give the nodeId associated to the given label. If this association doesn't exist, return the label
      Parameters:
      label - label
      Returns:
      the nodeId associated to the label