|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.graphml.graph2d.AbstractNodeRealizerSerializer
public abstract class AbstractNodeRealizerSerializer
Abstract base class for instances of NodeRealizerSerializer.
This class parses/writes basic properties of NodeRealizers.
| Constructor Summary | |
|---|---|
AbstractNodeRealizerSerializer()
|
|
| Method Summary | |
|---|---|
boolean |
canHandle(Node n,
GraphMLParseContext context)
Returns true iff n.getNamespaceURI().equals(getNamespaceURI())
&& n.getLocalName().equals(getName()). |
boolean |
canHandle(NodeRealizer nr,
GraphMLWriteContext context)
Returns true iff nr.getClass() == getRealizerClass(). |
NodeRealizer |
createRealizerInstance(Node node,
GraphMLParseContext context)
Create new instance of the Realizer from the given information |
String |
getNamespacePrefix()
The namespace prefix to use for writing. |
void |
parse(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
Parses the properties into an instance of NodeRealizer. |
protected void |
parseLabel(NodeRealizer nr,
Node n,
GraphMLParseContext context)
Parses a single NodeLabel element. |
protected void |
parseNodePorts(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
Parses the NodePorts elements and its NodePort
child elements. |
void |
write(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
Writes the realizer element's content. |
void |
writeAttributes(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
Writes the attributes of an NodeRealizer element. |
protected void |
writeFill(XmlWriter writer,
NodeRealizer nr)
Write the Fill element. |
protected void |
writeNodeLabel(NodeLabel label,
XmlWriter writer,
GraphMLWriteContext context)
Writes a single NodeLabel element. |
protected void |
writeNodePorts(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
Writes the NodePorts elements and its NodePort
child elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface y.io.graphml.graph2d.NodeRealizerSerializer |
|---|
getName, getNamespaceURI, getRealizerClass |
| Constructor Detail |
|---|
public AbstractNodeRealizerSerializer()
| Method Detail |
|---|
public void parse(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
throws GraphMLParseException
NodeRealizerSerializerNodeRealizer.
parse in interface NodeRealizerSerializerGraphMLParseExceptionnr - An existing NodeRealizer instance which is configured.domNode - The XML node containing the realizer data.context - The current parse context.
protected void parseNodePorts(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
throws GraphMLParseException
NodePorts elements and its NodePort
child elements.
GraphMLParseExceptionnr - The node realizer that will own the node ports.domNode - The DOM node containing node port data.context - The current parse context.
protected void parseLabel(NodeRealizer nr,
Node n,
GraphMLParseContext context)
throws GraphMLParseException
NodeLabel element.
GraphMLParseExceptionnr - The NodeRealizer that will own this label.n - The DOM node containing the label data.context - The current parse context.
public void writeAttributes(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
NodeRealizerSerializer
writeAttributes in interface NodeRealizerSerializernr - The Realizer to write.writer - The XmlWriter for the serialization.context - The current write context.
public void write(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
throws GraphMLWriteException
NodeRealizerSerializer
write in interface NodeRealizerSerializerGraphMLWriteExceptionnr - The Realizer to write.writer - The XmlWriter for the serialization.context - The current write context.
protected void writeNodePorts(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
throws GraphMLWriteException
NodePorts elements and its NodePort
child elements.
GraphMLWriteExceptionnr - The node realizer for which node port information is written.writer - The XML writer to use.context - The current write context.
protected void writeNodeLabel(NodeLabel label,
XmlWriter writer,
GraphMLWriteContext context)
throws GraphMLWriteException
NodeLabel element.
GraphMLWriteExceptionlabel - The label to write.writer - The XML writer to use.context - The current write context.
protected void writeFill(XmlWriter writer,
NodeRealizer nr)
Fill element.
writer - The writer to use.nr - The NodeRealizer whose fill is to be written.
public boolean canHandle(NodeRealizer nr,
GraphMLWriteContext context)
true iff nr.getClass() == getRealizerClass().
canHandle in interface NodeRealizerSerializernr - The realizer that may be written.context - The current write context.
true iff nr.getClass() == getRealizerClass().
public boolean canHandle(Node n,
GraphMLParseContext context)
true iff n.getNamespaceURI().equals(getNamespaceURI())
&& n.getLocalName().equals(getName()).
canHandle in interface NodeRealizerSerializern - The DOM node that may be parsed.context - The current parse context.
true iff n.getNamespaceURI().equals(getNamespaceURI())
&& n.getLocalName().equals(getName()).
public NodeRealizer createRealizerInstance(Node node,
GraphMLParseContext context)
throws GraphMLParseException
NodeRealizerSerializer
createRealizerInstance in interface NodeRealizerSerializerGraphMLParseExceptionnode - The DOM node that represents the realizer data.context - The current parse context.
public String getNamespacePrefix()
getNamespacePrefix in interface NodeRealizerSerializernull, meaning that a predeclared mapping should be used.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||