|
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.ShapeNodeRealizerSerializer
public class ShapeNodeRealizerSerializer
Serializer for instances of ShapeNodeRealizer
.
Constructor Summary | |
---|---|
ShapeNodeRealizerSerializer()
|
Method Summary | |
---|---|
protected byte |
decodeShapeType(java.lang.String s,
GraphMLParseContext context)
Returns a shape type that is represented by s . |
protected java.lang.String |
encodeShapeType(ShapeNodeRealizer snr,
GraphMLWriteContext context)
Returns a string describing the shape type that is used by snr . |
java.lang.String |
getName()
Returns the string ShapeNode. |
java.lang.String |
getNamespaceURI()
Returns the target namespace of the toplevel element |
java.lang.Class |
getRealizerClass()
Returns class ShapeNodeRealizer . |
void |
parse(NodeRealizer realizer,
org.w3c.dom.Node domNode,
GraphMLParseContext context)
Parses the properties into an instance of NodeRealizer . |
void |
write(NodeRealizer realizer,
XmlWriter writer,
GraphMLWriteContext context)
Writes the realizer element's content. |
protected void |
writeBorder(NodeRealizer nr,
XmlWriter writer)
Writes the BorderStyle element. |
Methods inherited from class y.io.graphml.graph2d.AbstractNodeRealizerSerializer |
---|
canHandle, canHandle, createRealizerInstance, getNamespacePrefix, parseLabel, parseNodePorts, writeAttributes, writeFill, writeNodeLabel, writeNodePorts |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeNodeRealizerSerializer()
Method Detail |
---|
public java.lang.String getName()
public java.lang.String getNamespaceURI()
NodeRealizerSerializer
public java.lang.Class getRealizerClass()
ShapeNodeRealizer
.
public void write(NodeRealizer realizer, XmlWriter writer, GraphMLWriteContext context) throws GraphMLWriteException
NodeRealizerSerializer
write
in interface NodeRealizerSerializer
write
in class AbstractNodeRealizerSerializer
realizer
- The Realizer to write.writer
- The XmlWriter for the serialization.context
- The current write context.
GraphMLWriteException
protected void writeBorder(NodeRealizer nr, XmlWriter writer)
BorderStyle
element.
This implementation adds the state of the
raisedBorderEnabled
as attribute raised
to element BorderStyle
.
writeBorder
in class AbstractNodeRealizerSerializer
nr
- The NodeRealizer whose border style is to be written.writer
- The writer to use.protected java.lang.String encodeShapeType(ShapeNodeRealizer snr, GraphMLWriteContext context)
snr
.
snr
.public void parse(NodeRealizer realizer, org.w3c.dom.Node domNode, GraphMLParseContext context) throws GraphMLParseException
NodeRealizerSerializer
NodeRealizer
.
parse
in interface NodeRealizerSerializer
parse
in class AbstractNodeRealizerSerializer
realizer
- An existing NodeRealizer
instance which is configured.domNode
- The XML node containing the realizer data.context
- The current parse context.
GraphMLParseException
protected byte decodeShapeType(java.lang.String s, GraphMLParseContext context)
s
.
It is up to the caller to interpret the return value correctly.
s
- the String to decode
s
.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |