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

java.lang.Object
  extended by org.dspace.app.xmlui.wing.element.AbstractWingElement
      extended by org.dspace.app.xmlui.wing.element.Container
          extended by org.dspace.app.xmlui.wing.element.TextContainer
              extended by org.dspace.app.xmlui.wing.element.RichTextContainer
                  extended by org.dspace.app.xmlui.wing.element.Value
All Implemented Interfaces:
WingElement

public class Value
extends RichTextContainer

This class represents field values.

Author:
Scott Phillips

Field Summary
static String A_CHECKED
          The name of the checked attribute
static String A_CONFIDENCE
          The name of the confidence attribute
static String A_OPTION
          The name of the option value attribute
static String A_TYPE
          The name of the value type attribute
static String E_VALUE
          The name of the value element
static String TYPE_AUTHORITY
          value of the metadata authority code associated with a raw value
static String TYPE_INTERPRETED
           
static String TYPE_OPTION
           
static String TYPE_RAW
          The possible value types
static String[] TYPES
          All the possible value types collected into one array.
 
Fields inherited from class org.dspace.app.xmlui.wing.element.Container
contents
 
Fields inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
context
 
Constructor Summary
protected Value(WingContext context, String type)
          Construct a new field value, when used in a multiple value context
protected Value(WingContext context, String type, boolean checked)
          Construct a new field value, when used in a multiple value context
protected Value(WingContext context, String type, String optionOrConfidence)
          Construct a new field value, when used in a multiple value context
 
Method Summary
protected  String getType()
           
 void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
          Translate this element and all contained elements into SAX events.
 
Methods inherited from class org.dspace.app.xmlui.wing.element.RichTextContainer
addButton, addButton, addCheckBox, addCheckBox, addComposite, addComposite, addFigure, addFigure, addFile, addFile, addHidden, addHidden, addHighlight, addPassword, addPassword, addRadio, addRadio, addSelect, addSelect, addText, addText, addTextArea, addTextArea, addXref, addXref, addXref, addXref, addXref, addXref, addXref
 
Methods inherited from class org.dspace.app.xmlui.wing.element.TextContainer
addContent, addContent, addContent
 
Methods inherited from class org.dspace.app.xmlui.wing.element.Container
dispose
 
Methods inherited from class org.dspace.app.xmlui.wing.element.AbstractWingElement
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_VALUE

public static final String E_VALUE
The name of the value element

See Also:
Constant Field Values

A_TYPE

public static final String A_TYPE
The name of the value type attribute

See Also:
Constant Field Values

A_OPTION

public static final String A_OPTION
The name of the option value attribute

See Also:
Constant Field Values

A_CHECKED

public static final String A_CHECKED
The name of the checked attribute

See Also:
Constant Field Values

A_CONFIDENCE

public static final String A_CONFIDENCE
The name of the confidence attribute

See Also:
Constant Field Values

TYPE_RAW

public static final String TYPE_RAW
The possible value types

See Also:
Constant Field Values

TYPE_INTERPRETED

public static final String TYPE_INTERPRETED
See Also:
Constant Field Values

TYPE_OPTION

public static final String TYPE_OPTION
See Also:
Constant Field Values

TYPE_AUTHORITY

public static final String TYPE_AUTHORITY
value of the metadata authority code associated with a raw value

See Also:
Constant Field Values

TYPES

public static final String[] TYPES
All the possible value types collected into one array.

Constructor Detail

Value

protected Value(WingContext context,
                String type)
         throws WingException
Construct a new field value, when used in a multiple value context

Parameters:
context - (Required) The context this element is contained in
type - (may be null) Determine the value's type, raw, default or interpreted. If the value is null, then raw is used.
Throws:
WingException

Value

protected Value(WingContext context,
                String type,
                String optionOrConfidence)
         throws WingException
Construct a new field value, when used in a multiple value context

Parameters:
context - (Required) The context this element is contained in
type - (may be null) Determine the value's type, raw, default or interpreted. If the value is null, then raw is used.
optionOrConfidence - (May be null) when type is TYPE_AUTHORITY, this is the symbolic confidence value, otherwise it is the option value.
Throws:
WingException

Value

protected Value(WingContext context,
                String type,
                boolean checked)
         throws WingException
Construct a new field value, when used in a multiple value context

Parameters:
context - (Required) The context this element is contained in
type - (may be null) Determine the value's type, raw, default or interpreted. If the value is null, then raw is used.
checked - (Required) Determine if the value is checked, only valid for checkboxes and radio buttons
Throws:
WingException
Method Detail

getType

protected String getType()
Returns:
the type of this value.

toSAX

public void toSAX(ContentHandler contentHandler,
                  LexicalHandler lexicalHandler,
                  NamespaceSupport namespaces)
           throws SAXException
Translate this element and all contained elements into SAX events. The events should be routed to the contentHandler found in the WingContext.

Specified by:
toSAX in interface WingElement
Overrides:
toSAX in class Container
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.