yext.graphml.graph2D
Class AbstractEdgeRealizerSerializer

java.lang.Object
  extended byyext.graphml.graph2D.AbstractEdgeRealizerSerializer
All Implemented Interfaces:
EdgeRealizerSerializer
Direct Known Subclasses:
ArcEdgeRealizerSerializer, BezierEdgeRealizerSerializer, GenericEdgeRealizerSerializer, PolyLineEdgeRealizerSerializer, QuadCurveEdgeRealizerSerializer, SplineEdgeRealizerSerializer

public abstract class AbstractEdgeRealizerSerializer
extends Object
implements EdgeRealizerSerializer

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)
          Default implementation.
 boolean canHandle(Node n, GraphMLParseContext context)
          Default implementation.
 EdgeRealizer createRealizerInstance(Node node, GraphMLParseContext context)
          Create new instance of the Realizer from the given information
 String getNamespacePrefix()
          Returns the namespace prefix of the toplevel element
 void parse(EdgeRealizer er, Node domNode, GraphMLParseContext context)
          Parses the properties from an instance of EdgeRealizer.
 void write(EdgeRealizer edgeRealizer, XmlWriter ps, GraphMLWriteContext context)
          Writes the properties from an instance of EdgeRealizer.
 void writeAttributes(EdgeRealizer er, XmlWriter writer, GraphMLWriteContext context)
          Writes out the selection state if requested.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface yext.graphml.graph2D.EdgeRealizerSerializer
getName, getNamespaceURI, getRealizerClass
 

Constructor Detail

AbstractEdgeRealizerSerializer

public AbstractEdgeRealizerSerializer()
Method Detail

parse

public void parse(EdgeRealizer er,
                  Node domNode,
                  GraphMLParseContext context)
Parses the properties from an instance of EdgeRealizer.

Specified by:
parse in interface EdgeRealizerSerializer

writeAttributes

public void writeAttributes(EdgeRealizer er,
                            XmlWriter writer,
                            GraphMLWriteContext context)
Writes out the selection state if requested.

Specified by:
writeAttributes in interface EdgeRealizerSerializer

write

public void write(EdgeRealizer edgeRealizer,
                  XmlWriter ps,
                  GraphMLWriteContext context)
Writes the properties from an instance of EdgeRealizer.

Specified by:
write in interface EdgeRealizerSerializer

canHandle

public boolean canHandle(EdgeRealizer er,
                         GraphMLWriteContext context)
Default implementation.

Specified by:
canHandle in interface EdgeRealizerSerializer
Parameters:
er -
context -
Returns:
true iff er.getClass() == getRealizerClass().

canHandle

public boolean canHandle(Node n,
                         GraphMLParseContext context)
Default implementation.

Specified by:
canHandle in interface EdgeRealizerSerializer
Parameters:
n -
context -
Returns:
true iff n.getNamespaceURI().equals(getNamespaceURI()) && n.getLocalName().equals(getName()).

createRealizerInstance

public EdgeRealizer createRealizerInstance(Node node,
                                           GraphMLParseContext context)
                                    throws GraphMLParseException
Description copied from interface: EdgeRealizerSerializer
Create new instance of the Realizer from the given information

Specified by:
createRealizerInstance in interface EdgeRealizerSerializer
Parameters:
node -
context -
Returns:
new instance of the Realizer
Throws:
GraphMLParseException

getNamespacePrefix

public String getNamespacePrefix()
Description copied from interface: EdgeRealizerSerializer
Returns the namespace prefix of the toplevel element

Specified by:
getNamespacePrefix in interface EdgeRealizerSerializer
Returns:
the namespace prefix of the toplevel element


Copyright ©2000-2008, yWorks GmbH. All rights reserved.