UIX 2.2.16

oracle.cabo.ui.xml.parse
Class UIXParseFactory

java.lang.Object
  |
  +--oracle.cabo.ui.xml.parse.UIXParseFactory
Direct Known Subclasses:
UIXParseFactory

public class UIXParseFactory
extends java.lang.Object

Factory for creating UIX objects during parsing. UINodeParser will use the registered UIXParseFactory to create all UINodes, AttributeMaps, NodeLists, and ContextMaps during parsing. Note, however, that if a particular UINode does not contain any attributes, or any indexed children, or any named children, then the corresponding collection object will not be created.

When using the UIX Servlet, the UIXParseFactory can be overridden by subclassing either the BajaContext or the PageBroker and overriding the getService() method to handle UIXParseFactory.class.


Constructor Summary
UIXParseFactory()
           
 
Method Summary
 AttributeMap createAttributeMap(ParseContext context, BaseMutableUINode node, int sizeHint)
          Creates an AttributeMap.
 ContextMap createContextMap(ParseContext context, BaseMutableUINode node, int sizeHint)
          Creates a ContextMap.
 BaseMutableUINode createUINode(ParseContext context, UINodeType nodeType, java.lang.String namespace, java.lang.String localName, org.xml.sax.Attributes attrs)
          Creates a UINode.
 UINodeList createUINodeList(ParseContext context, BaseMutableUINode node, int lengthHint)
          Creates a UINodeList.
static UIXParseFactory getUIXParseFactory(ParseContext context)
          Gets the UIXParseFactory from a ParseContext.
 void parseEnded(ParseContext context)
          Called as notification that a parse is ending.
 void parseStarted(ParseContext context)
          Called as notification that a parse is starting.
static void setUIXParseFactory(ParseContext context, UIXParseFactory factory)
          Sets the UIXParseFactory on a ParseContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIXParseFactory

public UIXParseFactory()
Method Detail

getUIXParseFactory

public static UIXParseFactory getUIXParseFactory(ParseContext context)
Gets the UIXParseFactory from a ParseContext. If one has not been explicitly set, a default factory will be created - so this function will never return null.

setUIXParseFactory

public static void setUIXParseFactory(ParseContext context,
                                      UIXParseFactory factory)
Sets the UIXParseFactory on a ParseContext.

parseStarted

public void parseStarted(ParseContext context)
Called as notification that a parse is starting.

parseEnded

public void parseEnded(ParseContext context)
Called as notification that a parse is ending.

createUINode

public BaseMutableUINode createUINode(ParseContext context,
                                      UINodeType nodeType,
                                      java.lang.String namespace,
                                      java.lang.String localName,
                                      org.xml.sax.Attributes attrs)
                               throws java.lang.InstantiationException,
                                      java.lang.IllegalAccessException
Creates a UINode. The default implementation will delegate to the UINodeType; if a parse factory does not have specific knowledge about a specific type of UINode, it should follow this behavior.
Parameters:
context - the ParseContext
nodeType - a UINodeType identifying the object.
namespace - the namespace of the UINode
localName - the local name of the UINode
attrs - the SAX attributes for the UINode.

createAttributeMap

public AttributeMap createAttributeMap(ParseContext context,
                                       BaseMutableUINode node,
                                       int sizeHint)
Creates an AttributeMap.
Parameters:
context - the ParseContext
node - the BaseMutableUINode created by createUINode()
sizeHint - a hint about how big the attribute map might be; if zero or negative, a default size should be assumed.

createUINodeList

public UINodeList createUINodeList(ParseContext context,
                                   BaseMutableUINode node,
                                   int lengthHint)
Creates a UINodeList.
Parameters:
context - the ParseContext
node - the BaseMutableUINode created by createUINode()
sizeHint - a hint about how big the node list might be; if zero or negative, a default size should be assumed.

createContextMap

public ContextMap createContextMap(ParseContext context,
                                   BaseMutableUINode node,
                                   int sizeHint)
Creates a ContextMap.
Parameters:
context - the ParseContext
node - the BaseMutableUINode created by createUINode()
sizeHint - a hint about how big the context map might be; if zero or negative, a default size should be assumed.

UIX 2.2.16