| org.apache.cocoon.xml.AbstractXMLConsumer org.apache.cocoon.forms.util.XMLAdapter
XMLAdapter | public class XMLAdapter extends AbstractXMLConsumer implements XMLizable(Code) | | Adapter class that wraps a Form object and makes it
possible to populate a widget hierarchy from XML in form of SAX
events and serialize the content of the widget hierarchy as XML.
The XML format is such that there is one XML element for each
widget and the element get the widgets id as name. Exceptions from
this is that the elements in a repeater gets the name
item and a attribute position with the
position of the repeater child, instead of just a number (which is
not allowed as element name). Childs of a
MultiValueField are also embeded within a
item element. If the Form widget does
not have an id it get the name uknown .
An AggregateField can both be interpreted as one value
and as several widgets. This ambiguity is resolved by chosing to emit
the single value rather than the fields as XML. For population of the
form both forms are however allowed.
version: $Id: XMLAdapter.java 451957 2006-10-02 10:33:13Z vgritsenko $ |
Method Summary | |
public void | characters(char ch, int start, int len) Receive notification of character data. | public void | endElement(String uri, String loc, String raw) Receive notification of the end of an element. | public Locale | getLocale() | public void | setLocale(Locale locale) | public void | startElement(String uri, String loc, String raw, Attributes a) Receive notification of the beginning of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: loc - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. Parameters: a - The attributes attached to the element. | public void | toSAX(ContentHandler handler) Generates SAX events representing the object's state. |
XMLAdapter | public XMLAdapter(Widget widget)(Code) | | Wrap a Form with an XMLAdapter
|
characters | public void characters(char ch, int start, int len) throws SAXException(Code) | | Receive notification of character data.
Parameters: ch - The characters from the XML document. Parameters: start - The start position in the array. Parameters: len - The number of characters to read from the array. |
endElement | public void endElement(String uri, String loc, String raw) throws SAXException(Code) | | Receive notification of the end of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: loc - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. |
getLocale | public Locale getLocale()(Code) | | Get the locale used for conversion between XML data and Java objects
|
setLocale | public void setLocale(Locale locale)(Code) | | Set the locale used for conversion between XML data and Java objects
|
startElement | public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException(Code) | | Receive notification of the beginning of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: loc - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. Parameters: a - The attributes attached to the element. If there are noattributes, it shall be an empty Attributes object. |
Methods inherited from org.apache.cocoon.xml.AbstractXMLConsumer | public void characters(char ch, int start, int len) throws SAXException(Code)(Java Doc) public void comment(char ch, int start, int len) throws SAXException(Code)(Java Doc) public void endCDATA() throws SAXException(Code)(Java Doc) public void endDTD() throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String loc, String raw) throws SAXException(Code)(Java Doc) public void endEntity(String name) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int len) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startCDATA() throws SAXException(Code)(Java Doc) public void startDTD(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException(Code)(Java Doc) public void startEntity(String name) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc)
|
|
|