Esri Geoportal Server
1.0

com.esri.gpt.catalog.schema
Class Parameter

java.lang.Object
  extended by com.esri.gpt.catalog.schema.Component
      extended by com.esri.gpt.catalog.schema.Parameter

public class Parameter
extends Component

Parameter component associated with a metadata schema.

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

Example:
<parameter key="abstract">
</parameter>


Constructor Summary
Parameter()
          Default constructor.
Parameter(Parameter 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.
 Parameter duplicate()
          Produces a deep clone of the object.
 void echo(StringBuffer sb)
          Appends property information for the component to a StringBuffer.
 void evaluate(Schema schema, Document dom, XPath xpath)
          Evaluates a parameter based upon the supplied metadata document.
 Content getContent()
          Gets the Content component.
 Input getInput()
          Gets the input component.
 Label getLabel()
          Gets the label component.
 String getMeaningType()
          Gets the meaning type.
 Validation getValidation()
          Gets the validation component.
 boolean getVisible()
          Gets the visible status.
 boolean getVisibleOnDetails()
          Gets the status indicating if the parameter should be displayed on the view details page.
 void setContent(Content content)
          Sets the Content component.
 void setInput(Input input)
          Sets the input component.
 void setLabel(Label label)
          Sets the label component.
 void setMeaningType(String type)
          Sets the meaning type.
 void setValidation(Validation validation)
          Sets the validation component.
 void setVisible(boolean visible)
          Sets the visible status.
 void setVisibleOnDetails(boolean visible)
          Sets the status indicating if the parameter should be displayed on the view details page.
 void unBind(UiContext context, UIComponent editorForm)
          Triggered on the save event from the metadata editor.
 void update(Document dom, XPath xpath)
          Updates the metadata document template based upon entered parameter value(s).
 void validate(Schema schema, Section section)
          Validates a parameter.
 
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

Parameter

public Parameter()
Default constructor.


Parameter

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

Parameters:
objectToDuplicate - the object to duplicate
Method Detail

getContent

public Content getContent()
Gets the Content component.

Returns:
the Content component

setContent

public void setContent(Content content)
Sets the Content component.

Parameters:
content - the Content component

getInput

public Input getInput()
Gets the input component.

Returns:
the input component

setInput

public void setInput(Input input)
Sets the input component.

Parameters:
input - the input component

getLabel

public Label getLabel()
Gets the label component.

Returns:
the label component

setLabel

public void setLabel(Label label)
Sets the label component.

Parameters:
label - the label component

getMeaningType

public String getMeaningType()
Gets the meaning type.

Returns:
the meaning type

setMeaningType

public void setMeaningType(String type)
Sets the meaning type.

Parameters:
type - the meaning type

getValidation

public Validation getValidation()
Gets the validation component.

Returns:
the validation component

setValidation

public void setValidation(Validation validation)
Sets the validation component.

Parameters:
validation - the validation component

getVisible

public boolean getVisible()
Gets the visible status.

Returns:
true if the parameter is visible

setVisible

public void setVisible(boolean visible)
Sets the visible status.

Parameters:
visible - true if the parameter is visible

getVisibleOnDetails

public boolean getVisibleOnDetails()
Gets the status indicating if the parameter should be displayed on the view details page.

Returns:
true if the parameter should be displayed on the view details page

setVisibleOnDetails

public void setVisibleOnDetails(boolean visible)
Sets the status indicating if the parameter should be displayed on the view details page.

Parameters:
visible - true if the parameter should be displayed on the view details page

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:
meaning visible visibleOnDetails

The following child nodes are configured:
label input validation content

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

duplicate

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

Specified by:
duplicate in class Component

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 Component
Parameters:
sb - the StringBuffer to use when appending information

evaluate

public void evaluate(Schema schema,
                     Document dom,
                     XPath xpath)
              throws XPathExpressionException
Evaluates a parameter based upon the supplied metadata document.

The default behavior is to invoke the "evaluate" method for the Content component associated with the parameter, and then invoke the "evaluate" method on the Meaning component of the parent schema.

Parameters:
schema - the schema being evaluated
dom - the metadata document
xpath - an XPath object configured with an appropriate Namespace context for the schema
Throws:
XPathExpressionException - if an evaluation expression fails

unBind

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

The default behavior is to invoke the "unBind" method for the Input object, as well as each child parameter.

Parameters:
context - the UI context
editorForm - the Faces HtmlForm for the metadata editor
Throws:
SchemaException - if an associated Faces UIComponent cannot be located

update

public void update(Document dom,
                   XPath xpath)
            throws XPathExpressionException,
                   SchemaException
Updates the metadata document template based upon entered parameter value(s).

The default behavior is to invoke the "update" method for the Content component associated with the parameter.

Parameters:
dom - the metadata document template for the schema
xpath - an XPath object configured with an appropriate Namespace context for the schema
Throws:
XPathExpressionException - if an expression fails
SchemaException - if the update fails

validate

public void validate(Schema schema,
                     Section section)
Validates a parameter.

The default behavior is to invoke the "validate" method on the Validation component associated with the parameter, and then invoke the "evaluate" method on the Meaning component of the parent schema.

Encountered errors should be appended to the schema.getValidationErrors() collection.

Parameter values associated with meaning should be used to populate schema.getMeaning() values.

Parameters:
schema - the schema being validated
section - the section being validated

Esri Geoportal Server
1.0

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