01: package org.griphyn.cPlanner.provenance.pasoa;
02:
03: import java.util.List;
04:
05: import org.griphyn.cPlanner.engine.Refiner;
06:
07: /**
08: * Pegasus P-assertion Support interface
09: *
10: * Classes that implement this interface assist in the creation of p-assertions for the Pegasus workflow refinement system.
11: * This interface follows a <a href="http://en.wikipedia.org/wiki/Builder_pattern">builder pattern</a>.
12: *
13: * Using this interface proceeds as follows:
14: * 1. At the beginning of a refinement step the beginWorkflowRefinmentStep method should be called.
15: * 2. As nodes are transformed the particular refinement operation method (siteSelectionFor, isParticiationOf...) should be called.
16: * 3. When the refinement step is complete the endWorkflowStep method should be called.
17: * 4. At this point identicalTo relationships are automatically created between the resulting workflow and the
18: input workflow
19: *
20: * A note on PHeaders:
21: * For the first refinement step, the p-header can be passed in as null.
22: * For each, subsequent refinement step the p-header provided by the endWorkflowRefinementStep method
23: * should be passed into the beginWorkflowRefinementMethod
24: */
25:
26: public interface PPS {
27: /**
28: * A namespace we can use to identify relationships and concepts defined for Pegasus' provenance data
29: */
30: public static final String NAMESPACE = "http://www.isi.edu/pasoa";
31:
32: // Actors: Every refinement step and Pegaus itself is given an identifying URI
33: public static final String PEGASUS = NAMESPACE + "/actors#pegasus";
34: public static final String REFINEMENT_CLUSTER = NAMESPACE
35: + "/actors#cluster";
36: public static final String REFINEMENT_REDUCE = NAMESPACE
37: + "/actors#reduce";
38: public static final String REFINEMENT_REGISTER = NAMESPACE
39: + "/actors#register";
40: public static final String REFINEMENT_SITE_SELECT = NAMESPACE
41: + "/actors#siteSelect";
42: public static final String REFINEMENT_STAGE = NAMESPACE
43: + "/actors#stage";
44:
45: /**
46: * @return The ID used for the whole refinement process of this workflow
47: */
48: public String beginWorkflowRefinementStep(Refiner refiner,
49: String refinementStepName, boolean firstStep)
50: throws Exception;
51:
52: public void isIdenticalTo(String afterNode, String beforeNode)
53: throws Exception;
54:
55: public void siteSelectionFor(String afterNode, String beforeNode)
56: throws Exception;
57:
58: public void stagingIntroducedFor(List stagingNodes, String appNode)
59: throws Exception;
60:
61: public void registrationIntroducedFor(String registrationNode,
62: String dataStagingNode) throws Exception;
63:
64: public void clusteringOf(String clusteredJob, List jobs)
65: throws Exception;
66:
67: public void isPartitionOf(String afterNode, List beforeNode)
68: throws Exception;
69:
70: public void endWorkflowRefinementStep(Refiner refiner)
71: throws Exception;
72: }
|