Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.apache.xerces.readers
Class DefaultEntityHandler

    java.lang.Object
      |
      +--weblogic.apache.xerces.readers.DefaultEntityHandler

public class DefaultEntityHandler
extends java.lang.Object
implements XMLEntityHandler, XMLEntityHandler.DTDHandler

Default entity handler implementation.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

Version:
  $Id: DefaultEntityHandler.java,v 1.6 2000/08/09 22:24:59 lehors Exp $
Author:
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Inner Class Summary
`class` | `DefaultEntityHandler.EntityPool`
`static interface` | `DefaultEntityHandler.EventHandler`

Field Summary
`protected XMLEntityReaderFactory` | `fReaderFactory`

Constructor Summary
`DefaultEntityHandler(StringPool stringPool, XMLErrorReporter errorReporter)`

Method Summary
`int` | `addExternalEntityDecl(int name, int publicId, int systemId, boolean isExternal)`
`int` | `addExternalPEDecl(int name, int publicId, int systemId, boolean isExternal)`
`int` | `addInternalEntityDecl(int name, int value, boolean isExternal)`
`int` | `addInternalPEDecl(int name, int value, boolean isExternal)`
`int` | `addNotationDecl(int notationName, int publicId, int systemId, boolean isExternal)`
`void` | `addRecognizer(XMLDeclRecognizer recognizer)` Adds a recognizer.
`void` | `addRequiredNotation(int notationName, org.xml.sax.Locator locator, int majorCode, int minorCode, java.lang.Object[] args)`
`int` | `addUnparsedEntityDecl(int name, int publicId, int systemId, int notationName, boolean isExternal)`
`XMLEntityHandler.EntityReader` | `changeReaders()` This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery.
`void` | `checkRequiredNotations()`
`void` | `endEntityDecl()` end an entity declaration
`java.lang.String` | `expandSystemId(java.lang.String systemId)` Expands a system id and returns the system id as a URI, if it can be expanded.
`boolean` | `externalReferenceInContent(int entityHandle)`
`boolean` | `getAllowJavaEncodings()`
`XMLEntityHandler.CharDataHandler` | `getCharDataHandler()`
`int` | `getColumnNumber()` Return the column number of the current position within the document that we are processing.
`XMLEntityHandler.EntityReader` | `getEntityReader()` get the Entity reader.
`org.xml.sax.EntityResolver` | `getEntityResolver()` Gets the resolver used to resolve external entities.
`protected int` | `getEntityValue(int entityHandle)`
`int` | `getLineNumber()` Return the line number of the current position within the document that we are processing.
`protected int` | `getParameterEntityValue(int peIndex)`
`java.lang.String` | `getPublicId()` Return the public identifier of the `InputSource` that we are processing.
`protected java.lang.String` | `getPublicIdOfEntity(int entityHandle)`
`protected java.lang.String` | `getPublicIdOfParameterEntity(int peIndex)`
`int` | `getReaderDepth()` This method is provided for scanner implementations.
`int` | `getReaderId()` This method is provided for scanner implementations.
`java.lang.String` | `getSystemId()` Return the system identifier of the `InputSource` that we are processing.
`protected java.lang.String` | `getSystemIdOfEntity(int entityHandle)`
`protected java.lang.String` | `getSystemIdOfParameterEntity(int peIndex)`
`protected boolean` | `isExternalEntity(int entityHandle)`
`protected boolean` | `isExternalParameterEntity(int peIndex)`
`boolean` | `isNotationDeclared(int notationName)`
`boolean` | `isUnparsedEntity(int entityName)`
`protected int` | `lookupEntity(int entityNameIndex)`
`protected int` | `lookupParameterEntity(int peName)`
`void` | `reset(StringPool stringPool)` Reset the entity handler.
`void` | `setAllowJavaEncodings(boolean flag)`
`void` | `setCharDataHandler(XMLEntityHandler.CharDataHandler charDataHandler)`
`void` | `setEntityResolver(org.xml.sax.EntityResolver resolver)` Sets the resolver used to resolve external entities.
`void` | `setEventHandler(DefaultEntityHandler.EventHandler eventHandler)`
`void` | `setReaderDepth(int depth)` This method is provided for scanner implementations.
`void` | `setReaderFactory(XMLEntityReaderFactory readerFactory)` Set the reader factory.
`void` | `setSendCharDataAsCharArray(boolean flag)` Set char data processing preference.
`boolean` | `startEntityDecl(boolean isPE, int entityName)` start an entity declaration
`boolean` | `startReadingFromDocument(org.xml.sax.InputSource source)`
`boolean` | `startReadingFromEntity(int entityName, int readerDepth, int context)` start reading from an external entity
`void` | `startReadingFromExternalSubset(java.lang.String publicId, java.lang.String systemId, int readerDepth)` start reading from an external DTD subset
`void` | `stopReadingFromExternalSubset()` stop reading from an external DTD subset
`protected int` | `valueOfReferenceInAttValue(int entityHandle)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fReaderFactory

    protected XMLEntityReaderFactory fReaderFactory

Constructor Detail

### DefaultEntityHandler

    public DefaultEntityHandler(StringPool stringPool,
                                XMLErrorReporter errorReporter)

Method Detail

### setEventHandler

    public void setEventHandler(DefaultEntityHandler.EventHandler eventHandler)

### setCharDataHandler

    public void setCharDataHandler(XMLEntityHandler.CharDataHandler charDataHandler)

  Specified by:
    setCharDataHandler in interface XMLEntityHandler

### getCharDataHandler

    public XMLEntityHandler.CharDataHandler getCharDataHandler()

  Specified by:
    getCharDataHandler in interface XMLEntityHandler

### setSendCharDataAsCharArray

    public void setSendCharDataAsCharArray(boolean flag)

  Set char data processing preference.

### setReaderFactory

    public void setReaderFactory(XMLEntityReaderFactory readerFactory)

  Set the reader factory.

### reset

    public void reset(StringPool stringPool)

  Reset the entity handler.

### setAllowJavaEncodings

    public void setAllowJavaEncodings(boolean flag)

### getAllowJavaEncodings

    public boolean getAllowJavaEncodings()

### addInternalPEDecl

    public int addInternalPEDecl(int name,
                                 int value,
                                 boolean isExternal)
                          throws java.lang.Exception

  Specified by:
    addInternalPEDecl in interface XMLEntityHandler.DTDHandler

### addExternalPEDecl

    public int addExternalPEDecl(int name,
                                 int publicId,
                                 int systemId,
                                 boolean isExternal)
                          throws java.lang.Exception

  Specified by:
    addExternalPEDecl in interface XMLEntityHandler.DTDHandler

### addInternalEntityDecl

    public int addInternalEntityDecl(int name,
                                     int value,
                                     boolean isExternal)
                              throws java.lang.Exception

  Specified by:
    addInternalEntityDecl in interface XMLEntityHandler.DTDHandler

### addExternalEntityDecl

    public int addExternalEntityDecl(int name,
                                     int publicId,
                                     int systemId,
                                     boolean isExternal)
                              throws java.lang.Exception

  Specified by:
    addExternalEntityDecl in interface XMLEntityHandler.DTDHandler

### addUnparsedEntityDecl

    public int addUnparsedEntityDecl(int name,
                                     int publicId,
                                     int systemId,
                                     int notationName,
                                     boolean isExternal)
                              throws java.lang.Exception

  Specified by:
    addUnparsedEntityDecl in interface XMLEntityHandler.DTDHandler

### addNotationDecl

    public int addNotationDecl(int notationName,
                               int publicId,
                               int systemId,
                               boolean isExternal)
                        throws java.lang.Exception

  Specified by:
    addNotationDecl in interface XMLEntityHandler.DTDHandler

### isUnparsedEntity

    public boolean isUnparsedEntity(int entityName)

  Specified by:
    isUnparsedEntity in interface XMLEntityHandler.DTDHandler

### isNotationDeclared

    public boolean isNotationDeclared(int notationName)

  Specified by:
    isNotationDeclared in interface XMLEntityHandler.DTDHandler

### addRequiredNotation

    public void addRequiredNotation(int notationName,
                                    org.xml.sax.Locator locator,
                                    int majorCode,
                                    int minorCode,
                                    java.lang.Object[] args)

  Specified by:
    addRequiredNotation in interface XMLEntityHandler.DTDHandler

### checkRequiredNotations

    public void checkRequiredNotations()
                                throws java.lang.Exception

  Specified by:
    checkRequiredNotations in interface XMLEntityHandler.DTDHandler

### lookupEntity

    protected int lookupEntity(int entityNameIndex)

### externalReferenceInContent

    public boolean externalReferenceInContent(int entityHandle)
                                       throws java.lang.Exception

### valueOfReferenceInAttValue

    protected int valueOfReferenceInAttValue(int entityHandle)
                                      throws java.lang.Exception

### isExternalEntity

    protected boolean isExternalEntity(int entityHandle)

### getEntityValue

    protected int getEntityValue(int entityHandle)

### getPublicIdOfEntity

    protected java.lang.String getPublicIdOfEntity(int entityHandle)

### getSystemIdOfEntity

    protected java.lang.String getSystemIdOfEntity(int entityHandle)

### lookupParameterEntity

    protected int lookupParameterEntity(int peName)
                                 throws java.lang.Exception

### isExternalParameterEntity

    protected boolean isExternalParameterEntity(int peIndex)

### getParameterEntityValue

    protected int getParameterEntityValue(int peIndex)

### getPublicIdOfParameterEntity

    protected java.lang.String getPublicIdOfParameterEntity(int peIndex)

### getSystemIdOfParameterEntity

    protected java.lang.String getSystemIdOfParameterEntity(int peIndex)

### getEntityReader

    public XMLEntityHandler.EntityReader getEntityReader()

  get the Entity reader.
  Specified by:
    getEntityReader in interface XMLEntityHandler

### addRecognizer

    public void addRecognizer(XMLDeclRecognizer recognizer)

  Adds a recognizer.

  Parameters:
    `recognizer` - The XML recognizer to add.

### setEntityResolver

    public void setEntityResolver(org.xml.sax.EntityResolver resolver)

  Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.

  Parameters:
    `resolver` - The new entity resolver. Passing a null value will uninstall the currently installed resolver.

### getEntityResolver

    public org.xml.sax.EntityResolver getEntityResolver()

  Gets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.

  Returns:
    The current entity resolver.

### expandSystemId

    public java.lang.String expandSystemId(java.lang.String systemId)

  Expands a system id and returns the system id as a URI, if it can be expanded. A return value of null means that the identifier is already expanded. An exception thrown indicates a failure to expand the id.
  Specified by:
    expandSystemId in interface XMLEntityHandler

  Parameters:
    `systemId` - The systemId to be expanded.
  Returns:
    Returns the URI string representing the expanded system identifier. A null value indicates that the given system identifier is already expanded.

### startReadingFromDocument

    public boolean startReadingFromDocument(org.xml.sax.InputSource source)
                                     throws java.lang.Exception

  Specified by:
    startReadingFromDocument in interface XMLEntityHandler

### startReadingFromExternalSubset

    public void startReadingFromExternalSubset(java.lang.String publicId,
                                               java.lang.String systemId,
                                               int readerDepth)
                                        throws java.lang.Exception

  start reading from an external DTD subset
  Specified by:
    startReadingFromExternalSubset in interface XMLEntityHandler.DTDHandler

### stopReadingFromExternalSubset

    public void stopReadingFromExternalSubset()
                                       throws java.lang.Exception

  stop reading from an external DTD subset
  Specified by:
    stopReadingFromExternalSubset in interface XMLEntityHandler.DTDHandler

### startReadingFromEntity

    public boolean startReadingFromEntity(int entityName,
                                          int readerDepth,
                                          int context)
                                   throws java.lang.Exception

  start reading from an external entity
  Specified by:
    startReadingFromEntity in interface XMLEntityHandler

### startEntityDecl

    public boolean startEntityDecl(boolean isPE,
                                   int entityName)
                            throws java.lang.Exception

  start an entity declaration
  Specified by:
    startEntityDecl in interface XMLEntityHandler.DTDHandler

### endEntityDecl

    public void endEntityDecl()
                       throws java.lang.Exception

  end an entity declaration
  Specified by:
    endEntityDecl in interface XMLEntityHandler.DTDHandler

### getReaderId

    public int getReaderId()

  This method is provided for scanner implementations.
  Specified by:
    getReaderId in interface XMLEntityHandler

### setReaderDepth

    public void setReaderDepth(int depth)

  This method is provided for scanner implementations.
  Specified by:
    setReaderDepth in interface XMLEntityHandler

### getReaderDepth

    public int getReaderDepth()

  This method is provided for scanner implementations.
  Specified by:
    getReaderDepth in interface XMLEntityHandler

### getPublicId

    public java.lang.String getPublicId()

  Return the public identifier of the `InputSource` that we are processing.

  Returns:
    The public identifier, or null if not provided.

### getSystemId

    public java.lang.String getSystemId()

  Return the system identifier of the `InputSource` that we are processing.

  Returns:
    The system identifier, or null if not provided.

### getLineNumber

    public int getLineNumber()

  Return the line number of the current position within the document that we are processing.

  Returns:
    The current line number.

### getColumnNumber

    public int getColumnNumber()

  Return the column number of the current position within the document that we are processing.

  Returns:
    The current column number.

### changeReaders

    public XMLEntityHandler.EntityReader changeReaders()
                                                throws java.lang.Exception

  This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery.
  Specified by:
    changeReaders in interface XMLEntityHandler

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD