Package fr.imag.adele.apam.declarations.references.components

Examples of fr.imag.adele.apam.declarations.references.components.SpecificationReference


  }


  @Override
  protected SpecificationReference generateReference() {
    return new SpecificationReference(getName());
  }
View Full Code Here


  }


  @Override
  public Specification findSpecByName(Component client, String specName) {
    return (Specification) findByName(client, new SpecificationReference(specName), ComponentKind.SPECIFICATION);
  }
View Full Code Here

  public Implementation resolveSpecByName(Instance client, String specName, Set<String> constraints, List<String> preferences) {
    if (client == null) {
      client = CompositeImpl.getRootInstance();
    }

    RelationDefinition dep = new RelationDefinitionImpl(new SpecificationReference(specName), client.getKind(), ComponentKind.IMPLEMENTATION, constraints, preferences);

    return resolveSpecByResource(client, dep);
  }
View Full Code Here

   
    String componentName   = getAttributeInCapability(metadata, CST.NAME);
    String componentkind  = getAttributeInCapability(metadata, CST.COMPONENT_TYPE);
   
    if (CST.SPECIFICATION.equals(componentkind)) {
      return new SpecificationReference(componentName);
    }
   
    if (CST.IMPLEMENTATION.equals(componentkind)) {
      return new ImplementationReference<ImplementationDeclaration>(componentName);
    }
View Full Code Here

   */
  private CompositeDeclaration parseComposite(Element element) {

    String name = parseName(element);

    SpecificationReference specification             = parseSpecificationReference(name, element, ATT_SPECIFICATION, false);
        String  versionRange                     = parseString(name, element, ATT_REQUIRE_VERSION, false);
        VersionedReference<SpecificationDeclaration> specificationVersion  = specification != null ? VersionedReference.range(specification,versionRange) : null;
   
        ComponentReference<?> implementation   = parseAnyComponentReference(name, element, ATT_MAIN_IMPLEMENTATION, false);

View Full Code Here

    InstrumentedClass instrumentedClass = new InstrumentedClassMetadata(className, pojoMetadata, instrumentedCode);

    /*
     * load specification
     */
    SpecificationReference specification            = parseSpecificationReference(name, element, ATT_SPECIFICATION, false);
        String  versionRange                    = parseString(name, element, ATT_REQUIRE_VERSION, false);
        VersionedReference<SpecificationDeclaration> specificationVersion  = specification != null ? VersionedReference.range(specification,versionRange) : null;
       
        AtomicImplementationDeclaration declaration = new AtomicImplementationDeclaration(name, specificationVersion, instrumentedClass);
       
View Full Code Here

  /**
   * Get an specification reference coded in an attribute
   */
  private SpecificationReference parseSpecificationReference(String inComponent, Element element, String attribute, boolean mandatory) {
    String specification = parseString(inComponent, element, attribute, mandatory);
    return ((specification == null) && !mandatory) ? null : new SpecificationReference(specification);
  }
View Full Code Here

     */
    private int numInstances;

    public ApamOnlyCompositeType(String name, String specificationName, String mainName, Set<ManagerModel> models, Map<String, String> properties) {

      super(new CompositeDeclaration(name, specificationName != null && !specificationName.trim().isEmpty() ? VersionedReference.any(new SpecificationReference(specificationName)) : null, new ComponentReference<ComponentDeclaration>(mainName)));
     
      if (properties != null) {
        declaration.getProperties().putAll(properties);
      }

View Full Code Here

              component = new SpecificationDeclaration(componentName);
        break;
      case IMPLEMENTATION:
            if (isDefined(CST.APAM_COMPOSITE) && flag(CST.APAM_COMPOSITE)) {
                 
              SpecificationReference specification             = reference(CST.PROVIDE_SPECIFICATION, ComponentKind.SPECIFICATION);
              String range                         = property(CST.REQUIRE_VERSION);
              VersionedReference<SpecificationDeclaration> specificationVersion  = specification != null ? VersionedReference.range(specification,range) : null;

              ComponentReference<?> main = reference(CST.APAM_MAIN_COMPONENT,ComponentKind.COMPONENT);

              component = new CompositeDeclaration(componentName,specificationVersion,main);
            }
            else {

              SpecificationReference specification            = reference(CST.PROVIDE_SPECIFICATION, ComponentKind.SPECIFICATION);
              String range                         = property(CST.REQUIRE_VERSION);
              VersionedReference<SpecificationDeclaration> specificationVersion  = specification != null ? VersionedReference.range(specification,range) : null;
             
              InstrumentedClass instrumentedClass =  new UnloadedClassMetadata(property(CST.PROVIDE_CLASSNAME));
                component = new AtomicImplementationDeclaration(componentName, specificationVersion, instrumentedClass);
View Full Code Here

 
    public RemoteImplem(String name) {
 
        String specName = null;
 
        SpecificationReference specReference = null;
 
        Specification spec = CST.componentBroker.getSpec(specName);
        if (spec != null) {
          specReference = spec.getApformSpec().getDeclaration().getReference();
        }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.declarations.references.components.SpecificationReference

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.