|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.output.AbstractSerializer
public abstract class AbstractSerializer
Convenience base class for implementations of SerializationHandler
Constructor Summary | |
---|---|
AbstractSerializer()
|
Method Summary | |
---|---|
abstract boolean |
canHandle(SerializationEvent e)
Predicate member method to determine whether this instance should react to a given SerializationEvent . |
void |
onHandleSerialization(SerializationEvent event)
Listen to a serialization event. |
abstract void |
serializeItem(java.lang.Object item,
XmlWriter writer,
GraphMLWriteContext context)
Actually perform the serialization for the given arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSerializer()
Method Detail |
---|
public void onHandleSerialization(SerializationEvent event) throws GraphMLWriteException
canHandle(SerializationEvent)
returns true
for the supplied event argument, in which case it calls serializeItem(Object, XmlWriter,GraphMLWriteContext)
and
sets SerializationEvent.setHandled(boolean)
to true
.
canHandle(SerializationEvent)
returns false
, no action is performed.
onHandleSerialization
in interface SerializationHandler
event
- The event to handle
GraphMLWriteException
- if something went wrong in the serialization process.public abstract void serializeItem(java.lang.Object item, XmlWriter writer, GraphMLWriteContext context) throws GraphMLWriteException
onHandleSerialization(SerializationEvent)
if canHandle(SerializationEvent)
returns true
.
item
- The item to serialize.writer
- The writer for the output.context
- The current write context.
GraphMLWriteException
public abstract boolean canHandle(SerializationEvent e)
SerializationEvent
.
e
- The event data.
true
iff this instance should handle the event.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |