uk.ac.bbk.dcs.automed.hdmstore
Class Edge

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.hdmstore.Edge

public class Edge
extends java.lang.Object

A Edge represents an HDM edge, which can be of any length, each element (or Span) can be a node or an edge and edges can be named (optionally).

Author:
Dean Williams (dean@dcs.bbk.ac.uk)

Field Summary
private static java.lang.String closeBracketSymbol
           
private  java.lang.String edgeName
           
private  java.lang.String edgeType
           
private  java.lang.String edgeValueAsString
           
private static java.lang.String hideSeperator
           
private  Span newSpan
           
private static java.lang.String openBracketSymbol
           
private  java.util.ArrayList path
           
private static java.lang.String seperator
           
 
Constructor Summary
Edge(java.lang.String edgeDef, java.lang.String[] args)
          Construct a representation of an edge from a string representing its type and an array of spans
 
Method Summary
private static java.lang.String changeInternalSeperators(java.lang.String orig, java.lang.String from, java.lang.String to)
          Change internal seperators from one character to another
 java.lang.String edgeValueAsString()
          Get the edge values as a string
static java.lang.String hideInternalSeperators(java.lang.String orig)
          Remove commas that are not at the 'top level' e.g.
private  java.lang.String makeStringOfArgs(java.lang.String[] args)
          Given an array of string representations of edge spans, return a string representation of the edge value
 java.lang.String name()
          Get the edge name
 java.util.ArrayList path()
          Get the edge value as a path of spans
static java.lang.String returnInternalSeperators(java.lang.String orig)
          If commas that are not at the 'top level' have been removed, replace them e.g.
 java.lang.String type()
          Get the edge type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edgeName

private java.lang.String edgeName

edgeType

private java.lang.String edgeType

edgeValueAsString

private java.lang.String edgeValueAsString

path

private java.util.ArrayList path

newSpan

private Span newSpan

openBracketSymbol

private static final java.lang.String openBracketSymbol
See Also:
Constant Field Values

closeBracketSymbol

private static final java.lang.String closeBracketSymbol
See Also:
Constant Field Values

seperator

private static final java.lang.String seperator
See Also:
Constant Field Values

hideSeperator

private static final java.lang.String hideSeperator
See Also:
Constant Field Values
Constructor Detail

Edge

public Edge(java.lang.String edgeDef,
            java.lang.String[] args)
Construct a representation of an edge from a string representing its type and an array of spans

Method Detail

name

public java.lang.String name()
Get the edge name


type

public java.lang.String type()
Get the edge type


edgeValueAsString

public java.lang.String edgeValueAsString()
Get the edge values as a string


path

public java.util.ArrayList path()
Get the edge value as a path of spans


makeStringOfArgs

private java.lang.String makeStringOfArgs(java.lang.String[] args)
Given an array of string representations of edge spans, return a string representation of the edge value


hideInternalSeperators

public static java.lang.String hideInternalSeperators(java.lang.String orig)
Remove commas that are not at the 'top level' e.g. passing <>>> returns <>>>


returnInternalSeperators

public static java.lang.String returnInternalSeperators(java.lang.String orig)
If commas that are not at the 'top level' have been removed, replace them e.g. passing <>>> returns <>>>


changeInternalSeperators

private static java.lang.String changeInternalSeperators(java.lang.String orig,
                                                         java.lang.String from,
                                                         java.lang.String to)
Change internal seperators from one character to another