Class ReceivingContentHandler.LocalLocator

  • All Implemented Interfaces:
    javax.xml.transform.SourceLocator, Location, org.xml.sax.Locator
    Enclosing class:
    ReceivingContentHandler

    public static class ReceivingContentHandler.LocalLocator
    extends java.lang.Object
    implements Location
    An implementation of the Saxon Location interface that wraps the SAX Locator information. Note that this object is mutable and changes continually as parsing proceeds; it is therefore necessary to call its saveLocation() method to obtain an immutable location that still has meaning once parsing is finished.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int levelInEntity  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Return the character position where the current document event ends.
      int getLineNumber()
      Return the line number where the current document event ends.
      java.lang.String getPublicId()
      Return the public identifier for the current document event.
      java.lang.String getSystemId()
      Return the system identifier for the current document event.
      Location saveLocation()
      Get an immutable copy of this Location object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • levelInEntity

        public int levelInEntity
    • Method Detail

      • getSystemId

        public java.lang.String getSystemId()
        Return the system identifier for the current document event.
        Specified by:
        getSystemId in interface Location
        Specified by:
        getSystemId in interface org.xml.sax.Locator
        Specified by:
        getSystemId in interface javax.xml.transform.SourceLocator
        Returns:
        A string containing the system identifier, or null if none is available.
      • getPublicId

        public java.lang.String getPublicId()
        Return the public identifier for the current document event.
        Specified by:
        getPublicId in interface Location
        Specified by:
        getPublicId in interface org.xml.sax.Locator
        Specified by:
        getPublicId in interface javax.xml.transform.SourceLocator
        Returns:
        A string containing the public identifier, or null if none is available.
      • getLineNumber

        public int getLineNumber()
        Return the line number where the current document event ends.
        Specified by:
        getLineNumber in interface Location
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        Specified by:
        getLineNumber in interface javax.xml.transform.SourceLocator
        Returns:
        The line number, or -1 if none is available.
      • getColumnNumber

        public int getColumnNumber()
        Return the character position where the current document event ends.
        Specified by:
        getColumnNumber in interface Location
        Specified by:
        getColumnNumber in interface org.xml.sax.Locator
        Specified by:
        getColumnNumber in interface javax.xml.transform.SourceLocator
        Returns:
        The column number, or -1 if none is available.
      • saveLocation

        public Location saveLocation()
        Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.
        Specified by:
        saveLocation in interface Location
        Returns:
        an immutable copy (which may be the original object, if it is already immutable)