Package q_impress.pmi.lib.decorators

Examples of q_impress.pmi.lib.decorators.DecoratorsFactory


  /**
   * Initializes the translator.
   * @throws TranslationException if the initialization fails
   */
  private void initialize() throws TranslationException {
    decFactory = new DecoratorsFactory(resourceSet);
   
    // create the decorator for the UML model
    List<EObject> contents = modelResource.getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
View Full Code Here


  /**
   * Initializes the translator.
   * @throws TranslationException if the initialization fails
   */
  private void initialize() throws TranslationException {
    decFactory = new DecoratorsFactory(resourceSet);
   
    // create the decorator for the UML model
    List<EObject> contents = modelResource.getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
View Full Code Here

   * Gets the decorator associated to the first
   * @return
   * @throws ResourceException
   */
  public ModelDecorator getFirstModelDecorator() throws ResourceException {
    DecoratorsFactory decFactory = new DecoratorsFactory(getResourceSet());
   
    // create the decorator for the UML model
    List<EObject> contents = loadResource().getContents();
    for (EObject obj : contents) {
      if (obj instanceof Model) {
        Model model = (Model)obj;
        try {
          return (ModelDecorator) decFactory.getDecorator(model);
        } catch (ClassNotFoundException e) {
          throw new ResourceException("Unable to load first model", e);
        } catch (InvalidContextException e) {
          throw new ResourceException("Unable to load first model", e);
        }
View Full Code Here

  private synchronized void computeLoadInfo() {
    // initialize the set
    loadInfos = new HashMap<Device,LoadInfo>();
   
    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) {
            loadInfo = new LoadInfo(artifactDec.getDeploymentDevice());
            loadInfos.put(loadInfo.getTargetDevice(), loadInfo);
View Full Code Here

TOP

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

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.