yext.graphml.graph2D
Class GenericEdgeRealizerSerializer

java.lang.Object
  extended byyext.graphml.graph2D.AbstractEdgeRealizerSerializer
      extended byyext.graphml.graph2D.GenericEdgeRealizerSerializer
All Implemented Interfaces:
EdgeRealizerSerializer

public class GenericEdgeRealizerSerializer
extends AbstractEdgeRealizerSerializer

Serializer for instances of GenericEdgeRealizer.


Constructor Summary
GenericEdgeRealizerSerializer()
           
 
Method Summary
 boolean canHandle(Node n, GraphMLParseContext context)
          Default implementation.
 String getName()
          Returns the name of the XML element tag which denotes this type of realizer.
 String getNamespaceURI()
          Returns the target namespace of the toplevel element
protected  ObjectStringConverter getObjectStringConverter()
          Gets the ObjectStringConverter that will be used by this instance to convert the GenericNodeRealizer.getUserData() to strings for serialization.
 Class getRealizerClass()
          Returns the class of which the realizer is an instance of.
 void parse(EdgeRealizer realizer, Node domNode, GraphMLParseContext context)
          Parses the properties from an instance of EdgeRealizer.
protected  void parseUserData(GenericEdgeRealizer ger, Node domNode, GraphMLParseContext context)
          Parses the userdata section of this realizer and assigns the user data object.
 void write(EdgeRealizer realizer, XmlWriter ipw, GraphMLWriteContext context)
          Writes the properties from an instance of EdgeRealizer.
 void writeAttributes(EdgeRealizer realizer, XmlWriter writer, GraphMLWriteContext context)
          Writes out the selection state if requested.
protected  void writeUserData(GenericEdgeRealizer ger, XmlWriter writer, GraphMLWriteContext context)
          Writes the userdata section of this realizer and assigns the user data object.
 
Methods inherited from class yext.graphml.graph2D.AbstractEdgeRealizerSerializer
canHandle, createRealizerInstance, getNamespacePrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericEdgeRealizerSerializer

public GenericEdgeRealizerSerializer()
Method Detail

getName

public String getName()
Description copied from interface: EdgeRealizerSerializer
Returns the name of the XML element tag which denotes this type of realizer.


getNamespaceURI

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

Returns:
the target namespace of the toplevel element

getRealizerClass

public Class getRealizerClass()
Description copied from interface: EdgeRealizerSerializer
Returns the class of which the realizer is an instance of.


writeAttributes

public void writeAttributes(EdgeRealizer realizer,
                            XmlWriter writer,
                            GraphMLWriteContext context)
Description copied from class: AbstractEdgeRealizerSerializer
Writes out the selection state if requested.

Specified by:
writeAttributes in interface EdgeRealizerSerializer
Overrides:
writeAttributes in class AbstractEdgeRealizerSerializer

write

public void write(EdgeRealizer realizer,
                  XmlWriter ipw,
                  GraphMLWriteContext context)
Description copied from class: AbstractEdgeRealizerSerializer
Writes the properties from an instance of EdgeRealizer.

Specified by:
write in interface EdgeRealizerSerializer
Overrides:
write in class AbstractEdgeRealizerSerializer

canHandle

public boolean canHandle(Node n,
                         GraphMLParseContext context)
Description copied from class: AbstractEdgeRealizerSerializer
Default implementation.

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

writeUserData

protected void writeUserData(GenericEdgeRealizer ger,
                             XmlWriter writer,
                             GraphMLWriteContext context)
Writes the userdata section of this realizer and assigns the user data object.


getObjectStringConverter

protected ObjectStringConverter getObjectStringConverter()
Gets the ObjectStringConverter that will be used by this instance to convert the GenericNodeRealizer.getUserData() to strings for serialization.

Returns:
The value of ObjectStringConversion.getInstance().

parse

public void parse(EdgeRealizer realizer,
                  Node domNode,
                  GraphMLParseContext context)
Description copied from class: AbstractEdgeRealizerSerializer
Parses the properties from an instance of EdgeRealizer.

Specified by:
parse in interface EdgeRealizerSerializer
Overrides:
parse in class AbstractEdgeRealizerSerializer

parseUserData

protected void parseUserData(GenericEdgeRealizer ger,
                             Node domNode,
                             GraphMLParseContext context)
Parses the userdata section of this realizer and assigns the user data object.



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