org.autoplot.dods.MetaDataScraper

Scrape the metadata from the <dods URL>.html form of the data. Get a new instance, call parse( <dods URL>.html ), then call getAttr(String varName) which returns a Map of the properties. Note the scraping is only necessary because Jeremy forgot about the .das and .dds extensions. .dds returns the stream syntax. .das returns the metadata.

MetaDataScraper( )

Creates a new instance of SPDFMetaDataScraper. Use parseData then getAttr after creating the instance.


getAttr

getAttr( String varName ) → Map

provides the attributes for this variable in a map. The keys are the String attribute name (e.g. UNITS) and the values are either type String or Double.

Parameters

varName - the variable name

Returns:

the attributes

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


getRecDims

getRecDims( String varName ) → int

Parameters

varName - a String

Returns:

int[]

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


parseURL

parseURL( java.net.URL url ) → void

retrieve the URL, which should be a dods server form. The content is scraped, looking for textareas with the name varname_attr. The textarea content is assumed to be a newline delimited set of name value pairs, name: value. Value is of type Double or String. After parseURL is performed, getAttr is used to get Attributes.

Parameters

url - an URL

Returns:

void (returns nothing)

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