Packagecom.yworks.io.graphml
Classpublic class JavaCompatGraphMLIOHandler
InheritanceJavaCompatGraphMLIOHandler Inheritance GraphMLIOHandler Inheritance flash.events.EventDispatcher

A GraphMLIOHandler that is preconfigured for compatiblity with yFiles Java.

Depending on the useJavaStyles constructor parameter, either specific style implementations for yFiles Java compatibility will be used where necessary, or the serialized realizer information will be mapped to default yFiles FLEX styles where this is possible. For best possible compatibility with the yFiles Java GraphML format, true should be passed to the constructor.

MXML SyntaxexpandedHide MXML Syntax
<yworks:RoundtripHandler id="roundTrip" graphCanvas="{graphCanvas}" serviceName="service"> <yworks:inputIOHandler> <yworks:JavaCompatGraphMLIOHandler useJavaStyles="true"/> </yworks:inputIOHandler> </yworks:RoundtripHandler>


Public Properties
 PropertyDefined By
 InheritedadjustFontSize : Boolean
Whether to adjust the font size when serializing / deserializing fonts.
GraphMLIOHandler
 InheritedclearGraphBeforeRead : Boolean
Whether to clear an existing graph instance before reading.
GraphMLIOHandler
 InheritedfontSizeFactor : Number
The factor to adjust the font size when serializing / deserializing fonts.
GraphMLIOHandler
 InheritedinputHandlerProvider : IInputHandlerProvider
Gets or sets an IInputHandlerProvider instance for dynamic input handler retrieval.
GraphMLIOHandler
 InheritedlocalViewMode : Boolean
Whether to read/write only the local view for folded graphs.
GraphMLIOHandler
  mapJavaLabelModels : Boolean
Whether to use a matching Label model when parsing graphml.
JavaCompatGraphMLIOHandler
 InheritedoutputHandlerProvider : IOutputHandlerProvider
Gets or sets an IOutputHandlerProvider instance for dynamic output handler retrieval.
GraphMLIOHandler
 InheritedparseErrorHandler : IGraphMLParseErrorHandler
An error handler that will be used to handle errors which occur during parsing.
GraphMLIOHandler
 InheritedreadLabels : Boolean
Whether labels should be deserialized.
GraphMLIOHandler
 InheritedreadMajorVersion : int
The major file format version for the input.
GraphMLIOHandler
 InheritedreadMinorVersion : int
The minor file format version for the input.
GraphMLIOHandler
 InheritedreadPortLocationModel : Boolean
Whether port location models should be deserialized.
GraphMLIOHandler
 InheritedreadRealizers : Boolean
Whether styles should be deserialized from realizers.
GraphMLIOHandler
 InheritedreadStyles : Boolean
Whether styles should be deserialized.
GraphMLIOHandler
 InheritedreadTables : Boolean
Whether to read tables.
GraphMLIOHandler
 InheritedrealizerSerializerManager : RealizerSerializerManager
[read-only] Get the RealizerSerializerManager instance used by this GraphMLIOHandler.
GraphMLIOHandler
 InheritedsupportUserTags : Boolean
Whether to support user tags at ModelItems automatically.
GraphMLIOHandler
 InheritedsupportZOrder : Boolean
Whether to support z-orders of IModelItems automatically.
GraphMLIOHandler
  useJavaStyles : Boolean
Whether to use style implementations that were created for compatibility with the yFiles Java realizers.
JavaCompatGraphMLIOHandler
 InheritedwriteLabels : Boolean
Whether labels should be serialized.
GraphMLIOHandler
 InheritedwriteMajorVersion : int
The major file format version for the output
GraphMLIOHandler
 InheritedwriteMinorVersion : int
The minor file format version for the output
GraphMLIOHandler
 InheritedwritePortLocationModel : Boolean
Whether port location models should be serialized.
GraphMLIOHandler
 InheritedwriteRealizers : Boolean
Whether styles should be serialized as realizers.
GraphMLIOHandler
 InheritedwriteSharedReferences : Boolean
Whether to support object sharing on output.
GraphMLIOHandler
 InheritedwriteStyles : Boolean
Whether styles should be serialized.
GraphMLIOHandler
 InheritedwriteTables : Boolean
Whether to write tables.
GraphMLIOHandler
Protected Properties
 PropertyDefined By
 Inherited_edgeOutputHandlers : List
The installed edge output handlers
GraphMLIOHandler
 Inherited_graphMLOutputHandlers : List
The installed graphml output handlers
GraphMLIOHandler
 Inherited_graphOutputHandlers : List
The installed graph output handlers
GraphMLIOHandler
 Inherited_inputHandlers : List
The installed input handlers
GraphMLIOHandler
 Inherited_namespaces : ArrayList
The installed namespaces
GraphMLIOHandler
 Inherited_nodeOutputHandlers : List
The installed node output handlers
GraphMLIOHandler
 Inherited_portOutputHandlers : List
The installed port output handlers
GraphMLIOHandler
Public Methods
 MethodDefined By
  
JavaCompatGraphMLIOHandler(useJavaStyles:Boolean = false)
Creates a new instance.
JavaCompatGraphMLIOHandler
 Inherited
addEdgeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type.
GraphMLIOHandler
 Inherited
addGraphAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type.
GraphMLIOHandler
 Inherited
Adds a input handler that can parse <data> blocks.
GraphMLIOHandler
 Inherited
addNamespace(ns:Namespace):void
Adds a namespace to the header of a GraphML file.
GraphMLIOHandler
 Inherited
addNodeAttribute(mapper:IMapper, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type.
GraphMLIOHandler
 Inherited
addOutputHandler(outputHandler:IOutputHandler, scope:String):void
Adds a subordinate output handler for the given element scope to this GraphMLIOHandler.
GraphMLIOHandler
 Inherited
addRegistryEdgeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with edge scope that holds data of simple type.
GraphMLIOHandler
 Inherited
addRegistryGraphAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with graph scope that holds data of simple type.
GraphMLIOHandler
 Inherited
addRegistryNodeAttribute(registryTag:Object, attrName:String, type:String = string):void
Adds a GraphML attribute with node scope that holds data of simple type.
GraphMLIOHandler
 Inherited
Returns an iterable view of all input handlers that have been registered with this instance.
GraphMLIOHandler
 Inherited
Returns an editable view on the registered output handlers for GraphML attributes with given scope that are registered with this GraphMLIOHandler.
GraphMLIOHandler
 Inherited
Returns an Iterable of all deserializers that have been registered with this instance.
GraphMLIOHandler
 Inherited
Returns an iterable view of all serializers that have been registered with this instance.
GraphMLIOHandler
 Inherited
read(graph:IGraph, xml:XML):void
populate the given graph with the graph defined in the given xml file.
GraphMLIOHandler
 Inherited
readURL(graph:IGraph, url:String):void
Populate the graph with the graph structure defined in a graph file located at the URL.
GraphMLIOHandler
 Inherited
Register a IDeserializer instance for reading custom information.
GraphMLIOHandler
 Inherited
Register a ISerializer instance for writing custom information.
GraphMLIOHandler
 Inherited
Removes an input handler.
GraphMLIOHandler
 Inherited
removeOutputHandler(outputHandler:IOutputHandler, scope:String):void
Removes an output handler that was added for the given scope.
GraphMLIOHandler
 Inherited
Unregister an IDeserializer instance that was previously registered.
GraphMLIOHandler
 Inherited
Unregister an ISerializer instance that was previously registered.
GraphMLIOHandler
 Inherited
write(graph:IGraph):XML
Write the given graph to a XML Object in GraphML format.
GraphMLIOHandler
Protected Methods
 MethodDefined By
 Inherited
Sets up all default IDeserializer instances on context.
GraphMLIOHandler
 Inherited
Sets up all input handlers for the provided parser instance.
GraphMLIOHandler
 Inherited
Configures context to use all registered serializers.
GraphMLIOHandler
 Inherited
Create the DirectGraphMLWriter instance that is used for writing GraphML output.
GraphMLIOHandler
 Inherited
Create a suitable instance of IGraphElementFactory that can handle the given graph
GraphMLIOHandler
 Inherited
Create an IGraphElementProvider instance that provides the graph elements that are to be written.
GraphMLIOHandler
 Inherited
Create the GraphMLParser instance that is used for writing GraphML output.
GraphMLIOHandler
  
[override] Callback method for the creation of a new read context.
JavaCompatGraphMLIOHandler
 Inherited
Callback method for the creation of a new write context.
GraphMLIOHandler
 Inherited
Create the IXmlWriter instance that is used for low-level XML writing.
GraphMLIOHandler
  
[override] Registers default data handlers for reading and writing style information in a yFiles Java compatible format.
JavaCompatGraphMLIOHandler
Events
 Event Summary Defined By
 InheritedDispatched when the io handler has finished parsing a graph.GraphMLIOHandler
 InheritedDispatched when readURL is used and a the server sends a HTTP status code.GraphMLIOHandler
 InheritedDispatched when readURL is used and an IO error occurs.GraphMLIOHandler
 InheritedDispatched when readURL is used and a security error occurs.GraphMLIOHandler
Property Detail
mapJavaLabelModelsproperty
mapJavaLabelModels:Boolean

Whether to use a matching Label model when parsing graphml.

If set to false all edge labels will get a FreeEdgeLabelModel parameter when a GraphML is read. This will guarantee that all labels will be placed at their exact position but the labels can be moved anywhere by the user if moving labels is allowed.

If set to true edge labels with the models center_slider, side_slider, six_pos, three_center, two_pos and centered will be created with a SliderEdgeLabelModel parameter when a GraphML is read. This will restrict moving labels to certain positions along the edge if moving labels is allowed / another layout with labeling is run. On the other hand it cannot be guaranteed that the labels will be placed at the exact position they had on Java side.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get mapJavaLabelModels():Boolean
    public function set mapJavaLabelModels(value:Boolean):void
useJavaStylesproperty 
useJavaStyles:Boolean

Whether to use style implementations that were created for compatibility with the yFiles Java realizers. If false is passed (the default), the serialized realizer information will be mapped to default yFiles FLEX styles where this is possible. Defaults to false for backwards compatibility.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get useJavaStyles():Boolean
    public function set useJavaStyles(value:Boolean):void
Constructor Detail
JavaCompatGraphMLIOHandler()Constructor
public function JavaCompatGraphMLIOHandler(useJavaStyles:Boolean = false)

Creates a new instance.

For best possible compatibility with the yFiles Java GraphML format, true should be passed to the constructor. This will ensure that special compatibility style implementations will be used. The useJavaStyles constructor parameter defaults to false for backwards compatiblity.

Parameters
useJavaStyles:Boolean (default = false) — whether to use style implementations that were created for compatibility with the yFiles Java realizers. If false is passed (the default), the serialized realizer information will be mapped to default yFiles FLEX styles where this is possible. Defaults to false for backwards compatibility.
Method Detail
createParseContext()method
override 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

Returns
GraphMLParseContext — A context that can be passed to the reader as the initial context
initializeHandlers()method 
override protected function initializeHandlers():void

Registers default data handlers for reading and writing style information in a yFiles Java compatible format.