KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javolution > xml > stream > Location


1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2006 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */

9 package javolution.xml.stream;
10
11 /**
12  * Provides information on the location of an event.
13  *
14  * @author <a HREF="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
15  * @version 3.8, May 22, 2006
16  */

17 public interface Location {
18     
19   /**
20    * Return the line number where the current event ends,
21    * returns -1 if none is available.
22    * @return the current line number
23    */

24   int getLineNumber();
25
26   /**
27    * Return the column number where the current event ends,
28    * returns -1 if none is available.
29    * @return the current column number
30    */

31   int getColumnNumber();
32   
33   /**
34    * Return the byte or character offset into the input source this location
35    * is pointing to. If the input source is a file or a byte stream then
36    * this is the byte offset into that stream, but if the input source is
37    * a character media then the offset is the character offset.
38    * Returns -1 if there is no offset available.
39    *
40    * @return the current offset
41    */

42   int getCharacterOffset();
43
44   /**
45    * Returns the public ID of the XML
46    *
47    * @return the public ID, or null if not available
48    */

49   public String JavaDoc getPublicId();
50
51   /**
52    * Returns the system ID of the XML
53    * @return the system ID, or null if not available
54    */

55   public String JavaDoc getSystemId();
56 }
Popular Tags