Examples of AttributeDefinition


Examples of com.volantis.mcs.build.parser.AttributeDefinition

            // Add any extra attributes.
            if ((value = pi.getValue("attribute")) != null) {
                String name = value;

                Scope scope = parser.getScope();
                AttributeDefinition definition = scope.addAttributeDefinition(
                        name);
                definition.setType(pi.getValue("type"));
                definition.setUse(pi.getValue("use"));

                List attributes = attributesStructureInfo.getAttributes();
                attributes.add(definition);
            }
View Full Code Here

Examples of com.volantis.mcs.eclipse.ab.editors.xml.schema.AttributeDefinition

                            List options = new ArrayList();

                            if (ic.isAttribute()) {
                                List attributes =
                                    element.getAttributeDefinitions(matchName);
                                AttributeDefinition attribute;

                                for (int i = 0;
                                     i < attributes.size();
                                     i++) {
                                    attribute =
                                        (AttributeDefinition)attributes.get(i);

                                    options.add(attribute.getName());
                                }
                            } else {
                                List subElements =
                                    element.getSubElementNames(matchName);
View Full Code Here

Examples of oracle.binding.meta.AttributeDefinition

        // wrap attributes and accessors with their own class for lazy resolving
        for (Iterator iter = structDef.getAttributeDefinitions().iterator(); iter.hasNext();) {
            Object obj = iter.next();
            if (obj instanceof AttributeDef) {
                AttributeDefinition attr = (AttributeDefinition) obj;
                attributes.put(attr.getName(), new Attribute(attr));
            }
        }
        for (Iterator iter = structDef.getAccessorDefinitions().iterator(); iter.hasNext();) {
            Object obj = iter.next();
            if (obj instanceof AccessorDefinition) {
View Full Code Here

Examples of org.apache.harmony.pack200.AttributeDefinitionBands.AttributeDefinition

    public void testEmptyLayout() throws IOException {
        CPUTF8 name = new CPUTF8("TestAttribute");
        CPUTF8 layout = new CPUTF8("");
        MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
                null, null, new AttributeDefinition(35,
                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
        List layoutElements = newAttributeBands.getLayoutElements();
        assertEquals(0, layoutElements.size());
    }
View Full Code Here

Examples of org.apache.struts.tiles.AttributeDefinition

        // If role is set, add it in attribute definition if any.
        // If no attribute definition, create untyped one, and set role.
        Object attributeValue = nestedTag.getList();

        if (nestedTag.getRole() != null) {
            AttributeDefinition def = new UntypedAttribute(attributeValue);
            def.setRole(nestedTag.getRole());
            attributeValue = def;
        }

        // now add attribute to enclosing parent (i.e. : this object)
        addElement(attributeValue);
View Full Code Here

Examples of org.apache.struts.tiles.AttributeDefinition

    public void processNestedTag(AddTag nestedTag) throws JspException {
        // Get real value and check role
        // If role is set, add it in attribute definition if any.
        // If no attribute definition, create untyped one, and set role.
        Object attributeValue = nestedTag.getRealValue();
        AttributeDefinition def;

        if (nestedTag.getRole() != null) {
            try {
                def = ((AttributeDefinition) attributeValue);
            } catch (ClassCastException ex) {
                def = new UntypedAttribute(attributeValue);
            }
            def.setRole(nestedTag.getRole());
            attributeValue = def;
        }

        // now add attribute to enclosing parent (i.e. : this object)
        addElement(attributeValue);
View Full Code Here

Examples of org.apache.struts.tiles.AttributeDefinition

    public void processNestedTag(PutTag nestedTag) throws JspException {
        // Get real value and check role
        // If role is set, add it in attribute definition if any.
        // If no attribute definition, create untyped one and set role.
        Object attributeValue = nestedTag.getRealValue();
        AttributeDefinition def;

        if (nestedTag.getRole() != null) {
            try {
                def = ((AttributeDefinition) attributeValue);
            } catch (ClassCastException ex) {
                def = new UntypedAttribute(attributeValue);
            }
            def.setRole(nestedTag.getRole());
            attributeValue = def;
        }

        // now add attribute to enclosing parent (i.e. : this object)
        putAttribute(nestedTag.getName(), attributeValue);
View Full Code Here

Examples of org.apache.struts.tiles.AttributeDefinition

        // If role is set, add it in attribute definition if any.
        // If no attribute definition, create untyped one and set role.
        Object attributeValue = nestedTag.getList();

        if (nestedTag.getRole() != null) {
            AttributeDefinition def = new UntypedAttribute(attributeValue);
            def.setRole(nestedTag.getRole());
            attributeValue = def;
        }

        // Check if a name is defined
        if (nestedTag.getName() == null) {
View Full Code Here

Examples of org.dmd.dms.AttributeDefinition

   * @throws ClassNotFoundException 
   */
  public DmcObject createObject(DmcUncheckedObject uco) throws ResultException, DmcValueException, ClassNotFoundException {
    DmcObject      dmo  = null;
    ClassDefinition    cd  = null;
    AttributeDefinition  ad  = null;
   
    if ((cd = schema.isClass((String)uco.classes.get(0))) == null){
          ResultException ex = new ResultException();
            ex.result.addResult(Result.ERROR,"Unknown class: " + uco.classes.get(0));
            throw(ex);
    }
   
//    DebugInfo.debug(uco.toOIF(15));
   
    dmo = cd.newDMOInstance();
   
    // Add the object class
    DmcTypeClassDefinitionREFMV cref = new DmcTypeClassDefinitionREFMV();
    cref.add(cd.getObjectName());
   
    dmo.add(DmcObject.__objectClass, cref);
   
    // And add any auxiliary classes if we have them
    for(int i=1; i<uco.classes.size(); i++){
      if ((cd = schema.isClass((String)uco.classes.get(i))) == null){
            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown class: " + uco.classes.get(i));
              throw(ex);
      }
      cref.add(cd.getObjectName());
      dmo.add("objectClass", cref);
    }
   
    Iterator<String> names = uco.getAttributeNames();
    while(names.hasNext()){
      String n = names.next();
      ad = schema.adef(n);
     
      if (ad == null){
            ResultException ex = new ResultException();
              ex.result.addResult(Result.ERROR,"Unknown attribute: " + n);
              throw(ex);
      }
     
      DmcAttributeInfo ai = dmo.getAttributeInfo(n);
      if (ai == null){
        ai = ad.getAttributeInfo();
      }
     
//      DmcAttributeInfo ai = DmcOmni.instance().getInfo(ad.getDmdID());
     
      if (ai == null)
        throw(new IllegalStateException("Unknown attribute id: " + ad.getDmdID() + " for attribute: " + ad.getName()));
     
      NamedStringArray values = null;
     
      switch(ad.getValueType()){
      case SINGLE:
        values = uco.get(n);
       
        try {
          // Try to get the attribute
//          DmcAttribute<?> attr = dmo.get(ad.getName().getNameString());
          DmcAttribute<?> attr = dmo.get(ai);
         
          // If we can't find the attribute container, create it
          if (attr == null)
            attr = ad.getType().getAttributeHolder(ai);
         
          // Set the value
          attr.set(values.get(0));
         
          // Store the attribute
          dmo.set(ai, attr);
        } catch (InstantiationException e) {
          e.printStackTrace();
        } catch (IllegalAccessException e) {
          e.printStackTrace();
        } catch (DmcValueException e) {
          throw(e);
        }
        break;
      case MULTI:
      case HASHMAPPED:
      case TREEMAPPED:
      case HASHSET:
      case TREESET:
        values = uco.get(n);
       
        for (String attrVal: values){
          try {
            // Try to get the attribute
//            DmcAttribute<?> attr = dmo.get(ad.getName().getNameString());
            DmcAttribute<?> attr = dmo.get(ai);
           
            // If we can't find the attribute container, create it
            if (attr == null)
              attr = ad.getType().getAttributeHolder(ai);
                       
            // Add the value to the container
            attr.add(attrVal);
         
            // Store the attribute
View Full Code Here

Examples of org.hibernate.persister.walking.spi.AttributeDefinition

  private void collectAttributeDefinitions(
      Map<String,AttributeDefinition> attributeDefinitionsByName,
      EntityMetamodel metamodel) {
    for ( int i = 0; i < metamodel.getPropertySpan(); i++ ) {
      final AttributeDefinition attributeDefinition = metamodel.getProperties()[i];
      // Don't replace an attribute definition if it is already in attributeDefinitionsByName
      // because the new value will be from a subclass.
      final AttributeDefinition oldAttributeDefinition = attributeDefinitionsByName.get(
          attributeDefinition.getName()
      );
      if ( oldAttributeDefinition != null ) {
        if ( LOG.isTraceEnabled() ) {
            LOG.tracef(
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.