| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
package org.wsmo.factory; |
| 20 | |
|
| 21 | |
import java.util.*; |
| 22 | |
|
| 23 | |
import org.omwg.logicalexpression.*; |
| 24 | |
import org.omwg.ontology.*; |
| 25 | |
import org.wsmo.common.*; |
| 26 | |
import org.wsmo.common.exception.*; |
| 27 | |
import org.wsmo.service.*; |
| 28 | |
import org.wsmo.service.orchestration.*; |
| 29 | |
import org.wsmo.service.orchestration.Orchestration; |
| 30 | |
import org.wsmo.service.orchestration.rule.*; |
| 31 | |
import org.wsmo.service.rule.*; |
| 32 | |
import org.wsmo.service.signature.*; |
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
|
| 43 | |
|
| 44 | |
|
| 45 | 0 | public abstract class OrchestrationFactory |
| 46 | |
{ |
| 47 | |
public interface Containers |
| 48 | |
{ |
| 49 | |
public Orchestration createOrchestration(Identifier id); |
| 50 | |
|
| 51 | |
public Orchestration createOrchestration(Identifier id, |
| 52 | |
StateSignature signature, OrchestrationRules rules); |
| 53 | |
|
| 54 | |
public StateSignature createStateSignature(Identifier id); |
| 55 | |
|
| 56 | |
public StateSignature createStateSignature(Identifier id, Set<In> inMode, |
| 57 | |
Set<Out> outMode, Set<Shared> sharedMode, Set<Static> staticMode, |
| 58 | |
Set<Controlled> controlledMode); |
| 59 | |
|
| 60 | |
public OrchestrationRules createRules(Identifier id); |
| 61 | |
|
| 62 | |
public OrchestrationRules createRules(Identifier id, Set<Rule> rules); |
| 63 | |
} |
| 64 | |
|
| 65 | |
public interface TransitionRules |
| 66 | |
{ |
| 67 | |
|
| 68 | |
public Condition createConditionFromLogicalExpression(LogicalExpression e) |
| 69 | |
throws InvalidModelException; |
| 70 | |
|
| 71 | |
public OrchestrationIfThen createIfThen(Condition expression, Rule rule); |
| 72 | |
|
| 73 | |
public OrchestrationIfThen createIfThen(Condition expression, Set<Rule> rules); |
| 74 | |
|
| 75 | |
public OrchestrationForAll createForAll(Variable variable, Condition condition, Rule rule); |
| 76 | |
|
| 77 | |
public OrchestrationForAll createForAll(Set<Variable> variables, Condition condition, |
| 78 | |
Rule rule); |
| 79 | |
|
| 80 | |
public OrchestrationForAll createForAll(Variable variable, Condition condition, |
| 81 | |
Set<Rule> rules); |
| 82 | |
|
| 83 | |
public OrchestrationForAll createForAll(Set<Variable> variables, Condition condition, |
| 84 | |
Set<Rule> rules); |
| 85 | |
|
| 86 | |
public OrchestrationChoose createChoose(Variable variable, Condition condition, Rule rule); |
| 87 | |
|
| 88 | |
public OrchestrationChoose createChoose(Set<Variable> variables, Condition condition, |
| 89 | |
Rule rule); |
| 90 | |
|
| 91 | |
public OrchestrationChoose createChoose(Variable variable, Condition condition, |
| 92 | |
Set<Rule> rules); |
| 93 | |
|
| 94 | |
public OrchestrationChoose createChoose(Set<Variable> variables, Condition condition, |
| 95 | |
Set<Rule> rules); |
| 96 | |
} |
| 97 | |
|
| 98 | |
public interface UpdateRules |
| 99 | |
{ |
| 100 | |
|
| 101 | |
public Add createAdd(CompoundFact fact); |
| 102 | |
|
| 103 | |
public Delete createDelete(CompoundFact fact); |
| 104 | |
|
| 105 | |
public Update createUpdate(CompoundFact newFact); |
| 106 | |
|
| 107 | |
public Update createUpdate(CompoundFact newFact, CompoundFact oldFact) |
| 108 | |
throws InvalidModelException; |
| 109 | |
|
| 110 | |
public Receive createReceive(IRI perform, IRI source); |
| 111 | |
|
| 112 | |
public Send createSend(IRI perform, IRI target); |
| 113 | |
|
| 114 | |
public OrchestrationApplyMediation createOrchestrationApplyMediation(IRI perform, PpMediator mediator); |
| 115 | |
|
| 116 | |
public OrchestrationInvokeService createOrchestrationInvokeService(IRI perform, WebService service); |
| 117 | |
|
| 118 | |
public OrchestrationAchieveGoal createOrchestrationAchieveGoal(IRI perform, Goal goal); |
| 119 | |
|
| 120 | |
public PpMediator createPpMediator(Identifier id); |
| 121 | |
} |
| 122 | |
|
| 123 | |
|
| 124 | |
public interface Facts |
| 125 | |
{ |
| 126 | |
public MoleculeFact createMoleculeFact(); |
| 127 | |
|
| 128 | |
public MoleculeFact createMoleculeFact( |
| 129 | |
Set<MembershipMolecule> memberMolecules, |
| 130 | |
Set<AttributeValueMolecule> attrValues); |
| 131 | |
|
| 132 | |
public MoleculeFact createMoleculeFact(MembershipMolecule memberMolecule, |
| 133 | |
Set<AttributeValueMolecule> attrValues); |
| 134 | |
|
| 135 | |
public MoleculeFact createMoleculeFact( |
| 136 | |
Set<MembershipMolecule> memberMolecules, |
| 137 | |
AttributeValueMolecule attrValue); |
| 138 | |
|
| 139 | |
public MoleculeFact createMoleculeFact(MembershipMolecule memberMolecule, |
| 140 | |
AttributeValueMolecule attrValue); |
| 141 | |
|
| 142 | |
public RelationFact createRelationFact(); |
| 143 | |
|
| 144 | |
public RelationFact createRelationFact(Atom atom); |
| 145 | |
} |
| 146 | |
|
| 147 | |
public interface Modes |
| 148 | |
{ |
| 149 | |
public In createIn(Concept concept); |
| 150 | |
|
| 151 | |
public In createIn(Concept concept, Set<Grounding> grounding); |
| 152 | |
|
| 153 | |
public In createIn(Relation relation); |
| 154 | |
|
| 155 | |
public In createIn(Relation relation, Set<Grounding> grounding); |
| 156 | |
|
| 157 | |
public Out createOut(Concept concept); |
| 158 | |
|
| 159 | |
public Out createOut(Concept concept, Set<Grounding> grounding); |
| 160 | |
|
| 161 | |
public Out createOut(Relation relation); |
| 162 | |
|
| 163 | |
public Out createOut(Relation relation, Set<Grounding> grounding); |
| 164 | |
|
| 165 | |
public Shared createShared(Concept concept); |
| 166 | |
|
| 167 | |
public Shared createShared(Concept concept, Set<Grounding> grounding); |
| 168 | |
|
| 169 | |
public Shared createShared(Relation relation); |
| 170 | |
|
| 171 | |
public Shared createShared(Relation relation, Set<Grounding> grounding); |
| 172 | |
|
| 173 | |
public Controlled createControlled(Concept concept); |
| 174 | |
|
| 175 | |
public Controlled createControlled(Relation relation); |
| 176 | |
|
| 177 | |
public Static createStatic(Concept concept); |
| 178 | |
|
| 179 | |
public Static createStatic(Relation relation); |
| 180 | |
|
| 181 | |
public WSDLGrounding createWSDLGrounding(IRI iri); |
| 182 | |
} |
| 183 | |
|
| 184 | 0 | public final Containers containers = createContainers(); |
| 185 | |
|
| 186 | 0 | public final TransitionRules transitionRules = createTransitionRules(); |
| 187 | |
|
| 188 | 0 | public final UpdateRules updateRules = createUpdateRules(); |
| 189 | |
|
| 190 | 0 | public final Facts facts = createFacts(); |
| 191 | |
|
| 192 | 0 | public final Modes modes = createModes(); |
| 193 | |
|
| 194 | |
protected abstract Containers createContainers(); |
| 195 | |
|
| 196 | |
protected abstract TransitionRules createTransitionRules(); |
| 197 | |
|
| 198 | |
protected abstract UpdateRules createUpdateRules(); |
| 199 | |
|
| 200 | |
protected abstract Facts createFacts(); |
| 201 | |
|
| 202 | |
protected abstract Modes createModes(); |
| 203 | |
|
| 204 | |
} |