public class LASBackendRequest
extends gov.noaa.pmel.tmap.jdom.LASDocument
Constructor and Description |
---|
LASBackendRequest() |
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
getAnalysisAxes()
For each variable in this request get the list of axes that are to be transformed by an analysis request.
|
java.lang.String |
getAxisAsConstraint(java.lang.String type)
Get an SQL statement to constraint a query according the range of the axis
|
java.util.ArrayList<java.lang.String> |
getAxisAsDRDSConstraint(java.lang.String type)
Get a list of strings that will constrain a DRDS request according to the range of the axis
|
java.io.File |
getCancelFile()
This is a convenience method to get the cancel result as a java.io.File
|
org.jdom.Element |
getChainedData(java.lang.String result_ID)
Using the ID passed in find the data element that contains this result.
|
java.lang.String |
getChainedDataFile(java.lang.String result_ID)
Get the chained result as a file
|
java.lang.String |
getChainedDataURL(java.lang.String result_ID)
Get the data access URL of the chained result.
|
Constraint |
getConstraint(java.lang.String lhs)
Get the a constraint based on the value of the left-hand side (the name of the constratain).
|
java.lang.String |
getConstraintRHS(java.lang.String lhs)
Get the value (right-hand side) of the constraint based on the value of the left-hand side (the name of the constratain).
|
java.util.ArrayList |
getConstraints()
Returns an array list of gov.noaa.pmel.tmap.las.util.Constraint objects
|
java.util.HashMap<java.lang.String,java.lang.String> |
getConstraintsAsSymbols()
Get constraints in the request as Ferret symbols
|
java.lang.String |
getConstraintString(java.lang.String operator)
Get all the constraints in a request as a string that can be used to limit the select joined by the operator.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getDataAsSymbols()
Create a hash map of all of the information in the dataObjects so they can be written out as Ferret symbols.
|
java.lang.String |
getDataAttribute(java.lang.String variable,
java.lang.String attribute)
Get the value of a particular attribute for a particular variable.
|
java.lang.String |
getDatabaseProperty(java.lang.String property)
Get the value of a particular database property.
|
java.lang.String |
getDatabaseTime(java.lang.String time)
Convert a time value according to the time_type database property.
|
java.lang.String |
getDatabaseTime(java.lang.String time,
java.lang.String target_format)
Convert a time string to the desired format
|
double |
getDatabaseTimeAsDouble(java.lang.String time,
java.lang.String time_units)
Given a UDUNITS-style time unit (hours since 1990-01-01 00:00:00) and a formatted time string get the double value
|
java.lang.String |
getDatabaseXhi()
Get a normalized x high value.
|
java.lang.String |
getDatabaseXlo()
Get a normalized x low value.
|
int |
getDataCount()
The number of data elements.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getDataSymbols()
Translate the dataObjects in this request into pairs of names and values and return in a HashMap
|
java.util.HashMap<java.lang.String,java.lang.String> |
getDataSymbols(org.jdom.Element data,
int index)
For a given dataObject data element pull out the property groups, then get each property and flatten it all into a symbol for Ferret.
|
java.lang.String |
getDRDSVariableConstraintString(java.lang.String variable)
Construct a variable constraint from the variable that is suitable as a constraint
expression on a DRDS server.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getFerretSymbols()
Get all the information in this request as Ferret symbols
|
java.lang.String |
getJSESSIONID()
Get the JSESSIONID if it exists (returns an empty string if it does not exist).
|
java.lang.String |
getKey(org.jdom.Element operation) |
java.lang.String |
getMissingConstraint()
Build an SQL constraint that will mask out missing values.
|
long |
getProductTimeout()
Get the "product_timeout" value (0 if it does not exist).
|
long |
getProgressTimeout()
Get the "ui_timeout" property value.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getPropertyGroup(java.lang.String group_name) |
java.lang.String |
getPropertyValuesCommaSeparated(java.lang.String group_name) |
java.lang.String |
getRegionAsConstraint()
Get the entire region as an SQL statement that will select only values within the region
|
java.util.HashMap<java.lang.String,java.lang.String> |
getRegionsAsSymbols()
Reduce all the region information into a HashMap of symbol names and values so the information can be handed to Ferret.
|
java.lang.String |
getRemoteURL()
If this service is running remotely, this is the URL of the remote server.
|
java.lang.String |
getResult(java.lang.String ID)
Get the URL of a result by ID
|
java.lang.String |
getResultAsFile(java.lang.String ID)
Returns the file name of the result with the given ID.
|
java.lang.String |
getResultAsFileByType(java.lang.String in_type)
Pull out the file name of a result according to type.
|
int |
getResultCount()
Count the number of results in the expected response
|
java.lang.String |
getResultFileName(int i)
Get the file name of the result at a particular index
|
java.lang.String |
getResultID(int i)
Get the ID of the result at a particular index.
|
java.lang.String |
getResultMimeType(int i)
Get the MIME type of the result at a particular index
|
java.lang.String |
getResultType(int i)
Get the result type at a particular index
|
java.lang.String |
getResultURL(int i)
Get the URL of the result at a particular index
|
java.lang.String |
getService()
Get the service used by the backend service request
|
java.lang.String |
getServiceAction()
Get the service action for this backend service request.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getSymbols()
Get any properties that are not assigned to a particular data set as a HashMap
|
java.util.HashMap<java.lang.String,java.lang.String> |
getSymbols(org.jdom.Element group,
int index)
A helper routine that pulls the properties out of a property group element.
|
java.lang.String |
getThi()
Get the high time value with no formatting applied
|
java.lang.String |
getThi(int i) |
java.lang.String |
getThi(int i,
java.lang.String format) |
java.lang.String |
getThi(java.lang.String format)
Get a formatted string value for the high time in the region
|
java.lang.String |
getTlo()
Get the low time value with no formatting applied
|
java.lang.String |
getTlo(int i) |
java.lang.String |
getTlo(int i,
java.lang.String format) |
java.lang.String |
getTlo(java.lang.String format)
Get a formatted string value for the low time in the region
|
java.util.ArrayList |
getVariables()
Returns a list of variable names in this request.
|
java.lang.String |
getVariablesAsString()
Returns an SQL formatted string containing the list of variable names with no duplicates separated by commas.
|
java.lang.String |
getVariablesAsStringWithIFNULL()
Returns an SQL formatted string containing the list of variable names separated by commas with each variable surrounded by an IFNULL construct.
|
java.lang.String |
getXhi()
Get the high X value.
|
java.lang.String |
getXlo()
Get the low X value.
|
java.lang.String |
getYhi()
Get the high Y value.
|
java.lang.String |
getYlo()
Get the low Y value
|
java.lang.String |
getZhi()
Get the high Z value.
|
java.lang.String |
getZlo()
Get the low Z value.
|
boolean |
hasVariable(java.lang.String var)
See if the request contains a variable of a particular name.
|
boolean |
isCanceled()
Ask whether or not a request has been canceled.
|
boolean |
isCancelRequest()
A convenience method that will report if the <cancel> element is present
in the request.
|
boolean |
isRemote()
Check for the existence of the
|
boolean |
isTrajectory() |
void |
mapResultToURL(java.lang.String serverURL,
java.lang.String resultType)
Set the URL for a particular result type.
|
boolean |
removeProperty(java.lang.String group,
java.lang.String property)
Remove a particular property from the property group.
|
void |
removePropertyExcludedGroups(org.jdom.Element operation) |
boolean |
removePropertyGroup(java.lang.String group)
Remove an entire property group from the request.
|
void |
runRemote()
Set an empty element
|
void |
setCancel()
A convenience method to add the <cancel> element to the request.
|
void |
setLocalFileNames(java.lang.String output_dir,
java.lang.String http_base_url,
java.lang.String opendap_base_url)
Translates the suggested file names into local file names for use by a remote service.
|
convertProperties, findProperty, findPropertyGroup, findPropertyGroup, findPropertyGroupList, findPropertyGroupList, findPropertyValue, getElementByXPath, getProperty, toCompactString, toEncodedJavaScriptSafeURLString, toEncodedURLString, toJavaScriptSafeString, toJSON, toJSON, toString, toString, write, write, write, writeElement
addContent, addContent, addContent, addContent, clone, cloneContent, detachRootElement, equals, getBaseURI, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getDocType, getDocument, getParent, getProperty, getRootElement, hashCode, hasRootElement, indexOf, removeContent, removeContent, removeContent, removeContent, setBaseURI, setContent, setContent, setContent, setContent, setDocType, setProperty, setRootElement
public boolean isCancelRequest() throws java.io.IOException
java.io.IOException
public boolean isCanceled()
public java.io.File getCancelFile()
public void setCancel()
public java.util.HashMap<java.lang.String,java.lang.String> getDataAsSymbols()
getDataSymbols()
public org.jdom.Element getChainedData(java.lang.String result_ID)
result_ID
- the ID of the chained result to findgetChainedDataFile(String)
,
getChainedDataURL(String)
public java.lang.String getChainedDataURL(java.lang.String result_ID)
result_ID
- the chained result idpublic java.lang.String getChainedDataFile(java.lang.String result_ID)
result_ID
- the id of the result that is chainedpublic java.util.HashMap<java.lang.String,java.lang.String> getRegionsAsSymbols()
public java.util.HashMap<java.lang.String,java.lang.String> getSymbols()
public java.util.HashMap<java.lang.String,java.lang.String> getPropertyGroup(java.lang.String group_name)
public java.lang.String getPropertyValuesCommaSeparated(java.lang.String group_name)
public java.util.HashMap<java.lang.String,java.lang.String> getDataSymbols()
public java.util.HashMap<java.lang.String,java.lang.String> getSymbols(org.jdom.Element group, int index)
group
- the group elementindex
- the index of the data object that gets added to the symbol name.public java.util.HashMap<java.lang.String,java.lang.String> getDataSymbols(org.jdom.Element data, int index)
data
- the data element to processindex
- the index of the data element to add to the symbol namepublic java.util.HashMap<java.lang.String,java.lang.String> getFerretSymbols() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.util.HashMap<java.lang.String,java.lang.String> getConstraintsAsSymbols()
public int getResultCount()
public int getDataCount()
public java.lang.String getResultType(int i)
i
- the indexpublic java.lang.String getResultURL(int i)
i
- the indexpublic java.lang.String getResultFileName(int i)
i
- the indexpublic java.lang.String getResultMimeType(int i)
i
- the indexpublic java.lang.String getResultID(int i)
i
- the indexpublic java.lang.String getResult(java.lang.String ID)
ID
- the id of the desired resultpublic java.lang.String getResultAsFile(java.lang.String ID)
ID
- the desired idpublic java.lang.String getResultAsFileByType(java.lang.String in_type)
in_type
- the type of the desired resultpublic java.lang.String getService() throws org.jdom.JDOMException, gov.noaa.pmel.tmap.exception.LASException
org.jdom.JDOMException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getServiceAction() throws org.jdom.JDOMException, gov.noaa.pmel.tmap.exception.LASException
org.jdom.JDOMException
gov.noaa.pmel.tmap.exception.LASException
public java.util.ArrayList getVariables()
public java.lang.String getVariablesAsString()
public java.lang.String getVariablesAsStringWithIFNULL() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public boolean hasVariable(java.lang.String var)
var
- the variable name to checkpublic java.lang.String getDataAttribute(java.lang.String variable, java.lang.String attribute)
variable
- look at this variableattribute
- get the value of this attributepublic java.lang.String getMissingConstraint() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getDatabaseProperty(java.lang.String property) throws gov.noaa.pmel.tmap.exception.LASException
property
- gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getThi(java.lang.String format) throws gov.noaa.pmel.tmap.exception.LASException
format
- the formatgov.noaa.pmel.tmap.exception.LASException
public java.lang.String getTlo(java.lang.String format) throws gov.noaa.pmel.tmap.exception.LASException
format
- the formatgov.noaa.pmel.tmap.exception.LASException
public java.lang.String getThi()
public java.lang.String getTlo(int i)
public java.lang.String getTlo(int i, java.lang.String format) throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getThi(int i, java.lang.String format) throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getThi(int i)
public java.lang.String getTlo()
public java.lang.String getZhi()
public java.lang.String getZlo()
public java.lang.String getYhi()
public java.lang.String getYlo()
public java.lang.String getXhi()
public java.lang.String getXlo()
public java.lang.String getDatabaseXhi() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getDatabaseXlo() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getAxisAsConstraint(java.lang.String type) throws gov.noaa.pmel.tmap.exception.LASException
type
- the axis (x, y, z, t)gov.noaa.pmel.tmap.exception.LASException
public java.util.ArrayList<java.lang.String> getAxisAsDRDSConstraint(java.lang.String type) throws gov.noaa.pmel.tmap.exception.LASException
type
- the axis type to be constrained (x, y, z or t)gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getRegionAsConstraint() throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getDatabaseTime(java.lang.String time) throws gov.noaa.pmel.tmap.exception.LASException
time
- the time to convertgov.noaa.pmel.tmap.exception.LASException
public double getDatabaseTimeAsDouble(java.lang.String time, java.lang.String time_units) throws gov.noaa.pmel.tmap.exception.LASException
time
- the formatted time stringtime_units
- the UDUNITS-style units stringjava.lang.Exception
gov.noaa.pmel.tmap.exception.LASException
public java.lang.String getDatabaseTime(java.lang.String time, java.lang.String target_format) throws gov.noaa.pmel.tmap.exception.LASException
time
- the original time stringtarget_format
- the new formatgov.noaa.pmel.tmap.exception.LASException
public java.util.ArrayList getConstraints()
public java.lang.String getConstraintRHS(java.lang.String lhs)
lhs
- the "name" (left-hand side) of the constraintpublic Constraint getConstraint(java.lang.String lhs)
lhs
- the "name" (left-hand side) of the constraintpublic java.lang.String getDRDSVariableConstraintString(java.lang.String variable) throws gov.noaa.pmel.tmap.exception.LASException
variable
- the variable to be use to build the constraintgov.noaa.pmel.tmap.exception.LASException
public java.lang.String getConstraintString(java.lang.String operator)
operator
- join each constraint using this operator (usually AND or OR)public long getProgressTimeout()
public long getProductTimeout()
public boolean removePropertyGroup(java.lang.String group)
group
- public void runRemote()
public boolean isRemote()
public java.lang.String getRemoteURL()
public void setLocalFileNames(java.lang.String output_dir, java.lang.String http_base_url, java.lang.String opendap_base_url) throws org.jdom.JDOMException
output_dir
- the output directory for this serverhttp_base_url
- the base url of the tomcat serveropendap_base_url
- the base url of the remote F-TDS serverorg.jdom.JDOMException
public void mapResultToURL(java.lang.String serverURL, java.lang.String resultType)
serverURL
- the URL of the LAS serverresultType
- the result type to be mappedpublic java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> getAnalysisAxes()
public java.lang.String getJSESSIONID()
public boolean removeProperty(java.lang.String group, java.lang.String property) throws gov.noaa.pmel.tmap.exception.LASException
group
- the property group nameproperty
- the name of the propertygov.noaa.pmel.tmap.exception.LASException
public java.lang.String getKey(org.jdom.Element operation)
public void removePropertyExcludedGroups(org.jdom.Element operation)
public boolean isTrajectory()