org.dspace.app.xmlui.wing.element
Class Data

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Data
All Implemented Interfaces:
WingElement

public class Data
extends AbstractWingElement

This class represents data, by data we mean the translated and untranslated characters in between XML elements. When data needs to be translated it is enclosed inside the cocoon i18n schema while untranslated data is enclosed inside nothing.

Author:
Scott Phillips

Field Summary
static String A_CATALOGUE
          The name of the catalogue attribute (used inside text or i18n message)
static String A_TYPE
          The name of the type attribute (used inside params)
static String A_VALUE
          The name of the value attribute (used inside params)
static String E_PARAM
          The name of the param element
static String E_TEXT
          The name of the text element
static String E_TRANSLATE
          The name of the translate element
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Constructor Summary
protected Data(WingContext context, Message message)
          Construct a new data element using translated content.
protected Data(WingContext context, String characters)
          Construct a new data element with untranslated content.
 
Method Summary
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this element into SAX
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
dispose, endElement, endElement, getWingContext, greater, lesser, require, require, requireFalse, requireTrue, restrict, sendCharacters, setWingContext, startElement, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E_TEXT

public static final String E_TEXT
The name of the text element

See Also:
Constant Field Values

E_TRANSLATE

public static final String E_TRANSLATE
The name of the translate element

See Also:
Constant Field Values

E_PARAM

public static final String E_PARAM
The name of the param element

See Also:
Constant Field Values

A_CATALOGUE

public static final String A_CATALOGUE
The name of the catalogue attribute (used inside text or i18n message)

See Also:
Constant Field Values

A_TYPE

public static final String A_TYPE
The name of the type attribute (used inside params)

See Also:
Constant Field Values

A_VALUE

public static final String A_VALUE
The name of the value attribute (used inside params)

See Also:
Constant Field Values
Constructor Detail

Data

protected Data(WingContext context,
               Message message)
        throws WingException
Construct a new data element using translated content.

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
message - (Required) translatable data
Throws:
WingException

Data

protected Data(WingContext context,
               String characters)
        throws WingException
Construct a new data element with untranslated content.

Parameters:
context - (Required) The context this element is contained in, such as where to route SAX events and what i18n catalogue to use.
characters - (Required) Untranslated character data.
Throws:
WingException
Method Detail

toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this element into SAX

Parameters:
contentHandler - (Required) The registered contentHandler where SAX events should be routed too.
lexicalHandler - (Required) The registered lexicalHandler where lexical events (such as CDATA, DTD, etc) should be routed too.
namespaces - (Required) SAX Helper class to keep track of namespaces able to determine the correct prefix for a given namespace URI.
Throws:
SAXException


Copyright © 2012 DuraSpace. All Rights Reserved.