net.sf.swan.xml.input.event
Class DocumentContext
java.lang.Object
|
+--net.sf.swan.xml.input.event.EventContext
|
+--net.sf.swan.xml.input.event.DocumentContext
- Direct Known Subclasses:
- SAXDocumentContext
- public abstract class DocumentContext
- extends EventContext
Maintains contextual information relevant to the processing
of a document.
Methods inherited from class net.sf.swan.xml.input.event.EventContext |
addContextListener, connectEvent, fireEndElement, fireProcessingInstruction, fireStartElement, fireTextEvent, getClientState, getListeners, getProperty, putClientState, putProperty, removeContextListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DocumentContext
public DocumentContext()
getLocator
public abstract org.xml.sax.Locator getLocator()
getErrorHandler
public abstract ErrorHandler getErrorHandler()
currentElement
public abstract ElementContext currentElement()
currentEvent
public abstract ContextEvent currentEvent()
getDocumentContext
public DocumentContext getDocumentContext()
- Overrides:
getDocumentContext
in class EventContext
addDocumentListener
public void addDocumentListener(DocumentListener listener)
removeDocumentListener
public void removeDocumentListener(DocumentListener listener)
putContextProperty
public void putContextProperty(java.lang.Object key,
java.lang.Object value)
- Description copied from class:
EventContext
- Add a context property. Context properties (unlike annotations) are
inherited by descendant contexts.
- Overrides:
putContextProperty
in class EventContext
getContextProperty
public java.lang.Object getContextProperty(java.lang.Object key)
- Description copied from class:
EventContext
- Get the property on this context or the nearest ancestor
with a matching property.
- Overrides:
getContextProperty
in class EventContext
setInitialContextMapCapacity
public void setInitialContextMapCapacity(int capacity)
- Sets the default initial capacity for the map used to hold
context properties
.
Applications that expect to set large numbers of distinct context properties
during processing may get better performance by setting this initial capacity
higher. Doing so may reduce or eliminate the need for the map to rehash itself.
getInitialContextMapCapacity
public int getInitialContextMapCapacity()
- Returns the current setting for the default initial capacity for the map used to hold
context properties
.
- See Also:
setInitialContextMapCapacity(int)
release
public void release()
- Description copied from class:
EventContext
- Release all associated properties and resources and
reset the context to a default state.
- Overrides:
release
in class EventContext
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
fireStartDocument
protected void fireStartDocument()
throws EventContextException
fireEndDocument
protected void fireEndDocument()
throws EventContextException
getDocumentListeners
protected DocumentListener[] getDocumentListeners()