| java.lang.Object com.jgraph.codecplugin.JGraphpadGXLCodec
JGraphpadGXLCodec | public class JGraphpadGXLCodec (Code) | | GXL Codec.
|
Method Summary | |
protected static Map | createDefaultAttributes(Map map) Returns an attributeMap for the specified position and color. | public static void | decode(InputStream inputStream, GraphLayoutCache cache, Object vertexPrototype, Object edgePrototype) Decodes a GXL File. | protected static void | decodeCell(Node gnode, Map gnode_attrs) | protected static void | decodeEdge(Node enode, Map enode_attrs) Decodes a Edge. | public static String | encode(JGraph graph) Create a GXL-representation for all the cells.
Parameters: graph - JGraph to encode. | public static String | encode(JGraph graph, Object[] cells) Create a GXL-representation for the specified cells.
Parameters: graph - JGraph to encode. Parameters: cells - Selected cells to be encoded. | protected static String | encodeAttribute(String values, String attributeName, int level) Attribute encoding.
Parameters: values - Values of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeBean(Object bean, String attributeName, int level) Bean encoding. | protected static String | encodeBoolean(boolean value, String attributeName, int level) Boolean encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeColor(Color color, String attributeName, int level) Color encoding.
Parameters: color - Color of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeEdge(JGraph graph, Object id, Object edge) Encode a Edge of a graph
Parameters: graph - Graph containing the edge. Parameters: id - Id of the vertex. Parameters: edge - Edge to be encoded. | protected static String | encodeFont(Font font, String attributeName, int level) Font encoding.
Parameters: font - Font of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeInteger(int value, String attributeName, int level) Integer encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeRectangle(Rectangle2D rec, String attributeName, int level) Rectangle encoding.
Parameters: rec - Rectangle to be encoded. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeString(String value, String attributeName, int level) String encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. | protected static String | encodeValue(String type, String value, int level) Basic value encoding.
Parameters: type - GXL Type of the value (int, bool, ...) Parameters: value - Value to be encoded. Parameters: level - Tab level. | protected static String | encodeValue(int value, int level) Basic integer encoding.
Parameters: value - Value to be encoded. Parameters: level - Tab level. | protected static String | encodeValue(String value, int level) Basic String encoding.
Parameters: value - Value to be encoded. Parameters: level - Tab level. | protected static String | encodeVertex(JGraph graph, String id, Object vertex) Encode a Vertex of a graph
Parameters: graph - Graph containing the vertex. Parameters: id - Id of the vertex. Parameters: vertex - Vertex to be encoded. | protected static String | getLabel(Node node) | public static Hashtable | getLastDecodingHashtable() Retrieves the decoding Hashtable with the node's Id. | public static Hashtable | getLastEncodingHashtable() Retrieves the encoding Hashtable with the node's Id. | public static boolean | getValidateDTD() | protected static void | readGXLAttributeValues(Node enode, LinkedList values) Reads the values of an GXL Attribute.
Parameters: enode - Node to read. Parameters: values - List to populate : with 2 dimension String arrys. | public static void | setValidateDTD(boolean validate) |
createDefaultAttributes | protected static Map createDefaultAttributes(Map map)(Code) | | Returns an attributeMap for the specified position and color.
|
decode | public static void decode(InputStream inputStream, GraphLayoutCache cache, Object vertexPrototype, Object edgePrototype) throws Exception(Code) | | Decodes a GXL File.
Parameters: inputStream - Stream to be decoded. Parameters: cache - GraphLayoutCache where the decode file is inserted. |
decodeCell | protected static void decodeCell(Node gnode, Map gnode_attrs)(Code) | | Extracts visual properties of the node from the child 'view' element
Currently recognized properties: - Bounds - color - background-color -
autosize - Font - Line-End, Line-size, Line-color
|
decodeEdge | protected static void decodeEdge(Node enode, Map enode_attrs)(Code) | | Decodes a Edge.
Parameters: enode - XML Node. Parameters: enode_attrs - Cell Attributes. |
encode | public static String encode(JGraph graph)(Code) | | Create a GXL-representation for all the cells.
Parameters: graph - JGraph to encode. Encoded string. |
encode | public static String encode(JGraph graph, Object[] cells)(Code) | | Create a GXL-representation for the specified cells.
Parameters: graph - JGraph to encode. Parameters: cells - Selected cells to be encoded. Encoded string. |
encodeAttribute | protected static String encodeAttribute(String values, String attributeName, int level)(Code) | | Attribute encoding.
Parameters: values - Values of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeBean | protected static String encodeBean(Object bean, String attributeName, int level)(Code) | | Bean encoding. This is usefull to encode the userObject in the Vertex. It
must be a bean with a beanInfo class in order to inspect it.
Parameters: bean - Bean to be encoded. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeBoolean | protected static String encodeBoolean(boolean value, String attributeName, int level)(Code) | | Boolean encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeColor | protected static String encodeColor(Color color, String attributeName, int level)(Code) | | Color encoding.
Parameters: color - Color of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeEdge | protected static String encodeEdge(JGraph graph, Object id, Object edge)(Code) | | Encode a Edge of a graph
Parameters: graph - Graph containing the edge. Parameters: id - Id of the vertex. Parameters: edge - Edge to be encoded. Encoded string. |
encodeFont | protected static String encodeFont(Font font, String attributeName, int level)(Code) | | Font encoding.
Parameters: font - Font of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeInteger | protected static String encodeInteger(int value, String attributeName, int level)(Code) | | Integer encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeRectangle | protected static String encodeRectangle(Rectangle2D rec, String attributeName, int level)(Code) | | Rectangle encoding.
Parameters: rec - Rectangle to be encoded. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeString | protected static String encodeString(String value, String attributeName, int level)(Code) | | String encoding.
Parameters: value - Value of the attribute. Parameters: attributeName - name of the attribute. Parameters: level - Tab level. Encoded string. |
encodeValue | protected static String encodeValue(String type, String value, int level)(Code) | | Basic value encoding.
Parameters: type - GXL Type of the value (int, bool, ...) Parameters: value - Value to be encoded. Parameters: level - Tab level. Encoded string. |
encodeValue | protected static String encodeValue(int value, int level)(Code) | | Basic integer encoding.
Parameters: value - Value to be encoded. Parameters: level - Tab level. Encoded string. |
encodeValue | protected static String encodeValue(String value, int level)(Code) | | Basic String encoding.
Parameters: value - Value to be encoded. Parameters: level - Tab level. Encoded string. |
encodeVertex | protected static String encodeVertex(JGraph graph, String id, Object vertex)(Code) | | Encode a Vertex of a graph
Parameters: graph - Graph containing the vertex. Parameters: id - Id of the vertex. Parameters: vertex - Vertex to be encoded. Encoded string. |
getLastDecodingHashtable | public static Hashtable getLastDecodingHashtable()(Code) | | Retrieves the decoding Hashtable with the node's Id.
It may be usefull to sirialize the values of the nodes.
Hastable with elements : ((key : node), (value : GXL id)). |
getLastEncodingHashtable | public static Hashtable getLastEncodingHashtable()(Code) | | Retrieves the encoding Hashtable with the node's Id.
It may be usefull to sirialize the values of the nodes.
Hastable with elements : ((key : node), (value : GXL id)). |
getValidateDTD | public static boolean getValidateDTD()(Code) | | Getter for the property validateDTD
|
readGXLAttributeValues | protected static void readGXLAttributeValues(Node enode, LinkedList values)(Code) | | Reads the values of an GXL Attribute.
Parameters: enode - Node to read. Parameters: values - List to populate : with 2 dimension String arrys. return[0] :type of value return[1] : value |
setValidateDTD | public static void setValidateDTD(boolean validate)(Code) | | Setter for the property validateDTD
Parameters: validate - True, the validation will occur. |
|
|