org.apache.myfaces.trinidadinternal.share.xml
Interface NodeParser

All Known Implementing Classes:
BaseImageProviderRequestParser, BaseNodeParser, BeanParser, CapabilitiesDocumentParser, CapabilityDataDocumentParser, ClassRendererParser, ColorizedIconParser, ColorNodeParser, ColorParser, ColorSchemeNodeParser, CompositeButtonParser, CompoundPropertyNodeParser, CSSStyleParser, DefaultsParser, FlippedIconParser, FontParser, IconNodeParser, IconsNodeParser, ImageGeneratorParser, ImageIconParser, ImageMapParser, ImageMetadataParser, IncludePropertyNodeParser, InstanceIconParser, LeafNodeParser, NullIconParser, PropertyNodeParser, ReferenceIconParser, RendererNodeParser, RenderersNodeParser, SkinAdditionNodeParser, SkinNodeParser, SkinPropertiesNodeParser, SkinPropertyNodeParser, SkinsNodeParser, StringParser, StyleNodeParser, StyleSheetDocumentParser, StyleSheetNodeParser, TextIconParser, TextParser, ValueNodeParser

public interface NodeParser

NodeParser is the interface used to process each XML element. NodeParsers are responsible for building up a Java object based on an XML element and all of its contents, though they will generally delegate the handling of any child XML elements to other NodeParsers.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/share/xml/NodeParser.java#0 $) $Date: 10-nov-2005.18:59:11 $
Author:
The Oracle ADF Faces Team

Method Summary
 void addCompletedChild(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, java.lang.Object child)
          Receives notification of the end of a delegated child element.
 void addText(ParseContext context, char[] text, int start, int length)
          Receives notification of text content of this element.
 void addWhitespace(ParseContext context, char[] text, int start, int length)
          Receives notification of ignorable whitespace.
 void endChildElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName)
          Receives notification of the end of a child element; called only if startChildElement returned "this".
 java.lang.Object endElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName)
          Receives notification of the end of the element.
 NodeParser startChildElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
          Receives notification of the start of a child element.
 void startElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
          Receives notification of the start of an element.
 

Method Detail

startElement

void startElement(ParseContext context,
                  java.lang.String namespaceURI,
                  java.lang.String localName,
                  org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXParseException
Receives notification of the start of an element.

Parameters:
context - the parsing context
namespaceURI - the namespace of the element
localName - the local name of the element
attrs - the attributes attached to the element
Throws:
org.xml.sax.SAXParseException

endElement

java.lang.Object endElement(ParseContext context,
                            java.lang.String namespaceURI,
                            java.lang.String localName)
                            throws org.xml.sax.SAXParseException
Receives notification of the end of the element.

Parameters:
context - the parsing context
namespaceURI - the namespace of the element
localName - the local name of the element
Returns:
the fully-initialized Java object corresponding to this release
Throws:
org.xml.sax.SAXParseException

startChildElement

NodeParser startChildElement(ParseContext context,
                             java.lang.String namespaceURI,
                             java.lang.String localName,
                             org.xml.sax.Attributes attrs)
                             throws org.xml.sax.SAXParseException
Receives notification of the start of a child element. If this method returns "this", further processing of that child element will be continue with this same parser. If it returns "null", the element will be ignored, and a warning logged. Otherwise, handling will be delegated to the new parser, and the next call made to this interface will be addCompletedChild()

Parameters:
context - the parsing context
namespaceURI - the namespace of the child element
localName - the local name of the child element
attrs - the attributes attached to the element
Returns:
the node parser that should be used for this child element, or null if processing should continue with this NodeParser
Throws:
org.xml.sax.SAXParseException
See Also:
endChildElement(org.apache.myfaces.trinidadinternal.share.xml.ParseContext, java.lang.String, java.lang.String), addCompletedChild(org.apache.myfaces.trinidadinternal.share.xml.ParseContext, java.lang.String, java.lang.String, java.lang.Object)

endChildElement

void endChildElement(ParseContext context,
                     java.lang.String namespaceURI,
                     java.lang.String localName)
                     throws org.xml.sax.SAXParseException
Receives notification of the end of a child element; called only if startChildElement returned "this".

Parameters:
context - the parsing context
namespaceURI - the namespace of the child element
localName - the local name of the child element
Throws:
org.xml.sax.SAXParseException

addCompletedChild

void addCompletedChild(ParseContext context,
                       java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.Object child)
                       throws org.xml.sax.SAXParseException
Receives notification of the end of a delegated child element. Called only if startChildElement returns a value other than "null" or "this".

Parameters:
context - the parsing context
namespaceURI - the namespace of the child element
localName - the local name of the child element
child - the Java object produced for that child by its NodeParser's endElement() method.
Throws:
org.xml.sax.SAXParseException
See Also:
endElement(org.apache.myfaces.trinidadinternal.share.xml.ParseContext, java.lang.String, java.lang.String)

addText

void addText(ParseContext context,
             char[] text,
             int start,
             int length)
             throws org.xml.sax.SAXParseException
Receives notification of text content of this element.

Parameters:
context - the parsing context
text - an array of characters
start - the start position in the array
length - the number of characters to read from the array
Throws:
org.xml.sax.SAXParseException

addWhitespace

void addWhitespace(ParseContext context,
                   char[] text,
                   int start,
                   int length)
                   throws org.xml.sax.SAXParseException
Receives notification of ignorable whitespace.

Parameters:
context - the parsing context
text - an array of characters
start - the start position in the array
length - the number of characters to read from the array
Throws:
org.xml.sax.SAXParseException


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.