Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.xml.parse
Class UINodeParser

java.lang.Object
  |
  +--oracle.cabo.share.xml.BaseNodeParser
        |
        +--oracle.cabo.ui.xml.parse.UINodeParser
All Implemented Interfaces:
NodeParser

public class UINodeParser
extends BaseNodeParser

UINodeParser is the base NodeParser implementation for creating UINodes.


Constructor Summary
UINodeParser()
          Creates an untyped node parser.
UINodeParser(UINodeType type)
          Creates a typed node parser.
 
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.
protected  void addIndexedChild(BaseMutableUINode parent, UINode child)
          Adds an indexed child to the web bean.
 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.
protected  BaseMutableUINode createUINode(ParseContext context, java.lang.String namespaceURI, java.lang.String localName)
          Creates the web bean that will be used by the node parser.
 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.Class getCurrentChildClass()
          Returns the current child class.
protected  java.lang.String getCurrentChildName()
          Returns the current child name.
protected  int getCurrentChildType()
          Returns the current child type.
static UINodeParser getCurrentNodeParser(ParseContext context)
           
protected  BaseMutableUINode getUINode()
          Returns the node.
protected  UINodeType getUINodeType()
          Returns the UINodeType.
static void processVirtualAttributes(MutableUINode node)
          Processes "virtual" attributes on a UINode.
static void setCurrentNodeParser(ParseContext context, UINodeParser node)
           
protected  void setNamedChild(ParseContext context, BaseMutableUINode parent, java.lang.String name, UINode child)
          Sets a named child on the web bean.
protected  void setUINodeAttributes(ParseContext context, org.xml.sax.Attributes attrs)
          Sets the attributes of a bean.
protected static void setUINodeAttributes(ParseContext context, BaseMutableUINode node, UINodeType type, org.xml.sax.Attributes attrs)
          Deprecated. UINodeParser subclasses should use the non-static version,
protected  void setUINodeType(UINodeType type)
          Set the UINodeType.
 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.
 
Methods inherited from class oracle.cabo.share.xml.BaseNodeParser
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

UINodeParser

public UINodeParser()
Creates an untyped node parser.

UINodeParser

public UINodeParser(UINodeType type)
Creates a typed node parser.
Method Detail

getCurrentNodeParser

public static UINodeParser getCurrentNodeParser(ParseContext context)

setCurrentNodeParser

public static void setCurrentNodeParser(ParseContext context,
                                        UINodeParser node)

processVirtualAttributes

public static void processVirtualAttributes(MutableUINode node)
Processes "virtual" attributes on a UINode. These are attributes added to UIX that do not directly map onto a single UIX Components (Marlin) attribute.

startElement

public void startElement(ParseContext context,
                         java.lang.String namespaceURI,
                         java.lang.String localName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXParseException
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

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)

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

addWhitespace

public void addWhitespace(ParseContext context,
                          char[] text,
                          int start,
                          int length)
Description copied from interface: NodeParser
Receives notification of ignorable whitespace.
Overrides:
addWhitespace 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

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

setUINodeType

protected void setUINodeType(UINodeType type)
Set the UINodeType. Generally, this happens only in the constructor, but some types of nodes may wish to override this.

getUINode

protected final BaseMutableUINode getUINode()
Returns the node. Note that this function will entail "detatching" any references - that is, a node that up to now is a shared instance will have to be duplicated. Consequently, do not call this function unless a value must actually be set on the node.

getUINodeType

protected final UINodeType getUINodeType()
Returns the UINodeType.

getCurrentChildName

protected java.lang.String getCurrentChildName()
Returns the current child name.

getCurrentChildType

protected int getCurrentChildType()
Returns the current child type.

getCurrentChildClass

protected java.lang.Class getCurrentChildClass()
Returns the current child class.

addIndexedChild

protected void addIndexedChild(BaseMutableUINode parent,
                               UINode child)
Adds an indexed child to the web bean. Can be overridden if a subclass needs to place the indexed child somewhere other than directly on the bean.

setNamedChild

protected void setNamedChild(ParseContext context,
                             BaseMutableUINode parent,
                             java.lang.String name,
                             UINode child)
Sets a named child on the web bean. Can be overridden if a subclass needs to place the named child somewher other than directly on the bean.

createUINode

protected BaseMutableUINode createUINode(ParseContext context,
                                         java.lang.String namespaceURI,
                                         java.lang.String localName)
                                  throws org.xml.sax.SAXParseException
Creates the web bean that will be used by the node parser. Can be overridden if a subclass needs a specific web bean instance.

setUINodeAttributes

protected void setUINodeAttributes(ParseContext context,
                                   org.xml.sax.Attributes attrs)
Sets the attributes of a bean.
Parameters:
context - the parsing context
attrs - the SAX attribute list

setUINodeAttributes

protected static void setUINodeAttributes(ParseContext context,
                                          BaseMutableUINode node,
                                          UINodeType type,
                                          org.xml.sax.Attributes attrs)
Deprecated. UINodeParser subclasses should use the non-static version,

Sets the attributes of a bean.
Parameters:
context - the parsing context
bean - the web bean
type - the UINodeType object, if a type exists
attrs - the SAX attribute list

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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