FileDocCategorySizeDatePackage
SAXLocatorWrapper.javaAPI DocApache Xerces 3.0.12945Fri Sep 14 20:33:54 BST 2007org.apache.xerces.util

SAXLocatorWrapper

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

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

author
Michael Glavassevich, IBM
version
$Id: SAXLocatorWrapper.java 447241 2006-09-18 05:12:57Z mrglavas $

Fields Summary
private Locator
fLocator
private Locator2
fLocator2
Constructors Summary
public SAXLocatorWrapper()

    
      
Methods Summary
public java.lang.StringgetBaseSystemId()

        return null;
    
public intgetCharacterOffset()

        return -1;
    
public intgetColumnNumber()

        if (fLocator != null) {
            return fLocator.getColumnNumber();
        }
        return -1;
    
public java.lang.StringgetEncoding()

        if (fLocator2 != null) {
            return fLocator2.getEncoding();
        }
        return null;
    
public java.lang.StringgetExpandedSystemId()

        return getLiteralSystemId();
    
public intgetLineNumber()

        if (fLocator != null) {
            return fLocator.getLineNumber();
        }
        return -1;
    
public java.lang.StringgetLiteralSystemId()

        if (fLocator != null) {
            return fLocator.getSystemId();
        }
        return null;
    
public org.xml.sax.LocatorgetLocator()

        return fLocator;
    
public java.lang.StringgetPublicId()

        if (fLocator != null) {
            return fLocator.getPublicId();
        }
        return null;
    
public java.lang.StringgetXMLVersion()

        if (fLocator2 != null) {
            return fLocator2.getXMLVersion();
        }
        return null;
    
public voidsetLocator(org.xml.sax.Locator locator)

        fLocator = locator;
        if (locator instanceof Locator2 || locator == null) {
            fLocator2 = (Locator2) locator;
        }