Search this API

y.io.gml
Class EdgeRealizerObjectEncoder

java.lang.Object
  extended by y.io.gml.EdgeRealizerObjectEncoder
All Implemented Interfaces:
ObjectEncoder

public class EdgeRealizerObjectEncoder
extends java.lang.Object
implements ObjectEncoder

This class is capable of encoding an Edge's EdgeRealizer in valid gml format. It is used by GMLIOHandler.

 

Constructor Summary
EdgeRealizerObjectEncoder()
           
 
Method Summary
 void encode(java.lang.Object item, GMLEncoder enc)
          This method will try to encode the given object using the GMLEncoder
static java.lang.String encodeArcType(byte arcType)
          Encodes the arc type of an ArcEdgeRealizer to one of the GML values fixedHeight or fixedRatio.
static java.lang.String encodeArrowType(Arrow a)
          Encodes an arrow type to one of the GML values delta, standard, diamond, short, white_delta, white_diamond, none.
static java.lang.String encodeLineStyle(byte lineStyle)
          Encodes a line-style constant to one of the GML values line, dashed or dotted.
protected  java.lang.String encodeType(java.lang.String qualifiedName)
          Returns the external form of the given qualified class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeRealizerObjectEncoder

public EdgeRealizerObjectEncoder()
Method Detail

encode

public void encode(java.lang.Object item,
                   GMLEncoder enc)
            throws java.io.IOException
Description copied from interface: ObjectEncoder
This method will try to encode the given object using the GMLEncoder

Specified by:
encode in interface ObjectEncoder
Parameters:
item - the object to be encoded
enc - an encoder
Throws:
java.io.IOException - in the case of an I/O exception

encodeType

protected java.lang.String encodeType(java.lang.String qualifiedName)
Returns the external form of the given qualified class name.

By default, this method delegates to YGFIOHandler.encode(String).

Note: To prevent obfuscation from breaking user data and style property serialization, an explicit class name encoding should be specified for user data types and style property value types.

See Also:
YGFIOHandler.addEncoding(String, String), EdgeGraphicsParser.decodeType(String)

encodeArcType

public static java.lang.String encodeArcType(byte arcType)
Encodes the arc type of an ArcEdgeRealizer to one of the GML values fixedHeight or fixedRatio.


encodeArrowType

public static java.lang.String encodeArrowType(Arrow a)
Encodes an arrow type to one of the GML values delta, standard, diamond, short, white_delta, white_diamond, none.


encodeLineStyle

public static java.lang.String encodeLineStyle(byte lineStyle)
Encodes a line-style constant to one of the GML values line, dashed or dotted.


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.