uk.ac.cisban.rod.dao.specifics
Class ProtocolActionNavigation

java.lang.Object
  extended by uk.ac.cisban.rod.dao.specifics.ProtocolActionNavigation

public class ProtocolActionNavigation
extends java.lang.Object

Handles database connections relating to navigating and querying database 'trees' composed of ActionCVs and ProtocolCVs, or ActionApplications and ProtocolApplications.

Author:
Morgan Taschuk

Constructor Summary
ProtocolActionNavigation(Persist persist)
          Main constructor.
 
Method Summary
 ActionApplication createTrail(javax.jdo.PersistenceManager pm, ProtocolApplication sourceProtocolApp, ActionCV startActionCV, ActionCV targetActionCV)
          Creates an ActionApplication in a ProtocolApplication based upon the trail of the ProtocolCV and ActionCV.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolActionNavigation

public ProtocolActionNavigation(Persist persist)
Main constructor.

Parameters:
persist -
Method Detail

createTrail

public ActionApplication createTrail(javax.jdo.PersistenceManager pm,
                                     ProtocolApplication sourceProtocolApp,
                                     ActionCV startActionCV,
                                     ActionCV targetActionCV)
                              throws java.lang.Exception
Creates an ActionApplication in a ProtocolApplication based upon the trail of the ProtocolCV and ActionCV. A path is created from the ProtocolApplication to the ActionApplication through any intervening Protocol/Action steps. For example, in a simple situation, a ProtocolCV (P1) has an ActionCV (A1), which links to ProtocolCV 2 (P2), which has an ActionCV (A2):

P1 -> A1 -> P2 - A2

In this particular experiment, MyExp, only the top-level step exists so far.

PA1

To this method applyAction, I can pass the id for PA1, and the id for A2, and it will create the following structure:

PA1 -> AA1 -> PA2 -> AA2

Clear as mud?

Parameters:
pm - the persistence manager
sourceProtocolApp - the ProtocolApplication to add the Action to
startActionCV -
targetActionCV - the ActionCV that the ActionApplication should be created from
Returns:
the new ActionApplication created from the targetActionCV
Throws:
java.lang.Exception - if there is no trail from the ProtocolCV (reference by the ProtocolApplication) to the ActionCV


Copyright © 2010. All Rights Reserved.