| 
 | 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.AbstractEdgeRealizerSerializer
public abstract class AbstractEdgeRealizerSerializer
Abstract base class for instances of
 EdgeRealizerSerializer.
 This class parses/writes basic properties of EdgeRealizers.
| Constructor Summary | |
|---|---|
| AbstractEdgeRealizerSerializer() | |
| Method Summary | |
|---|---|
|  boolean | canHandle(EdgeRealizer er,
          GraphMLWriteContext context)Returns trueiffer.getClass() == getRealizerClass(). | 
|  boolean | canHandle(org.w3c.dom.Node n,
          GraphMLParseContext context)Returns trueiffn.getNamespaceURI().equals(getNamespaceURI())
 && n.getLocalName().equals(getName()). | 
|  EdgeRealizer | createRealizerInstance(org.w3c.dom.Node node,
                       GraphMLParseContext context)Create new instance of the Realizer from the given information | 
|  java.lang.String | getNamespacePrefix()The namespace prefix to use for writing. | 
|  void | parse(EdgeRealizer er,
      org.w3c.dom.Node domNode,
      GraphMLParseContext context)Parses the properties from an instance of EdgeRealizer. | 
| protected  void | parseLabel(EdgeRealizer er,
           org.w3c.dom.Node n,
           GraphMLParseContext context)Parses a single EdgeLabelelement. | 
| protected  Port | parsePort(org.w3c.dom.Node domNode,
          GraphMLParseContext context)Parses a single SourcePortorTargetPortelement. | 
|  void | write(EdgeRealizer edgeRealizer,
      XmlWriter ps,
      GraphMLWriteContext context)Writes the realizer element's content. | 
|  void | writeAttributes(EdgeRealizer er,
                XmlWriter writer,
                GraphMLWriteContext context)Writes the attributes of an EdgeRealizer element. | 
| protected  void | writeEdgeLabel(EdgeLabel label,
               XmlWriter writer,
               GraphMLWriteContext context)Write a single EdgeLabelelement. | 
| protected  void | writePort(Port port,
          XmlWriter ps,
          GraphMLWriteContext context,
          boolean atSource)Write a single SourcePortorTargetPortelement. | 
| 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.EdgeRealizerSerializer | 
|---|
| getName, getNamespaceURI, getRealizerClass | 
| Constructor Detail | 
|---|
public AbstractEdgeRealizerSerializer()
| Method Detail | 
|---|
public void parse(EdgeRealizer er,
                  org.w3c.dom.Node domNode,
                  GraphMLParseContext context)
           throws GraphMLParseException
EdgeRealizer.
parse in interface EdgeRealizerSerializerer - An existing EdgeRealizer instance which is configured.domNode - The XML node containing the realizer data.context - The current parse context.
GraphMLParseException
protected void parseLabel(EdgeRealizer er,
                          org.w3c.dom.Node n,
                          GraphMLParseContext context)
                   throws GraphMLParseException
EdgeLabel element.
er - The EdgeRealizer that will own this label.n - The DOM node containing the label data.context - The current parse context.
GraphMLParseException
protected Port parsePort(org.w3c.dom.Node domNode,
                         GraphMLParseContext context)
                  throws GraphMLParseException
SourcePort or TargetPort element.
context - The current parse context.domNode - The DOM node containing the Port data.
GraphMLParseException
public void writeAttributes(EdgeRealizer er,
                            XmlWriter writer,
                            GraphMLWriteContext context)
EdgeRealizerSerializer
writeAttributes in interface EdgeRealizerSerializerer - The Realizer to write.writer - The XmlWriter for the serialization.context - The current write context.
public void write(EdgeRealizer edgeRealizer,
                  XmlWriter ps,
                  GraphMLWriteContext context)
           throws GraphMLWriteException
EdgeRealizerSerializer
write in interface EdgeRealizerSerializeredgeRealizer - The Realizer to write.ps - The XmlWriter for the serialization.context - The current write context.
GraphMLWriteException
protected void writeEdgeLabel(EdgeLabel label,
                              XmlWriter writer,
                              GraphMLWriteContext context)
                       throws GraphMLWriteException
EdgeLabel element.
context - The current parse context.writer - The XML writer to use.label - The label to write.
GraphMLWriteException
protected void writePort(Port port,
                         XmlWriter ps,
                         GraphMLWriteContext context,
                         boolean atSource)
SourcePort or TargetPort element.
context - The current parse context.ps - The XML writer to use.port - The port to write.atSource - true iff a SourcePort should be written.
public boolean canHandle(EdgeRealizer er,
                         GraphMLWriteContext context)
true iff er.getClass() == getRealizerClass().
canHandle in interface EdgeRealizerSerializerer - The Realizer that my be writtencontext - The current write context
true iff er.getClass() == getRealizerClass().
public boolean canHandle(org.w3c.dom.Node n,
                         GraphMLParseContext context)
true iff n.getNamespaceURI().equals(getNamespaceURI())
 && n.getLocalName().equals(getName()).
canHandle in interface EdgeRealizerSerializern - The DOM node that may be parsed.context - The current parse context.
true iff n.getNamespaceURI().equals(getNamespaceURI())
 && n.getLocalName().equals(getName()).
public EdgeRealizer createRealizerInstance(org.w3c.dom.Node node,
                                           GraphMLParseContext context)
                                    throws GraphMLParseException
EdgeRealizerSerializer
createRealizerInstance in interface EdgeRealizerSerializernode - The DOM node that represents the realizer data.context - The current parse context.
GraphMLParseExceptionpublic java.lang.String getNamespacePrefix()
getNamespacePrefix in interface EdgeRealizerSerializernull, meaning that a predeclared mapping should be used.| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||