yext.graphml.graph2D
Interface NodeRealizerSerializer

All Known Implementing Classes:
AbstractNodeRealizerSerializer

public interface NodeRealizerSerializer

Interface for serializing instances of NodeRealizer.


Method Summary
 boolean canHandle(Node n, GraphMLParseContext context)
          Return whether this instance can deserialize the content of n in the given context.
 boolean canHandle(NodeRealizer nr, GraphMLWriteContext context)
          Return whether this instance can serialize the NodeRealizer nr in the given context.
 NodeRealizer createRealizerInstance(Node node, GraphMLParseContext context)
          Create new instance of the Realizer from the given information
 String getName()
          Returns the name of the XML element tag which denotes this type of realizer.
 String getNamespacePrefix()
          Returns the namespace prefix of the toplevel element
 String getNamespaceURI()
          Returns the target namespace of the toplevel element
 Class getRealizerClass()
          Returns the class of which the realizer is an instance of.
 void parse(NodeRealizer realizer, Node node, GraphMLParseContext context)
          Parses the realizer from a given DOM node.
 void write(NodeRealizer realizer, XmlWriter writer, GraphMLWriteContext context)
          Writes the realizer.
 void writeAttributes(NodeRealizer realizer, XmlWriter writer, GraphMLWriteContext context)
          Writes the attributes of the top level xml element representing the realizer.
 

Method Detail

getName

public String getName()
Returns the name of the XML element tag which denotes this type of realizer.


getNamespaceURI

public String getNamespaceURI()
Returns the target namespace of the toplevel element

Returns:
the target namespace of the toplevel element

getNamespacePrefix

public String getNamespacePrefix()
Returns the namespace prefix of the toplevel element

Returns:
the namespace prefix of the toplevel element

getRealizerClass

public Class getRealizerClass()
Returns the class of which the realizer is an instance of.


parse

public void parse(NodeRealizer realizer,
                  Node node,
                  GraphMLParseContext context)
Parses the realizer from a given DOM node.


write

public void write(NodeRealizer realizer,
                  XmlWriter writer,
                  GraphMLWriteContext context)
Writes the realizer.


writeAttributes

public void writeAttributes(NodeRealizer realizer,
                            XmlWriter writer,
                            GraphMLWriteContext context)
Writes the attributes of the top level xml element representing the realizer.


canHandle

public boolean canHandle(NodeRealizer nr,
                         GraphMLWriteContext context)
Return whether this instance can serialize the NodeRealizer nr in the given context.

Parameters:
nr -
context -
Returns:
true iff this instance can serialize nr in the context of context

canHandle

public boolean canHandle(Node n,
                         GraphMLParseContext context)
Return whether this instance can deserialize the content of n in the given context.

Parameters:
n -
context -
Returns:
true iff this instance can deserialize n in the context of context

createRealizerInstance

public NodeRealizer createRealizerInstance(Node node,
                                           GraphMLParseContext context)
                                    throws GraphMLParseException
Create new instance of the Realizer from the given information

Parameters:
node -
context -
Returns:
new instance of the Realizer
Throws:
GraphMLParseException


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