Search this API

y.io.graphml.layout
Class AbstractNodeLayoutSerializer

java.lang.Object
  extended by y.io.graphml.layout.AbstractNodeLayoutSerializer
All Implemented Interfaces:
java.util.EventListener, DeserializationHandler, SerializationHandler

public abstract class AbstractNodeLayoutSerializer
extends java.lang.Object
implements DeserializationHandler, SerializationHandler

Reads and writes node layout information from/to GraphML.

 

Constructor Summary
protected AbstractNodeLayoutSerializer()
          Initializes a new AbstractNodeLayoutSerializer instance.
 
Method Summary
abstract  java.lang.String getName()
          Returns the name of the XML element tag which denotes this type of realizer.
abstract  java.lang.String getNamespacePrefix()
          Returns the namespace prefix of the toplevel element
abstract  java.lang.String getNamespaceURI()
          Returns the target namespace of the toplevel element
 void onHandleDeserialization(DeserializationEvent event)
          Reads node layout information for deserialization events that request results of type NodeLayout.
 void onHandleSerialization(SerializationEvent event)
          Writes node layout information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNodeLayoutSerializer

protected AbstractNodeLayoutSerializer()
Initializes a new AbstractNodeLayoutSerializer instance.

Method Detail

getName

public abstract 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

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

Returns:
the target namespace of the toplevel element

getNamespacePrefix

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

Returns:
the namespace prefix of the toplevel element

onHandleDeserialization

public void onHandleDeserialization(DeserializationEvent event)
                             throws GraphMLParseException
Reads node layout information for deserialization events that request results of type NodeLayout.

Specified by:
onHandleDeserialization in interface DeserializationHandler
Parameters:
event - contains all data that is needed for deserialization.
Throws:
GraphMLParseException - if a problem occurs during deserialization.

onHandleSerialization

public void onHandleSerialization(SerializationEvent event)
                           throws GraphMLWriteException
Writes node layout information.

Specified by:
onHandleSerialization in interface SerializationHandler
Parameters:
event - contains all data that is needed for serialization.
Throws:
GraphMLWriteException - if a problem during serialization occurs.

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