Package q_impress.pmi.lib.decorators

Examples of q_impress.pmi.lib.decorators.ActionDecorator


          extraPredicates += current.getStateVariable() + " > 0";
        }
      }
    }
   
    ActionDecorator nodeDec;
    PaStepStub paStepStub;
    try {
      nodeDec = (ActionDecorator) translator.getDecoratorsFactory().getDecorator(node);
      paStepStub = nodeDec.getPaStepStub();
      if (paStepStub == null) throw new TranslationException(this, "Unable to generate property for node \"" + node.getQualifiedName() + "\" : no PaStep stereotype associated.");
    } catch (InvalidContextException e) {
      throw new TranslationException(this, "Unable to generate property for node \"" + node.getQualifiedName() + "\"", e);
    } catch (ClassNotFoundException e) {
      throw new TranslationException(this, "Unable to generate property for node \"" + node.getQualifiedName() + "\"", e);
View Full Code Here


    // ActionNodes should have just one out transition
    checkSingleOutgoingTransition(node);
   
    ActivityEdge edge = node.getOutgoing(null);
    ActivityNode target = edge.getTarget();
    ActionDecorator actionDec = null;
    try {
      actionDec = (ActionDecorator) translator.getDecoratorsFactory().getDecorator(node);
    } catch (InvalidContextException e) {
      throw new TranslationException(this, "Unable to visit node \"" + node.getQualifiedName() + "\"", e);
    } catch (ClassNotFoundException e) {
      throw new TranslationException(this, "Unable to visit node \"" + node.getQualifiedName() + "\"", e);
    }
   
    double outProb = 1d;
    double negProb = 0d;
   
    PaStepStub stub = actionDec.getPaStepStub();
    if (stub == null) {
      throw new TranslationException(this, "Unable to visit node \"" + node.getQualifiedName() + "\" : no PaStep stereotype associated.");
    }
   
    outProb = stub.getProb();
View Full Code Here

   
    // compute them
    for (ExecutionPath path : executionPaths) {
      for (Action action : path.getPath()) {
        try {
          ActionDecorator actionDec = (ActionDecorator) decFactory.getDecorator(action);
         
          Artifact artifact = actionDec.getImplementingArtifact();
          if (artifact != null) {
            deploymentArtifacts.add(artifact);
            ArtifactDecorator artifactDec = (ArtifactDecorator) decFactory.getDecorator(artifact);
            deploymentDevices.add(artifactDec.getDeploymentDevice());
          }
View Full Code Here

    DecoratorsFactory decFactory = activityInfo.getDecFactory();
   
    // compute loads
    for (Action action : path) {
      try {
        ActionDecorator actionDec = (ActionDecorator) decFactory.getDecorator(action);
        PaStepStub paStub = actionDec.getPaStepStub();
       
        // parse load string
        String hostDemandRep = paStub.getHostDemand();
        if (hostDemandRep == null) hostDemandRep = "";
        Map<RESOURCE_TYPE,Double> demands = LoadInfo.parseDemandString(hostDemandRep);
       
        Artifact artifact = actionDec.getImplementingArtifact();
        if (artifact != null) { // update loads
          ArtifactDecorator artifactDec = (ArtifactDecorator) decFactory.getDecorator(artifact);
         
          LoadInfo loadInfo = loadInfos.get(artifactDec.getDeploymentDevice());
          if (loadInfo == null) {
View Full Code Here

TOP

Related Classes of q_impress.pmi.lib.decorators.ActionDecorator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.