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

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

public class Span
extends java.lang.Object

A Span represents one element in a HDM edge. A span can be a node or can itself be an edge.

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

Field Summary
private  java.lang.String dataType
           
private  char edgeOrNode
           
private  int hid
           
private  int id
           
private  java.lang.String type
           
private  java.lang.String value
           
 
Constructor Summary
Span()
          Empty Span Constructor
Span(char pEdgeOrNode, int pId, int pHid)
          Constructor with database ids passed
Span(java.lang.String pType, char pEdgeOrNode, int pId, int pHid)
          Constructor with edge type, database ids passed
Span(java.lang.String pType, java.lang.String pValue)
          Constructor is passed the type (node or edge) and a string representation of the value
Span(java.lang.String pType, java.lang.String pValue, char pEdgeOrNode, int pId, int pHid, java.lang.String pDataType)
          Constructor with all parameters set
 
Method Summary
 java.lang.String dataType()
          Get the dataType
 java.lang.String display()
          return the node value using the HDM notation
 char edgeOrNode()
          Get the edgeOrNode indicator
 int hid()
          Get the hid
 int id()
          Get the id
 boolean isNode()
          Is this Span a node?
 void populateDatabaseId(char pEdgeOrNode, int pId)
          Populate the id of the span in the database
 void populateEdgeValue(java.lang.String pType)
          Populate specific values for an edge
 void populateNodeValue(java.lang.String pValue, java.lang.String pDataType, java.lang.String pType)
          Populate specific values for a node
 java.lang.String type()
          Get the type
 java.lang.String value()
          Get the value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private java.lang.String type

value

private java.lang.String value

edgeOrNode

private char edgeOrNode

id

private int id

hid

private int hid

dataType

private java.lang.String dataType
Constructor Detail

Span

Span(java.lang.String pType,
     java.lang.String pValue)
Constructor is passed the type (node or edge) and a string representation of the value


Span

Span(java.lang.String pType,
     java.lang.String pValue,
     char pEdgeOrNode,
     int pId,
     int pHid,
     java.lang.String pDataType)
Constructor with all parameters set


Span

Span(char pEdgeOrNode,
     int pId,
     int pHid)
Constructor with database ids passed


Span

Span(java.lang.String pType,
     char pEdgeOrNode,
     int pId,
     int pHid)
Constructor with edge type, database ids passed


Span

Span()
Empty Span Constructor

Method Detail

populateNodeValue

public void populateNodeValue(java.lang.String pValue,
                              java.lang.String pDataType,
                              java.lang.String pType)
Populate specific values for a node


populateEdgeValue

public void populateEdgeValue(java.lang.String pType)
Populate specific values for an edge


populateDatabaseId

public void populateDatabaseId(char pEdgeOrNode,
                               int pId)
Populate the id of the span in the database


type

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


value

public java.lang.String value()
Get the value


edgeOrNode

public char edgeOrNode()
Get the edgeOrNode indicator


id

public int id()
Get the id


hid

public int hid()
Get the hid


dataType

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


display

public java.lang.String display()
return the node value using the HDM notation


isNode

public boolean isNode()
Is this Span a node?