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

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

public class EdgeElement
extends java.lang.Object

An edge element represents a single element of an edge. Static methods exist to convert between lists of edge elements and the ASG class used to represent queries in AutoMed. (In retrospect this class should have been combined with Span

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

Field Summary
private  java.lang.String dataType
           
private  java.util.LinkedList edge
           
private  java.lang.String elementType
           
private  boolean node
           
private  java.lang.String nodeValue
           
 
Constructor Summary
EdgeElement(java.lang.String pElementType, java.util.LinkedList pEdge)
          Constructor for an element thats an edge
EdgeElement(java.lang.String pElementType, java.lang.String pNodeValue, java.lang.String pDataType)
          Constructor for an element thats a node
 
Method Summary
 java.lang.String dataType()
          get the dataType
static void display(java.util.LinkedList edge)
          Pretty print an edge
private static void display(java.util.LinkedList edge, int tabLevel)
          Pretty print an edge, indenting by
 java.util.LinkedList edge()
          get the edge
 java.lang.String elementType()
          get the elementType;
 boolean node()
          is this element a node?
 java.lang.String nodeValue()
          get the nodeValue
static ASG toASG(java.util.LinkedList edge)
          Convert a LinkedList of edge elements and convert to an ASG
static ASG toASG(java.util.LinkedList edge, boolean topLevel)
          Convert a LinkedList of edge elements and convert to an ASG If is true return elements as a list, otherwise as a tuple (so that the ASG returned is a list of tuples)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementType

private java.lang.String elementType

node

private boolean node

nodeValue

private java.lang.String nodeValue

dataType

private java.lang.String dataType

edge

private java.util.LinkedList edge
Constructor Detail

EdgeElement

EdgeElement(java.lang.String pElementType,
            java.util.LinkedList pEdge)
Constructor for an element thats an edge


EdgeElement

EdgeElement(java.lang.String pElementType,
            java.lang.String pNodeValue,
            java.lang.String pDataType)
Constructor for an element thats a node

Method Detail

display

public static void display(java.util.LinkedList edge)
Pretty print an edge


display

private static void display(java.util.LinkedList edge,
                            int tabLevel)
Pretty print an edge, indenting by


toASG

public static ASG toASG(java.util.LinkedList edge)
Convert a LinkedList of edge elements and convert to an ASG


toASG

public static ASG toASG(java.util.LinkedList edge,
                        boolean topLevel)
Convert a LinkedList of edge elements and convert to an ASG If is true return elements as a list, otherwise as a tuple (so that the ASG returned is a list of tuples)


dataType

public java.lang.String dataType()
get the dataType


edge

public java.util.LinkedList edge()
get the edge


elementType

public java.lang.String elementType()
get the elementType;


node

public boolean node()
is this element a node?


nodeValue

public java.lang.String nodeValue()
get the nodeValue