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

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.Instance
All Implemented Interfaces:
WingElement

public class Instance
extends Container

Instance represents multiple value instances of a field.

Author:
Scott Phillips

Field Summary
static String E_INSTANCE
          The name of the field instance element
 
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 Instance(WingContext context)
          Construct a new field value, when used in a multiple value context
 
Method Summary
 Value addOptionValue(String option)
          Add an option value, there may be many of these.
 Value setAuthorityValue()
          Set the authority value of the field removing any previous authority values.
 Value setAuthorityValue(String characters, String confidence)
          Set the authority value of the field removing any previous authority values.
 void setCheckedValue(boolean checked, String characters)
          Set the checkbox (or radio) value of this field.
 Value setInterpretedValue()
          Set the interpreted value of the field removing any previous interpreted values.
 void setInterpretedValue(Message message)
          Set the interpreted value of the field removing any previous interpreted values.
 void setInterpretedValue(String characters)
          Set the interpreted value of the field removing any previous interpreted values.
 void setOptionSelected(int returnValue)
          Set the given option as selected.
 void setOptionSelected(String returnValue)
          Set the given option as selected.
 Value setValue()
          Set the raw value of the field removing any previous raw values.
 void setValue(boolean checked)
          Set the raw value of the field removing any previous raw values.
 void setValue(Message message)
          Set the raw value of the field removing any previous raw values.
 void setValue(String characters)
          Set the raw value of the field removing any previous raw values.
 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.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_INSTANCE

public static final String E_INSTANCE
The name of the field instance element

See Also:
Constant Field Values
Constructor Detail

Instance

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

Parameters:
context - (Required) The context this element is contained in
Throws:
WingException
Method Detail

setValue

public Value setValue()
               throws WingException
Set the raw value of the field removing any previous raw values.

Throws:
WingException

setValue

public void setValue(String characters)
              throws WingException
Set the raw value of the field removing any previous raw values.

Parameters:
characters - (May be null) Field value as a string
Throws:
WingException

setValue

public void setValue(Message message)
              throws WingException
Set the raw value of the field removing any previous raw values.

Parameters:
message - (Required) A key into the i18n catalogue for translation into the user's preferred language.
Throws:
WingException

setValue

public void setValue(boolean checked)
              throws WingException
Set the raw value of the field removing any previous raw values. This will set the field as either checked or unchecked. This should only be used on checkbox or radio button fields.

Parameters:
checked - (Required) Whether the checkbox is checked or not.
Throws:
WingException

setAuthorityValue

public Value setAuthorityValue()
                        throws WingException
Set the authority value of the field removing any previous authority values. Initialized to an empty value.

Throws:
WingException

setAuthorityValue

public Value setAuthorityValue(String characters,
                               String confidence)
                        throws WingException
Set the authority value of the field removing any previous authority values.

Parameters:
characters - (May be null) Field value as a string
Throws:
WingException

setOptionSelected

public void setOptionSelected(String returnValue)
                       throws WingException
Set the given option as selected.

Parameters:
returnValue - (Required) The return value of the option to be selected.
Throws:
WingException

setOptionSelected

public void setOptionSelected(int returnValue)
                       throws WingException
Set the given option as selected.

Parameters:
returnValue - (Required) The return value of the option to be selected.
Throws:
WingException

setInterpretedValue

public Value setInterpretedValue()
                          throws WingException
Set the interpreted value of the field removing any previous interpreted values.

Throws:
WingException

setInterpretedValue

public void setInterpretedValue(String characters)
                         throws WingException
Set the interpreted value of the field removing any previous interpreted values.

Parameters:
characters - (May be null) Field value as a string
Throws:
WingException

setInterpretedValue

public void setInterpretedValue(Message message)
                         throws WingException
Set the interpreted value of the field removing any previous interpreted values.

Parameters:
message - (Required) A key into the i18n catalogue for translation into the user's preferred language.
Throws:
WingException

addOptionValue

public Value addOptionValue(String option)
                     throws WingException
Add an option value, there may be many of these. These values reference an option already added to the field.

Parameters:
option - (Required) The return value of the selected option.
Throws:
WingException

setCheckedValue

public void setCheckedValue(boolean checked,
                            String characters)
                     throws WingException
Set the checkbox (or radio) value of this field. This is a parameter whether the field is selected or not along with the return string that should be used with this parameter.

Parameters:
checked - (Required) determine if the value is selected or not.
characters - (may be null) The returned value for this field, if selected.
Throws:
WingException

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.