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.ls;
  13. import org.w3c.dom.events.Event;
  14. /**
  15. * This interface represents a progress event object that notifies the
  16. * application about progress as a document is parsed. It extends the
  17. * <code>Event</code> interface defined in [<a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>DOM Level 3 Events</a>]
  18. * .
  19. * <p> The units used for the attributes <code>position</code> and
  20. * <code>totalSize</code> are not specified and can be implementation and
  21. * input dependent.
  22. * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
  23. and Save Specification</a>.
  24. */
  25. public interface LSProgressEvent extends Event {
  26. /**
  27. * The input source that is being parsed.
  28. */
  29. public LSInput getInput();
  30. /**
  31. * The current position in the input source, including all external
  32. * entities and other resources that have been read.
  33. */
  34. public int getPosition();
  35. /**
  36. * The total size of the document including all external resources, this
  37. * number might change as a document is being parsed if references to
  38. * more external resources are seen. A value of <code>0</code> is
  39. * returned if the total size cannot be determined or estimated.
  40. */
  41. public int getTotalSize();
  42. }