HiRISE

HiRISE.HiReport.form
Class CtxProductForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by HiRISE.HiReport.form.ProductForm
          extended by HiRISE.HiReport.form.CtxProductForm
All Implemented Interfaces:
Serializable

public class CtxProductForm
extends ProductForm

Corresponds to a request for a single CTX observation by ID

See Also:
Serialized Form

Field Summary
static Pattern CTX_ID_PATTERN
          Regular expression to match CTX product IDs
static String ID
          CVS ID
 
Fields inherited from class HiRISE.HiReport.form.ProductForm
id, version
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
CtxProductForm()
           
 
Method Summary
 int getOrbitNumber()
          Get the orbit number from the ID
 String getPath()
          Get the (HiRISE-like) relative path
 float getTargetLatitude()
          Get the target latitude from the ID
 boolean isPds()
          True if this is a PDS-style CTX ID
 boolean parse(String input)
          Parse input to see if it is a CTX observation ID
 void setId(String id)
          Set the observation ID.
 String toString()
          Text representation
 org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map, javax.servlet.http.HttpServletRequest req)
          Verify that the observation ID is valid.
 
Methods inherited from class HiRISE.HiReport.form.ProductForm
getId, getVersion, setVersion
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values

CTX_ID_PATTERN

public static Pattern CTX_ID_PATTERN
Regular expression to match CTX product IDs

Constructor Detail

CtxProductForm

public CtxProductForm()
Method Detail

parse

public boolean parse(String input)
Parse input to see if it is a CTX observation ID

Parameters:
input - possible CTX observation ID
Returns:
true if this looks like a CTX observation ID

setId

public void setId(String id)
Description copied from class: ProductForm
Set the observation ID.

Overrides:
setId in class ProductForm
Parameters:
id - Observation ID

toString

public String toString()
Text representation

Overrides:
toString in class ProductForm
Returns:
product#version

isPds

public boolean isPds()
True if this is a PDS-style CTX ID

Returns:
true for CTX PDS ID

getOrbitNumber

public int getOrbitNumber()
Get the orbit number from the ID

Returns:
orbit number

getTargetLatitude

public float getTargetLatitude()
Get the target latitude from the ID

Returns:
target latitude

getPath

public String getPath()
Get the (HiRISE-like) relative path

Returns:
directory path

validate

public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping map,
                                                      javax.servlet.http.HttpServletRequest req)
Verify that the observation ID is valid.

Overrides:
validate in class ProductForm

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona