|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ejen.EjenChildNode
Parent abstract class of all Ejen...Node classes.
Field Summary | |
protected static String |
_messageIndent
Indentation string for message reporting. |
Fields inherited from interface org.ejen.EjenConstants |
CTX_DOM_SOURCE, CTX_STYLESHEET_HANDLER, CTX_STYLESHEET_ROOT, CTX_TRANSFORMER_FACTORY_IMPL, CTX_TRANSFORMER_IMPL, DEFAULT_XML_DATA, DEFAULT_XML_DATA_ENCODING, DEFAULT_XSL_DATA, LOG_INDENT_STR1, LOG_INDENT_STR2, MSG_DEBUG, MSG_ERR, MSG_INFO, MSG_VERBOSE, MSG_WARN, STATE_AFTER_PROCESS, STATE_BEFORE_PROCESS, STATE_CHECK, STATE_IDLE, STATE_PROCESS, STATES |
Constructor Summary | |
EjenChildNode()
|
Method Summary | |
void |
afterProcess()
Does post-execution actions after this EjenChildNode execution. |
void |
beforeProcess()
Prepares this EjenChildNode execution. |
void |
check()
Check this EjenChildNode for mandatory attributes/child nodes. |
protected EjenContext |
cloneContext()
Duplicates the current context (or creates a new one if the stack is empty). |
protected String |
evaluateAVT(String avt)
Returns the evaluation of an Attribute Value Template. |
protected String |
evaluateAVT(TransformerImpl ti,
String avt)
Returns the evaluation of an Attribute Value Template, using the provided TransformerImpl object. |
Properties |
getAttributes()
Returns the attributes of this EjenChildNode (empty here). |
Vector |
getChildren()
Returns the children of this EjenChildNode (empty here). |
protected Object |
getFromContext(String name)
Returns an Object (whose name is 'name') from the current context stack. |
protected Object |
getFromContext(String name,
int offset)
Returns an Object (whose name is 'name') from the current context stack. |
protected Object |
getFromGlobalContext(String name)
Returns an Object (whose name is 'name') from the global (shared) context. |
static EjenListener |
getListener()
Returns the current listener for all EjenChildNode classes (the listener is static). |
int |
getState()
Returns the current state of this EjenChildNode. |
void |
idle()
Signals that this EjenChildNode has completly terminated its execution (including any post-execution actions). |
abstract String |
nodeName()
Returns the name of this EjenChildNode. |
protected EjenContext |
popContext()
Pops the current context from the contexts stack. |
void |
process()
Executes this EjenChildNode. |
protected EjenContext |
pushContext(EjenContext ejenContext)
Pushes a new EjenContext onto the top of the contexts stack. |
protected Object |
putInContext(String name,
Object value)
Puts an Object (whose name is 'name') in the current context (on the top of the stack). |
protected Object |
putInGlobalContext(String name,
Object value)
Puts an Object (whose name is 'name') in the global (shared) context. |
void |
sendMessageEvent(String msg)
Sends a message event from this EjenChildNode (with level Does nothing if there is no listener. |
void |
sendMessageEvent(String msg,
int level)
Sends a message event from this EjenChildNode (with a specific level). |
void |
sendStateEvent()
Sends a state change event (according to the current state of this EjenChildNode). |
static void |
sendXSLMessageEvent(String msg)
Sends a message event from an XSL file (via the Messenger.send(XSLProcessorContext context, ElemExtensionCall elem)
extension function).
|
static void |
sendXSLMessageEvent(String msg,
int level)
Sends a message event from an XSL file (via the Messenger.send(XSLProcessorContext context, ElemExtensionCall elem)
extension function), with specific level.
|
static void |
setListener(EjenListener ejenListener)
Sets the listener for all EjenChildNode classes (the listener is static). |
String |
toString()
Returns the String representation of this EjenChildNode, in the form of "<node_name> {[<attribute_name_1>=<attribute_value_1>[, <attribute_name_2>=<attribute_value_2> ...]]}". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static String _messageIndent
Constructor Detail |
public EjenChildNode()
Method Detail |
public abstract String nodeName()
public Properties getAttributes()
public Vector getChildren()
public void check()
EjenConstants.STATE_CHECK
).
public void beforeProcess()
EjenConstants.STATE_BEFORE_PROCESS
).
public void process()
EjenConstants.STATE_PROCESS
).
public void afterProcess()
EjenConstants.STATE_AFTER_PROCESS
).
public final void idle()
EjenConstants.STATE_IDLE
).
public final int getState()
EjenConstants
).public static final void setListener(EjenListener ejenListener)
ejenListener
- the new EjenListener.public static final EjenListener getListener()
public final void sendStateEvent()
public final void sendMessageEvent(String msg)
EjenConstants.MSG_INFO
).
msg
- the message to send to the listener.public final void sendMessageEvent(String msg, int level)
msg
- the message to send to the listener.level
- level of the message (see EjenConstants
).public static final void sendXSLMessageEvent(String msg)
Messenger.send(XSLProcessorContext context, ElemExtensionCall elem)
extension function).
Does nothing if there is no listener.
msg
- the message to send to the listener.public static final void sendXSLMessageEvent(String msg, int level)
Messenger.send(XSLProcessorContext context, ElemExtensionCall elem)
extension function), with specific level.
Does nothing if there is no listener.
msg
- the message to send to the listener.level
- level of the message (see EjenConstants
).public final String toString()
toString
in class Object
protected final Object getFromContext(String name)
name
- name of the Object to be returned.
protected final Object getFromContext(String name, int offset)
name
- name of the value to be returned.offset
- a negative value or zero (to access any context in the stack).
EmptyStackException
- if the stack is empty.protected final Object getFromGlobalContext(String name)
name
- name of the value to be returned.
protected final Object putInContext(String name, Object value)
name
- name of the Object to be put in the context.value
- the Object.
protected final Object putInGlobalContext(String name, Object value)
name
- name of the Object to be put in the context.value
- the Object.
protected final EjenContext popContext()
EmptyStackException
- if the stack is empty.protected final EjenContext pushContext(EjenContext ejenContext)
ejenContext
- the new EjenContext to be pushed.
EmptyStackException
- if the stack is empty.protected final EjenContext cloneContext()
protected final String evaluateAVT(String avt)
avt
- the Attribute Value Template.
EjenException
- if something goes wrong.protected final String evaluateAVT(TransformerImpl ti, String avt)
ti
- a TransformerImpl instance.avt
- the Attribute Value Template.
EjenException
- if something goes wrong.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |