Package org.geomajas.layer.feature.attribute

Examples of org.geomajas.layer.feature.attribute.ManyToOneAttribute


          if (displayName == null) {
            displayName = associationAttributeInfo.getFeature().getAttributes().get(0).getName();
          }
          switch (associationAttributeInfo.getType()) {
            case MANY_TO_ONE:
              ManyToOneAttribute manyToOneAttribute = (ManyToOneAttribute) attr;
              Object value = manyToOneAttribute.getValue().getAllAttributes().get(displayName).getValue();
              if (value != null) {
                record.setAttribute(attributeInfo.getName(), value.toString());
              } else {
                record.setAttribute(attributeInfo.getName(), "");
              }
View Full Code Here


        attributes.put(attrInfo.getName(), createPrimitiveAttribute((PrimitiveAttributeInfo) attrInfo));
      } else if (attrInfo instanceof AssociationAttributeInfo) {
        AssociationAttributeInfo assocInfo = (AssociationAttributeInfo) attrInfo;
        switch (assocInfo.getType()) {
          case MANY_TO_ONE:
            attributes.put(assocInfo.getName(), new ManyToOneAttribute());
            break;
          case ONE_TO_MANY:
            OneToManyAttribute oneToMany = new OneToManyAttribute();
            oneToMany.setValue(new ArrayList<AssociationValue>());
            attributes.put(assocInfo.getName(), oneToMany);
View Full Code Here

TOP

Related Classes of org.geomajas.layer.feature.attribute.ManyToOneAttribute

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.