Esri Geoportal Server
1.0

com.esri.gpt.catalog.schema
Class InputDelimitedTextArea

java.lang.Object
  extended by com.esri.gpt.catalog.schema.Component
      extended by com.esri.gpt.catalog.schema.UiComponent
          extended by com.esri.gpt.catalog.schema.Input
              extended by com.esri.gpt.catalog.schema.InputText
                  extended by com.esri.gpt.catalog.schema.InputTextArea
                      extended by com.esri.gpt.catalog.schema.InputDelimitedTextArea

public class InputDelimitedTextArea
extends InputTextArea

Input delimited text area component associated with a metadata parameter.

The component provides a text area for inputing a delimited list of values (such as keywords) associated with multiple nodes within a metadata document.

The component is configured from a node with a schema configuration XML document.

Example:

<parameter key="abstract">
<input type="delimitedTextArea" cols="60" rows="8" delimiter=","/>
</parameter>


Field Summary
 
Fields inherited from class com.esri.gpt.catalog.schema.Input
INPUTTYPE_DELIMITEDTEXTAREA, INPUTTYPE_MAP, INPUTTYPE_SELECTMANYCHECKBOX, INPUTTYPE_SELECTONEMEMU, INPUTTYPE_SELECTWITHOTHER, INPUTTYPE_TEXT, INPUTTYPE_TEXTAREA, INPUTTYPE_TEXTARRAY, INPUTTYPE_UNKNOWN
 
Constructor Summary
InputDelimitedTextArea()
          Default constructor.
InputDelimitedTextArea(InputDelimitedTextArea objectToDuplicate)
          Construct by duplicating an existing object.
 
Method Summary
 void configure(CfgContext context, Node node, NamedNodeMap attributes)
          Configures the object based upon a node loaded from a schema configuration XML.
 InputDelimitedTextArea duplicate()
          Produces a deep clone of the object.
 void echo(StringBuffer sb)
          Appends property information for the component to a StringBuffer.
 String getDefaultDelimeter()
          Gets the default delimiter (",").
 String getDelimiter()
          Gets the delimiter.
protected  String makeDelimitedValue(Parameter parameter)
          Makes a delimited string multiple values associated with the parameter.
 UIComponent makeInputComponent(UiContext context, Section section, Parameter parameter)
          Makes a Faces HtmlInputTextarea component for a parameter.
 void setDelimiter(String delimiter)
          Sets the delimiter.
 void unBind(UiContext context, UIComponent editorForm, Parameter parameter)
          Triggered on the save event from the metadata editor.
 
Methods inherited from class com.esri.gpt.catalog.schema.InputTextArea
getCols, getDefaultCols, getDefaultMaxlength, getDefaultRows, getRows, setCols, setRows
 
Methods inherited from class com.esri.gpt.catalog.schema.InputText
getDefaultSize, getMaxlength, getSize, setMaxlength, setSize
 
Methods inherited from class com.esri.gpt.catalog.schema.Input
applyHint, evaluateDefault, findInputComponent, formatValue, getDefaultValue, getEditable, getFacesId, getHintMode, getHintResourceKey, getInputValue, getOnChange, getOnClick, getTestResourceKey, makeOutputComponent, setComponentValue, setDefaultValue, setEditable, setFacesId, setHintMode, setHintResourceKey, setOnChange, setOnClick, setTestResourceKey
 
Methods inherited from class com.esri.gpt.catalog.schema.UiComponent
getStyleClass, makeBR, makeNBSP, setStyleClass
 
Methods inherited from class com.esri.gpt.catalog.schema.Component
getKey, setKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputDelimitedTextArea

public InputDelimitedTextArea()
Default constructor.


InputDelimitedTextArea

public InputDelimitedTextArea(InputDelimitedTextArea objectToDuplicate)
Construct by duplicating an existing object.

Parameters:
objectToDuplicate - the object to duplicate
Method Detail

getDelimiter

public String getDelimiter()
Gets the delimiter.

Returns:
the delimiter

setDelimiter

public void setDelimiter(String delimiter)
Sets the delimiter.
The delimiter will be trimmed.
If a null or empty string is supplied, the default delimiter will be used (",").

Parameters:
delimiter - the delimiter

getDefaultDelimeter

public String getDefaultDelimeter()
Gets the default delimiter (",").

Returns:
the default max length

configure

public void configure(CfgContext context,
                      Node node,
                      NamedNodeMap attributes)
Configures the object based upon a node loaded from a schema configuration XML.
The super.configure method should be invoked prior to any sub-class configuration.

The following attributes are configured:
key maxlength cols rows delimiter

Overrides:
configure in class InputTextArea
Parameters:
context - the configuration context
node - the configuration node
attributes - the attributes of the configuration node

duplicate

public InputDelimitedTextArea duplicate()
Produces a deep clone of the object.
The duplication constructor is invoked.
return new InputDelimitedTextArea(this);

Overrides:
duplicate in class InputTextArea

echo

public void echo(StringBuffer sb)
Appends property information for the component to a StringBuffer.
The method is intended to support "FINEST" logging.
super.echo should be invoked prior appending any local information.

Overrides:
echo in class InputTextArea
Parameters:
sb - the StringBuffer to use when appending information

makeDelimitedValue

protected String makeDelimitedValue(Parameter parameter)
Makes a delimited string multiple values associated with the parameter.

Parameters:
parameter - the associated parameter
Returns:
the delimited string

makeInputComponent

public UIComponent makeInputComponent(UiContext context,
                                      Section section,
                                      Parameter parameter)
Makes a Faces HtmlInputTextarea component for a parameter.

The multiple values associated with the parameter (parameter.getMultipleValues()) are used to generate a delimited single value. The super class method (InputTextArea.makeInputComponent) is then invoked to create component.

The reverse operation is executed on the unBind() method.

Overrides:
makeInputComponent in class InputTextArea
Parameters:
context - the UI context
section - the parent section
parameter - the associated parameter
Returns:
the UI component

unBind

public void unBind(UiContext context,
                   UIComponent editorForm,
                   Parameter parameter)
            throws SchemaException
Triggered on the save event from the metadata editor.

On this event, the multiple values associated with the parameter (parameter.getMultipleValues()) are generated from the delimited input string.

Overrides:
unBind in class InputText
Parameters:
context - the UI context
editorForm - the Faces HtmlForm for the metadata editor
parameter - the associated parameter
Throws:
SchemaException - if an associated Faces UIComponent cannot be located

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.