This class is responsible for doing the actual parsing of an XML
document following the layout.dtd. It produces a
LayoutElement tree with a
LayoutDefinition object at the root of the tree.
Constructor.
Parameters: url - A URL pointing to the LayoutDefinition Parameters: entityResolver - EntityResolver to use, may be (null) Parameters: errorHandler - ErrorHandler to use, may be (null) Parameters: baseURI - The base URI passed to DocumentBuilder.parse()
This method takes the given HANDLER_DEFINITION_ELEMENT node and
reads the ID_ATTRIBUTE, CLASS_NAME_ATTRIBUTE, and
METHOD_NAME_ATTRIBUTE attributes. It then instantiates a new
HandlerDefinition object.
Next it looks to see if the HandlerDefinition has child inputDef,
outputDef, and/or nested handler elements. If so it processes
them.
Parameters: node - The HANDLER_DEFINITION_ELEMENT node to extractinformation from when creating the HandlerDefinition. The newly created HandlerDefinition.
This method returns a Map of all attributes for the given Node. Each
attribute name will be stored in the map in lower case so case can be
ignored.
Parameters: node - The node to pull attributes from. Map of attributes found on the given node.
This method returns a List of all child Elements below the given Node.
Parameters: node - The node to pull child elements from. List of child elements found below the given node.
This method returns a List of all child Elements below the given
Node matching the given name. If name equals null, all Elements
below this node will be returned.
Parameters: node - The node to pull child elements from. Parameters: name - The name of the Elements to return. List of child elements found below the given node matchingthe name (if provided).
This utility method returns the requested component type. If it is
not found, it throws an IllegalArgumentException.
Parameters: elt - A LayoutElement whose root is LayoutDefinition Parameters: type - The String type to lookup the ComponentType
This method returns the String representation of all the
Node.TEXT_NODE nodes that are children of the given Node.
Parameters: node - The node to pull child elements from. The String representation of all the Node.TEXT_NODE type nodesunder the given node.
The read method opens the given URL and parses the XML document
that it points to. It then walks the DOM and populates a
LayoutDefinition structure, which is returned.