Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.xml
Class ParseContextImpl

java.lang.Object
  |
  +--oracle.cabo.share.xml.ParseContextImpl
All Implemented Interfaces:
java.lang.Cloneable, ParseContext
Direct Known Subclasses:
BajaParseContext

public class ParseContextImpl
extends java.lang.Object
implements ParseContext, java.lang.Cloneable

The base implementation of ParseContext. Clients can subclass this if they wish to change the behavior, but a more common use is simply creating a ParseContext so you can set properties.


Constructor Summary
ParseContextImpl(ErrorLog log)
          Creates a ParseContext that uses the provided ParserManager to get NodeParsers.
 
Method Summary
 java.lang.Object clone()
          Clones the ParseContext so that it can be used for a new set of parsing.
 ErrorLog getErrorLog()
          Get an interface that can be used to log errors.
 ParserExtension getExtension(java.lang.String namespaceURI)
          Returns a parser extension.
 org.xml.sax.Locator getLocator()
          Return a SAX Locator object for identifying the document location.
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Convert a string prefix to a full namespace URI.
 NodeParser getParser(java.lang.Class expectedType, java.lang.String namespaceURI, java.lang.String localName)
          Returns the default node parser that shold be used for a specific element name, given the type of expected object.
 ParserManager getParserManager()
          Returns the parser manager.
 java.lang.Object getProperty(java.lang.String namespace, java.lang.Object key)
          Gets a property stored on the context.
 XMLProvider getXMLProvider()
          Get an XMLProvider.
 void setProperty(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
          Stores a property on the context.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseContextImpl

public ParseContextImpl(ErrorLog log)
Creates a ParseContext that uses the provided ParserManager to get NodeParsers.
Method Detail

getParser

public NodeParser getParser(java.lang.Class expectedType,
                            java.lang.String namespaceURI,
                            java.lang.String localName)
Returns the default node parser that shold be used for a specific element name, given the type of expected object.

Specified by:
getParser in interface ParseContext
Parameters:
expectedType - the Class of the Java object expected for this element
namespaceURI - the namespace of the XML element
localName - the local name of the XML element

getExtension

public ParserExtension getExtension(java.lang.String namespaceURI)
Returns a parser extension.

Specified by:
getExtension in interface ParseContext
Parameters:
currentType - the Class of the Java object being built
namespaceURI - the namespace of the XML element or attribute

getParserManager

public ParserManager getParserManager()
Returns the parser manager.
Specified by:
getParserManager in interface ParseContext

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Convert a string prefix to a full namespace URI.
Specified by:
getNamespaceURI in interface ParseContext
Parameters:
prefix - the string prefix of the namspace, or the empty string for the default namespace
Returns:
the URI of that namespace, or null if the prefix hasn't been mapped

getErrorLog

public ErrorLog getErrorLog()
Get an interface that can be used to log errors.
Specified by:
getErrorLog in interface ParseContext

getLocator

public org.xml.sax.Locator getLocator()
Return a SAX Locator object for identifying the document location.
Specified by:
getLocator in interface ParseContext
Returns:
a locator, or null if none is available

getXMLProvider

public XMLProvider getXMLProvider()
Get an XMLProvider.
Specified by:
getXMLProvider in interface ParseContext

getProperty

public java.lang.Object getProperty(java.lang.String namespace,
                                    java.lang.Object key)
Gets a property stored on the context.
Specified by:
getProperty in interface ParseContext

setProperty

public void setProperty(java.lang.String namespace,
                        java.lang.Object key,
                        java.lang.Object value)
Stores a property on the context.
Specified by:
setProperty in interface ParseContext

clone

public java.lang.Object clone()
Description copied from interface: ParseContext
Clones the ParseContext so that it can be used for a new set of parsing.
Specified by:
clone in interface ParseContext
Overrides:
clone in class java.lang.Object

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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