tico.board.encoding
Class TAttributeEncoder

java.lang.Object
  extended by tico.board.encoding.TAttributeEncoder

public class TAttributeEncoder
extends java.lang.Object

Static class which implements functions to encode and decode attibute maps to XML.

Version:
1.0 Nov 20, 2006
Author:
Pablo Mu�oz

Constructor Summary
TAttributeEncoder()
           
 
Method Summary
static java.lang.String[] getFilePaths(org.w3c.dom.Document doc)
          Returns all the file paths that appears in a XML document.
static org.jgraph.graph.AttributeMap XMLDecode(org.w3c.dom.Element element)
          Returns an attributeMap object from the data contained in the XML Element.
static org.w3c.dom.Node XMLEncode(org.jgraph.graph.AttributeMap map, org.w3c.dom.Document doc)
          Generates an XML Element that contains the attributeMap data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TAttributeEncoder

public TAttributeEncoder()
Method Detail

XMLEncode

public static org.w3c.dom.Node XMLEncode(org.jgraph.graph.AttributeMap map,
                                         org.w3c.dom.Document doc)
Generates an XML Element that contains the attributeMap data.

Parameters:
map - The attributeMap to encode
doc - The Document that represents the entire XML document
Returns:
The XML Element generated

XMLDecode

public static org.jgraph.graph.AttributeMap XMLDecode(org.w3c.dom.Element element)
                                               throws InvalidFormatException
Returns an attributeMap object from the data contained in the XML Element.

Parameters:
element - The XML Element that contains the attributeMap data
Returns:
The generated attributeMap
Throws:
InvalidFormatException - If Element has an invalid format

getFilePaths

public static java.lang.String[] getFilePaths(org.w3c.dom.Document doc)
Returns all the file paths that appears in a XML document.

Parameters:
doc - The XML document
Returns:
A vector with all the file paths that apear in doc