org.apache.cocoon.components.language.markup.xsp
Class XSPObjectHelper

java.lang.Object
  |
  +--org.apache.cocoon.components.language.markup.xsp.XSPObjectHelper
Direct Known Subclasses:
XSPCookieHelper

public class XSPObjectHelper
extends java.lang.Object

Base class for XSP's object model manipulation logicsheets

Version:
CVS $Id: XSPObjectHelper.java,v 1.6 2002/03/08 04:08:53 vgritsenko Exp $
Author:
Ricardo Rocha, Sylvain Wallez (Cocoon1 xspExpr() methods port)

Field Summary
protected static org.xml.sax.helpers.AttributesImpl emptyAttr
          Empty attributes used for contentHandler.startElement()
 
Constructor Summary
XSPObjectHelper()
           
 
Method Summary
protected static void addAttribute(org.xml.sax.helpers.AttributesImpl attr, java.lang.String name, java.lang.String value)
          Add an attribute
protected static void data(org.xml.sax.ContentHandler contentHandler, java.lang.String data)
          Add string data
protected static void elementData(java.lang.String uri, java.lang.String prefix, org.xml.sax.ContentHandler contentHandler, java.lang.String name, java.lang.String data)
          Output an element containing text only and no attributes
protected static void elementData(java.lang.String uri, java.lang.String prefix, org.xml.sax.ContentHandler contentHandler, java.lang.String name, java.lang.String data, org.xml.sax.helpers.AttributesImpl attr)
          Output an element containing text only and attributes
protected static void end(java.lang.String uri, java.lang.String prefix, org.xml.sax.ContentHandler contentHandler, java.lang.String name)
          End an element with the proper object's uri and prefix
protected static void start(java.lang.String uri, java.lang.String prefix, org.xml.sax.ContentHandler contentHandler, java.lang.String name)
          Start an element with the proper object's uri and prefix and no attributes
protected static void start(java.lang.String uri, java.lang.String prefix, org.xml.sax.ContentHandler contentHandler, java.lang.String name, org.xml.sax.helpers.AttributesImpl attr)
          Start an element with the proper object's uri and prefix and with attributes
static void xspExpr(org.xml.sax.ContentHandler contentHandler, boolean v)
          Implementation of <xsp:expr> for boolean : outputs characters representing the value (true / false).
static void xspExpr(org.xml.sax.ContentHandler contentHandler, byte v)
          Implementation of <xsp:expr> for byte : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, char v)
          Implementation of <xsp:expr> for char : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, java.util.Collection v)
          Implementation of <xsp:expr> for java.util.Collection : outputs the value by calling xspExpr() on each element of the collection.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, double v)
          Implementation of <xsp:expr> for double : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, float v)
          Implementation of <xsp:expr> for long : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, int v)
          Implementation of <xsp:expr> for int : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, long v)
          Implementation of <xsp:expr> for long : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, org.w3c.dom.Node v)
          Implementation of <xsp:expr> for org.w3c.dom.Node : converts the Node to a SAX event stream.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, java.lang.Object v)
          Implementation of <xsp:expr> for Object depending on its class : if it's an array, call xspExpr() on all its elements, if it's class has a specific xspExpr()implementation, use it, else, output it's string representation.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, java.lang.String text)
          Implementation of <xsp:expr> for String : outputs characters representing the value.
static void xspExpr(org.xml.sax.ContentHandler contentHandler, XMLizable v)
          Implementation of <xsp:expr> for XMLizable : outputs the value by calling v.toSax(contentHandler).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emptyAttr

protected static final org.xml.sax.helpers.AttributesImpl emptyAttr
Empty attributes used for contentHandler.startElement()
Constructor Detail

XSPObjectHelper

public XSPObjectHelper()
Method Detail

elementData

protected static void elementData(java.lang.String uri,
                                  java.lang.String prefix,
                                  org.xml.sax.ContentHandler contentHandler,
                                  java.lang.String name,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Output an element containing text only and no attributes
Parameters:
contentHandler - The SAX content handler
name - The element name
data - The data contained by the element

elementData

protected static void elementData(java.lang.String uri,
                                  java.lang.String prefix,
                                  org.xml.sax.ContentHandler contentHandler,
                                  java.lang.String name,
                                  java.lang.String data,
                                  org.xml.sax.helpers.AttributesImpl attr)
                           throws org.xml.sax.SAXException
Output an element containing text only and attributes
Parameters:
contentHandler - The SAX content handler
name - The element name
data - The data contained by the element
attr - The element attributes

start

protected static void start(java.lang.String uri,
                            java.lang.String prefix,
                            org.xml.sax.ContentHandler contentHandler,
                            java.lang.String name)
                     throws org.xml.sax.SAXException
Start an element with the proper object's uri and prefix and no attributes
Parameters:
contentHandler - The SAX content handler
name - The element name

start

protected static void start(java.lang.String uri,
                            java.lang.String prefix,
                            org.xml.sax.ContentHandler contentHandler,
                            java.lang.String name,
                            org.xml.sax.helpers.AttributesImpl attr)
                     throws org.xml.sax.SAXException
Start an element with the proper object's uri and prefix and with attributes
Parameters:
contentHandler - The SAX content handler
name - The element name
attr - The element attributes

end

protected static void end(java.lang.String uri,
                          java.lang.String prefix,
                          org.xml.sax.ContentHandler contentHandler,
                          java.lang.String name)
                   throws org.xml.sax.SAXException
End an element with the proper object's uri and prefix
Parameters:
contentHandler - The SAX content handler
name - The element name

addAttribute

protected static void addAttribute(org.xml.sax.helpers.AttributesImpl attr,
                                   java.lang.String name,
                                   java.lang.String value)
                            throws org.xml.sax.SAXException
Add an attribute
Parameters:
attr - The attribute list
name - The attribute name
value - The attribute value

data

protected static void data(org.xml.sax.ContentHandler contentHandler,
                           java.lang.String data)
                    throws org.xml.sax.SAXException
Add string data
Parameters:
contentHandler - The SAX content handler
data - The string data

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           char v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for char : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           byte v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for byte : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           boolean v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for boolean : outputs characters representing the value (true / false).
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           int v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for int : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           long v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for long : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           float v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for long : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           double v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for double : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           java.lang.String text)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for String : outputs characters representing the value.
Parameters:
contentHandler - the SAX content handler
text - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           XMLizable v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for XMLizable : outputs the value by calling v.toSax(contentHandler).
Parameters:
contentHandler - the SAX content handler
v - the XML fragment

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           org.w3c.dom.Node v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for org.w3c.dom.Node : converts the Node to a SAX event stream.
Parameters:
contentHandler - the SAX content handler
v - the value

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           java.util.Collection v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for java.util.Collection : outputs the value by calling xspExpr() on each element of the collection.
Parameters:
contentHandler - the SAX content handler
v - the XML fragment

xspExpr

public static void xspExpr(org.xml.sax.ContentHandler contentHandler,
                           java.lang.Object v)
                    throws org.xml.sax.SAXException
Implementation of <xsp:expr> for Object depending on its class :
Parameters:
contentHandler - the SAX content handler
v - the value


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.