thredds.catalog.query
Class Selector

java.lang.Object
  extended by thredds.catalog.query.Selector
Direct Known Subclasses:
SelectGeoRegion, SelectList, SelectRange, SelectRangeDate, SelectService, SelectStation

public abstract class Selector
extends Object

Abstract class for DQC selector elements.

Author:
john caron

Field Summary
protected  ArrayList children
           
protected  List compound
           
protected  InvDocumentation desc
           
protected  String id
           
protected  boolean isUsed
           
protected  boolean multiple
           
protected  boolean required
           
protected  String template
           
protected  String title
           
 
Constructor Summary
protected Selector()
           
protected Selector(String title, String id, String template, String required, String multiple)
          Construct from fields in XML catalog.
 
Method Summary
 void appendQuery(StringBuffer sbuff, ArrayList values)
          Create the selector result string, and append.
 boolean equals(Object o)
          Instances which have same id are equal.
 InvDocumentation getDescription()
           
 String getId()
           
 String getSelectType()
           
 String getTemplate()
           
 String getTitle()
           
 int hashCode()
          Override Object.hashCode() to be consistent with this equals.
 boolean isMultiple()
           
 boolean isRequired()
           
 boolean isUsed()
           
 void setCompoundSelectors(List compound)
           
 void setDescription(InvDocumentation desc)
           
 void setId(String id)
           
 void setMultiple(String multiple)
           
 void setRequired(String required)
           
 void setTemplate(String template)
           
 void setTitle(String title)
           
 void setUsed(boolean isUsed)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

protected ArrayList children

compound

protected List compound

isUsed

protected boolean isUsed

title

protected String title

id

protected String id

template

protected String template

required

protected boolean required

multiple

protected boolean multiple

desc

protected InvDocumentation desc
Constructor Detail

Selector

protected Selector()

Selector

protected Selector(String title,
                   String id,
                   String template,
                   String required,
                   String multiple)
Construct from fields in XML catalog.

Parameters:
title - : human displayable name
id - : unique id
template - : for the query string
required - : true or false
multiple - : true or false
Method Detail

setDescription

public void setDescription(InvDocumentation desc)

getDescription

public InvDocumentation getDescription()

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

getId

public String getId()

setId

public void setId(String id)

getTemplate

public String getTemplate()

setTemplate

public void setTemplate(String template)

isRequired

public boolean isRequired()

setRequired

public void setRequired(String required)

isMultiple

public boolean isMultiple()

setMultiple

public void setMultiple(String multiple)

getSelectType

public String getSelectType()

setCompoundSelectors

public void setCompoundSelectors(List compound)

isUsed

public boolean isUsed()

setUsed

public void setUsed(boolean isUsed)

appendQuery

public void appendQuery(StringBuffer sbuff,
                        ArrayList values)
Create the selector result string, and append.

Parameters:
sbuff - append here
values - list of selected values, each value is a pair (String, Object), where the String is name of the value, and the Object is the value itself. We use the toString() method on the object to get its String representation.

equals

public boolean equals(Object o)
Instances which have same id are equal.

Overrides:
equals in class Object

hashCode

public int hashCode()
Override Object.hashCode() to be consistent with this equals.

Overrides:
hashCode in class Object


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.