com.sun.enterprise.deployment.node
Interface XMLNode<T>

All Known Subinterfaces:
RootXMLNode<T>
All Known Implementing Classes:
AbsoluteOrderingNode, ActivationConfigNode, ActivationConfigNode, ActivationSpecNode, AddressingNode, AdminObjectNode, AppClientNode, AppClientRuntimeNode, ApplicationNode, ApplicationRuntimeNode, AroundInvokeNode, AroundTimeoutNode, AuthConstraintNode, AuthMechNode, BeanCacheNode, BeanPoolNode, BundleNode, CacheHelperNode, CacheMappingNode, CacheNode, CheckpointAtEndOfMethodNode, ClassLoaderNode, CmpFieldNode, CmpNode, CmpResourceNode, ConcurrentMethodNode, ConfigPropertyNode, ConfigurableNode, ConnectionDefNode, ConnectorNode, ConnectorNode, ConstraintFieldNode, ContainerTransactionNode, CookieConfigNode, CookiePropertiesNode, DataSourceDefinitionNode, DataSourcePropertyNode, DefaultResourcePrincipalNode, DefaultResourcePrincipalNode, DeploymentDescriptorNode, DeploymentExtensionNode, DisplayableComponentNode, EjbApplicationExceptionNode, EjbBundleNode, EjbBundleRuntimeNode, EjbEntityNode, EjbInitNode, EjbInterceptorNode, EjbLocalReferenceNode, EjbNode, EjbNode, EjbReferenceNode, EjbRefNode, EjbRefNode, EjbRelationNode, EjbRelationshipRoleNode, EjbRemoveNode, EjbSessionNode, EntityManagerFactoryReferenceNode, EntityManagerReferenceNode, EntrepriseBeansRuntimeNode, EnvEntryNode, ErrorPageNode, ExcludeListNode, ExtensionElementNode, FilterMappingNode, FilterNode, FinderNode, FlushAtEndOfMethodNode, GFAppClientRuntimeNode, GFApplicationRuntimeNode, GFEjbBundleRuntimeNode, GFWebBundleRuntimeNode, GroupNode, IconNode, IdempotentUrlPatternNode, InBoundRANode, InitParamNode, InjectionTargetNode, InterceptorBindingNode, InterfaceBasedEjbNode, IORConfigurationNode, JavaWebStartAccessNode, JaxrpcMappingDescriptorNode, JspConfigNode, JspGroupNode, LicenseNode, LifecycleCallbackNode, ListenerNode, LocaleCharsetInfoNode, LocaleCharsetMapNode, LocaleEncodingMappingListNode, LocaleEncodingMappingNode, LocalizedInfoNode, LocalizedNode, LoginConfigNode, MailConfigurationNode, MapElementNode, MDBConnectionFactoryNode, MDBResourceAdapterNode, MessageDestinationNode, MessageDestinationRefNode, MessageDestinationRefNode, MessageDestinationRuntimeNode, MessageDrivenBeanNode, MessageListenerNode, MessageNode, MessageSecurityBindingNode, MessageSecurityNode, MethodNode, MethodPermissionNode, MimeMappingNode, ModuleNode, MultipartConfigNode, NameValuePairNode, OrderingNode, OrderingOrderingNode, OutBoundRANode, PersistenceNode, PersistenceUnitNode, PMDescriptorNode, PMDescriptorsNode, PMInUseNode, PrefetchDisabledNode, PrincipalNameNode, PrincipalNode, PrincipalNode, PropertiesNode, ProtectionNode, QueryNode, RANode, RelationshipsNode, ReliabilityConfigNode, RequiredConfigNode, ResourceAdapterNode, ResourceEnvRefNode, ResourceEnvRefNode, ResourceEnvRefNode, ResourceRefNode, ResourceRefNode, ResourceRefNode, RespectBindingNode, RoleMapNode, RunAsNode, RuntimeBundleNode, RuntimeDescriptorNode, RuntimeNameValuePairNode, ScheduledTimerNode, SecurityConstraintNode, SecurityIdentityNode, SecurityPermissionNode, SecurityRoleMappingNode, SecurityRoleNode, SecurityRoleRefNode, ServiceReferenceNode, ServiceRefNode, ServiceRefPortInfoRuntimeNode, ServletMappingNode, ServletNode, ServletNode, SessionConfigNode, SessionConfigNode, SessionManagerNode, TagLibNode, TimeoutValueNode, UserDataConstraintNode, ValveNode, WebBundleNode, WebBundleRuntimeNode, WebCacheNode, WebCommonNode, WebFragmentNode, WebPropertyContainerNode, WebPropertyNode, WebResourceCollectionNode, WebRuntimeNode, WebServiceEndpointNode, WebServiceEndpointRuntimeNode, WebServiceHandlerChainNode, WebServiceHandlerNode, WebServiceNode, WebServiceRuntimeNode, WebServicesDescriptorNode, WLApplicationRuntimeNode, WLContainerDescriptorNode, WLEjbReferenceDescriptionNode, WLJspDescriptorNode, WLModuleNode, WLResourceDescriptionNode, WLResourceEnvDescriptionNode, WLSecurityRoleAssignmentNode, WLServiceRefNode, WLServiceRefPortInfoRuntimeNode, WLServletDescriptorNode, WLSessionDescriptorNode, WLUnSupportedNode, WLWebBundleRuntimeNode, WLWebServiceEndpointNode, WLWebServiceEndpointNode.ServiceEndpointAddressNode, WLWebServiceEndpointNode.WSDLNode, WLWebServiceNode, WLWebServicesDescriptorNode

public interface XMLNode<T>

This interface defines the protocol associated with all the nodes. An XML node is responsible for reading the XML file into a object representation

Version:
Author:
Jerome Dochez

Method Summary
 void addDescriptor(java.lang.Object descriptor)
          Add a new descriptor to the current descriptor associated with this node.
 void addPrefixMapping(java.lang.String prefix, java.lang.String uri)
          notify of a new prefix mapping used from this node
 boolean endElement(XMLElement element)
          notification of the end of an XML element in the source XML file.
 T getDescriptor()
           
 XMLNode getHandlerFor(XMLElement element)
          Return the XMLNode implementation respionsible for handling the sub-element of the current node
 XMLNode getParentNode()
           
 java.lang.String getXMLPath()
           
 boolean handlesElement(XMLElement element)
          Return true if the XMLNode is responisble for handling the XML element
 java.lang.String resolvePrefix(XMLElement element, java.lang.String prefix)
          Resolve a QName prefix to its corresponding Namespace URI by searching up node chain starting with the child.
 void setElementValue(XMLElement element, java.lang.String value)
          sets the value of an XML element
 void startElement(XMLElement element, org.xml.sax.Attributes attributes)
          notification of the start of an XML element tag in the processed XML source file.
 org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent, T descriptor)
          write the descriptor to an JAXP DOM node and return it
 

Method Detail

startElement

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

Parameters:
element - the XML element type name
attributes - the specified or defaultted attritutes

setElementValue

void setElementValue(XMLElement element,
                     java.lang.String value)
sets the value of an XML element

Parameters:
element - the XML element type name
value - the element value

endElement

boolean endElement(XMLElement element)
notification of the end of an XML element in the source XML file.

Parameters:
element - the XML element type name
Returns:
true if this node is done with the processing of elements in the processing

handlesElement

boolean handlesElement(XMLElement element)
Return true if the XMLNode is responisble for handling the XML element

Parameters:
element - the XML element type name
Returns:
true if the node processes this element name

getHandlerFor

XMLNode getHandlerFor(XMLElement element)
Return the XMLNode implementation respionsible for handling the sub-element of the current node

Parameters:
element - the XML element type name
Returns:
XMLNode implementation responsible for handling the XML tag

getParentNode

XMLNode getParentNode()
Returns:
the parent node for this XMLNode

getXMLPath

java.lang.String getXMLPath()
Returns:
the XMLPath for the element name this node is handling. The XML path can be a absolute or a relative XMLPath.

getDescriptor

T getDescriptor()
Returns:
the Descriptor subclass that was populated by reading the source XML file

addDescriptor

void addDescriptor(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.

Parameters:
descriptor - the new descriptor to be added to the current descriptor.

writeDescriptor

org.w3c.dom.Node writeDescriptor(org.w3c.dom.Node parent,
                                 T descriptor)
write the descriptor to an JAXP DOM node and return it

Parameters:
parent - node in the DOM tree
descriptor - the descriptor to be written
Returns:
the JAXP DOM node for this descriptor

addPrefixMapping

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


resolvePrefix

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



Copyright © 2012 GlassFish Community. All Rights Reserved.