Package fr.imag.adele.apam.declarations

Examples of fr.imag.adele.apam.declarations.PropertyDefinition


      }

      /*
       * Get the property used to handle the state
       */
      PropertyDefinition propertyDefinition = implementation.getDeclaration().getPropertyDefinition(propertyReference);

      /*
       * In case the property providing the state is not defined signal an
       * error.
       */
      if (propertyDefinition == null) {
        throw new InvalidConfiguration("Invalid state declaration, property not defined "+ propertyReference.getIdentifier());
      }

      this.stateProperty = propertyDefinition.getName();

      /*
       * compute the initial state of the composite
       */
      this.state = this.stateHolder.getProperty(this.stateProperty);
View Full Code Here


      return propertyName.startsWith(CST.DEFINITION_PREFIX);
  }

  private final PropertyDefinition definition(String propertyName) {
      String property = propertyName.substring(CST.DEFINITION_PREFIX.length());
      return new PropertyDefinition(component.getReference(),property,type(propertyName),property(propertyName));
  }
View Full Code Here

    for (Map.Entry<String, String> property : component.getProperties().entrySet()) {
     
      /*
       * Try to get the exact  type and map it to types supported by OBR
       */
      PropertyDefinition definition  = component.getPropertyDefinition(property.getKey());
      if (definition == null) {
        property(property.getKey(),property.getValue());
      }
      else {
        property(property.getKey(),type(definition.getType()),property.getValue());
      }
    }
  }
View Full Code Here

        String field   = subElement.getAttribute(ComponentParser.ATT_FIELD);
        String callback = subElement.getAttribute(ComponentParser.ATT_METHOD);

        element.removeElement(subElement);
        PropertyDefinition updatedDef = new PropertyDefinition(new ComponentReference<ComponentDeclaration>("Dummy"), name, type, defaultVal, field, callback, injectPolicy);

        mapAddedDefinitions.put(name, updatedDef);
      }
    }
    return definitions;
View Full Code Here

      }
     
      /*
       * The last computed source of the navigation is used to look for the final property
       */
      PropertyDefinition property = source.getPropertyDefinition(expression.attr);
      if (property == null) {
        error("Invalid substitute expression "+value+ ", invalid property "+quoted(expression.attr)+" for component "+target.getName());
        return null;
      }

      /*
       * Infer the type of the expression from the type of the property, and the multiplicity of the navigation
       */
     
      propertyType = typeParser.parse(property.getType());
      if (propertyType == null) {
        error("Invalid substitute expression "+value+ " , invalid type "+property.getType()+" for property "+property.getName());
        return null;
      }
     
    }
   
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.PropertyDefinition

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.