|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.graphdrawing.graphml.writer.GraphMLWriteContext
Messenger class that represents the current state of the writing process. Among others, instances store the current graph element nesting, thus implementing stack semantics.
| Nested Class Summary | |
static interface |
GraphMLWriteContext.ResourceDescriptor
|
static interface |
GraphMLWriteContext.ResourceEncoder
Interface for classes that encode object to GraphML output |
static interface |
GraphMLWriteContext.ResourceHandler
Interface for classes that provide methods to manage shared object resources for the output process |
| Constructor Summary | |
GraphMLWriteContext(DirectGraphMLWriter writer)
Create a new context |
|
| Method Summary | |
List |
getContainers()
Provide direct access to the complete element stack. |
Object |
getCurrentContainer()
Return a reference to the topmost element on the current element stack. |
GraphMLWriteErrorHandler |
getErrorHandler()
Return a reference to an error handler that can be used to handle error conditions |
Object |
getProperty(String name)
Return the value of a property that has been set with setProperty(String, Object) |
Object |
getSecondToCurrentContainer()
Return a reference to the second to topmost element on the current element stack. |
Object |
lookup(Class c)
Retrieve an object that is indexed by class c.
|
void |
popGraphMLElement()
Pop a graph element from the current element stack. |
void |
pushGraphMLElement(Object element)
Push a new graph element onto the current element stack |
void |
setLookup(Class c,
Object o)
Store a new value in the lookup map |
void |
setProperty(String name,
Object o)
This can be used to set internal properties of the context that are usually handled by external facades. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphMLWriteContext(DirectGraphMLWriter writer)
writer - the writer that uses this context| Method Detail |
public void pushGraphMLElement(Object element)
element - public void popGraphMLElement()
public Object getCurrentContainer()
public Object getSecondToCurrentContainer()
public List getContainers()
public Object lookup(Class c)
Lookupc.
The return value should be an instance of class c or a subclass.
lookup in interface Lookupc - The class for which we want an implementation
c.
public void setLookup(Class c,
Object o)
c - the class that is used as lookup keyo - an object that should be an implementation of cpublic GraphMLWriteErrorHandler getErrorHandler()
public void setProperty(String name,
Object o)
name - The name of the propertyo - the valuepublic Object getProperty(String name)
setProperty(String, Object)
name - the name of the property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||