Search this API

y.io.graphml.graph2d
Interface NodeRealizerSerializer

All Known Implementing Classes:
AbstractNodeRealizerSerializer, FallbackNodeRealizerSerializer, GenericGroupNodeRealizerSerializer, GenericNodeRealizerSerializer, GroupNodeRealizerSerializer, ImageNodeRealizerSerializer, ProxyAutoBoundsNodeRealizerSerializer, ProxyShapeNodeRealizerSerializer, ShapeNodeRealizerSerializer, TableGroupNodeRealizerSerializer

public interface NodeRealizerSerializer

Interface for serializing instances of NodeRealizer.

 
Your browser does not support SVG content.

Method Summary
 boolean canHandle(org.w3c.dom.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(org.w3c.dom.Node node, GraphMLParseContext context)
          Create new instance of the Realizer from the given information
 java.lang.String getName()
          Returns the name of the XML element tag which denotes this type of realizer.
 java.lang.String getNamespacePrefix()
          Returns the namespace prefix of the toplevel element
 java.lang.String getNamespaceURI()
          Returns the target namespace of the toplevel element
 java.lang.Class getRealizerClass()
          Returns the class of which the realizer is an instance of.
 void parse(NodeRealizer realizer, org.w3c.dom.Node node, GraphMLParseContext context)
          Parses the properties into an instance of NodeRealizer.
 void write(NodeRealizer realizer, XmlWriter writer, GraphMLWriteContext context)
          Writes the realizer element's content.
 void writeAttributes(NodeRealizer realizer, XmlWriter writer, GraphMLWriteContext context)
          Writes the attributes of an NodeRealizer element.
 

Method Detail

getName

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

Returns:
The name of the XML element

getNamespaceURI

java.lang.String getNamespaceURI()
Returns the target namespace of the toplevel element

Returns:
the target namespace of the toplevel element

getNamespacePrefix

java.lang.String getNamespacePrefix()
Returns the namespace prefix of the toplevel element

Returns:
the namespace prefix of the toplevel element

getRealizerClass

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

Returns:
The target class of the realizer

parse

void parse(NodeRealizer realizer,
           org.w3c.dom.Node node,
           GraphMLParseContext context)
           throws GraphMLParseException
Parses the properties into an instance of NodeRealizer.

Parameters:
realizer - An existing NodeRealizer instance which is configured.
node - The XML node containing the realizer data.
context - The current parse context.
Throws:
GraphMLParseException

write

void write(NodeRealizer realizer,
           XmlWriter writer,
           GraphMLWriteContext context)
           throws GraphMLWriteException
Writes the realizer element's content.

Parameters:
realizer - The Realizer to write.
writer - The XmlWriter for the serialization.
context - The current write context.
Throws:
GraphMLWriteException

writeAttributes

void writeAttributes(NodeRealizer realizer,
                     XmlWriter writer,
                     GraphMLWriteContext context)
Writes the attributes of an NodeRealizer element.

Parameters:
realizer - The Realizer to write.
writer - The XmlWriter for the serialization.
context - The current write context.

canHandle

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

Parameters:
nr - The realizer to write
context - The current write context.
Returns:
true iff this instance can serialize nr in the context of context

canHandle

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

Parameters:
n - The DOM node that represents the realizer data.
context - The current parse context.
Returns:
true iff this instance can deserialize n in the context of context

createRealizerInstance

NodeRealizer createRealizerInstance(org.w3c.dom.Node node,
                                    GraphMLParseContext context)
                                    throws DeserializationNotSupportedException,
                                           GraphMLParseException
Create new instance of the Realizer from the given information

Parameters:
node - The DOM node that represents the realizer data.
context - The current parse context.
Returns:
new instance of the Realizer
Throws:
DeserializationNotSupportedException
GraphMLParseException

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