|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.carrierwave.graphmodel.GraphModel
The GraphModel class is intended as a simple abstraction for managing the relationships in an ImageGraph instance. Use the GraphModel to remove instances of an Image completely from the graph, or to dynamically walk the graph, or to retrieve a whole graph via a ImageSource. After instantiating an instance of GraphModel, resolve it so that that model matches the underlying ImageGraph. From there add or remove Vertices or Edges from the model. During this process the ImageGraph instance will be in an inconsistent state. Sync the model when the changes are complete.
Constructor Summary | |
GraphModel(ImageGraph imageGraph)
|
|
GraphModel(ImageGraph imageGraph,
boolean isLocalOnly)
|
Method Summary | |
Edge |
addEdgeFor(java.lang.String name,
boolean readOnly,
Vertex parentVertex,
Vertex childVertex)
|
Edge |
addEdgeFor(java.lang.String name,
Vertex parentVertex,
Vertex childVertex)
|
Vertex |
addVertexFor(Icon icon)
|
Vertex |
addVertexFor(Image image)
|
Vertex |
bindVertexTo(Vertex vertex,
Icon icon)
|
Vertex |
bindVertexTo(Vertex vertex,
Image image)
|
void |
clearVertices()
|
boolean |
containsVertexFor(Icon icon)
|
boolean |
containsVertexFor(Image image)
|
java.util.List |
findLeaves()
|
java.util.List |
findRoots()
|
ImageGraph |
getImageGraph()
|
Vertex |
getVertexFor(Icon icon)
Returns a Vertex instance for the given Icon instance. |
Vertex |
getVertexFor(Image image)
Returns a Vertex instance for the given Image instance. |
java.util.List |
getVertices()
Returns a copy of the vertices collection. |
java.util.List |
getVerticesAssignableTo(java.lang.Class type)
|
void |
removeEdgeFor(java.lang.String name,
Vertex parentVertex)
|
void |
resolveModel()
|
void |
syncModel()
|
void |
syncModel(ImageGraph imageGraph)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphModel(ImageGraph imageGraph)
public GraphModel(ImageGraph imageGraph, boolean isLocalOnly)
Method Detail |
public ImageGraph getImageGraph()
public void clearVertices()
public java.util.List getVertices()
public java.util.List getVerticesAssignableTo(java.lang.Class type)
public boolean containsVertexFor(Icon icon)
public boolean containsVertexFor(Image image)
public Vertex getVertexFor(Image image)
public Vertex getVertexFor(Icon icon)
public Vertex addVertexFor(Icon icon)
public Vertex addVertexFor(Image image)
public Vertex bindVertexTo(Vertex vertex, Image image)
public Vertex bindVertexTo(Vertex vertex, Icon icon)
public Edge addEdgeFor(java.lang.String name, Vertex parentVertex, Vertex childVertex)
public Edge addEdgeFor(java.lang.String name, boolean readOnly, Vertex parentVertex, Vertex childVertex)
public void removeEdgeFor(java.lang.String name, Vertex parentVertex)
public void syncModel()
public void syncModel(ImageGraph imageGraph)
public void resolveModel()
public java.util.List findLeaves()
public java.util.List findRoots()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |