package com.c2kernel.lifecycle.instance.predefined.entitycreation; import java.util.ArrayList; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import com.c2kernel.collection.MembershipException; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.graph.model.GraphPoint; import com.c2kernel.lookup.DomainPath; import com.c2kernel.property.PropertyDescription; import com.c2kernel.property.PropertyDescriptionList; import com.c2kernel.property.PropertyUtility; public class Aggregation implements java.io.Serializable { public boolean isDescription; public ArrayList aggregationMemberList = new ArrayList(); public String name; public Aggregation() { super(); } public Aggregation(String name, boolean isDescription) { this(); this.name = name; this.isDescription = isDescription; } public Aggregation(Element agg) { name = agg.getAttribute("name"); isDescription = agg.getAttribute("isDescription").equals("true"); NodeList depmemnl = agg.getElementsByTagName("AggregationMember"); for (int k=0; k0) { PropertyDescriptionList propList = PropertyUtility.getPropertyDescriptionOutcome(new DomainPath(thisMem.itemDescriptionPath).getSysKey()); for (PropertyDescription pd : propList.list) { thisMem.props.put(pd.getName(), pd.getDefaultValue()); if (pd.getIsClassIdentifier()) classProps.append((classProps.length()>0?",":"")).append(pd.getName()); } } if (thisMem.itemPath != null && thisMem.itemPath.length()>0) { int syskey = new DomainPath(thisMem.itemPath).getSysKey(); if (syskey == -1) throw new MembershipException("Cannot find "+thisMem.itemPath+" specified for collection."); newAgg.addMember(syskey, thisMem.props, classProps.toString(), new GraphPoint(thisMem.geometry.x, thisMem.geometry.y), thisMem.geometry.width, thisMem.geometry.height); } } return newAgg; } }