FileDocCategorySizeDatePackage
XMLNode.javaAPI DocGlassfish v2 API5307Fri May 04 22:31:40 BST 2007com.sun.enterprise.deployment.node

XMLNode

public interface XMLNode
This interface defines the protocol associated with all the nodes. An XML node is responsible for reading the XML file into a object representation
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
public voidaddDescriptor(java.lang.Object descriptor)
Add a new descriptor to the current descriptor associated with this node. This method is usually called by sub XMLNodes (Returned by getHandlerFor) to add the result of their parsing to the main descriptor.

param
descriptor the new descriptor to be added to the current descriptor.

public voidaddPrefixMapping(java.lang.String prefix, java.lang.String uri)
notify of a new prefix mapping used from this node

public booleanendElement(XMLElement element)
notification of the end of an XML element in the source XML file.

param
element the XML element type name
return
true if this node is done with the processing of elements in the processing

public java.lang.ObjectgetDescriptor()

return
the Descriptor subclass that was populated by reading the source XML file

public com.sun.enterprise.deployment.node.XMLNodegetHandlerFor(XMLElement element)
Return the XMLNode implementation respionsible for handling the sub-element of the current node

param
element the XML element type name
return
XMLNode implementation responsible for handling the XML tag

public com.sun.enterprise.deployment.node.XMLNodegetParentNode()

return
the parent node for this XMLNode

public java.lang.StringgetXMLPath()

return
the XMLPath for the element name this node is handling. The XML path can be a absolute or a relative XMLPath.

public booleanhandlesElement(XMLElement element)
Return true if the XMLNode is responisble for handling the XML element

param
element the XML element type name
return
true if the node processes this element name

public java.lang.StringresolvePrefix(XMLElement element, java.lang.String prefix)
Resolve a QName prefix to its corresponding Namespace URI by searching up node chain starting with the child.

public voidsetElementValue(XMLElement element, java.lang.String value)
sets the value of an XML element

param
element the XML element type name
param
value the element value

public voidstartElement(XMLElement element, org.xml.sax.Attributes attributes)
notification of the start of an XML element tag in the processed XML source file.

param
element the XML element type name
param
attributes the specified or defaultted attritutes

public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, com.sun.enterprise.deployment.Descriptor descriptor)
write the descriptor to an JAXP DOM node and return it

param
parent node in the DOM tree
param
descriptor the descriptor to be written
return
the JAXP DOM node for this descriptor