1. /*
  2. * Copyright (c) 2004 World Wide Web Consortium,
  3. *
  4. * (Massachusetts Institute of Technology, European Research Consortium for
  5. * Informatics and Mathematics, Keio University). All Rights Reserved. This
  6. * work is distributed under the W3C(r) Software License [1] in the hope that
  7. * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  8. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. *
  10. * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
  11. */
  12. package org.w3c.dom;
  13. /**
  14. * <code>DOMLocator</code> is an interface that describes a location (e.g.
  15. * where an error occurred).
  16. * <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>.
  17. * @since DOM Level 3
  18. */
  19. public interface DOMLocator {
  20. /**
  21. * The line number this locator is pointing to, or <code>-1</code> if
  22. * there is no column number available.
  23. */
  24. public int getLineNumber();
  25. /**
  26. * The column number this locator is pointing to, or <code>-1</code> if
  27. * there is no column number available.
  28. */
  29. public int getColumnNumber();
  30. /**
  31. * The byte offset into the input source this locator is pointing to or
  32. * <code>-1</code> if there is no byte offset available.
  33. */
  34. public int getByteOffset();
  35. /**
  36. * 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
  37. * <code>-1</code> if there is no UTF-16 offset available.
  38. */
  39. public int getUtf16Offset();
  40. /**
  41. * The node this locator is pointing to, or <code>null</code> if no node
  42. * is available.
  43. */
  44. public Node getRelatedNode();
  45. /**
  46. * The URI this locator is pointing to, or <code>null</code> if no URI is
  47. * available.
  48. */
  49. public String getUri();
  50. }