uk.ac.ic.doc.automed.p2p
Class PathwayDescription

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.PathwayDescription
All Implemented Interfaces:
PersistentObject

public class PathwayDescription
extends java.lang.Object
implements PersistentObject

Author:
Charis, dmle - Support multiple pathways - Support pathway abstraction b/w peer and dsp

Constructor Summary
PathwayDescription(AbstractMessage reply)
          Edited by dmle on 9/11/2005 to cater for cases where there are multiple sets of pathways (i.e.
PathwayDescription(java.lang.String fromSchema, java.lang.String toSchema, java.lang.String transformations, float quality, DataSource ds)
          Overloading constructor for creating a description of an pathway abstraction
PathwayDescription(java.lang.String fromSchema, java.lang.String toSchema, java.lang.String transformations, float quality, java.lang.String dsType, int capability)
          A constructor for creating a description of an pathway abstraction
 
Method Summary
static java.util.List convertIntoObjects(java.util.List rows)
          A method for creating a pathway abstraction objects from a List of records
static PathwayDescription deserialise(java.util.Map pa)
          This method guarantees that a PersistentObject can be deserialised properly from its own set of persistent attributes.
 DataSource getDataSource()
           
 java.lang.String getFromSchema()
           
 PersistentKey getKey()
           
 Root getModelTree()
          Return the models tree dmle 14/11/2005
 int getNumPathWays()
          return the number of pathways
 java.util.Map getPersistentAttributes()
           
 float getQuality()
           
 Root getRoot()
          Backward compatible method: return the first element by default
 Root[] getRoots()
          Get all roots
 java.lang.String getToSchema()
           
 java.lang.String getTransformations()
          XML representation of the transformations
static java.lang.String toString(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathwayDescription

public PathwayDescription(AbstractMessage reply)
                   throws IllegalReplyException
Edited by dmle on 9/11/2005 to cater for cases where there are multiple sets of pathways (i.e. multiple automed trees) are sent Use this constructor for full pathway exchange

Throws:
IllegalReplyException

PathwayDescription

public PathwayDescription(java.lang.String fromSchema,
                          java.lang.String toSchema,
                          java.lang.String transformations,
                          float quality,
                          java.lang.String dsType,
                          int capability)
A constructor for creating a description of an pathway abstraction


PathwayDescription

public PathwayDescription(java.lang.String fromSchema,
                          java.lang.String toSchema,
                          java.lang.String transformations,
                          float quality,
                          DataSource ds)
Overloading constructor for creating a description of an pathway abstraction

Method Detail

convertIntoObjects

public static java.util.List convertIntoObjects(java.util.List rows)
A method for creating a pathway abstraction objects from a List of records


toString

public static java.lang.String toString(java.lang.Object o)

getTransformations

public java.lang.String getTransformations()
XML representation of the transformations


getDataSource

public DataSource getDataSource()

getFromSchema

public java.lang.String getFromSchema()

getQuality

public float getQuality()

getRoot

public Root getRoot()
Backward compatible method: return the first element by default


getRoots

public Root[] getRoots()
Get all roots


getToSchema

public java.lang.String getToSchema()

getNumPathWays

public int getNumPathWays()
return the number of pathways


getModelTree

public Root getModelTree()
Return the models tree dmle 14/11/2005


getKey

public PersistentKey getKey()
Specified by:
getKey in interface PersistentObject

getPersistentAttributes

public java.util.Map getPersistentAttributes()
Specified by:
getPersistentAttributes in interface PersistentObject

deserialise

public static PathwayDescription deserialise(java.util.Map pa)
                                      throws java.lang.IllegalArgumentException
This method guarantees that a PersistentObject can be deserialised properly from its own set of persistent attributes. It is a reverse of getPersistentAttributes()

Parameters:
pa - a HashMap of persistent attributes (created by {@link #getPersistentAttributes())
Throws:
java.lang.IllegalArgumentException