ucar.unidata.data.point
Class AddePointDataSource

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.data.DataSourceImpl
          extended by ucar.unidata.data.FilesDataSource
              extended by ucar.unidata.data.point.PointDataSource
                  extended by ucar.unidata.data.point.AddePointDataSource
All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable

public class AddePointDataSource
extends PointDataSource

A data source for ADDE point data

Version:
$Revision: 1.76 $ $Date: 2007/07/05 18:46:10 $
Author:
Don Murray

Field Summary
 
Fields inherited from class ucar.unidata.data.point.PointDataSource
fieldsDescription, POINT_DATA, PROP_STATIONMODELNAME, STATION_DATA, STATION_PLOT
 
Fields inherited from class ucar.unidata.data.FilesDataSource
adapters, oldSourceFromBundles, sources
 
Fields inherited from class ucar.unidata.data.DataSourceImpl
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YES
 
Fields inherited from interface ucar.unidata.data.DataSource
MOST_RECENT, ordinalNames, PROP_AUTOCREATEDISPLAY, PROP_BASEDIRECTORY, PROP_CACHEABLE, PROP_DATACHOICENAME, PROP_DISPLAYPROPERTIES, PROP_DOCUMENTLINKS, PROP_FILEPATTERN, PROP_GEOLOCATION, PROP_ICON, PROP_NAME, PROP_POLLINFO, PROP_RESOLVERURL, PROP_SERVICE_HTTP, PROP_SUBPROPERTIES, PROP_TIMELABELS, PROP_TITLE
 
Constructor Summary
AddePointDataSource()
          Default contstructor.
AddePointDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties)
          Create a new AddePointDataSource from the parameters supplied.
 
Method Summary
 boolean canDoGeoSelection()
          Can this datasource do the geoselection subsetting and decimation
protected  boolean canDoGeoSelectionMap()
          Used for the geo subsetting property gui as to whether to show the map selection or not
protected  boolean canDoGeoSelectionStride()
          Used for the geo subsetting property gui as to whether to show the stride or not
 boolean canSaveDataToLocalDisk()
          Is this data source capable of saving its data to local disk
 boolean equals(Object o)
          Check to see if this AddePointDataSource is equal to the object in question.
 List getAllLevels(DataChoice dataChoice, DataSelection dataSelection)
          Get the list of all levels available from this DataSource
 String getDataName()
          Get the name of this data.
protected  DataChoice getDescriptionDataChoice()
          Get the data choice to use for the description
 int hashCode()
          HashCode implementation.
static void mainxxx(String[] args)
          main
protected  void makeFieldDescription(FieldImpl fi)
          Create a field description from the field
protected  FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox)
          Get the data from the ADDE URL and make the FieldImpl of PointObs from it.
protected  List saveDataToLocalDisk(String prefix, Object loadId, boolean changeLinks)
          Save data to local disk
 void setUrl(String url)
          Deprecated. Use setSource() instead.
 
Methods inherited from class ucar.unidata.data.point.PointDataSource
applyProperties, doMakeDataChoices, getBinRoundTo, getBinWidth, getDataInner, getFullDescription, getPointCategories, getPropertiesComponents, getSource, init, setBinRoundTo, setBinWidth, setRoundToFromComboBox, setSource, setWidthFromComboBox
 
Methods inherited from class ucar.unidata.data.FilesDataSource
doRemove, getDataFileExtension, getDataPaths, getFilePath, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initAfterUnpersistence, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, setNewFiles, setSources, sourcesChanged, updateState
 
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addPropertiesTabs, applyFieldMask, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDescription, getDescriptor, getErrorMessage, getExtraGeoSelectionComponent, getFileFilterForPolling, getid, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initDataChoice, initDataSelectionComponents, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, notifyDataChange, putCache, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDescription, setDescriptor, setDirectory, setInError, setInError, setInError, setName, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, writeFieldMaskFile, writeFieldMaskFile
 
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
 

Constructor Detail

AddePointDataSource

public AddePointDataSource()
                    throws VisADException
Default contstructor.

Throws:
VisADException

AddePointDataSource

public AddePointDataSource(DataSourceDescriptor descriptor,
                           String source,
                           Hashtable properties)
                    throws VisADException
Create a new AddePointDataSource from the parameters supplied.

Parameters:
descriptor - DataSourceDescriptor for this.
source - Source URL
properties - Hashtable of properties for the source.
Throws:
VisADException - couldn't create the VisAD data
Method Detail

getDataName

public String getDataName()
Get the name of this data. Override superclass method.

Overrides:
getDataName in class PointDataSource
Returns:
name of data

canSaveDataToLocalDisk

public boolean canSaveDataToLocalDisk()
Is this data source capable of saving its data to local disk

Specified by:
canSaveDataToLocalDisk in interface DataSource
Overrides:
canSaveDataToLocalDisk in class DataSourceImpl
Returns:
Can save to local disk

saveDataToLocalDisk

protected List saveDataToLocalDisk(String prefix,
                                   Object loadId,
                                   boolean changeLinks)
                            throws Exception
Save data to local disk

Overrides:
saveDataToLocalDisk in class FilesDataSource
Parameters:
prefix - Fir dir and prefix
loadId - For JobManager
changeLinks - Change internal file references
Returns:
The files we made
Throws:
Exception - On badness

makeObs

protected FieldImpl makeObs(DataChoice dataChoice,
                            DataSelection subset,
                            ucar.unidata.geoloc.LatLonRect bbox)
                     throws Exception
Get the data from the ADDE URL and make the FieldImpl of PointObs from it.

Specified by:
makeObs in class PointDataSource
Parameters:
dataChoice - data choice
subset - subsetting selection
bbox - bounding box. may be null
Returns:
data corresponding to the choice and subset
Throws:
Exception - problem creating the data

makeFieldDescription

protected void makeFieldDescription(FieldImpl fi)
Create a field description from the field

Overrides:
makeFieldDescription in class PointDataSource
Parameters:
fi - field to use

getDescriptionDataChoice

protected DataChoice getDescriptionDataChoice()
Get the data choice to use for the description

Overrides:
getDescriptionDataChoice in class PointDataSource
Returns:
the data choice

canDoGeoSelection

public boolean canDoGeoSelection()
Can this datasource do the geoselection subsetting and decimation

Specified by:
canDoGeoSelection in interface DataSource
Overrides:
canDoGeoSelection in class DataSourceImpl
Returns:
_can do geo subsetting

canDoGeoSelectionStride

protected boolean canDoGeoSelectionStride()
Used for the geo subsetting property gui as to whether to show the stride or not

Overrides:
canDoGeoSelectionStride in class DataSourceImpl
Returns:
default is true

canDoGeoSelectionMap

protected boolean canDoGeoSelectionMap()
Used for the geo subsetting property gui as to whether to show the map selection or not

Overrides:
canDoGeoSelectionMap in class DataSourceImpl
Returns:
default is true

equals

public boolean equals(Object o)
Check to see if this AddePointDataSource is equal to the object in question.

Overrides:
equals in class FilesDataSource
Parameters:
o - object in question
Returns:
true if they are the same or equivalent objects

hashCode

public int hashCode()
HashCode implementation.

Overrides:
hashCode in class Object
Returns:
hash code

setUrl

public void setUrl(String url)
Deprecated. Use setSource() instead.

Set the ADDE URL used for this object.

Parameters:
url - ADDE URL

mainxxx

public static void mainxxx(String[] args)
                    throws Exception
main

Parameters:
args - args
Throws:
Exception - On badness

getAllLevels

public List getAllLevels(DataChoice dataChoice,
                         DataSelection dataSelection)
Get the list of all levels available from this DataSource

Specified by:
getAllLevels in interface DataSource
Overrides:
getAllLevels in class DataSourceImpl
Parameters:
dataChoice - The data choice we are getting levels for
dataSelection - data selection
Returns:
List of all available levels