net.sf.swan.xml.input.event
Class ElementContext

java.lang.Object
  |
  +--net.sf.swan.xml.input.event.EventContext
        |
        +--net.sf.swan.xml.input.event.ElementContext

public class ElementContext
extends EventContext

Maintains contextual information relevant to the processing of an element's content.


Constructor Summary
protected ElementContext(DocumentContext document)
           
 
Method Summary
 java.lang.Object getContextProperty(java.lang.Object key)
          Get the property on this context or the nearest ancestor with a matching property.
 DocumentContext getDocumentContext()
           
 java.lang.String getLocalName()
           
 java.lang.String getNamespaceUri()
           
 EventContext getParentContext()
           
 ElementContext getParentElement()
           
 java.lang.String getQName()
           
 java.util.Enumeration namespacePrefixes()
           
 void putContextProperty(java.lang.Object key, java.lang.Object value)
          Add a context property.
protected  void release()
          Release all associated properties and resources and reset the context to a default state.
 java.lang.String resolveNamespacePrefix(java.lang.String prefix)
           
 java.lang.String toString()
           
 
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
 

Constructor Detail

ElementContext

protected ElementContext(DocumentContext document)
Method Detail

getParentContext

public EventContext getParentContext()

getParentElement

public ElementContext getParentElement()

getDocumentContext

public DocumentContext getDocumentContext()
Overrides:
getDocumentContext in class EventContext

getNamespaceUri

public java.lang.String getNamespaceUri()

getLocalName

public java.lang.String getLocalName()

getQName

public java.lang.String getQName()

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

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

resolveNamespacePrefix

public java.lang.String resolveNamespacePrefix(java.lang.String prefix)

namespacePrefixes

public java.util.Enumeration namespacePrefixes()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

release

protected 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