diff --git a/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraph.java b/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraph.java new file mode 100644 index 0000000000000000000000000000000000000000..f9adb83c7924c1ac368060e4d46f050ed94579d2 --- /dev/null +++ b/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraph.java @@ -0,0 +1,52 @@ +package kieker.analysis.dev.nestedgraph; + +import java.util.HashSet; +import java.util.Set; + +import com.tinkerpop.blueprints.Edge; +import com.tinkerpop.blueprints.Graph; +import com.tinkerpop.blueprints.Vertex; +import com.tinkerpop.blueprints.util.wrappers.partition.PartitionGraph; +import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedGraph; + +public class NestedGraph extends WrappedGraph<Graph> { + + private static final String PARTITION_KEY = "__nested-graph-partition"; + + private final Set<NestedGraphPartition> partitions = new HashSet<>(); + + public NestedGraph(final Graph baseGraph) { + super(new PartitionGraph<Graph>(baseGraph, PARTITION_KEY, "")); + } + + public void addPartition(final NestedGraphPartition partition) { + partitions.add(partition); + } + + public Iterable<NestedGraphPartition> getPartitions() { + return partitions; + } + + public Iterable<Vertex> getVerticesForPartition(final NestedGraphPartition partition) { + + // TODO + + return null; + } + + public Iterable<Edge> getEdgesForPartition(final NestedGraphPartition partition) { + + // TODO + + return null; + } + + public void addVertexToPartition(final Vertex vertex, final NestedGraphPartition partition) { + // TODO + } + + public void addEdgeToPartition(final Edge edge, final NestedGraphPartition partition) { + // TODO + } + +} diff --git a/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraphPartition.java b/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraphPartition.java new file mode 100644 index 0000000000000000000000000000000000000000..91ec108af08f01093b43cc9b01c7ca7c5d900c50 --- /dev/null +++ b/src/main/java/kieker/analysis/dev/nestedgraph/NestedGraphPartition.java @@ -0,0 +1,32 @@ +package kieker.analysis.dev.nestedgraph; + +import java.util.HashSet; +import java.util.Set; + +public class NestedGraphPartition { + + private String name; + + private final Set<NestedGraphPartition> subPartitions = new HashSet<>(); + + public NestedGraphPartition(final String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + public Iterable<NestedGraphPartition> getSubPartitions() { + return subPartitions; + } + + public void addSubPartition(final NestedGraphPartition subPartition) { + subPartitions.add(subPartition); + } + +}