|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.graphml.graph2d.AbstractNodeRealizerSerializer
y.io.graphml.graph2d.GenericNodeRealizerSerializer
y.io.graphml.graph2d.GenericGroupNodeRealizerSerializer
y.io.graphml.graph2d.TableGroupNodeRealizerSerializer
public class TableGroupNodeRealizerSerializer
Serializer for instances of TableGroupNodeRealizer.
As special feature, this serializer optionally uses lenient label parsing.
That means all GraphMLParseExceptions and RuntimeExceptions
thrown during the parsing of label data are caught and ignored.
isLenientLabelParsingEnabled()
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class y.io.graphml.graph2d.GenericNodeRealizerSerializer |
|---|
GenericNodeRealizerSerializer.ConfigurationFactory |
| Constructor Summary | |
|---|---|
TableGroupNodeRealizerSerializer()
Initializes a new TableGroupNodeRealizerSerializer
for strict label parsing. |
|
TableGroupNodeRealizerSerializer(boolean lenientLabelParsing)
Initializes a new TableGroupNodeRealizerSerializer. |
|
| Method Summary | |
|---|---|
String |
getName()
Returns the name of the XML element tag which denotes this type of realizer. |
Class |
getRealizerClass()
Returns the class of which the realizer is an instance of. |
boolean |
isLenientLabelParsingEnabled()
Determines whether this serializer uses lenient or strict label parsing. |
void |
parse(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
Parses the properties into an instance of NodeRealizer. |
protected void |
parseColumn(TableGroupNodeRealizer.Column column,
Node domNode,
GraphMLParseContext context)
Parses a single Column element storing geometric and
structural information for the specified column. |
protected void |
parseLabel(NodeRealizer realizer,
Node domNode,
GraphMLParseContext context)
Parses a single NodeLabel element. |
protected void |
parseRow(TableGroupNodeRealizer.Row row,
Node domNode,
GraphMLParseContext context)
Parses a single Row element storing geometric and
structural information for the specified row. |
void |
parseTable(TableGroupNodeRealizer realizer,
Node domNode,
GraphMLParseContext context)
Parses the Table element storing the tabular information
for the specified realizer. |
void |
write(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
Writes the realizer element's content. |
protected void |
writeColumn(TableGroupNodeRealizer.Column column,
XmlWriter writer,
GraphMLWriteContext context)
Writes nested Column elements as appropriate for the
specified column. |
protected void |
writeNodeLabel(NodeLabel label,
XmlWriter writer,
GraphMLWriteContext context)
Writes a single NodeLabel element. |
protected void |
writeRow(TableGroupNodeRealizer.Row row,
XmlWriter writer,
GraphMLWriteContext context)
Writes nested Row elements as appropriate for the
specified row. |
protected void |
writeTable(TableGroupNodeRealizer realizer,
XmlWriter writer,
GraphMLWriteContext context)
Writes a single Table element storing the tabular information
associated to the specified realizer including default settings for
(minimum) column width and (minimum) row height. |
| Methods inherited from class y.io.graphml.graph2d.GenericNodeRealizerSerializer |
|---|
getNamespaceURI, getObjectStringConverter, parseStyleProperties, parseUserData, writeAttributes, writeStyleProperties, writeUserData |
| Methods inherited from class y.io.graphml.graph2d.AbstractNodeRealizerSerializer |
|---|
canHandle, canHandle, createRealizerInstance, getNamespacePrefix, parseNodePorts, writeFill, writeNodePorts |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableGroupNodeRealizerSerializer()
TableGroupNodeRealizerSerializer
for strict label parsing. Invoking this constructor is equivalent to
new TableGroupNodeRealizerSerializer(false)
public TableGroupNodeRealizerSerializer(boolean lenientLabelParsing)
TableGroupNodeRealizerSerializer.
lenientLabelParsing - if true, fault-tolerant
label parsing is enabled; otherwise strict label parsing is used.| Method Detail |
|---|
public boolean isLenientLabelParsingEnabled()
GraphMLParseExceptions and
RuntimeExceptions thrown during the parsing of label data are
caught and ignored.
true if label parsing is lenient; false
otherwise.public String getName()
NodeRealizerSerializer
getName in interface NodeRealizerSerializergetName in class GenericGroupNodeRealizerSerializerpublic Class getRealizerClass()
NodeRealizerSerializer
getRealizerClass in interface NodeRealizerSerializergetRealizerClass in class GenericGroupNodeRealizerSerializer
public void write(NodeRealizer nr,
XmlWriter writer,
GraphMLWriteContext context)
throws GraphMLWriteException
NodeRealizerSerializer
write in interface NodeRealizerSerializerwrite in class GenericGroupNodeRealizerSerializerGraphMLWriteExceptionnr - The Realizer to write.writer - The XmlWriter for the serialization.context - The current write context.
protected void writeTable(TableGroupNodeRealizer realizer,
XmlWriter writer,
GraphMLWriteContext context)
Table element storing the tabular information
associated to the specified realizer including default settings for
(minimum) column width and (minimum) row height.
realizer - the TableGroupNodeRealize whose tabular data
is serialized.writer - the target XmlWriter.context - the current GraphMLWriteContext.
protected void writeColumn(TableGroupNodeRealizer.Column column,
XmlWriter writer,
GraphMLWriteContext context)
Column elements as appropriate for the
specified column. The root Column element stores the column's
geometric data.
column - the Column instance to be serialized.writer - the target XmlWriter.context - the current GraphMLWriteContext.
protected void writeRow(TableGroupNodeRealizer.Row row,
XmlWriter writer,
GraphMLWriteContext context)
Row elements as appropriate for the
specified row. The root Row element stores the row's
geometric data.
row - the Row instance to be serialized.writer - the target XmlWriter.context - the current GraphMLWriteContext.
protected void writeNodeLabel(NodeLabel label,
XmlWriter writer,
GraphMLWriteContext context)
throws GraphMLWriteException
NodeLabel element.
Overwritten to support
TableGroupNodeRealizer.ColumnNodeLabelModel and
TableGroupNodeRealizer.RowNodeLabelModel.
writeNodeLabel in class AbstractNodeRealizerSerializerGraphMLWriteExceptionlabel - the NodeLabel to write.writer - the target XmlWriter.context - the current GraphMLWriteContext.
public void parse(NodeRealizer nr,
Node domNode,
GraphMLParseContext context)
throws GraphMLParseException
NodeRealizerSerializerNodeRealizer.
parse in interface NodeRealizerSerializerparse in class GenericGroupNodeRealizerSerializerGraphMLParseExceptionnr - An existing NodeRealizer instance which is configured.domNode - The XML node containing the realizer data.context - The current parse context.
public void parseTable(TableGroupNodeRealizer realizer,
Node domNode,
GraphMLParseContext context)
Table element storing the tabular information
for the specified realizer.
realizer - the TableGroupNodeRealizer whose tabular
information is deserialized.domNode - the XML node containing the table data.context - the current GraphMLParseContext.
protected void parseColumn(TableGroupNodeRealizer.Column column,
Node domNode,
GraphMLParseContext context)
Column element storing geometric and
structural information for the specified column.
column - the Column instance to store the deserialized
data.domNode - the XML node containing the column data.context - the current GraphMLParseContext.
protected void parseRow(TableGroupNodeRealizer.Row row,
Node domNode,
GraphMLParseContext context)
Row element storing geometric and
structural information for the specified row.
row - the Row instance to store the deserialized data.domNode - the XML node containing the row data.context - the current GraphMLParseContext.
protected void parseLabel(NodeRealizer realizer,
Node domNode,
GraphMLParseContext context)
throws GraphMLParseException
NodeLabel element.
Overwritten to support
TableGroupNodeRealizer.ColumnNodeLabelModel and
TableGroupNodeRealizer.RowNodeLabelModel.
parseLabel in class AbstractNodeRealizerSerializerGraphMLParseExceptionrealizer - the realizer that will hold the created label.domNode - the XML node containing the label data.context - the current GraphMLParseContext.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||