public class AddeImageParameterDataSource extends AddeImageDataSource
| Modifier and Type | Class and Description |
|---|---|
static class |
AddeImageParameterDataSource.BundlePreviewSelection |
ImageDataSource.ImageDataInfoaddeImageDataSelectiondescriptorsToUse, imageList, imageTimes, myDataChoices, PROP_BANDINFO, PROP_IMAGETYPE, timeMap, TYPE_RADAR, TYPE_SATELLITEchangeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YESDATAPATH_DATE_FORMAT, DATAPATH_DATE_PATTERN, 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 and Description |
|---|
AddeImageParameterDataSource() |
AddeImageParameterDataSource(DataSourceDescriptor descriptor,
ImageDataset ids,
Hashtable properties)
Create a new AddeImageParameterDataSource with the given dataset.
|
AddeImageParameterDataSource(DataSourceDescriptor descriptor,
List images,
Hashtable properties)
Creates a new
AddeImageParameterDataSource with an
List of ADDE URL strings. |
AddeImageParameterDataSource(DataSourceDescriptor descriptor,
String[] images,
Hashtable properties)
Create a new AddeImageParameterDataSource with an array of ADDE URL strings.
|
AddeImageParameterDataSource(DataSourceDescriptor descriptor,
String image,
Hashtable properties)
Creates a
AddeImageParameterDataSource with a single ADDE URL. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDataChoice(DataChoice choice)
Insert the new DataChoice into the dataChoice list.
|
protected boolean |
canDoProgressiveResolution() |
boolean |
canSaveDataToLocalDisk()
Is this data source capable of saving its data to local disk
|
void |
doMakeDataChoices()
Create the set of
DataChoice that represent
the data held by this data source. |
private void |
getAreaDirectory(Hashtable properties) |
String |
getChoiceName()
_more_
|
private List |
getChoicesFromSubset(CompositeDataChoice choice,
DataSelection subset)
Get the subset of the composite based on the selection
|
protected Data |
getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection dataSelection,
Hashtable requestProperties)
Create the actual data represented by the given
DataChoice. |
protected String |
getDataPrefix() |
DataSelection |
getDataSelection()
Overridden so that McIDAS-V can attempt to return the correct
DataSelection for the current DataChoice. |
List |
getDateTimeSelection()
Return the list of times held by the DataSelection member.
|
AddeImageDescriptor |
getDescriptor(Object object)
A utility method that helps us deal with legacy bundles that used to
have String file names as the id of a data choice.
|
List |
getDescriptors(DataChoice dataChoice,
DataSelection subset)
Get a list of descriptors from the choice and subset
|
String |
getDisplaySource() |
String |
getImageDataSourceName()
Overwrite base class method to return the name of this class.
|
boolean |
getIsProgressiveResolution() |
static String |
getKey(String src,
String key) |
private float[] |
getLineEleResolution(AreaDirectory ad) |
boolean |
getMatchDisplayRegion() |
PollingInfo |
getPollingInfo() |
private List<AreaDirectory> |
getPreviewDirectories(AddeImageDescriptor imageDescriptor) |
private AddeImageDescriptor |
getPreviewDirectory(AddeImageDescriptor aid) |
private Object |
getRelativeTimeObject(AddeImageDescriptor aid)
Get the object that we use to display relative time.
|
private void |
getSaveComponents() |
int |
getSaveEleMag() |
double |
getSaveLat() |
int |
getSaveLineMag() |
double |
getSaveLon() |
int |
getSaveNumEle() |
int |
getSaveNumLine() |
String |
getSavePlace() |
boolean |
getSaveShowPreview() |
DataSelection |
getSelForChoice(DataChoice choice) |
private String |
getServer(String urlString) |
boolean |
getShowPreview() |
String |
getSource() |
Hashtable |
getSourceProps() |
protected String |
getUrl()
Create the first part of the ADDE request URL
|
protected void |
handlePreviewImageError(int flag,
Exception excp)
Show the given error to the user.
|
private boolean |
hasBandInfo(DataChoice dataChoice)
Check if the DataChoice has a BandInfo for it's Id
|
protected boolean |
hasPollingInfo() |
boolean |
hasSelForChoice(DataChoice choice) |
void |
initAfterUnpersistence()
_more_
|
protected boolean |
initDataFromPollingInfo()
Method for intializing the data.
|
protected void |
initDataSelectionComponents(List components,
DataChoice dataChoice)
_more_
|
static boolean |
isFromFile(AddeImageDescriptor descriptor)
Checks to see if a given
AddeImageDescriptor is based upon a
local (or remote) file. |
protected boolean |
isPolling() |
private static String |
makeBandParam(AddeImageDescriptor descriptor) |
private static String |
makeBandParam(BandInfo bi)
Make a parmeter name for the BandInfo
|
private void |
makeCategories()
Initialize the
DataCategory objects that
this data source uses. |
private SingleBandedImage |
makeImage(AddeImageDescriptor aid,
MathType rangeType,
boolean fromSequence,
String readLabel,
DataSelection subset)
Create the single image defined by the given
AddeImageDescriptor. |
protected ImageSequence |
makeImageSequence(DataChoice dataChoice,
DataSelection subset)
Create the image sequence defined by the given dataChoice.
|
private boolean |
makePreviewImage(DataChoice dataChoice)
A hook to allow this data source to add data selection components
to the IDV field selector
|
protected void |
propertiesChanged()
The user changed the properties.
|
void |
putSelForChoice(DataChoice choice,
DataSelection sel) |
protected List |
readTextLines(String url)
Read the adde text url and return the lines of text.
|
static String |
removeKey(String src,
String key) |
static String |
replaceKey(String sourceUrl,
String key,
Object value) |
static String |
replaceKey(String src,
String oldKey,
String newKey,
Object value) |
private <T> void |
replaceKey(String key,
T value) |
protected List |
saveDataToLocalDisk(String prefix,
Object loadId,
boolean changeLinks)
Save files to local disk
|
void |
setChoiceName(String choiceName)
_more_
|
void |
setDataSelection(DataSelection s)
Overridden so that McIDAS-V can associate this data source's current
DataChoice with the given DataSelection. |
void |
setDateTimeSelection(List selectedTimes) |
void |
setDisplaySource(String src,
Hashtable props) |
void |
setIsProgressiveResolution(boolean isPG) |
private void |
setMag() |
void |
setPollingInfo(PollingInfo value) |
void |
setSaveEleMag(int saveEleMag) |
void |
setSaveLat(double saveLat) |
void |
setSaveLineMag(int saveLineMag) |
void |
setSaveLon(double saveLon) |
void |
setSaveNumEle(int saveNumEle) |
void |
setSaveNumLine(int saveNumLine) |
void |
setSavePlace(String savePlace) |
void |
setSaveShowPreview(boolean saveShowPreview) |
void |
setShowPreview(boolean showPreview) |
void |
setSource(String source) |
void |
setSourceProps(Hashtable sourceProps) |
private List |
sortChoices(List choices)
Sort the list of data choices on their time
|
calculateMagFactor, geoSpaceSubsetD, getAddeImageDataSelection, getBaseSource, getDataName, getEleMag, getEMag, getImageBoundingBox, getLatLonPoints, getLineMag, getLMag, getPreviewSource, getUnitString, initOldBundle, makeSamplingLabel, reloadData, reSetImageDataDescriptor, setEleMag, setLineMagcanCacheDataToDisk, doMakeDateTimes, doRemove, equals, getAllDateTimes, getBandCategories, getBandTimeSeriesCategories, getCacheDataToDisk, getCompositeDataChoices, getDataPaths, getDescriptorsToUse, getFullDescription, getImageList, getLocationsForPolling, getSelectedDateTimes, getTwoDCategories, getTwoDTimeSeriesCategories, getUniqueDayStrings, hashCode, isFileBased, makeImage, makeImageDataset, makeImageDescriptors, newFileFromPolling, reloadData, setBandInfo, setImageList, setNewFiles, updateStateaddActions, addDataChangeListener, addPropertiesTabs, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataSelectionComponents, getDataSource, getDateTimes, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, getPassword, getPathsThatCanBeRelative, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initAfterCreation, initDataChoice, initFromXml, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFilesFromPolling, notifyDataChange, putCache, putCache, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setObjectProperties, setObjectProperty, setPassword, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, writeFieldMaskFile, writeFieldMaskFileapplySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUniqueIdprivate static final org.slf4j.Logger logger
public static final String SIZE_KEY
public static final String PLACE_KEY
public static final String LATLON_KEY
public static final String LINELE_KEY
public static final String MAG_KEY
public static final String BAND_KEY
public static final String BANDINFO_KEY
public static final String UNIT_KEY
public static final String PREVIEW_KEY
public static final String SPAC_KEY
public static final String NAV_KEY
public static final String AUX_KEY
public static final String DOC_KEY
public static final String SPACING_BRIT
public static final String SPACING_NON_BRIT
protected ProjectionImpl sampleProjection
public MapProjection sampleMapProjection
private List twoDCategories
private List twoDTimeSeriesCategories
private List bandCategories
private List bandTimeSeriesCategories
private String baseSource
private Hashtable sourceProps
private Hashtable selectionProps
private int lineResolution
private int elementResolution
private float lRes
private float eRes
private int lineMag
private int elementMag
private GeoSelection lastGeoSelection
private DataChoice lastChoice
private Boolean showPreview
private FlatField previewImage
private MapProjection previewProjection
private AreaDirectory previewDir
private AREAnav previewNav
private boolean haveDataSelectionComponents
private GeoPreviewSelection previewSel
private GeoLatLonSelection laLoSel
private String choiceName
private String saveCoordType
private double saveLat
private double saveLon
private int saveNumLine
private int saveNumEle
private int saveLineMag
private int saveEleMag
private Boolean saveShowPreview
private String displaySource
protected List<DataChoice> stashedChoices
private List saveImageList
private int previewLineRes
private int previewEleRes
private boolean fromBundle
private boolean hasRemoteChoices
private Map<String,AreaDirectory> requestIdToDirectory
private Hashtable<String,DataSelection> choiceToSel
AreaDirectory[][] currentDirs
public AddeImageParameterDataSource()
public AddeImageParameterDataSource(DataSourceDescriptor descriptor, String image, Hashtable properties) throws VisADException
AddeImageParameterDataSource with a single ADDE URL.
Note: the URLs should point at "image" data.descriptor - DataSourceDescriptor for this data source.image - ADDE URLproperties - The properties for this data source.VisADExceptionpublic AddeImageParameterDataSource(DataSourceDescriptor descriptor, String[] images, Hashtable properties) throws VisADException
descriptor - DataSourceDescriptor for this data source.images - Array of ADDE URLs.properties - Properties for this data source.VisADExceptionpublic AddeImageParameterDataSource(DataSourceDescriptor descriptor, List images, Hashtable properties) throws VisADException
AddeImageParameterDataSource with an
List of ADDE URL strings.
Note: the URLs should point at "image" data.descriptor - DataSourceDescriptor for this data source.images - List of ADDE URL strings.properties - Properties for this data source.VisADExceptionpublic AddeImageParameterDataSource(DataSourceDescriptor descriptor, ImageDataset ids, Hashtable properties) throws VisADException
descriptor - DataSourceDescriptor for this data source.ids - Dataset.properties - Properties for this data source.VisADExceptionprotected void propertiesChanged()
ucar.unidata.data.imagery.ImageDataSourcepropertiesChanged in class ImageDataSourceprotected boolean initDataFromPollingInfo()
ucar.unidata.data.imagery.ImageDataSourceinitDataFromPollingInfo in class ImageDataSourceprotected boolean isPolling()
isPolling in class DataSourceImplpublic void setPollingInfo(PollingInfo value)
setPollingInfo in class DataSourceImplprotected boolean hasPollingInfo()
hasPollingInfo in class DataSourceImplpublic PollingInfo getPollingInfo()
getPollingInfo in class DataSourceImplpublic void initAfterUnpersistence()
ucar.unidata.data.imagery.AddeImageDataSourceinitAfterUnpersistence in interface DataSourceinitAfterUnpersistence in class AddeImageDataSourcepublic boolean canSaveDataToLocalDisk()
ucar.unidata.data.imagery.ImageDataSourcecanSaveDataToLocalDisk in interface DataSourcecanSaveDataToLocalDisk in class ImageDataSourcepublic DataSelection getSelForChoice(DataChoice choice)
public boolean hasSelForChoice(DataChoice choice)
public void putSelForChoice(DataChoice choice, DataSelection sel)
protected List saveDataToLocalDisk(String prefix, Object loadId, boolean changeLinks) throws Exception
saveDataToLocalDisk in class AddeImageDataSourceprefix - destination dir and file prefixloadId - For JobManagerchangeLinks - Change internal file referencesException - On badnessprotected String getDataPrefix()
getDataPrefix in class DataSourceImplpublic AddeImageDescriptor getDescriptor(Object object)
getDescriptor in class ImageDataSourceobject - May be an AddeImageDescriptor (for new bundles) or a
String that is converted to an image descriptor.public String getImageDataSourceName()
getImageDataSourceName in class AddeImageDataSourceprivate void setMag()
private void getAreaDirectory(Hashtable properties)
protected void initDataSelectionComponents(List components, DataChoice dataChoice)
ucar.unidata.data.imagery.AddeImageDataSourceinitDataSelectionComponents in class AddeImageDataSourcecomponents - _more_dataChoice - _more_private boolean makePreviewImage(DataChoice dataChoice)
dataChoice - the data choiceprotected void handlePreviewImageError(int flag, Exception excp)
handlePreviewImageError in class AddeImageDataSourceexcp - The exceptionflag - _more_public static String replaceKey(String sourceUrl, String key, Object value)
private <T> void replaceKey(String key, T value)
public void doMakeDataChoices()
DataChoice that represent
the data held by this data source. We create one top-level
CompositeDataChoice that represents
all of the image time steps. We create a set of children
DirectDataChoice, one for each time step.doMakeDataChoices in class ImageDataSourcepublic DataSelection getDataSelection()
DataSelection for the current DataChoice.getDataSelection in interface DataSourcegetDataSelection in class DataSourceImplpublic void setDataSelection(DataSelection s)
DataChoice with the given DataSelection.setDataSelection in class DataSourceImplprotected void addDataChoice(DataChoice choice)
addDataChoice in class AddeImageDataSourcechoice - new choice to addprivate void makeCategories()
DataCategory objects that
this data source uses.public static boolean isFromFile(AddeImageDescriptor descriptor)
AddeImageDescriptor is based upon a
local (or remote) file.
The check is pretty simple: is descriptor.getSource() a valid
path?
descriptor - AddeImageDescriptor of questionable origins. Shouldn't be null.true if descriptor's source is a valid path.protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException
DataChoice.getDataInner in class AddeImageDataSourcedataChoice - Either the
CompositeDataChoice
representing all time steps or a
DirectDataChoice
representing a single time step.category - Not really used.dataSelection - Defines any time subsets.requestProperties - extra request propertiesRemoteException - Java RMI problemVisADException - VisAD problemprivate boolean hasBandInfo(DataChoice dataChoice)
dataChoice - choice to checkprotected ImageSequence makeImageSequence(DataChoice dataChoice, DataSelection subset) throws VisADException, RemoteException
makeImageSequence in class ImageDataSourcedataChoice - The choice.subset - any time subsets.RemoteException - Java RMI problemVisADException - VisAD problemprivate SingleBandedImage makeImage(AddeImageDescriptor aid, MathType rangeType, boolean fromSequence, String readLabel, DataSelection subset) throws VisADException, RemoteException
AddeImageDescriptor.aid - Holds image directory and location of the desired image.rangeType - "rangeType" to use (if non-null).fromSequence - _more_readLabel - subset - geographical subsetting infoRemoteException - Java RMI problemVisADException - VisAD problemprivate static String makeBandParam(BandInfo bi)
bi - the BandInfo in questionprivate static String makeBandParam(AddeImageDescriptor descriptor)
private Object getRelativeTimeObject(AddeImageDescriptor aid)
aid - The image descriptorprivate List sortChoices(List choices)
choices - The data choicespublic List getDescriptors(DataChoice dataChoice, DataSelection subset)
getDescriptors in class AddeImageDataSourcedataChoice - Data choicesubset - subsetting infoprivate List getChoicesFromSubset(CompositeDataChoice choice, DataSelection subset)
choice - composite choicesubset - time selectionprivate List<AreaDirectory> getPreviewDirectories(AddeImageDescriptor imageDescriptor)
private AddeImageDescriptor getPreviewDirectory(AddeImageDescriptor aid)
public void setDisplaySource(String src, Hashtable props)
public String getDisplaySource()
private float[] getLineEleResolution(AreaDirectory ad)
protected List readTextLines(String url)
url - adde url to a text filenull if in error.protected String getUrl()
public Hashtable getSourceProps()
public void setSourceProps(Hashtable sourceProps)
public String getChoiceName()
ucar.unidata.data.imagery.AddeImageDataSourcegetChoiceName in class AddeImageDataSourcepublic void setChoiceName(String choiceName)
ucar.unidata.data.imagery.AddeImageDataSourcesetChoiceName in class AddeImageDataSourcechoiceName - _more_public String getSavePlace()
public void setSavePlace(String savePlace)
public double getSaveLat()
public void setSaveLat(double saveLat)
public double getSaveLon()
public void setSaveLon(double saveLon)
public int getSaveNumLine()
public void setSaveNumLine(int saveNumLine)
public int getSaveNumEle()
public void setSaveNumEle(int saveNumEle)
public int getSaveLineMag()
public void setSaveLineMag(int saveLineMag)
public int getSaveEleMag()
public void setSaveEleMag(int saveEleMag)
public boolean getShowPreview()
public void setShowPreview(boolean showPreview)
public boolean getSaveShowPreview()
public void setSaveShowPreview(boolean saveShowPreview)
private void getSaveComponents()
public List getDateTimeSelection()
getDateTimeSelection in interface DataSourcegetDateTimeSelection in class DataSourceImplpublic void setDateTimeSelection(List selectedTimes)
setDateTimeSelection in interface DataSourcesetDateTimeSelection in class DataSourceImplprotected boolean canDoProgressiveResolution()
public boolean getIsProgressiveResolution()
public void setIsProgressiveResolution(boolean isPG)
public boolean getMatchDisplayRegion()