diff options
Diffstat (limited to 'src/main/java/com/c2kernel/collection/AggregationVertexFactory.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/AggregationVertexFactory.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/java/com/c2kernel/collection/AggregationVertexFactory.java b/src/main/java/com/c2kernel/collection/AggregationVertexFactory.java new file mode 100644 index 0000000..2c27a06 --- /dev/null +++ b/src/main/java/com/c2kernel/collection/AggregationVertexFactory.java @@ -0,0 +1,36 @@ +package com.c2kernel.collection;
+
+import com.c2kernel.graph.model.GraphModelManager;
+import com.c2kernel.graph.model.GraphPoint;
+import com.c2kernel.graph.model.TypeNameAndConstructionInfo;
+import com.c2kernel.graph.model.VertexFactory;
+import com.c2kernel.utils.CastorHashMap;
+
+
+public class AggregationVertexFactory implements VertexFactory
+{
+ private Aggregation mAggregation = null;
+
+
+ @Override
+ public void setCreationContext(Object aggregation)
+ {
+ if (aggregation != null && aggregation instanceof Aggregation)
+ mAggregation = (Aggregation)aggregation;
+ }
+
+
+ @Override
+ public void create
+ (
+ GraphModelManager graphModelManager,
+ GraphPoint location,
+ TypeNameAndConstructionInfo typeNameAndConstructionInfo
+ ) throws Exception
+ {
+ if (typeNameAndConstructionInfo.mInfo.equals("AggregationMember")) {
+ mAggregation.addMember(null, new CastorHashMap(), "",location, 40, 40);
+ }
+ }
+}
+
|
