286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 2001, 2002,2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xerces.internal.dom;
286N/A
286N/Aimport org.w3c.dom.DOMLocator;
286N/Aimport org.w3c.dom.Node;
286N/A
286N/A
286N/A/**
286N/A * <code>DOMLocatorImpl</code> is an implementaion that describes a location (e.g.
286N/A * where an error occured).
286N/A * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913'>Document Object Model (DOM) Level 3 Core Specification</a>.
286N/A *
286N/A * @xerces.internal
286N/A *
286N/A * @author Gopal Sharma, SUN Microsystems Inc.
286N/A */
286N/A
286N/Apublic class DOMLocatorImpl implements DOMLocator {
286N/A
286N/A //
286N/A // Data
286N/A //
286N/A
286N/A /**
286N/A * The column number where the error occured,
286N/A * or -1 if there is no column number available.
286N/A */
286N/A public int fColumnNumber = -1;
286N/A
286N/A /**
286N/A * The line number where the error occured,
286N/A * or -1 if there is no line number available.
286N/A */
286N/A public int fLineNumber = -1;
286N/A
286N/A /** related data node*/
286N/A public Node fRelatedNode = null;
286N/A
286N/A /**
286N/A * The URI where the error occured,
286N/A * or null if there is no URI available.
286N/A */
286N/A public String fUri = null;
286N/A
286N/A /**
286N/A * The byte offset into the input source this locator is pointing to or -1
286N/A * if there is no byte offset available
286N/A */
286N/A public int fByteOffset = -1;
286N/A
286N/A /**
286N/A * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
286N/A * offset into the input source this locator is pointing to or -1 if there
286N/A * is no UTF-16 offset available.
286N/A */
286N/A public int fUtf16Offset = -1;
286N/A
286N/A //
286N/A // Constructors
286N/A //
286N/A
286N/A public DOMLocatorImpl(){
286N/A }
286N/A
286N/A public DOMLocatorImpl (int lineNumber, int columnNumber, String uri ){
286N/A fLineNumber = lineNumber ;
286N/A fColumnNumber = columnNumber ;
286N/A fUri = uri;
286N/A } // DOMLocatorImpl (int lineNumber, int columnNumber, String uri )
286N/A
286N/A public DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri ){
286N/A fLineNumber = lineNumber ;
286N/A fColumnNumber = columnNumber ;
286N/A fUri = uri;
286N/A fUtf16Offset = utf16Offset;
286N/A } // DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri )
286N/A
286N/A public DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri ){
286N/A fLineNumber = lineNumber ;
286N/A fColumnNumber = columnNumber ;
286N/A fByteOffset = byteoffset ;
286N/A fRelatedNode = relatedData ;
286N/A fUri = uri;
286N/A } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
286N/A
286N/A public DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri, int utf16Offset ){
286N/A fLineNumber = lineNumber ;
286N/A fColumnNumber = columnNumber ;
286N/A fByteOffset = byteoffset ;
286N/A fRelatedNode = relatedData ;
286N/A fUri = uri;
286N/A fUtf16Offset = utf16Offset;
286N/A } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
286N/A
286N/A
286N/A /**
286N/A * The line number where the error occured, or -1 if there is no line
286N/A * number available.
286N/A */
286N/A public int getLineNumber(){
286N/A return fLineNumber;
286N/A }
286N/A
286N/A /**
286N/A * The column number where the error occured, or -1 if there is no column
286N/A * number available.
286N/A */
286N/A public int getColumnNumber(){
286N/A return fColumnNumber;
286N/A }
286N/A
286N/A
286N/A /**
286N/A * The URI where the error occured, or null if there is no URI available.
286N/A */
286N/A public String getUri(){
286N/A return fUri;
286N/A }
286N/A
286N/A
286N/A public Node getRelatedNode(){
286N/A return fRelatedNode;
286N/A }
286N/A
286N/A
286N/A /**
286N/A * The byte offset into the input source this locator is pointing to or -1
286N/A * if there is no byte offset available
286N/A */
286N/A public int getByteOffset(){
286N/A return fByteOffset;
286N/A }
286N/A
286N/A /**
286N/A * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646],
286N/A * offset into the input source this locator is pointing to or -1 if there
286N/A * is no UTF-16 offset available.
286N/A */
286N/A public int getUtf16Offset(){
286N/A return fUtf16Offset;
286N/A }
286N/A
286N/A}// class DOMLocatorImpl