public class TextPointDataSource extends PointDataSource
| Modifier and Type | Class and Description |
|---|---|
static class |
TextPointDataSource.Metadata
Class Metadata holds the skipRows and the list of metadata items
|
PointDataSource.PlotModelSelectionComponent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BLANK_DELIM
Blank delimiter
|
static java.lang.String |
COMMA_DELIM
Comma delimiter
|
boolean |
hasLatLon
_more_
|
static java.lang.String |
PREF_METADATAMAP
Where to write out the saved meta data listing
|
static java.lang.String |
PROP_DATAPROPERTIES
Property identifier for the hashtable of properties
|
static java.lang.String |
PROP_HEADER_BLOB
property id for the whole header blob, map and params
|
static java.lang.String |
PROP_HEADER_EXTRA
Property identifier for the
|
static java.lang.String |
PROP_HEADER_MAP
property id for the header map
|
static java.lang.String |
PROP_HEADER_PARAMS
property id for the header params
|
static java.lang.String |
PROP_HEADER_SKIP
property id for how many rows to skip
|
static java.lang.String |
PROP_HEADER_SKIPPATTERN
property id for how many rows to skip
|
static java.lang.String |
SEMICOLON_DELIM
Semicolon delimiter
|
static java.lang.String |
TAB_DELIM
Tab delimiter
|
boolean |
useDriverTime
_more_
|
fieldsDescription, POINT_DATA, PROP_FIRSTGUESS, PROP_GRID_GAIN, PROP_GRID_NUMPASSES, PROP_GRID_PARAM, PROP_GRID_SEARCH_RADIUS, PROP_GRID_UNIT, PROP_GRID_X, PROP_GRID_Y, PROP_STATIONMODELNAME, PROP_STATIONMODELSCALE, STATION_DATA, STATION_PLOTadapters, oldSourceFromBundles, sourceschangeDataPathsCbx, 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_TIMESTRIDE, PROP_TITLE| Constructor and Description |
|---|
TextPointDataSource()
Default constructor
|
TextPointDataSource(DataSourceDescriptor descriptor,
java.util.List sources,
java.util.Hashtable properties)
Create a new PointDataSource
|
TextPointDataSource(DataSourceDescriptor descriptor,
java.lang.String source,
java.util.Hashtable properties)
Create a new TextPointDataSource
|
TextPointDataSource(DataSourceDescriptor descriptor,
java.lang.String source,
java.lang.String name,
java.util.Hashtable properties)
Create a new TextPointDataSource
|
TextPointDataSource(java.lang.String source)
Create a TextPointDataSource from the path name
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertiesTabs(javax.swing.JTabbedPane tabbedPane)
add to properties tab
|
void |
applyNames(java.lang.String line)
update the gui
|
boolean |
applyProperties()
apply properties
|
void |
applySavedMetaData(TextPointDataSource.Metadata metadata)
Init the widgets
|
void |
applySavedMetaDataFromUI(TextPointDataSource.Metadata metadata)
THis gets called from the Preferences menu and sets the
metadata and also updates the skipRows
|
void |
applySavedMetaDataFromUIInner(TextPointDataSource.Metadata metadata)
This gets called in a thread from the applySavedMetaDataFromUI method
|
boolean |
canDoGeoSelection()
Can this datasource do the geoselection subsetting and decimation
|
protected boolean |
canDoGeoSelectionStride()
Used for the geo subsetting property gui as to whether to
show the stride or not
|
boolean |
canSaveDataToLocalDisk()
Can we save locally
|
void |
changeMetadata()
Show the metadata gui
|
void |
deleteMetaData(java.lang.String key)
Remove the given key from the saved mapping.
|
void |
doMakeDataChoices()
Make the data choices
|
boolean |
equals(java.lang.Object o)
Check to see if this TextPointDataSource is equal to the object
in question.
|
static int[] |
findLatLonAltIndices(visad.TupleType type)
Find the lat/lon/alt indicides
|
protected java.lang.String |
getContents(java.lang.String sourceFile)
Get the contents of the file as a string
|
protected java.lang.String |
getContents(java.lang.String sourceFile,
boolean sampleIt)
Read the given source file and return the text contents of it.
|
protected visad.Data |
getDataInner(DataChoice dataChoice,
DataCategory category,
DataSelection dataSelection,
java.util.Hashtable requestProperties)
Get the data represented by this class.
|
java.lang.String |
getDelimiter()
Get the delimiter used in the text file
|
protected java.lang.String |
getDelimiter(java.lang.String source)
Get the delimiter to use for the given file.
|
java.lang.String |
getGroupVarName()
Get the GroupVarName property.
|
java.lang.String |
getMap()
Get the Map property.
|
java.util.List |
getMetaDataFields()
Get the MetaDataFields property.
|
java.lang.String |
getParams()
Get the Params property.
|
protected java.util.List |
getPointCategories()
Get the default categories for data from PointDataSource-s
|
void |
getPropertiesComponents(java.util.List comps)
Add to properties gui
|
protected visad.FieldImpl |
getSample(DataChoice dataChoice)
Read a sample of the data.
|
int |
getSkipRows()
Get the SkipRows property.
|
protected java.lang.String |
getSource(DataChoice dataChoice)
the data choice
|
int |
hashCode()
Get the hashcode for this object
|
static void |
main(java.lang.String[] args)
main
|
static void |
main2(java.lang.String[] args)
test
|
visad.FieldImpl |
makeObs(DataChoice dataChoice,
DataSelection subset,
ucar.unidata.geoloc.LatLonRect bbox)
Make PointObs from the raw VisAD data
|
visad.FieldImpl |
makeObs(DataChoice dataChoice,
DataSelection subset,
ucar.unidata.geoloc.LatLonRect bbox,
java.lang.String trackParam,
boolean sampleIt,
boolean showAttributeGuiIfNeeded)
make the observations from the given datachoice
|
visad.FieldImpl |
makeObs(java.lang.String contents,
java.lang.String delimiter,
DataSelection subset,
ucar.unidata.geoloc.LatLonRect bbox,
java.lang.String trackParam,
boolean sampleIt,
boolean showAttributeGuiIfNeeded)
make the observations from the given datachoice
|
void |
popupMetaDataMenu(javax.swing.JComponent near)
Show the metadata preference menu
|
void |
saveMetaDataMap()
Save the meta data
|
void |
setDelimiter(java.lang.String delim)
Get the delimiter used in the text file
|
void |
setGroupVarName(java.lang.String value)
Set the GroupVarName property.
|
void |
setMap(java.lang.String value)
Set the Map property.
|
void |
setMetaDataFields(java.util.List value)
Set the MetaDataFields property.
|
void |
setParams(java.lang.String value)
Set the Params property.
|
void |
setSkipRows(int value)
Set the SkipRows property.
|
void |
setStreamProcessor(visad.data.text.TextAdapter.StreamProcessor streamProcessor)
Set the stream processor to use
|
void |
writeHeader()
write the header text to a file
|
void |
writePlugin()
write the plugin
|
canAddCurrentName, canCreateGrid, canDoAllLevels, doRemove, getBinRoundTo, getBinWidth, getDataName, getDefaultLevels, getDescriptionDataChoice, getFullDescription, getGridGain, getGridSearchRadius, getGridUnit, getGridX, getGridY, getMakeGridFields, getNumGridPasses, init, initDataSelectionComponents, initGridParameters, makeDerivedDataChoices, makeFieldDescription, reloadData, setBinRoundTo, setBinWidth, setGridGain, setGridSearchRadius, setGridUnit, setGridX, setGridY, setMakeGridFields, setNumGridPasses, setRoundToFromComboBox, setSource, setWidthFromComboBox, shouldCachegetDataFileExtension, getDataPaths, getFilePath, getInputStreams, getLocationsForPolling, getPartialDescription, getSource, getSources, haveSources, initAfterCreation, initAfterUnpersistence, initWithPollingInfo, isFileBased, newFilesFromPolling, processDataFilename, propertiesChanged, reloadData, saveDataToLocalDisk, setNewFiles, setSources, sourcesChanged, updateStateaddActions, addDataChangeListener, addDataChoice, addReloadTab, applyFieldMask, beginWritingDataToLocalDisk, canCacheDataToDisk, canChangeData, canDoFieldMask, canDoGeoSelectionMap, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearCachedData, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeDateTimes, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getid, getIdv, 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, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeSaveLocalActions, newFileFromPolling, notifyDataChange, putCache, putCache, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, 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, writeFieldMaskFileapplySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetUniqueIdpublic static final java.lang.String PROP_HEADER_MAP
public static final java.lang.String PROP_DATAPROPERTIES
public static final java.lang.String PROP_HEADER_EXTRA
public static final java.lang.String PROP_HEADER_PARAMS
public static final java.lang.String PROP_HEADER_SKIP
public static final java.lang.String PROP_HEADER_SKIPPATTERN
public static final java.lang.String PROP_HEADER_BLOB
public static final java.lang.String PREF_METADATAMAP
public static final java.lang.String COMMA_DELIM
public static final java.lang.String SEMICOLON_DELIM
public static final java.lang.String TAB_DELIM
public static final java.lang.String BLANK_DELIM
public boolean useDriverTime
public boolean hasLatLon
public TextPointDataSource()
throws visad.VisADException
visad.VisADException - problem creating the objectpublic TextPointDataSource(java.lang.String source)
throws visad.VisADException
source - path to source datavisad.VisADException - problem creating the filepublic TextPointDataSource(DataSourceDescriptor descriptor, java.util.List sources, java.util.Hashtable properties) throws visad.VisADException
descriptor - data source descriptorsources - List of sources of data (filename/URL)properties - extra properties for initializationvisad.VisADException - problem creating the datapublic TextPointDataSource(DataSourceDescriptor descriptor, java.lang.String source, java.util.Hashtable properties) throws visad.VisADException
descriptor - data source descriptorsource - source of data (filename/URL)properties - extra properties for initializationvisad.VisADException - problem creating the datapublic TextPointDataSource(DataSourceDescriptor descriptor, java.lang.String source, java.lang.String name, java.util.Hashtable properties) throws visad.VisADException
descriptor - data source descriptorsource - source of data (filename/URL)name - the name of the datasetproperties - extra properties for initializationvisad.VisADException - problem creating the datapublic boolean canSaveDataToLocalDisk()
canSaveDataToLocalDisk in interface DataSourcecanSaveDataToLocalDisk in class DataSourceImplpublic void setStreamProcessor(visad.data.text.TextAdapter.StreamProcessor streamProcessor)
streamProcessor - the StreamProcessorpublic boolean canDoGeoSelection()
canDoGeoSelection in interface DataSourcecanDoGeoSelection in class DataSourceImplprotected boolean canDoGeoSelectionStride()
canDoGeoSelectionStride in class DataSourceImplpublic visad.FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox) throws java.lang.Exception
makeObs in class PointDataSourcedataChoice - choice for data (source of data)subset - subsetting parametersbbox - The area subset. May be null.java.lang.Exception - problem creating dataprotected java.lang.String getSource(DataChoice dataChoice)
getSource in class PointDataSourcedataChoice - the data choicepublic visad.FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox, java.lang.String trackParam, boolean sampleIt, boolean showAttributeGuiIfNeeded) throws java.lang.Exception
dataChoice - the data choicesubset - data selection to subset withbbox - bounding box to subsettrackParam - the parameter to use for thetracksampleIt - do we just sample or do we read the full set of obsshowAttributeGuiIfNeeded - popup the gui if we have a problemjava.lang.Exception - On badnessprotected java.lang.String getDelimiter(java.lang.String source)
source - source fileprotected final java.lang.String getContents(java.lang.String sourceFile)
throws java.lang.Exception
sourceFile - the contentsjava.lang.Exception - probably an IOExceptionprotected java.lang.String getContents(java.lang.String sourceFile,
boolean sampleIt)
throws java.lang.Exception
sourceFile - The source file (or url)sampleIt - if true, then just read on objava.lang.Exception - On badnesspublic visad.FieldImpl makeObs(java.lang.String contents,
java.lang.String delimiter,
DataSelection subset,
ucar.unidata.geoloc.LatLonRect bbox,
java.lang.String trackParam,
boolean sampleIt,
boolean showAttributeGuiIfNeeded)
throws java.lang.Exception
contents - The text contentsdelimiter - The delimitersubset - data selection to subset withbbox - bounding box to subsettrackParam - the parameter to use for thetracksampleIt - do we just sample or do we read the full set of obsshowAttributeGuiIfNeeded - popup the gui if we have a problemjava.lang.Exception - On badnesspublic void changeMetadata()
throws java.io.IOException
java.io.IOException - On badnesspublic java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delim)
delim - delimiterpublic void applyNames(java.lang.String line)
line - the sampled text linepublic void deleteMetaData(java.lang.String key)
key - keypublic void writePlugin()
public void writeHeader()
public void popupMetaDataMenu(javax.swing.JComponent near)
near - The component to show the menu nearpublic void saveMetaDataMap()
public boolean applyProperties()
applyProperties in class PointDataSourcepublic void addPropertiesTabs(javax.swing.JTabbedPane tabbedPane)
addPropertiesTabs in class PointDataSourcetabbedPane - tabpublic void applySavedMetaDataFromUI(TextPointDataSource.Metadata metadata)
metadata - The metadatapublic void applySavedMetaDataFromUIInner(TextPointDataSource.Metadata metadata)
metadata - The metadatapublic void applySavedMetaData(TextPointDataSource.Metadata metadata)
metadata - The metadatapublic boolean equals(java.lang.Object o)
equals in class FilesDataSourceo - object in questionpublic int hashCode()
hashCode in class java.lang.Objectprotected java.util.List getPointCategories()
getPointCategories in class PointDataSourcepublic static int[] findLatLonAltIndices(visad.TupleType type)
type - the type to searchprotected visad.FieldImpl getSample(DataChoice dataChoice) throws java.lang.Exception
getSample in class PointDataSourcedataChoice - The data choicejava.lang.Exception - On badnesspublic void doMakeDataChoices()
doMakeDataChoices in class PointDataSourcepublic void getPropertiesComponents(java.util.List comps)
getPropertiesComponents in class PointDataSourcecomps - properties compsprotected visad.Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, java.util.Hashtable requestProperties) throws visad.VisADException, java.rmi.RemoteException
getDataInner in class PointDataSourcedataChoice - choice for datacategory - category of datadataSelection - subselection propertiesrequestProperties - additional selection properties (not used here)java.rmi.RemoteException - Java RMI errorvisad.VisADException - VisAD Errorpublic static void main2(java.lang.String[] args)
throws java.lang.Exception
args - argsjava.lang.Exception - On badnesspublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - argsjava.lang.Exception - on badnesspublic void setMap(java.lang.String value)
value - The new value for Mappublic java.lang.String getMap()
public void setParams(java.lang.String value)
value - The new value for Paramspublic java.lang.String getParams()
public void setMetaDataFields(java.util.List value)
value - The new value for MetaDataFieldspublic java.util.List getMetaDataFields()
public void setGroupVarName(java.lang.String value)
value - The new value for GroupVarNamepublic java.lang.String getGroupVarName()
public void setSkipRows(int value)
value - The new value for SkipRowspublic int getSkipRows()