|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.carrierwave.plan.GraphPlan
The GraphPlan class describes the closure of an Image
or
Imageable
object graph.
This is accomplished by holding a tree of GraphNode
instances (graph node tree), or the
the meta-data used to create on during runtime.
Node trees generated at runtime are created using either the type of the origin node,
or an instance of the origin node. When using the type, the node tree is referred to as
static, since it describes the most general case possible for a given depth, etc. When
generated with an instance of an Image or Imageable object, it is a runtime graph
node tree.
GraphPlan instances are intended to be persisted in the repository and reused by client applications.
todo: need a way to make plans immutable??
Field Summary | |
static int |
ALL_CHILDREN
Infinite (whole graph) depth. |
static char |
VERSION_DELIM
The version delimiter used in full graph plan names. |
Constructor Summary | |
protected |
GraphPlan()
|
|
GraphPlan(GraphNode originNode)
Creates a new instance of a GraphPlan. |
|
GraphPlan(GraphNode originNode,
boolean isFuzzy)
Creates a new instance of a GraphPlan. |
|
GraphPlan(int depth)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(int depth,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(int depth,
boolean ignoreReadOnly,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(int depth,
boolean ignoreReadOnly,
boolean dependentsInclusive,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. |
|
GraphPlan(java.lang.String fullName,
GraphNode originNode)
Creates a new instance of a GraphPlan. |
|
GraphPlan(java.lang.String fullName,
GraphNode originNode,
boolean isFuzzy)
Creates a new instance of a GraphPlan. |
|
GraphPlan(java.lang.String fullName,
int depth)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(java.lang.String fullName,
int depth,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(java.lang.String fullName,
int depth,
boolean ignoreReadOnly,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. Note, for convenience, if isFuzzy is true, dependentsInclusive will be set to true. |
|
GraphPlan(java.lang.String fullName,
int depth,
boolean ignoreReadOnly,
boolean dependentsInclusive,
boolean isFuzzy)
Creates a new instance of a GraphPlan. A graph node tree will be generated on demand with the given meta-data. |
Method Summary | |
java.util.List |
getAllNodes()
Returns all GraphNode instances in this GraphPlan. This includes GraphNodeSets, but not the GraphNode peer instances in the set, only their children nodes. |
int |
getDepth()
The number of edges to traverse. |
java.lang.String |
getFullName()
|
java.lang.String |
getName()
|
GraphNode |
getOriginNode()
|
long |
getVersion()
|
boolean |
isDependentsInclusive()
If depth should be extended (automatically) to include dependent children in the resulting graph. |
boolean |
isFuzzy()
If leaf nodes should be returned as Icon instances instead of Image instances. |
boolean |
isIgnoreReadOnly()
If read-only edges should be traversed. |
void |
setDependentsInclusive(boolean dependentsInclusive)
|
void |
setDepth(int depth)
|
void |
setFullName(java.lang.String fullName)
Sets the full name of this GraphPlan instance. The full name consists of the name and version, for example: simple.graphPlan#2 |
void |
setFuzzy(boolean fuzzy)
|
void |
setIgnoreReadOnly(boolean ignoreReadOnly)
|
void |
setName(java.lang.String name)
Sets the simple name of this GraphPlan instance. |
void |
setVersion(long version)
Sets the version of this GraphPlan instance. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ALL_CHILDREN
public static char VERSION_DELIM
Constructor Detail |
protected GraphPlan()
public GraphPlan(java.lang.String fullName, GraphNode originNode)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulloriginNode
- the root node of a graph node treepublic GraphPlan(java.lang.String fullName, GraphNode originNode, boolean isFuzzy)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulloriginNode
- the root node of a graph node treeisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(GraphNode originNode)
originNode
- the root node of a graph node treepublic GraphPlan(GraphNode originNode, boolean isFuzzy)
originNode
- the root node of a graph node treeisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(java.lang.String fullName, int depth, boolean ignoreReadOnly, boolean dependentsInclusive, boolean isFuzzy)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulldepth
- the number of edge traversals to include in the resulting graphignoreReadOnly
- set to true if read-only edges should not be traverseddependentsInclusive
- set to true if depth should be extended to include a dependent childisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(java.lang.String fullName, int depth, boolean ignoreReadOnly, boolean isFuzzy)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulldepth
- the number of edge traversals to include in the resulting graphignoreReadOnly
- set to true if read-only edges should not be traversedisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(java.lang.String fullName, int depth, boolean isFuzzy)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulldepth
- the number of edge traversals to include in the resulting graphisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(java.lang.String fullName, int depth)
fullName
- the name of this GraphPlan instance, optionally versioned, may be nulldepth
- the number of edge traversals to include in the resulting graphpublic GraphPlan(int depth, boolean ignoreReadOnly, boolean dependentsInclusive, boolean isFuzzy)
depth
- the number of edge traversals to include in the resulting graphignoreReadOnly
- set to true if read-only edges should not be traverseddependentsInclusive
- set to true if depth should be extended to include a dependent childisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(int depth, boolean ignoreReadOnly, boolean isFuzzy)
depth
- the number of edge traversals to include in the resulting graphignoreReadOnly
- set to true if read-only edges should not be traversedisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(int depth, boolean isFuzzy)
depth
- the number of edge traversals to include in the resulting graphisFuzzy
- set to true if leaf nodes should be returned as Icon instances instead of Image instancespublic GraphPlan(int depth)
depth
- the number of edge traversals to include in the resulting graphMethod Detail |
public void setName(java.lang.String name)
name
- public java.lang.String getName()
public void setFullName(java.lang.String fullName)
simple.graphPlan#2
fullName
- public java.lang.String getFullName()
public void setVersion(long version)
version
- public long getVersion()
public GraphNode getOriginNode()
public java.util.List getAllNodes()
public int getDepth()
public void setDepth(int depth)
public boolean isIgnoreReadOnly()
public void setIgnoreReadOnly(boolean ignoreReadOnly)
public boolean isDependentsInclusive()
public void setDependentsInclusive(boolean dependentsInclusive)
public boolean isFuzzy()
public void setFuzzy(boolean fuzzy)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |