treebolic.provider.gxl
Class GxlParser

java.lang.Object
  extended by treebolic.provider.gxl.GxlParser

public class GxlParser
extends java.lang.Object

GXL parser

Author:
Bernard Bou

Constructor Summary
GxlParser()
           
 
Method Summary
private static java.util.List<MenuItem> allocate(java.util.List<MenuItem> thisList, int i)
          Allocate
private static org.w3c.dom.Element getFirstElementByTagName(org.w3c.dom.Element thisElement, java.lang.String thisTagName)
          Find DOM element with given tag
private static org.w3c.dom.Element getFirstLevel1ElementByTagName(org.w3c.dom.Element thisElement, java.lang.String thisTagName)
          Find DOM element with given tag among first level children
private static java.util.List<org.w3c.dom.Element> getLevel1ChildElementsByTagName(org.w3c.dom.Element thisElement, java.lang.String thisTagName)
          Find DOM elements with given tag among first level children
static Model parseModel(java.net.URL thisUrl)
          Parse model
private static Settings parseSettings(org.w3c.dom.Document thisDocument)
          Parse
private static Tree parseTree(org.w3c.dom.Document thisDocument)
          Parse tree
static Tree parseTree(java.net.URL thisUrl)
          Parse tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GxlParser

public GxlParser()
Method Detail

parseModel

public static Model parseModel(java.net.URL thisUrl)
Parse model

Returns:
model if successful

parseTree

public static Tree parseTree(java.net.URL thisUrl)
Parse tree

Returns:
tree if successful

parseTree

private static Tree parseTree(org.w3c.dom.Document thisDocument)
Parse tree

Returns:
tree if successful

parseSettings

private static Settings parseSettings(org.w3c.dom.Document thisDocument)
Parse

Returns:
graph if successful

allocate

private static java.util.List<MenuItem> allocate(java.util.List<MenuItem> thisList,
                                                 int i)
Allocate

Parameters:
thisList - menu item list
i - index
Returns:
same list with ith slot having an allocated menu item

getFirstElementByTagName

private static org.w3c.dom.Element getFirstElementByTagName(org.w3c.dom.Element thisElement,
                                                            java.lang.String thisTagName)
Find DOM element with given tag

Parameters:
thisElement - starting DOM element
thisTagName - tag
Returns:
DOM element if found, null if none

getFirstLevel1ElementByTagName

private static org.w3c.dom.Element getFirstLevel1ElementByTagName(org.w3c.dom.Element thisElement,
                                                                  java.lang.String thisTagName)
Find DOM element with given tag among first level children

Parameters:
thisElement - starting DOM element
thisTagName - tag
Returns:
DOM element if found, null if none

getLevel1ChildElementsByTagName

private static java.util.List<org.w3c.dom.Element> getLevel1ChildElementsByTagName(org.w3c.dom.Element thisElement,
                                                                                   java.lang.String thisTagName)
Find DOM elements with given tag among first level children

Parameters:
thisElement - starting DOM element
thisTagName - tag
Returns:
DOM element if found, null if none