Map<Name, Object> userData = new HashMap<Name, Object>();
singleLeaf.getUserData().put(Attributes.class, userData);
userData.put(Types.typeName(EG, "att"), "test attribute");
AttributeImpl rootOne = new ComplexAttributeImpl(rootPropertiesOne, rootDesc, null);
// eg:complexAttribute/eg:rootAttribute[2]
Collection<Property> rootPropertiesTwo = new ArrayList<Property>();
// eg:complexAttribute/eg:rootAttribute[2]/eg:multiLeafAttribute[1]
rootPropertiesTwo.add(leafOne);
rootPropertiesTwo.add(singleLeaf);
AttributeImpl rootTwo = new ComplexAttributeImpl(rootPropertiesTwo, rootDesc, null);
// eg:complexAttribute/eg:rootAttribute[3]
Collection<Property> rootPropertiesThree = new ArrayList<Property>();
// eg:complexAttribute/eg:rootAttribute[3]/eg:singleLeafAttribute
rootPropertiesThree.add(singleLeaf);
AttributeImpl rootThree = new ComplexAttributeImpl(rootPropertiesThree, rootDesc, null);
Collection<Property> complexProperties = new ArrayList<Property>(2);
complexProperties.add(rootOne);
complexProperties.add(rootTwo);
complexProperties.add(rootThree);
AttributeImpl complexAttribute = new ComplexAttributeImpl(complexProperties,
complexDesc, null);
properties.add(complexAttribute);
Feature feature = new FeatureImpl(properties, fType, new FeatureIdImpl("test1"));