001    /*
002     * Copyright (c) 2004 World Wide Web Consortium,
003     *
004     * (Massachusetts Institute of Technology, European Research Consortium for
005     * Informatics and Mathematics, Keio University). All Rights Reserved. This
006     * work is distributed under the W3C(r) Software License [1] in the hope that
007     * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
008     * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
009     *
010     * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
011     */
012    
013    package org.w3c.dom;
014    
015    /**
016     * <code>DOMLocator</code> is an interface that describes a location (e.g. 
017     * where an error occurred).
018     * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
019     * @since DOM Level 3
020     */
021    public interface DOMLocator {
022        /**
023         * The line number this locator is pointing to, or <code>-1</code> if 
024         * there is no column number available.
025         */
026        public int getLineNumber();
027    
028        /**
029         * The column number this locator is pointing to, or <code>-1</code> if 
030         * there is no column number available.
031         */
032        public int getColumnNumber();
033    
034        /**
035         * The byte offset into the input source this locator is pointing to or 
036         * <code>-1</code> if there is no byte offset available.
037         */
038        public int getByteOffset();
039    
040        /**
041         * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or 
042         * <code>-1</code> if there is no UTF-16 offset available.
043         */
044        public int getUtf16Offset();
045    
046        /**
047         * The node this locator is pointing to, or <code>null</code> if no node 
048         * is available.
049         */
050        public Node getRelatedNode();
051    
052        /**
053         * The URI this locator is pointing to, or <code>null</code> if no URI is 
054         * available.
055         */
056        public String getUri();
057    
058    }