|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.graph2d.AbstractNodeRealizerSerializer y.io.graphml.graph2d.FallbackNodeRealizerSerializer
public final class FallbackNodeRealizerSerializer
Fallback implementation of AbstractNodeRealizerSerializer
that deserializes
common NodeRealizer properties from arbitrary NodeRealizer XML content.
This includes geometry and labels.
Method Summary | |
---|---|
boolean |
canHandle(NodeRealizer nr,
GraphMLWriteContext context)
Returns true iff nr.getClass() == getRealizerClass() . |
NodeRealizer |
createRealizerInstance(org.w3c.dom.Node node,
GraphMLParseContext context)
Create new instance of the Realizer from the given information |
static FallbackNodeRealizerSerializer |
getInstance()
|
java.lang.String |
getName()
Returns the name of the XML element tag which denotes this type of realizer. |
java.lang.String |
getNamespaceURI()
Returns the target namespace of the toplevel element |
java.lang.Class |
getRealizerClass()
Returns the class of which the realizer is an instance of. |
void |
parse(NodeRealizer nr,
org.w3c.dom.Node domNode,
GraphMLParseContext context)
Parses the properties into an instance of NodeRealizer . |
void |
write(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
Writes the realizer element's content. |
Methods inherited from class y.io.graphml.graph2d.AbstractNodeRealizerSerializer |
---|
canHandle, getNamespacePrefix, parseLabel, parseNodePorts, writeAttributes, writeBorder, writeFill, writeNodeLabel, writeNodePorts |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FallbackNodeRealizerSerializer getInstance()
public java.lang.String getName()
NodeRealizerSerializer
public java.lang.String getNamespaceURI()
NodeRealizerSerializer
public java.lang.Class getRealizerClass()
NodeRealizerSerializer
public void parse(NodeRealizer nr, org.w3c.dom.Node domNode, GraphMLParseContext context) throws GraphMLParseException
NodeRealizerSerializer
NodeRealizer
.
parse
in interface NodeRealizerSerializer
parse
in class AbstractNodeRealizerSerializer
nr
- An existing NodeRealizer
instance which is configured.domNode
- The XML node containing the realizer data.context
- The current parse context.
GraphMLParseException
public void write(NodeRealizer nr, XmlWriter writer, GraphMLWriteContext context) throws GraphMLWriteException
NodeRealizerSerializer
write
in interface NodeRealizerSerializer
write
in class AbstractNodeRealizerSerializer
nr
- The Realizer to write.writer
- The XmlWriter for the serialization.context
- The current write context.
GraphMLWriteException
public boolean canHandle(NodeRealizer nr, GraphMLWriteContext context)
AbstractNodeRealizerSerializer
true
iff nr.getClass() == getRealizerClass()
.
canHandle
in interface NodeRealizerSerializer
canHandle
in class AbstractNodeRealizerSerializer
nr
- The realizer that may be written.context
- The current write context.
true
iff nr.getClass() == getRealizerClass()
.public NodeRealizer createRealizerInstance(org.w3c.dom.Node node, GraphMLParseContext context) throws GraphMLParseException
NodeRealizerSerializer
createRealizerInstance
in interface NodeRealizerSerializer
createRealizerInstance
in class AbstractNodeRealizerSerializer
node
- The DOM node that represents the realizer data.context
- The current parse context.
GraphMLParseException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |