Examples of EMFAttribute


Examples of org.openiaml.docs.modeldoc.EMFAttribute

  /**
   * Add all (local) attributes in the source class to the target EMFClass.
   */
  private void parseAttributes(ModeldocFactory factory, EClass source, EMFClass target) {
    for (EAttribute a : source.getEAttributes()) {
      EMFAttribute created = factory.createEMFAttribute();
      created.setName(a.getName());
      created.setId(a.isID());
      created.setLowerBound(a.getLowerBound());
      created.setUpperBound(a.getUpperBound());
      created.setType(a.getEAttributeType().getName());
      created.setDefaultLiteral(a.getDefaultValueLiteral());
     
      // add tagline
      JavadocTagElement e = getTaglineForEMFElement(factory, a);
      if (e != null) {
        created.setTagline(e);
      }
     
      // is it an enumeration? populate list of accepted literals
      if (a.getEAttributeType() instanceof EEnum) {
        EEnum en = (EEnum) a.getEAttributeType();
        for (EEnumLiteral literal : en.getELiterals()) {
          created.getAcceptedValues().add(literal.getLiteral());
        }
      }
     
      target.getAttributes().add(created);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.