## org.apache.xerces.util
Class SAXLocatorWrapper

    java.lang.Object
      |
      +--org.apache.xerces.util.SAXLocatorWrapper

All Implemented Interfaces:
  org.apache.xerces.xni.XMLLocator

public final class SAXLocatorWrapper
extends java.lang.Object
implements org.apache.xerces.xni.XMLLocator

A light wrapper around a SAX locator. This is useful when bridging between SAX and XNI components.

Version:
  $Id: SAXLocatorWrapper.java 699892 2008-09-28 21:08:27Z mrglavas $
Author:
  Michael Glavassevich, IBM

Constructor Summary
`SAXLocatorWrapper()`

Method Summary
`java.lang.String` `getBaseSystemId()` Returns the base system identifier.
`int` `getCharacterOffset()` Returns the character offset, or `-1` if no character offset is available.
`int` `getColumnNumber()` Returns the column number, or `-1` if no column number is available.
`java.lang.String` `getEncoding()` Returns the encoding of the current entity.
`java.lang.String` `getExpandedSystemId()` Returns the expanded system identifier.
`int` `getLineNumber()` Returns the line number, or `-1` if no line number is available.
`java.lang.String` `getLiteralSystemId()` Returns the literal system identifier.
`org.xml.sax.Locator` `getLocator()`
`java.lang.String` `getPublicId()` Returns the public identifier.
`java.lang.String` `getXMLVersion()` Returns the XML version of the current entity.
`void` `setLocator(org.xml.sax.Locator locator)`

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

Constructor Detail

### SAXLocatorWrapper

    public SAXLocatorWrapper()

Method Detail

### setLocator

    public void setLocator(org.xml.sax.Locator locator)

### getLocator

    public org.xml.sax.Locator getLocator()

### getPublicId

    public java.lang.String getPublicId()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the public identifier.
  Specified by:
    `getPublicId` in interface `org.apache.xerces.xni.XMLLocator`

### getLiteralSystemId

    public java.lang.String getLiteralSystemId()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the literal system identifier.
  Specified by:
    `getLiteralSystemId` in interface `org.apache.xerces.xni.XMLLocator`

### getBaseSystemId

    public java.lang.String getBaseSystemId()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the base system identifier.
  Specified by:
    `getBaseSystemId` in interface `org.apache.xerces.xni.XMLLocator`

### getExpandedSystemId

    public java.lang.String getExpandedSystemId()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the expanded system identifier.
  Specified by:
    `getExpandedSystemId` in interface `org.apache.xerces.xni.XMLLocator`

### getLineNumber

    public int getLineNumber()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the line number, or `-1` if no line number is available.
  Specified by:
    `getLineNumber` in interface `org.apache.xerces.xni.XMLLocator`

### getColumnNumber

    public int getColumnNumber()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the column number, or `-1` if no column number is available.
  Specified by:
    `getColumnNumber` in interface `org.apache.xerces.xni.XMLLocator`

### getCharacterOffset

    public int getCharacterOffset()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the character offset, or `-1` if no character offset is available.
  Specified by:
    `getCharacterOffset` in interface `org.apache.xerces.xni.XMLLocator`

### getEncoding

    public java.lang.String getEncoding()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the encoding of the current entity. Note that, for a given entity, this value can only be considered final once the encoding declaration has been read (or once it has been determined that there is no such declaration) since, no encoding having been specified on the XMLInputSource, the parser will make an initial "guess" which could be in error.
  Specified by:
    `getEncoding` in interface `org.apache.xerces.xni.XMLLocator`

### getXMLVersion

    public java.lang.String getXMLVersion()

  Description copied from interface: `org.apache.xerces.xni.XMLLocator`
  Returns the XML version of the current entity. This will normally be the value from the XML or text declaration or defaulted by the parser. Note that that this value may be different than the version of the processing rules applied to the current entity. For instance, an XML 1.1 document may refer to XML 1.0 entities. In such a case the rules of XML 1.1 are applied to the entire document. Also note that, for a given entity, this value can only be considered final once the XML or text declaration has been read or once it has been determined that there is no such declaration.
  Specified by:
    `getXMLVersion` in interface `org.apache.xerces.xni.XMLLocator`

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.