diff options
| author | abranson <andrew.branson@cern.ch> | 2011-08-04 00:42:34 +0200 |
|---|---|---|
| committer | abranson <andrew.branson@cern.ch> | 2011-08-04 00:42:34 +0200 |
| commit | 0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch) | |
| tree | 5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/collection/AggregationDescription.java | |
| parent | 036cbdba66f804743c4c838ed598d6972c4b3e17 (diff) | |
More code cleanup:
Refactored Entity Proxy Subscription to handle generics better
Rewrote RemoteMap to use TreeMap instead of the internal array for
order. It now sorts its keys by number if they parse, else as strings.
Removed a no-longer-in-progress outcome form class
Diffstat (limited to 'source/com/c2kernel/collection/AggregationDescription.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/collection/AggregationDescription.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/com/c2kernel/collection/AggregationDescription.java b/source/com/c2kernel/collection/AggregationDescription.java index 07a6818..a046871 100755..100644 --- a/source/com/c2kernel/collection/AggregationDescription.java +++ b/source/com/c2kernel/collection/AggregationDescription.java @@ -6,54 +6,54 @@ package com.c2kernel.collection; */
import com.c2kernel.graph.model.Vertex;
-import com.c2kernel.property.*;
+import com.c2kernel.property.PropertyDescriptionList;
+import com.c2kernel.property.PropertyUtility;
import com.c2kernel.utils.Logger;
-public class AggregationDescription extends Aggregation implements CollectionDescription
+public class AggregationDescription extends Aggregation implements CollectionDescription<AggregationMember>
{
public AggregationDescription()
{
setName("AggregationDescription");
- mMembers = new CollectionMemberList();
}
public AggregationDescription(String name)
{
setName(name);
- mMembers = new CollectionMemberList();
}
-
- public Collection newInstance()
+
+ @Override
+ public Aggregation newInstance()
{
AggregationInstance newInstance = new AggregationInstance(getName());
newInstance.setURLInfo(getURLInfo());
//for each desc member
for (int i=0; i<size(); i++)
{
- AggregationMember mem = (AggregationMember) mMembers.list.get(i);
- //get the propdesc of the member item
+ AggregationMember mem = mMembers.list.get(i);
+ //get the propdesc of the member item
PropertyDescriptionList pdList = PropertyUtility.getPropertyDescriptionOutcome(mem.getEntityKey());
if (pdList!=null)
{
- //create the new props of the member object
+ //create the new props of the member object
try {
Vertex v = getLayout().getVertexById(mem.getID());
- newInstance.addMember(-1, PropertyUtility.createProperty(pdList), pdList.getClassProps(),v.getCentrePoint(),v.getWidth(),v.getHeight());
- } catch (MembershipException e) {
+ newInstance.addMember(-1, PropertyUtility.createProperty(pdList), pdList.getClassProps(),v.getCentrePoint(),v.getWidth(),v.getHeight());
+ } catch (MembershipException e) {
// won't happen as we're not assigning an entity
}
}
else
- {
+ {
Logger.error("AggregationDescription::newInstance() There is no PropertyDescription. Cannot instantiate. " + mem.getEntityKey());
return null;
- }
+ }
}
return newInstance;
- }
+ }
}
|
