com.isti.jevalresp
Class RespWebProc

java.lang.Object
  extended by com.isti.jevalresp.RespProcessor
      extended by com.isti.jevalresp.RespWebProc

public class RespWebProc
extends RespProcessor

Class RespWebProc is an extension of high-level processing functions for 'JEvalResp' that adds methods for fetching and processing responses from a web-services server.


Field Summary
protected  boolean multiServerflag
           
protected  java.lang.String serverUrlString
           
 
Fields inherited from class com.isti.jevalresp.RespProcessor
errorMessage, headerFlag, LINE_SEP_STR, multiOutputFlag, numberErrors, numRespFound, outputDirectory, outputFileNamesCount, outputFileNamesStr, RESP_FILE_PREFIX
 
Constructor Summary
RespWebProc(java.lang.String serverUrlStr, boolean multiOutputFlag, boolean headerFlag, java.io.File outputDirectory, boolean multiSvrflag)
          Creates processor object for fetching and processing responses from a web-services server.
 
Method Summary
 boolean findAndOutputWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, double b62XValue, int respTypeIndex, boolean stdioFlag)
          Finds responses (via web services) with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, int respTypeIndex, boolean stdioFlag)
          Finds responses (via web services) with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, int respTypeIndex, boolean stdioFlag)
          Finds responses (via web services) with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, int respTypeIndex, boolean stdioFlag)
          Finds responses (via web services) with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, int respTypeIndex, boolean stdioFlag)
          Finds responses (via web services) with matching channel IDs, then processes them and writes their output.
protected  boolean findOneServerWebResps(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, boolean verboseFlag, RespCallback respCallbackObj, java.lang.String lSvrUrlStr, boolean noNetFlag, boolean noStaFlag)
          Finds responses with matching channel IDs on the given web-services server.
 boolean findWebResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, boolean verboseFlag, RespCallback respCallbackObj)
          Finds responses (via web services) with matching channel IDs.
 boolean findWebResponses(java.lang.String staListStr, java.lang.String chaListStr, java.lang.String netListStr, java.lang.String siteListStr, java.util.Date beginDateObj, java.util.Date endDateObj, boolean verboseFlag, RespCallback respCallbackObj)
          Finds responses (via web services) with matching channel IDs.
 
Methods inherited from class com.isti.jevalresp.RespProcessor
clearErrorMessage, doReadResponses, findAndOutputResponses, findAndOutputResponses, findAndOutputResponses, findAndOutputResponses, findAndOutputResponses, findResponses, findResponses, getErrorFlag, getErrorMessage, getNumberErrors, getNumRespFound, getOutputFileNamesCount, getOutputFileNamesStr, outputData, outputData, processResponse, processResponse, processResponse, processResponse, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverUrlString

protected final java.lang.String serverUrlString

multiServerflag

protected final boolean multiServerflag
Constructor Detail

RespWebProc

public RespWebProc(java.lang.String serverUrlStr,
                   boolean multiOutputFlag,
                   boolean headerFlag,
                   java.io.File outputDirectory,
                   boolean multiSvrflag)
Creates processor object for fetching and processing responses from a web-services server.

Parameters:
serverUrlStr - base URL string(s) for web-services server(s).
multiOutputFlag - true to allow multiple response outputs with the same "net.sta.loc.cha" code.
headerFlag - true to enable header information in the output file; false for no header information.
outputDirectory - output directory.
multiSvrflag - true to fetch responses from all specified web-services servers; false fetch no more than one response.
Method Detail

findAndOutputWebResponses

public boolean findAndOutputWebResponses(java.lang.String[] staArr,
                                         java.lang.String[] chaArr,
                                         java.lang.String[] netArr,
                                         java.lang.String[] siteArr,
                                         java.util.Date beginDateObj,
                                         java.util.Date endDateObj,
                                         int outUnitsConvIdx,
                                         double[] freqArr,
                                         boolean logSpacingFlag,
                                         boolean verboseFlag,
                                         int startStageNum,
                                         int stopStageNum,
                                         boolean useDelayFlag,
                                         boolean showInputFlag,
                                         boolean listInterpOutFlag,
                                         boolean listInterpInFlag,
                                         double listInterpTension,
                                         boolean unwrapPhaseFlag,
                                         boolean totalSensitFlag,
                                         double b62XValue,
                                         int respTypeIndex,
                                         boolean stdioFlag)
Finds responses (via web services) with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
showInputFlag - true to show RESP input text (sent to stdout).
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
unwrapPhaseFlag - true to unwrap phase output values.
totalSensitFlag - true to use stage 0 (total) sensitivity; false to use computed sensitivity.
b62XValue - sample value for polynomial blockette (62).
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputWebResponses

public boolean findAndOutputWebResponses(java.lang.String[] staArr,
                                         java.lang.String[] chaArr,
                                         java.lang.String[] netArr,
                                         java.lang.String[] siteArr,
                                         java.util.Date beginDateObj,
                                         java.util.Date endDateObj,
                                         int outUnitsConvIdx,
                                         double[] freqArr,
                                         boolean logSpacingFlag,
                                         boolean verboseFlag,
                                         int startStageNum,
                                         int stopStageNum,
                                         boolean useDelayFlag,
                                         boolean showInputFlag,
                                         boolean listInterpOutFlag,
                                         boolean listInterpInFlag,
                                         double listInterpTension,
                                         boolean unwrapPhaseFlag,
                                         boolean totalSensitFlag,
                                         int respTypeIndex,
                                         boolean stdioFlag)
Finds responses (via web services) with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
showInputFlag - true to show RESP input text (sent to stdout).
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
unwrapPhaseFlag - true to unwrap phase output values.
totalSensitFlag - true to use stage 0 (total) sensitivity; false to use computed sensitivity.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputWebResponses

public boolean findAndOutputWebResponses(java.lang.String[] staArr,
                                         java.lang.String[] chaArr,
                                         java.lang.String[] netArr,
                                         java.lang.String[] siteArr,
                                         java.util.Date beginDateObj,
                                         java.util.Date endDateObj,
                                         int outUnitsConvIdx,
                                         double[] freqArr,
                                         boolean logSpacingFlag,
                                         boolean verboseFlag,
                                         int startStageNum,
                                         int stopStageNum,
                                         boolean useDelayFlag,
                                         boolean showInputFlag,
                                         boolean listInterpOutFlag,
                                         boolean listInterpInFlag,
                                         double listInterpTension,
                                         int respTypeIndex,
                                         boolean stdioFlag)
Finds responses (via web services) with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
showInputFlag - true to show RESP input text (sent to stdout).
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputWebResponses

public boolean findAndOutputWebResponses(java.lang.String[] staArr,
                                         java.lang.String[] chaArr,
                                         java.lang.String[] netArr,
                                         java.lang.String[] siteArr,
                                         java.util.Date beginDateObj,
                                         java.util.Date endDateObj,
                                         int outUnitsConvIdx,
                                         double[] freqArr,
                                         boolean logSpacingFlag,
                                         boolean verboseFlag,
                                         int startStageNum,
                                         int stopStageNum,
                                         boolean useDelayFlag,
                                         boolean showInputFlag,
                                         int respTypeIndex,
                                         boolean stdioFlag)
Finds responses (via web services) with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
showInputFlag - true to show RESP input text (sent to stdout).
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputWebResponses

public boolean findAndOutputWebResponses(java.lang.String[] staArr,
                                         java.lang.String[] chaArr,
                                         java.lang.String[] netArr,
                                         java.lang.String[] siteArr,
                                         java.util.Date beginDateObj,
                                         java.util.Date endDateObj,
                                         int outUnitsConvIdx,
                                         double[] freqArr,
                                         boolean logSpacingFlag,
                                         boolean verboseFlag,
                                         int startStageNum,
                                         int stopStageNum,
                                         int respTypeIndex,
                                         boolean stdioFlag)
Finds responses (via web services) with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findWebResponses

public boolean findWebResponses(java.lang.String[] staArr,
                                java.lang.String[] chaArr,
                                java.lang.String[] netArr,
                                java.lang.String[] siteArr,
                                java.util.Date beginDateObj,
                                java.util.Date endDateObj,
                                boolean verboseFlag,
                                RespCallback respCallbackObj)
Finds responses (via web services) with matching channel IDs. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
verboseFlag - true for verbose output messages.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found.
Returns:
true if successful; false if error (in which case 'getErrorMessage()' may be used to see information about the error).

findWebResponses

public boolean findWebResponses(java.lang.String staListStr,
                                java.lang.String chaListStr,
                                java.lang.String netListStr,
                                java.lang.String siteListStr,
                                java.util.Date beginDateObj,
                                java.util.Date endDateObj,
                                boolean verboseFlag,
                                RespCallback respCallbackObj)
Finds responses (via web services) with matching channel IDs. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staListStr - a list of station name patterns to search for, or a null or empty string to accept all station names.
chaListStr - a list of channel name patterns to search for, or a null or empty string to accept all channel names.
netListStr - a list of network name patterns to search for, or a null or empty string to accept all network names.
siteListStr - a list of site name patterns to search for, or a null or empty string to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
verboseFlag - true for verbose output messages.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found.
Returns:
true if successful; false if error (in which case 'getErrorMessage()' may be used to see information about the error).

findOneServerWebResps

protected boolean findOneServerWebResps(java.lang.String[] staArr,
                                        java.lang.String[] chaArr,
                                        java.lang.String[] netArr,
                                        java.lang.String[] siteArr,
                                        java.util.Date beginDateObj,
                                        java.util.Date endDateObj,
                                        boolean verboseFlag,
                                        RespCallback respCallbackObj,
                                        java.lang.String lSvrUrlStr,
                                        boolean noNetFlag,
                                        boolean noStaFlag)
Finds responses with matching channel IDs on the given web-services server. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
verboseFlag - true for verbose output messages.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found.
lSvrUrlStr - local copy of base URL string for single web-services server.
noNetFlag - true if no network name provided.
noStaFlag - true if no station name provided.
Returns:
true if successful; false if error (in which case 'getErrorMessage()' may be used to see information about the error).