Package ucar.unidata.idv
Class IdvObjectStore
java.lang.Object
ucar.unidata.xml.XmlObjectStore
ucar.unidata.idv.IdvObjectStore
- All Implemented Interfaces:
IdvConstants
,PersistentStore
Provides some IDV specific extensions to the XmlObjectStore. Creates the
users local .unidata/idv directory, jython cache dir, etc.
- Author:
- IDV development team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The subdirectory name for holding favorites bundlesstatic final String
Where we save bundles tostatic final String
tmp dirFields inherited from class ucar.unidata.xml.XmlObjectStore
tmpFiles
Fields inherited from interface ucar.unidata.idv.IdvConstants
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_APPEARANCEMODE, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
-
Constructor Summary
ConstructorsConstructorDescriptionIdvObjectStore
(IntegratedDataViewer idv, String systemName, String appName, XmlEncoder encoder, String overrideUserDirectory) Create the store. -
Method Summary
Modifier and TypeMethodDescriptionReturn the obejct held in the table identified by the given key.Return the full path to the directory where we save the display control templatesReturn the full path to the directory where we save the display control templatesCreate, if needed, and return the directory to use for the jython cache.Return the full path to the directory where we save the user's local bundlesboolean
Get the MadeUserDirectory property.Return the full path to the directory where we look for pluginsReturn the full path to the directory where we save the user's local bundlesGet the path to the system directory.Get the users local directory.protected Hashtable
processTable
(Hashtable newTable) Overrwrite base class method to tweak any old property namesvoid
setOverrideDirectory
(File newDirectory) Set the override directory.Methods inherited from class ucar.unidata.xml.XmlObjectStore
append, cleanupTmpDirectory, cleanupTmpFiles, get, get, get, get, get, get, get, get, get, get, get, getEncodedFile, getEncoder, getFileContents, getTmpFile, getUniqueTmpDirectory, getUniqueTmpFile, getUserTmpDirectory, init, main, put, put, put, put, put, put, put, put, put, putEncodedFile, putFile, remove, save, saveIfNeeded, setEncoder, setTmpDir, userDirectoryOk
-
Field Details
-
PROP_TMPDIR
tmp dir- See Also:
-
DIR_BUNDLES
The subdirectory name for holding favorites bundles- See Also:
-
DIR_SAVEDBUNDLES
Where we save bundles to- See Also:
-
-
Constructor Details
-
IdvObjectStore
public IdvObjectStore(IntegratedDataViewer idv, String systemName, String appName, XmlEncoder encoder, String overrideUserDirectory) Create the store.- Parameters:
idv
- The IntegratedDataViewer for this object storesystemName
- The name of the top level directory (e.g., .unidata/idv)appName
- The name of the subdir (e.g., DefaultIdv)encoder
- The encoder to use for writing out and reading in the storeoverrideUserDirectory
- If non-null this overrides wehre we look for the user's home directory. Else we use the user.home system property.
-
-
Method Details
-
getMadeUserDirectory
public boolean getMadeUserDirectory()Get the MadeUserDirectory property. Was the user's directory created now.- Returns:
- The MadeUserDirectory
-
getSystemDirectory
Get the path to the system directory. Ex: ~/.unidata/idv- Returns:
- The system directory path.
-
processTable
Overrwrite base class method to tweak any old property names- Overrides:
processTable
in classXmlObjectStore
- Parameters:
newTable
- The table to process- Returns:
- The tweaked table
-
getJythonCacheDir
Create, if needed, and return the directory to use for the jython cache.- Returns:
- The jython cache directory
-
getUserDirectory
Get the users local directory. Example: ~/.unidata/idv/DefaultIdv- Overrides:
getUserDirectory
in classXmlObjectStore
- Returns:
- The user's local IDV directory
-
setOverrideDirectory
Set the override directory.- Parameters:
newDirectory
- dir to use
-
getDisplayTemplateDir
Return the full path to the directory where we save the display control templates- Returns:
- Template directory
-
getDataSourcesDir
Return the full path to the directory where we save the display control templates- Returns:
- Template directory
-
getPluginsDir
Return the full path to the directory where we look for plugins- Returns:
- Plugins directory
-
getLocalBundlesDir
Return the full path to the directory where we save the user's local bundles- Returns:
- Bundle directory
-
getSavedBundlesDir
Return the full path to the directory where we save the user's local bundles- Returns:
- Bundle directory
-
get
Return the obejct held in the table identified by the given key. Override the base class method. If the property is not in the main.xml then check the idv properties- Overrides:
get
in classXmlObjectStore
- Parameters:
key
- The object's key.- Returns:
- The Object identified by the given key or null if not found.
-