diff --git a/src/main/java/com/syncleus/dann/graph/Edge.java b/src/main/java/com/syncleus/dann/graph/Edge.java
index 9a25dcf85e9d122ffdef96b7fef9f8e894c55cce..6d58ce07f72aa78ca98360248978df6397ffb813 100644
--- a/src/main/java/com/syncleus/dann/graph/Edge.java
+++ b/src/main/java/com/syncleus/dann/graph/Edge.java
@@ -18,37 +18,12 @@
******************************************************************************/
package com.syncleus.dann.graph;
-import com.syncleus.dann.graph.context.ContextReporter;
-import com.syncleus.dann.graph.xml.EdgeXml;
-import com.syncleus.dann.xml.XmlSerializable;
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Set;
-
public interface Edge<
T,
EP extends Edge.Endpoint<? extends T>
- > extends Serializable, Cloneable, XmlSerializable<EdgeXml, Object>, ContextReporter
+ > extends Cloud<T,EP>
{
- interface Endpoint<T>
+ interface Endpoint<T> extends Cloud.Endpoint<T>
{
- Set<? extends Edge.Endpoint<? extends T>> getNeighbors();
- Set<? extends Edge.Endpoint<? extends T>> getTraversableNeighborsTo();
- Set<? extends Edge.Endpoint<? extends T>> getTraversableNeighborsFrom();
- boolean isTraversable();
- boolean isTraversable(Edge.Endpoint<?> destination);
- T getTarget();
};
-
- Set<EP> getEndpoints();
- Set<EP> getEndpoints(Object node);
- boolean contains(Object node);
- boolean containsAny(Collection<?> nodes);
- boolean containsAll(Collection<?> nodes);
- Set<T> getTargets();
- Set<T> getNeighbors(Object source);
- Set<T> getTraversableFrom(Object source);
- Set<T> getTraversableTo(Object destination);
- boolean isTraversable(Object source, Object destination);
- int getDegree();
}
diff --git a/src/main/java/com/syncleus/dann/graph/context/ContextElement.java b/src/main/java/com/syncleus/dann/graph/context/ContextElement.java
new file mode 100644
index 0000000000000000000000000000000000000000..42e12f52b78c0dd57008832f748a7587867dd039
--- /dev/null
+++ b/src/main/java/com/syncleus/dann/graph/context/ContextElement.java
@@ -0,0 +1,30 @@
+/******************************************************************************
+ * *
+ * Copyright: (c) Syncleus, Inc. *
+ * *
+ * You may redistribute and modify this source code under the terms and *
+ * conditions of the Open Source Community License - Type C version 1.0 *
+ * or any later version as published by Syncleus, Inc. at www.syncleus.com. *
+ * There should be a copy of the license included with this file. If a copy *
+ * of the license is not included you are granted no right to distribute or *
+ * otherwise use this file except through a legal and valid license. You *
+ * should also contact Syncleus, Inc. at the information below if you cannot *
+ * find a license: *
+ * *
+ * Syncleus, Inc. *
+ * 2604 South 12th Street *
+ * Philadelphia, PA 19148 *
+ * *
+ ******************************************************************************/
+package com.syncleus.dann.graph.context;
+
+import java.util.Set;
+import com.syncleus.dann.graph.Edge;
+
+public interface ContextElement<
+ E extends Edge<?, ? extends Edge.Endpoint<?>>
+ >
+{
+ void changingContext(Set<? extends E> joiningContexts, Set<? extends Edge<?,? extends Edge.Endpoint<?>>> leavingContexts) throws RejectedContextException;
+ void changedContext(Set<? extends E> joinedContexts, Set<? extends Edge<?,? extends Edge.Endpoint<?>>> leftContexts);
+}
diff --git a/src/main/java/com/syncleus/dann/graph/context/GraphContextElement.java b/src/main/java/com/syncleus/dann/graph/context/GraphContextElement.java
new file mode 100644
index 0000000000000000000000000000000000000000..8b1971f2e23b6fed595d69e64e18092c8ddfb199
--- /dev/null
+++ b/src/main/java/com/syncleus/dann/graph/context/GraphContextElement.java
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * *
+ * Copyright: (c) Syncleus, Inc. *
+ * *
+ * You may redistribute and modify this source code under the terms and *
+ * conditions of the Open Source Community License - Type C version 1.0 *
+ * or any later version as published by Syncleus, Inc. at www.syncleus.com. *
+ * There should be a copy of the license included with this file. If a copy *
+ * of the license is not included you are granted no right to distribute or *
+ * otherwise use this file except through a legal and valid license. You *
+ * should also contact Syncleus, Inc. at the information below if you cannot *
+ * find a license: *
+ * *
+ * Syncleus, Inc. *
+ * 2604 South 12th Street *
+ * Philadelphia, PA 19148 *
+ * *
+ ******************************************************************************/
+package com.syncleus.dann.graph.context;
+
+import java.util.Set;
+import com.syncleus.dann.graph.Edge;
+import com.syncleus.dann.graph.Graph;
+import sun.security.ec.ECParameters;
+
+public interface GraphContextElement<
+ G extends Graph<
+ ?,
+ Edge<?,? extends Edge.Endpoint<?>>,
+ ? extends Graph.NodeEndpoint<?,?>,
+ ? extends Graph.EdgeEndpoint<?,?>
+ >
+ >
+{
+ void changingNodeContext( Set<? extends G> joiningGraphContexts, Set<?> leavingGraphContexts) throws RejectedContextException;
+ void changedNodeContext(Set<? extends G> joinedGraphContexts, Set<?> leftGraphContexts);
+}
diff --git a/src/main/java/com/syncleus/dann/graph/context/GraphEdgeContextElement.java b/src/main/java/com/syncleus/dann/graph/context/GraphEdgeContextElement.java
new file mode 100644
index 0000000000000000000000000000000000000000..83729711eff85f7acfaa92b31db29713036442a5
--- /dev/null
+++ b/src/main/java/com/syncleus/dann/graph/context/GraphEdgeContextElement.java
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * *
+ * Copyright: (c) Syncleus, Inc. *
+ * *
+ * You may redistribute and modify this source code under the terms and *
+ * conditions of the Open Source Community License - Type C version 1.0 *
+ * or any later version as published by Syncleus, Inc. at www.syncleus.com. *
+ * There should be a copy of the license included with this file. If a copy *
+ * of the license is not included you are granted no right to distribute or *
+ * otherwise use this file except through a legal and valid license. You *
+ * should also contact Syncleus, Inc. at the information below if you cannot *
+ * find a license: *
+ * *
+ * Syncleus, Inc. *
+ * 2604 South 12th Street *
+ * Philadelphia, PA 19148 *
+ * *
+ ******************************************************************************/
+package com.syncleus.dann.graph.context;
+
+import java.util.Set;
+import com.syncleus.dann.graph.Edge;
+
+public interface GraphEdgeContextElement
+{
+ void changingEdgeContext(Set<? extends E> joinedGraphContexts, Set<? extends Edge<?,? extends Edge.Endpoint<?>>> leftGraphContexts);
+ void changedEdgeContext(Set<? extends E> joinedGraphContexts, Set<? extends Edge<?,? extends Edge.Endpoint<?>>> leftGraphContexts);
+}