|
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.input.AbstractInputHandler y.io.graphml.graph2d.AbstractReadNodePortHandler
public abstract class AbstractReadNodePortHandler
Abstract input handler for NodePort
data attributes in GraphML.
Constructor Summary | |
---|---|
protected |
AbstractReadNodePortHandler()
|
Method Summary | |
---|---|
boolean |
acceptKey(org.w3c.dom.Element keyDefinition)
|
void |
applyDefault(GraphMLParseContext context)
This method is invoked when no data tag is defined, and the default value should be applied. |
protected abstract java.lang.String |
getKey()
Returns the data type key that identifies the data that is read by this handler. |
protected java.lang.Object |
parseDataCore(GraphMLParseContext context,
org.w3c.dom.Node node)
Abstract method callback that actually parses the data. |
protected abstract void |
readPort(NodePort port,
org.w3c.dom.Node node,
GraphMLParseContext context)
Deserializes port data for the specified port from the given XML node. |
protected void |
setValue(GraphMLParseContext context,
java.lang.Object key,
java.lang.Object data)
Abstract method callback that actually stores the value with the keys. |
Methods inherited from class y.io.graphml.input.AbstractInputHandler |
---|
getDefaultValue, getPrecedence, getValidScopes, initializeFromKeyDefinition, isDefaultExists, isParseDefaultValue, parseData, setDefaultExists, setDefaultValue, setParseDefaultValue, setPrecedence, setValidScopes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractReadNodePortHandler()
Method Detail |
---|
public boolean acceptKey(org.w3c.dom.Element keyDefinition)
protected abstract java.lang.String getKey()
protected java.lang.Object parseDataCore(GraphMLParseContext context, org.w3c.dom.Node node) throws GraphMLParseException
AbstractInputHandler
parseDataCore
in class AbstractInputHandler
context
- The context.node
- The node that contains the data. This is either the GraphML data
element or the
default
element.
GraphMLParseException
protected void setValue(GraphMLParseContext context, java.lang.Object key, java.lang.Object data) throws GraphMLParseException
AbstractInputHandler
setValue
in class AbstractInputHandler
context
- The context.key
- The key.data
- The data.
GraphMLParseException
public void applyDefault(GraphMLParseContext context) throws GraphMLParseException
AbstractInputHandler
This implementation delegates to
AbstractInputHandler.setValue(GraphMLParseContext, Object, Object)
.
if AbstractInputHandler.isDefaultExists()
applyDefault
in interface InputHandler
applyDefault
in class AbstractInputHandler
context
- the current parse context.
GraphMLParseException
protected abstract void readPort(NodePort port, org.w3c.dom.Node node, GraphMLParseContext context) throws GraphMLParseException
port
- the port instance whose data has to be deserialized.node
- XML node providing the data to deserialize.context
- miscellaneous context information.
GraphMLParseException
- if the port data could not be deserialized.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |