org.autoplot.cdaweb.CDAWebDB

Class for encapsulating the functions of the database

CDAWebDB( )


CDAWeb


dbloc


getBaseUrl

getBaseUrl( String spid ) → String

returns the base URL. FTP urls in the all.xml file are converted to HTTP by replacing "ftp://cdaweb.gsfc.nasa.gov/pub/istp/" with "https://cdaweb.gsfc.nasa.gov/sp_phys/data/"

Parameters

spid - the id like "AC_H2_CRIS"

Returns:

the base URL like https://cdaweb.gsfc.nasa.gov/sp_phys/data/ace/cris/level_2_cdaweb/cris_h2

[search for examples] [view on GitHub] [view on old javadoc]


getFiles

getFiles( String spid, DatumRange tr, String useWebServiceHint, ProgressMonitor mon ) → String

isolate the code that resolves which files need to be accessed, so that we can use the web service when it is available.

Parameters

spid - the service provider id, like "AC_H2_CRIS"
tr - the timerange
useWebServiceHint - null means no preference, or "T", or "F" means use file template found in all.xml.
mon - progress monitor for the download

Returns:

array of strings, with filename|startTime|endTime

[search for examples] [view on GitHub] [view on old javadoc]


getFilesAndRangesFromWebService

getFilesAndRangesFromWebService( String spid, DatumRange tr ) → String

get the list of files from the web service

Parameters

spid - the id like "AC_H2_CRIS"
tr - the timerange constraint

Returns:

filename|startTime|endTime

[search for examples] [view on GitHub] [view on old javadoc]


getInstance

getInstance( ) → CDAWebDB

Returns:

org.autoplot.cdaweb.CDAWebDB

[search for examples] [view on GitHub] [view on old javadoc]


getMasterFile

getMasterFile( String ds, ProgressMonitor p ) → String

return the name of a master file, which is used to override the metadata of the daily files.

Parameters

ds - the name, like A1_K0_MPA
p - progress monitor

Returns:

the name (http://...) of the master file to use, which may be one of the data files.

[search for examples] [view on GitHub] [view on old javadoc]


getNaming

getNaming( String spid ) → String

returns the filename convention for spid, found in all.xml at /sites/datasite/dataset[@serviceprovider_ID='%s']/access For AC_H2_CRIS, this combines the subdividedby and filenaming properties to get %Y/ac_h2_cris_%Y%m%d_?%v.cdf

Parameters

spid - the id like "AC_H2_CRIS"

Returns:

URI template like "%Y/ac_h2_cris_%Y%m%d_?%v.cdf"

[search for examples] [view on GitHub] [view on old javadoc]


getOriginalFilesAndRangesFromWebService

getOriginalFilesAndRangesFromWebService( String spid, DatumRange tr, ProgressMonitor mon ) → String

get the list of files from the web service

Parameters

spid - the service provider id, like "AC_H2_CRIS"
tr - the timerange constraint
mon - progress monitor

Returns:

filename|startTime|endTime

[search for examples] [view on GitHub] [view on old javadoc]


getSampleFile

getSampleFile( String spid ) → String

return a sample file from the dataset.

Parameters

spid - the id like "AC_H2_CRIS"

Returns:

a downloadable file like http://cdaweb.gsfc.nasa.gov/pub/data/ace/cris/level_2_cdaweb/cris_h2/2015/ac_h2_cris_20151115_v06.cdf

[search for examples] [view on GitHub] [view on old javadoc]


getSampleTime

getSampleTime( String spid ) → String

return a range of a file that could be plotted. Right now, this just creates a FSM and gets a file.

Parameters

spid - the id like "AC_H2_CRIS"

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc]


getServiceProviderIds

getServiceProviderIds( ) → Map

Returns:

Map from serviceproviderId to description

[search for examples] [view on GitHub] [view on old javadoc]


getTimeRange

getTimeRange( String spid ) → String

return the timerange spanning the availability of the dataset.

Parameters

spid - service provider id.

Returns:

the time range (timerange_start, timerange_stop) for the dataset.

[search for examples] [view on GitHub] [view on old javadoc]


isOnline

isOnline( ) → boolean

returns true if the CDAWeb is on line.

Returns:

true if the CDAWeb is on line.

[search for examples] [view on GitHub] [view on old javadoc]


main

main( java.lang.String[] args ) → void

4.2 seconds before getting description. After too!

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


maybeRefresh

maybeRefresh( ProgressMonitor mon ) → void

refresh no more often than once per 10 minutes. We don't need to refresh often. Note it only takes a few seconds to refresh, plus download time, but we don't want to pound on the CDAWeb server needlessly.

Parameters

mon - a ProgressMonitor

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]


refresh

refresh( ProgressMonitor mon ) → void

Download and parse the all.xml to create a database of available products.

Parameters

mon - progress monitor for the task

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc]