Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.chiba.xml.xforms
Class XFormsElement  view XFormsElement download XFormsElement.java

java.lang.Object
  extended byorg.chiba.xml.xforms.XFormsElement
All Implemented Interfaces:
XFormsConstants
Direct Known Subclasses:
Bind, Instance, Model, Submission

public abstract class XFormsElement
extends java.lang.Object
implements XFormsConstants

Version:
$Id: XFormsElement.java,v 1.20 2003/10/01 14:24:16 joernt Exp $

Field Summary
protected  Container container
           
protected  org.w3c.dom.Element element
           
protected  java.lang.String id
           
protected  Model model
           
protected  org.w3c.dom.events.EventTarget target
           
protected  java.lang.String xformsPrefix
           
 
Fields inherited from interface org.chiba.xml.xforms.XFormsConstants
ACCESSKEY_ATTRIBUTE, ACTION, ACTION_ATTRIBUTE, ALERT, APPEARANCE_ATTRIBUTE, AT_ATTRIBUTE, BIND, BIND_ATTRIBUTE, BUBBLES_ATTRIBUTE, CALCULATE_ATTRIBUTE, CANCELABLE_ATTRIBUTE, CASE, CASE_ATTRIBUTE, CDATA_SECTION_ELEMENTS_ATTRIBUTE, CHOICES, CONSTRAINT_ATTRIBUTE, CONTROL_ATTRIBUTE, COPY, DELETE, DISPATCH, ENCODING_ATTRIBUTE, END_ATTRIBUTE, EXTENSION, FILENAME, GROUP, HELP, HINT, INCREMENTAL_ATTRIBUTE, INDENT_ATTRIBUTE, INDEX_ATTRIBUTE, INPUT, INSERT, INSTANCE, ITEM, ITEMSET, LABEL, LEVEL_ATTRIBUTE, LOAD, MAXOCCURS_ATTRIBUTE, MEDIATYPE, MEDIATYPE_ATTRIBUTE, MESSAGE, METHOD_ATTRIBUTE, MINOCCURS_ATTRIBUTE, MODEL, MODEL_ATTRIBUTE, NAME_ATTRIBUTE, NAVINDEX_ATTRIBUTE, NODESET_ATTRIBUTE, NUMBER_ATTRIBUTE, OMIT_XML_DECLARATION_ATTRIBUTE, OUTPUT, P3PTYPE_ATTRIBUTE, POSITION_ATTRIBUTE, RANGE, READONLY_ATTRIBUTE, REBUILD, RECALCULATE, REF_ATTRIBUTE, REFRESH, RELEVANT_ATTRIBUTE, REPEAT, REPEAT_ATTRIBUTE, REPEAT_BIND_ATTRIBUTE, REPEAT_MODEL_ATTRIBUTE, REPEAT_NODESET_ATTRIBUTE, REPEAT_NUMBER_ATTRIBUTE, REPEAT_STARTINDEX_ATTRIBUTE, REPLACE_ATTRIBUTE, REQUIRED_ATTRIBUTE, RESET, RESOURCE_ATTRIBUTE, REVALIDATE, SECRET, SELECT, SELECT1, SELECTED_ATTRIBUTE, SELECTION_ATTRIBUTE, SEND, SEPARATOR_ATTRIBUTE, SETFOCUS, SETINDEX, SETVALUE, SHOW_ATTRIBUTE, SRC_ATTRIBUTE, STANDALONE_ATTRIBUTE, START_ATTRIBUTE, STARTINDEX_ATTRIBUTE, STEP_ATTRIBUTE, SUBMISSION, SUBMISSION_ATTRIBUTE, SUBMIT, SWITCH, TARGET_ATTRIBUTE, TEXTAREA, TOGGLE, TRIGGER, TYPE_ATTRIBUTE, UPLOAD, VALUE, VALUE_ATTRIBUTE, VERSION_ATTRIBUTE
 
Constructor Summary
XFormsElement(org.w3c.dom.Element element)
           
XFormsElement(org.w3c.dom.Element element, Model model)
           
 
Method Summary
 boolean dispatch(java.lang.String type, java.lang.Object info)
          dispatch an DOM Event.
 boolean equals(java.lang.Object object)
          Determine whether this Object is semantically equal to another Object.
 Container getContainerObject()
           
 org.w3c.dom.Element getElement()
          Returns the DOM element of this element.
 java.lang.String getId()
          Returns the global id of this element.
protected abstract  org.apache.log4j.Category getLogger()
          Returns the logger object.
 Model getModel()
          Returns the context model of this element.
 XFormsElement getParentObject()
           
 org.w3c.dom.events.EventTarget getTarget()
          Returns the DOM event target of this element.
abstract  void init()
          Performs element init.
protected  void performDefault(org.w3c.dom.events.Event event)
          performs the default Action of this Element.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

container

protected Container container

element

protected org.w3c.dom.Element element

model

protected Model model

id

protected java.lang.String id

target

protected org.w3c.dom.events.EventTarget target

xformsPrefix

protected java.lang.String xformsPrefix
Constructor Detail

XFormsElement

public XFormsElement(org.w3c.dom.Element element)

XFormsElement

public XFormsElement(org.w3c.dom.Element element,
                     Model model)
Method Detail

getLogger

protected abstract org.apache.log4j.Category getLogger()
Returns the logger object.


init

public abstract void init()
                   throws org.chiba.xml.xforms.exception.XFormsException
Performs element init.


getId

public java.lang.String getId()
Returns the global id of this element.


getModel

public Model getModel()
Returns the context model of this element.


getElement

public org.w3c.dom.Element getElement()
Returns the DOM element of this element.


getTarget

public org.w3c.dom.events.EventTarget getTarget()
Returns the DOM event target of this element.


getContainerObject

public Container getContainerObject()

getParentObject

public XFormsElement getParentObject()

performDefault

protected void performDefault(org.w3c.dom.events.Event event)
performs the default Action of this Element. Element that need default actions must overwrite this method.


dispatch

public boolean dispatch(java.lang.String type,
                        java.lang.Object info)
dispatch an DOM Event. If the return-value is true (preventDefault() was not called), the Default Action is performed.


equals

public boolean equals(java.lang.Object object)
Description copied from class: java.lang.Object
Determine whether this Object is semantically equal to another Object.

There are some fairly strict requirements on this method which subclasses must follow:

  • It must be transitive. If a.equals(b) and b.equals(c), then a.equals(c) must be true as well.
  • It must be symmetric. a.equals(b) and b.equals(a) must have the same value.
  • It must be reflexive. a.equals(a) must always be true.
  • It must be consistent. Whichever value a.equals(b) returns on the first invocation must be the value returned on all later invocations.
  • a.equals(null) must be false.
  • It must be consistent with hashCode(). That is, a.equals(b) must imply a.hashCode() == b.hashCode(). The reverse is not true; two objects that are not equal may have the same hashcode, but that has the potential to harm hashing performance.

This is typically overridden to throw a java.lang.ClassCastException if the argument is not comparable to the class performing the comparison, but that is not a requirement. It is legal for a.equals(b) to be true even though a.getClass() != b.getClass(). Also, it is typical to never cause a java.lang.NullPointerException.

In general, the Collections API (java.util) use the equals method rather than the == operator to compare objects. However, java.util.IdentityHashMap is an exception to this rule, for its own good reasons.

The default implementation returns this == o.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).