Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.xml.beans
Class BeanParser

java.lang.Object
  |
  +--oracle.cabo.share.xml.BaseNodeParser
        |
        +--oracle.cabo.share.xml.beans.BeanParser
All Implemented Interfaces:
NodeParser
Direct Known Subclasses:
GoEventHandlerParser

public class BeanParser
extends BaseNodeParser

The node parser for UIX Beans.


Constructor Summary
BeanParser(BeanDef beanDef)
          Creates a BeanParser based on a bean definition.
 
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 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.
protected  java.lang.Object getBean()
          An accessor function for retrieving the bean currently being built.
protected  BeanDef getBeanDef()
          An accessor function for retrieving the bean defintion.
protected  boolean isInlineChildProperty(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, PropertyDef def)
          Returns whether a given property definition is parsed inline.
protected  void logUnknownAttribute(ParseContext context, java.lang.String namespaceURI, java.lang.String localName)
          Records that an attribute was unknown.
 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.
protected  NodeParser startChildProperty(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs, PropertyDef def)
          Called when an XML element is being parsed as a bean property.
 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.
protected  NodeParser startEnvelopeChildProperty(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs, PropertyDef def)
          Called to parse an XML element an inline bean property.
protected  NodeParser startInlineChildProperty(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs, PropertyDef def)
          Called to parse an XML element an inline bean property.
 
Methods inherited from class oracle.cabo.share.xml.BaseNodeParser
addWhitespace, getIgnoreParser, getRequiredAttribute, logError, logUnexpectedAttribute, logUnexpectedElement, logWarning, logWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanParser

public BeanParser(BeanDef beanDef)
Creates a BeanParser based on a bean definition.
Parameters:
beanDef - the bean definition
Method Detail

startElement

public void startElement(ParseContext context,
                         java.lang.String namespaceURI,
                         java.lang.String localName,
                         org.xml.sax.Attributes attrs)
Description copied from interface: NodeParser
Receives notification of the start of an element.
Overrides:
startElement in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
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

startChildElement

public NodeParser startChildElement(ParseContext context,
                                    java.lang.String namespaceURI,
                                    java.lang.String localName,
                                    org.xml.sax.Attributes attrs)
Description copied from interface: NodeParser
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()

Overrides:
startChildElement in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
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
See Also:
NodeParser.endChildElement(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String), NodeParser.addCompletedChild(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String, java.lang.Object)

endChildElement

public void endChildElement(ParseContext context,
                            java.lang.String namespaceURI,
                            java.lang.String localName)
Description copied from interface: NodeParser
Receives notification of the end of a child element; called only if startChildElement returned "this".

Overrides:
endChildElement in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
Parameters:
context - the parsing context
namespaceURI - the namespace of the child element
localName - the local name of the child element

addText

public void addText(ParseContext context,
                    char[] text,
                    int start,
                    int length)
Description copied from interface: NodeParser
Receives notification of text content of this element.
Overrides:
addText in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
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

addCompletedChild

public void addCompletedChild(ParseContext context,
                              java.lang.String namespaceURI,
                              java.lang.String localName,
                              java.lang.Object child)
Description copied from interface: NodeParser
Receives notification of the end of a delegated child element. Called only if startChildElement returns a value other than "null" or "this".

Overrides:
addCompletedChild in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
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.
See Also:
NodeParser.endElement(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String)

endElement

public java.lang.Object endElement(ParseContext context,
                                   java.lang.String namespaceURI,
                                   java.lang.String localName)
Description copied from interface: NodeParser
Receives notification of the end of the element.
Overrides:
endElement in class BaseNodeParser
Following copied from interface: oracle.cabo.share.xml.NodeParser
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

startChildProperty

protected final NodeParser startChildProperty(ParseContext context,
                                              java.lang.String namespaceURI,
                                              java.lang.String localName,
                                              org.xml.sax.Attributes attrs,
                                              PropertyDef def)
Called when an XML element is being parsed as a bean property.
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
def - the property definition
See Also:
startInlineChildProperty(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String, org.xml.sax.Attributes, oracle.cabo.share.xml.beans.PropertyDef), startEnvelopeChildProperty(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String, org.xml.sax.Attributes, oracle.cabo.share.xml.beans.PropertyDef)

startInlineChildProperty

protected NodeParser startInlineChildProperty(ParseContext context,
                                              java.lang.String namespaceURI,
                                              java.lang.String localName,
                                              org.xml.sax.Attributes attrs,
                                              PropertyDef def)
Called to parse an XML element an inline bean property. Inline child properties do not use an envelope element - they are parsed directly off of the current 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
def - the property definition

startEnvelopeChildProperty

protected NodeParser startEnvelopeChildProperty(ParseContext context,
                                                java.lang.String namespaceURI,
                                                java.lang.String localName,
                                                org.xml.sax.Attributes attrs,
                                                PropertyDef def)
Called to parse an XML element an inline bean property. Envelope child properties use an envelope element that names the property, but does not define its value. Instead, the envelope contains one further child XML element that defines the value. Most types are parsed in this fashion.
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
def - the property definition

isInlineChildProperty

protected boolean isInlineChildProperty(ParseContext context,
                                        java.lang.String namespaceURI,
                                        java.lang.String localName,
                                        PropertyDef def)
Returns whether a given property definition is parsed inline. By default, this version always returns false.

Parameters:
context - the parsing context
def - the property definition

getBeanDef

protected final BeanDef getBeanDef()
An accessor function for retrieving the bean defintion.

getBean

protected final java.lang.Object getBean()
An accessor function for retrieving the bean currently being built.

logUnknownAttribute

protected void logUnknownAttribute(ParseContext context,
                                   java.lang.String namespaceURI,
                                   java.lang.String localName)
Records that an attribute was unknown.
Parameters:
context - the parsing context
namespaceURI - the namespace of the attribute, or an empty string for no namespace
localName - the local name of the attribute

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.