Package | com.yworks.io.graphml |
Class | public class GraphMLIOHandler |
Inheritance | GraphMLIOHandler flash.events.EventDispatcher |
Implements | IOHandler |
Subclasses | DefaultGraphMLIOHandler, DotnetCompatGraphMLIOHandler, JavaCompatGraphMLIOHandler, LayoutGraphMLIOHandler |
Note that no additional input/output handlers are registered if an instances
of this class is created, i.e. no graphical properties of graph items will
be read or written by a "plain" instance that was not configured by adding
IInputHandler
s, IOuputHandler
s, IDeserialier
s
and/or IRealizerSerializers
.
Usually, a preconfigured GraphMLIOHandler
class should be used instead of this class.
Most yFiles FLEX applications can just use a com.yworks.remote.RoundtripHandler
instance
to read and write GraphML data. RoundtripHandler
will use preconfigured io handlers
for reading and writing.
As an alternative, DotnetCompatGraphMLIOHandler
or JavaCompatGraphmlIOHandler
can be used.
See the graphml primer at graphdrawing.org
See also
Property | Defined By | ||
---|---|---|---|
adjustFontSize : Boolean
Whether to adjust the font size when serializing / deserializing fonts. | GraphMLIOHandler | ||
clearGraphBeforeRead : Boolean
Whether to clear an existing graph instance before reading. | GraphMLIOHandler | ||
fontSizeFactor : Number
The factor to adjust the font size when serializing / deserializing fonts. | GraphMLIOHandler | ||
inputHandlerProvider : IInputHandlerProvider
Gets or sets an IInputHandlerProvider instance for dynamic input handler retrieval. | GraphMLIOHandler | ||
localViewMode : Boolean
Whether to read/write only the local view for folded graphs. | GraphMLIOHandler | ||
outputHandlerProvider : IOutputHandlerProvider
Gets or sets an IOutputHandlerProvider instance for dynamic output handler retrieval. | GraphMLIOHandler | ||
parseErrorHandler : IGraphMLParseErrorHandler
An error handler that will be used to handle errors which occur during parsing. | GraphMLIOHandler | ||
readLabels : Boolean
Whether labels should be deserialized. | GraphMLIOHandler | ||
readMajorVersion : int
The major file format version for the input. | GraphMLIOHandler | ||
readMinorVersion : int
The minor file format version for the input. | GraphMLIOHandler | ||
readPortLocationModel : Boolean
Whether port location models should be deserialized. | GraphMLIOHandler | ||
readRealizers : Boolean
Whether styles should be deserialized from realizers. | GraphMLIOHandler | ||
readStyles : Boolean
Whether styles should be deserialized. | GraphMLIOHandler | ||
readTables : Boolean
Whether to read tables. | GraphMLIOHandler | ||
realizerSerializerManager : RealizerSerializerManager [read-only]
Get the RealizerSerializerManager instance used by this
GraphMLIOHandler. | GraphMLIOHandler | ||
supportUserTags : Boolean
Whether to support user tags at ModelItems automatically. | GraphMLIOHandler | ||
supportZOrder : Boolean
Whether to support z-orders of IModelItems automatically. | GraphMLIOHandler | ||
writeLabels : Boolean
Whether labels should be serialized. | GraphMLIOHandler | ||
writeMajorVersion : int
The major file format version for the output
| GraphMLIOHandler | ||
writeMinorVersion : int
The minor file format version for the output
| GraphMLIOHandler | ||
writePortLocationModel : Boolean
Whether port location models should be serialized. | GraphMLIOHandler | ||
writeRealizers : Boolean
Whether styles should be serialized as realizers. | GraphMLIOHandler | ||
writeSharedReferences : Boolean
Whether to support object sharing on output. | GraphMLIOHandler | ||
writeStyles : Boolean
Whether styles should be serialized. | GraphMLIOHandler | ||
writeTables : Boolean
Whether to write tables. | GraphMLIOHandler |
Property | Defined By | ||
---|---|---|---|
_edgeOutputHandlers : List
The installed edge output handlers
| GraphMLIOHandler | ||
_graphMLOutputHandlers : List
The installed graphml output handlers
| GraphMLIOHandler | ||
_graphOutputHandlers : List
The installed graph output handlers
| GraphMLIOHandler | ||
_inputHandlers : List
The installed input handlers
| GraphMLIOHandler | ||
_namespaces : ArrayList
The installed namespaces
| GraphMLIOHandler | ||
_nodeOutputHandlers : List
The installed node output handlers
| GraphMLIOHandler | ||
_portOutputHandlers : List
The installed port output handlers
| GraphMLIOHandler |
Method | Defined By | ||
---|---|---|---|
Constructor. | GraphMLIOHandler | ||
addEdgeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type. | GraphMLIOHandler | ||
addGraphAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type. | GraphMLIOHandler | ||
addInputHandler(handler:IInputHandler):void
Adds a input handler that can parse <data> blocks. | GraphMLIOHandler | ||
addNamespace(ns:Namespace):void
Adds a namespace to the header of a GraphML file. | GraphMLIOHandler | ||
addNodeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type. | GraphMLIOHandler | ||
addOutputHandler(outputHandler:IOutputHandler, scope:String):void
Adds a subordinate output handler for the given
element scope to this GraphMLIOHandler. | GraphMLIOHandler | ||
addRegistryEdgeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type. | GraphMLIOHandler | ||
addRegistryGraphAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type. | GraphMLIOHandler | ||
addRegistryNodeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type. | GraphMLIOHandler | ||
Returns an iterable view of all input handlers that have been registered with this instance. | GraphMLIOHandler | ||
getOutputHandlers(scope:String):Collection
Returns an editable view on the registered output handlers for GraphML attributes with
given scope that are registered with this GraphMLIOHandler. | GraphMLIOHandler | ||
Returns an Iterable of all deserializers that have been registered with this instance. | GraphMLIOHandler | ||
Returns an iterable view of all serializers that have been registered with this instance. | GraphMLIOHandler | ||
populate the given graph with the graph defined in the given xml file. | GraphMLIOHandler | ||
Populate the graph with the graph structure defined
in a graph file located at the URL. | GraphMLIOHandler | ||
registerDeserializer(deserializer:IDeserializer):void
Register a IDeserializer instance for reading custom information. | GraphMLIOHandler | ||
registerSerializer(serializer:ISerializer):void
Register a ISerializer instance for writing custom information. | GraphMLIOHandler | ||
removeInputHandler(inputHandler:IInputHandler):void
Removes an input handler. | GraphMLIOHandler | ||
removeOutputHandler(outputHandler:IOutputHandler, scope:String):void
Removes an output handler that was added for the given scope. | GraphMLIOHandler | ||
unregisterDeserializer(deserializer:IDeserializer):void
Unregister an IDeserializer instance that was previously registered. | GraphMLIOHandler | ||
unregisterSerializer(serializer:ISerializer):void
Unregister an ISerializer instance that was previously registered. | GraphMLIOHandler | ||
Write the given graph to a XML Object in GraphML format. | GraphMLIOHandler |
Method | Defined By | ||
---|---|---|---|
configureDeserializers(context:GraphMLParseContext):void
Sets up all default IDeserializer instances on context. | GraphMLIOHandler | ||
configureInputHandlers(parser:GraphMLParser):void
Sets up all input handlers for the provided parser instance. | GraphMLIOHandler | ||
configureSerializers(context:GraphMLWriteContext):void
Configures context to use all registered serializers. | GraphMLIOHandler | ||
Create the DirectGraphMLWriter instance that is used for writing GraphML output. | GraphMLIOHandler | ||
Create a suitable instance of IGraphElementFactory that can handle the given graph
| GraphMLIOHandler | ||
Create an IGraphElementProvider instance that provides the graph elements that are to be written. | GraphMLIOHandler | ||
Create the GraphMLParser instance that is used for writing GraphML output. | GraphMLIOHandler | ||
Callback method for the creation of a new read context. | GraphMLIOHandler | ||
Callback method for the creation of a new write context. | GraphMLIOHandler | ||
Create the IXmlWriter instance that is used for low-level XML writing. | GraphMLIOHandler | ||
initializeHandlers():void
Callback for subclasses to register default data handlers. | GraphMLIOHandler |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the io handler has finished parsing a graph. | GraphMLIOHandler | |||
Dispatched when readURL is used and a the server sends a HTTP status code. | GraphMLIOHandler | |||
Dispatched when readURL is used and an IO error occurs. | GraphMLIOHandler | |||
Dispatched when readURL is used and a security error occurs. | GraphMLIOHandler |
_edgeOutputHandlers | property |
protected var _edgeOutputHandlers:List
The installed edge output handlers
_graphMLOutputHandlers | property |
protected var _graphMLOutputHandlers:List
The installed graphml output handlers
_graphOutputHandlers | property |
protected var _graphOutputHandlers:List
The installed graph output handlers
_inputHandlers | property |
protected var _inputHandlers:List
The installed input handlers
_namespaces | property |
protected var _namespaces:ArrayList
The installed namespaces
_nodeOutputHandlers | property |
protected var _nodeOutputHandlers:List
The installed node output handlers
_portOutputHandlers | property |
protected var _portOutputHandlers:List
The installed port output handlers
adjustFontSize | property |
adjustFontSize:Boolean
Whether to adjust the font size when serializing / deserializing fonts.
On reading the Font size will be multiplied by the factor specified by
fontSizeFactor
. On writing, the font will be divided by that factor.
This is necessary when deserializing a font from a .NET server, because .NET
interprets the font size as points (1/72 inch)
whereas Flex interprets the size as pixel (1/96 inch).
The default value is false
.
public function get adjustFontSize():Boolean
public function set adjustFontSize(value:Boolean):void
clearGraphBeforeRead | property |
clearGraphBeforeRead:Boolean
Whether to clear an existing graph instance before reading.
If set to true
, an existing graph instance will be cleared
before the graph is read into this instance, otherwise the loaded
graph will be merged into the existing one.
The default value is true
.
public function get clearGraphBeforeRead():Boolean
public function set clearGraphBeforeRead(value:Boolean):void
fontSizeFactor | property |
fontSizeFactor:Number
The factor to adjust the font size when serializing / deserializing fonts.
If adjustFontSize
is set to true
,
on reading the Font size will be multiplied by this factor. On writing,
the font will be divided by this factor.
This is necessary when deserializing a font from a .NET server, because .NET
interprets the font size as points (1/72 inch)
whereas Flex interprets the size as pixel (1/96 inch).
The default value is 0.75
.
public function get fontSizeFactor():Number
public function set fontSizeFactor(value:Number):void
inputHandlerProvider | property |
inputHandlerProvider:IInputHandlerProvider
Gets or sets an IInputHandlerProvider
instance for dynamic input handler retrieval.
public function get inputHandlerProvider():IInputHandlerProvider
public function set inputHandlerProvider(value:IInputHandlerProvider):void
See also
localViewMode | property |
localViewMode:Boolean
Whether to read/write only the local view for folded graphs.
If an IFoldedGraph
is found in the graph's lookup
,
the folded graph's master graph will be written instead, including all
view states. This behavior can be prevented by enabling localViewMode
.
In local view mode, only a single view is read/written to/from the
folded graph instance passed to the read/write method.
The default value is false
.
public function get localViewMode():Boolean
public function set localViewMode(value:Boolean):void
See also
outputHandlerProvider | property |
outputHandlerProvider:IOutputHandlerProvider
Gets or sets an IOutputHandlerProvider
instance for dynamic output handler retrieval.
public function get outputHandlerProvider():IOutputHandlerProvider
public function set outputHandlerProvider(value:IOutputHandlerProvider):void
See also
parseErrorHandler | property |
parseErrorHandler:IGraphMLParseErrorHandler
An error handler that will be used to handle errors which occur during parsing.
public function get parseErrorHandler():IGraphMLParseErrorHandler
public function set parseErrorHandler(value:IGraphMLParseErrorHandler):void
readLabels | property |
readLabels:Boolean
Whether labels should be deserialized.
The default value is true
.
public function get readLabels():Boolean
public function set readLabels(value:Boolean):void
readMajorVersion | property |
readMajorVersion:int
The major file format version for the input.
If this property is set, it forces the parser to read the specified major version format.
If the value of this property is null
(the default),
the version attribute of the graphml element in the parsed file
determines the major version.
The default value is -1
.
public function get readMajorVersion():int
public function set readMajorVersion(value:int):void
See also
readMinorVersion | property |
readMinorVersion:int
The minor file format version for the input.
If this property is set, it forces the parser to read the specified minor version format.
If the value of this property is null
(the default),
the version attribute of the graphml element in the parsed file
determines the minor version.
The default value is -1
.
public function get readMinorVersion():int
public function set readMinorVersion(value:int):void
See also
readPortLocationModel | property |
readPortLocationModel:Boolean
Whether port location models should be deserialized.
If true
, the read port location model takes precedence over a deserialized port layout when using
an AbstractRoundtripHandler
with readPortLayout
property set to true
.
The default value is false
.
public function get readPortLocationModel():Boolean
public function set readPortLocationModel(value:Boolean):void
See also
readRealizers | property |
readRealizers:Boolean
Whether styles should be deserialized from realizers.
The default value is false
.
public function get readRealizers():Boolean
public function set readRealizers(value:Boolean):void
readStyles | property |
readStyles:Boolean
Whether styles should be deserialized.
The default value is false
.
public function get readStyles():Boolean
public function set readStyles(value:Boolean):void
readTables | property |
readTables:Boolean
Whether to read tables.
If enabled new tables will be written to a mapper with the key
TableUtils.TABLE_MAPPER_ID
. It is up to the developer to transfer
the tables from that mapper to the correct table holder, e.g. a
TableNodeStyle
's table
.
GraphCanvasComponent.morphGraph()
does this automatically.
The default value is false
.
public function get readTables():Boolean
public function set readTables(value:Boolean):void
See also
realizerSerializerManager | property |
realizerSerializerManager:RealizerSerializerManager
[read-only]
Get the RealizerSerializerManager
instance used by this
GraphMLIOHandler
.
This allows to set/add/remove IRealizerSerializer
s for a specific handler instance.
public function get realizerSerializerManager():RealizerSerializerManager
supportUserTags | property |
supportUserTags:Boolean
Whether to support user tags at ModelItems automatically.
If enabled, user tag objects (which can be retrieved via the
ITagOwner
interface) are (de)serialized automatically if possible,
by means of associated GraphML (de)serializers.
The default value is false
.
public function get supportUserTags():Boolean
public function set supportUserTags(value:Boolean):void
supportZOrder | property |
supportZOrder:Boolean
Whether to support z-orders of IModelItems automatically.
If enabled, z-order values (which can be retrieved via the IZOrderSupport
interface)
are (de)serialized automatically if possible, by means of associated GraphML (de)serializers.
The default value is false
.
public function get supportZOrder():Boolean
public function set supportZOrder(value:Boolean):void
tagMapper | property |
writeLabels | property |
writeLabels:Boolean
Whether labels should be serialized.
The default value is true
.
public function get writeLabels():Boolean
public function set writeLabels(value:Boolean):void
writeMajorVersion | property |
writeMajorVersion:int
The major file format version for the output
The default value is com.yworks.io.graphml.GraphMLConstants#DEFAULT_FILE_VERSION_MAJOR
.
public function get writeMajorVersion():int
public function set writeMajorVersion(value:int):void
See also
writeMinorVersion | property |
writeMinorVersion:int
The minor file format version for the output
The default value is com.yworks.io.graphml.GraphMLConstants#DEFAULT_FILE_VERSION_MINOR
.
public function get writeMinorVersion():int
public function set writeMinorVersion(value:int):void
See also
writePortLocationModel | property |
writePortLocationModel:Boolean
Whether port location models should be serialized.
The default value is false
.
public function get writePortLocationModel():Boolean
public function set writePortLocationModel(value:Boolean):void
See also
writeRealizers | property |
writeRealizers:Boolean
Whether styles should be serialized as realizers.
The default value is false
.
public function get writeRealizers():Boolean
public function set writeRealizers(value:Boolean):void
writeSharedReferences | property |
writeSharedReferences:Boolean
Whether to support object sharing on output.
If enabled, multiple object references will be correctly represented in the output document, otherwise, each object reference will be serialized independently.
This property only applies to style serialization for the
yFiles FLEX/.NET GraphML extension. Therefore, it only affects
the GraphML output, if writeStyles
is set to
true
.
The default value is true
.
public function get writeSharedReferences():Boolean
public function set writeSharedReferences(value:Boolean):void
See also
writeStyles | property |
writeStyles:Boolean
Whether styles should be serialized.
The default value is false
.
public function get writeStyles():Boolean
public function set writeStyles(value:Boolean):void
writeTables | property |
writeTables:Boolean
Whether to write tables. If this property is enabled the tables are written as mapped attribute.
Tables which are part of a style (TableNodeStyle
) are serialized
together with that style if writeStyles
is enabled. Therefore,
enabling writeTables
is only necessary if writeStyles
is disabled.
Also, if this property is enabled and writeStyles
is enabled,
the table's styles are written, too. If writeStyles
is
disabled only the table's layout is written.
The default value is false
.
public function get writeTables():Boolean
public function set writeTables(value:Boolean):void
GraphMLIOHandler | () | Constructor |
public function GraphMLIOHandler()
Constructor. initializes the default style input handlers.
addEdgeAttribute | () | method |
public function addEdgeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type.
Parameters
mapper:IMapper — The mapper that is accessed by the output handler whenever actual data
for an edge is to be written to a GraphML file.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
addGraphAttribute | () | method |
public function addGraphAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type.
Parameters
mapper:IMapper — The mapper that is accessed by the output handler whenever actual data
for the graph is to be written to a GraphML file.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
addInputHandler | () | method |
public function addInputHandler(handler:IInputHandler):void
Adds a input handler that can parse <data> blocks.
The scope is determined by the for
attribute of the corresponding key node
Parameters
handler:IInputHandler — the input handler to add
|
addNamespace | () | method |
public function addNamespace(ns:Namespace):void
Adds a namespace to the header of a GraphML file.
Parameters
ns:Namespace — the namespace to add.
|
addNodeAttribute | () | method |
public function addNodeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type.
Parameters
mapper:IMapper — The mapper that is accessed by the output handler whenever actual data
for a node is to be written to a GraphML file.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
addOutputHandler | () | method |
public function addOutputHandler(outputHandler:IOutputHandler, scope:String):void
Adds a subordinate output handler for the given element scope to this GraphMLIOHandler.
Parameters
outputHandler:IOutputHandler — the output handler to be added.
| |
scope:String — Scope specifier. one of GraphMLConstants.SCOPE_GRAPH , GraphMLConstants.SCOPE_NODE ,
or GraphMLConstants.SCOPE_EDGE .
|
addRegistryEdgeAttribute | () | method |
public function addRegistryEdgeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type.
Parameters
registryTag:Object — The tag that is used to retrieve the mapper instance from the graph's mapper registry.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
addRegistryGraphAttribute | () | method |
public function addRegistryGraphAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type.
Parameters
registryTag:Object — The tag that is used to retrieve the mapper instance from the graph's mapper registry.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
addRegistryNodeAttribute | () | method |
public function addRegistryNodeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type.
Parameters
registryTag:Object — The tag that is used to retrieve the mapper instance from the graph's mapper registry.
| |
attrName:String — The name that is used inside the GraphML file with the XML attr.name
attribute of the GraphML <key> element.
| |
type:String (default = string ) — The attr.type of the attribute.
|
configureDeserializers | () | method |
protected function configureDeserializers(context:GraphMLParseContext):void
Sets up all default IDeserializer
instances on context
.
Parameters
context:GraphMLParseContext — The parse context that should be configured.
|
configureInputHandlers | () | method |
protected function configureInputHandlers(parser:GraphMLParser):void
Sets up all input handlers for the provided parser instance.
This implementation just assigns the IInputHandlerProvider
instance
set in the inputHandlerProvider
property to corresponding
inputHandlerProvider
property of the parser.
Parameters
parser:GraphMLParser — The parser that should be configured.
|
configureSerializers | () | method |
protected function configureSerializers(context:GraphMLWriteContext):void
Configures context
to use all registered serializers.
This implementation just registers all serializers that have been registered with registerDefaultSerializers()
in a ISerializerRegistry
instance present in context
.
Parameters
context:GraphMLWriteContext — The context to configure.
|
createDirectGraphMLWriter | () | method |
protected function createDirectGraphMLWriter(graph:IGraph):DirectGraphMLWriter
Create the DirectGraphMLWriter
instance that is used for writing GraphML output.
This method also creates the initial write context for the writer by calling createWriteContext
Parameters
graph:IGraph — The graph to create the writer for
|
DirectGraphMLWriter — the newly created writer.
|
See also
createGraphElementFactory | () | method |
protected function createGraphElementFactory(graph:IGraph):IGraphItemFactory
Create a suitable instance of IGraphElementFactory
that can handle the given graph
Parameters
graph:IGraph — The graph that should be filled by this instance
|
IGraphItemFactory — A suitable instance of IGraphElementFactory that can handle the given graph
|
createGraphElementProvider | () | method |
protected function createGraphElementProvider(graph:IGraph):IGraphElementProvider
Create an IGraphElementProvider
instance that provides the graph elements that are to be written.
Parameters
graph:IGraph — The graph instance to provide elements from.
|
IGraphElementProvider — The newly created graph element provider
|
createGraphMLParser | () | method |
protected function createGraphMLParser(graph:IGraph):GraphMLParser
Create the GraphMLParser
instance that is used for writing GraphML output.
This method also creates the initial parse context for the parser by calling createParseContext
Parameters
graph:IGraph — The graph that is to be filled by the parser
|
GraphMLParser — the newly created GraphMLParser
|
See also
createParseContext | () | method |
protected function createParseContext(parser:GraphMLParser, graph:IGraph):GraphMLParseContext
Callback method for the creation of a new read context.
This method is called by createGraphMLParser
Parameters
parser:GraphMLParser — The reader to create the read context for.
| |
graph:IGraph — The graph that is to be read by the reader
|
GraphMLParseContext — A context that can be passed to the reader as the initial context
|
See also
createWriteContext | () | method |
protected function createWriteContext(writer:DirectGraphMLWriter, graph:IGraph):GraphMLWriteContext
Callback method for the creation of a new write context.
This method is called by createDirectGraphMLWriter
Parameters
writer:DirectGraphMLWriter — The writer to create the write context for.
| |
graph:IGraph — The graph that is to be written by the writer
|
GraphMLWriteContext — A context that can be passed to the core writer as initial context
|
See also
createXmlWriter | () | method |
protected function createXmlWriter():IXmlWriter
Create the IXmlWriter
instance that is used for low-level XML writing.
IXmlWriter — The newly created IXmlWriter instance.
|
getInputHandlers | () | method |
public function getInputHandlers():Iterable
Returns an iterable view of all input handlers that have been registered with this instance.
ReturnsIterable — An Iterable of the registered input handlers.
|
getOutputHandlers | () | method |
public function getOutputHandlers(scope:String):Collection
Returns an editable view on the registered output handlers for GraphML attributes with given scope that are registered with this GraphMLIOHandler. Output handlers can be added or removed from the returned collection.
Parameters
scope:String — Scope specifier. one of GraphMLConstants.SCOPE_GRAPH , GraphMLConstants.SCOPE_NODE ,
or GraphMLConstants.SCOPE_EDGE .
|
Collection —
All registered subordinate output handlers for GraphML attributes with given scope.
|
getRegisteredDeserializers | () | method |
public function getRegisteredDeserializers():Iterable
Returns an Iterable of all deserializers that have been registered with this instance.
ReturnsIterable — An Iterable of the registered deserializers.
|
getRegisteredSerializers | () | method |
public function getRegisteredSerializers():Iterable
Returns an iterable view of all serializers that have been registered with this instance.
ReturnsIterable — An Iterable of the registered serilaizers.
|
initializeHandlers | () | method |
protected function initializeHandlers():void
Callback for subclasses to register default data handlers. This implementation doesn't register any handlers.
read | () | method |
public function read(graph:IGraph, xml:XML):void
populate the given graph
with the graph defined in the given xml
file.
Parameters
graph:IGraph — The graph to populate.
| |
xml:XML — The graphml file as a xml object.
|
readURL | () | method |
public function readURL(graph:IGraph, url:String):void
Populate the graph
with the graph structure defined
in a graph file located at the URL
.
Parameters
graph:IGraph — the graph to fill.
| |
url:String — An URL where a graph file is located.
|
registerDeserializer | () | method |
public function registerDeserializer(deserializer:IDeserializer):void
Register a IDeserializer
instance for reading custom information.
Parameters
deserializer:IDeserializer — The deserializer to register.
|
registerSerializer | () | method |
public function registerSerializer(serializer:ISerializer):void
Register a ISerializer
instance for writing custom information.
Parameters
serializer:ISerializer — The serializer to register.
|
removeInputHandler | () | method |
public function removeInputHandler(inputHandler:IInputHandler):void
Removes an input handler.
Parameters
inputHandler:IInputHandler — A previously added input handler that is to be removed.
|
removeOutputHandler | () | method |
public function removeOutputHandler(outputHandler:IOutputHandler, scope:String):void
Removes an output handler that was added for the given scope.
Parameters
outputHandler:IOutputHandler — The output handler to be removed.
| |
scope:String — Scope specifier. one of GraphMLConstants.SCOPE_GRAPH , GraphMLConstants.SCOPE_NODE ,
or GraphMLConstants.SCOPE_EDGE .
|
unregisterDeserializer | () | method |
public function unregisterDeserializer(deserializer:IDeserializer):void
Unregister an IDeserializer
instance that was previously registered.
Parameters
deserializer:IDeserializer — The deserializer to be deregistered.
|
unregisterSerializer | () | method |
public function unregisterSerializer(serializer:ISerializer):void
Unregister an ISerializer
instance that was previously registered.
Parameters
serializer:ISerializer — The serializer to be deregistered.
|
write | () | method |
public function write(graph:IGraph):XML
Write the given graph to a XML Object in GraphML format.
The exact output depends on the output handlers registered with this instance and on the
readRealizers,writeRealizers,readStyles and writeStyles
flags.
Parameters
graph:IGraph — The graph to be written.
|
XML — A XML object containing the GraphML output.
|
See also
graphChanged | Event |
com.yworks.graph.model.GraphEvent
com.yworks.graph.model.GraphEvent.GRAPH_CHANGED
Dispatched when the io handler has finished parsing a graph. The GraphEvent kind is set to GraphEventKind.UPDATE.
TheGraphEvent.GRAPH_CHANGED
constant defines the value of the
type
property of the event object for a graphChanged
event.
httpStatus | Event |
flash.events.HTTPStatusEvent
flash.events.HTTPStatusEvent.HTTP_STATUS
Dispatched when readURL
is used and a the server sends a HTTP status code.
ioError | Event |
flash.events.IOErrorEvent
flash.events.IOErrorEvent.IO_ERROR
Dispatched when readURL
is used and an IO error occurs.
securityError | Event |
flash.events.SecurityErrorEvent
flash.events.SecurityErrorEvent.SECURITY_ERROR
Dispatched when readURL
is used and a security error occurs.