01: package javax.xml.stream;
02:
03: /**
04: * Provides information on the location of an event.
05: *
06: * All the information provided by a Location is optional. For example
07: * an application may only report line numbers.
08: *
09: * @version 1.0
10: * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
11: */
12: public interface Location {
13: /**
14: * Return the line number where the current event ends,
15: * returns -1 if none is available.
16: * @return the current line number
17: */
18: int getLineNumber();
19:
20: /**
21: * Return the column number where the current event ends,
22: * returns -1 if none is available.
23: * @return the current column number
24: */
25: int getColumnNumber();
26:
27: /**
28: * Return the byte or character offset into the input source this location
29: * is pointing to. If the input source is a file or a byte stream then
30: * this is the byte offset into that stream, but if the input source is
31: * a character media then the offset is the character offset.
32: * Returns -1 if there is no offset available.
33: * @return the current offset
34: */
35: int getCharacterOffset();
36:
37: /**
38: * Returns the public ID of the XML
39: * @return the public ID, or null if not available
40: */
41: public String getPublicId();
42:
43: /**
44: * Returns the system ID of the XML
45: * @return the system ID, or null if not available
46: */
47: public String getSystemId();
48: }
|