public class ArgsManager extends IdvManager
IdvBase.doMakeArgsManager(String[])
,
in your derived IntegratedDataViewer
class.
parseArg(String,String[],int)
method.
Modifier and Type | Field and Description |
---|---|
java.util.List |
argDisplayB64Xml
A list of the base 64 encoded in line display xml files
|
java.util.List |
argXidvFiles
A list (String) of the bundle sources (files and/or urls) passed in
on the command line.
|
java.util.List |
b64Bundles
A list of the base 64 encoded in line bundles.
|
protected java.util.List |
fileMappingFiles
Holds the set files arguments
|
protected java.util.List |
fileMappingIds
Holds the set files arguments
|
protected java.util.List |
initDisplays
Holds the list of display names.
|
protected java.util.List |
initParams
Holds the list of parameter names.
|
java.util.List |
installPlugins
List of plugins
|
protected java.lang.String |
jythonCode
Jython code that should be evaluated at startup time
|
protected boolean |
listResources
Should we list out the resources for debugging
|
protected boolean |
noGui
Should any guis be shown
|
protected java.util.List |
persistentCommandLineArgs
This holds the command line arguments that should be written out
in saved jnlp files (e.g., .properties)
|
java.util.List |
plugins
List of plugins
|
protected boolean |
printJnlpBundles
Shuold the embedded bundles in jnlp files be printed out
|
static int |
RUNNABLE_MAX_TRIES
How many times to try to run the initial runnables
|
java.util.List |
scriptingFiles
List of isl files
|
java.lang.String |
testArchive
The name of the test archive when we are in test archive writing mode
|
java.lang.String |
testDir
The name of the test directory when we are in test archive writing mode
|
boolean |
testEval
Created when we see the -testeval command line argument.
|
boolean |
testMode
Created when we see the -test command line argument.
|
static java.lang.String |
USAGE_MESSAGE
usage message
|
contents, dialog, frame, window
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 and Description |
---|
ArgsManager(IntegratedDataViewer idv,
java.lang.String[] args)
Create the manager with the given idv and command line arguments.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkArg(java.lang.String arg,
java.lang.String lookingFor,
java.lang.String[] args,
int idx,
int howManyMore)
A utility method for checking the argument array.
|
java.util.List<PatternFileFilter> |
getBundleFileFilters()
Return a list of file filters that match on all of the types of bundles
|
java.lang.String |
getCollabHostName()
Get the host name for the collab server
|
int |
getCollabPort()
Port for collab server
|
boolean |
getDoCollabServer()
Should we start up a collab server
|
java.lang.String |
getFixedTimeString()
the fixed time index string
|
java.util.List |
getInitCatalogs()
Method to return the initial catalogs
|
boolean |
getIslInteractive()
Is isl interactive mode
|
boolean |
getIsOffScreen()
running in offscreen mode
|
boolean |
getNoGui()
Should we create any GUIs
|
java.lang.String[] |
getOriginalArgs()
Get the very original command line arguments.
|
protected java.lang.String |
getUsageMessage()
Return the command line usage message.
|
PatternFileFilter |
getXidvFileFilter()
Get the file filter to be used for a regular xidv bundle file
|
PatternFileFilter |
getXidvZidvFileFilter()
Get the file filter that matches both xidv and zidv files
|
PatternFileFilter |
getZidvFileFilter()
Get the file filter to be used for a zidv bundle file
|
protected void |
initDone()
Called by the IDV when its initialization is complete.
|
boolean |
isBundleFile(java.lang.String name)
Is the given file a bindle
|
static boolean |
isDisplayXmlFile(java.lang.String name)
Helper method to determine if the given filename is a display xml file
|
boolean |
isIslFile(java.lang.String name)
Helper method to determine if the given filename is an isl file
|
boolean |
isJnlpFile(java.lang.String name)
Helper method to determine if the given filename is a jnlp file
|
boolean |
isRbiFile(java.lang.String name)
Helper method to determine if the given filename is a resource bundle file
|
boolean |
isScriptingMode()
_more_
|
boolean |
isXidvFile(java.lang.String name)
Helper method to determine if the given filename is a xidv bundle file
|
boolean |
isZidvFile(java.lang.String name)
is file a zidv file
|
protected java.lang.String |
msg(java.lang.String arg,
java.lang.String desc)
Utility to format the usage message line
|
protected int |
parseArg(java.lang.String arg,
java.lang.String[] args,
int idx)
Check the argument given by the arg parameter.
|
void |
parseArgs()
Parse the command line arguments.
|
protected void |
parseArgs(java.lang.String[] args)
Parse the given argument array.
|
protected java.lang.String[] |
preprocessArgs(java.lang.String[] args)
Check for any .jnlp files in the command line.
|
protected void |
processInitialBundles()
Gets called by the IDV to process the set of initial files, e.g.,
default bundles, command line bundles, jnlp files, etc.
|
void |
processInstanceArgs(java.lang.String[] args)
Process the command line argument we got passed form another instance of the idv
|
void |
setIsOffScreen(boolean v)
set running in offscreen mode
|
void |
usage(java.lang.String err)
Print out the command line usage message and exit
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
public static final java.lang.String USAGE_MESSAGE
public static final int RUNNABLE_MAX_TRIES
protected boolean listResources
protected java.util.List persistentCommandLineArgs
public boolean testMode
public boolean testEval
public java.lang.String testArchive
public java.lang.String testDir
protected boolean noGui
protected java.lang.String jythonCode
public java.util.List argXidvFiles
public java.util.List argDisplayB64Xml
public java.util.List b64Bundles
public java.util.List plugins
public java.util.List installPlugins
protected boolean printJnlpBundles
public java.util.List scriptingFiles
protected java.util.List initParams
You can specify a set of initial parameter/display pairs
that will automatically be created with every data source
that gets loaded.
This are defined with the IdvConstants.ARG_DISPLAY
protected java.util.List initDisplays
You can specify a set of initial parameter/display pairs
that will automatically be created with every data source
that gets loaded.
This are defined with the IdvConstants.ARG_DISPLAY
protected java.util.List fileMappingIds
protected java.util.List fileMappingFiles
public ArgsManager(IntegratedDataViewer idv, java.lang.String[] args)
parseArgs()
idv
- The IDVargs
- Command line argumentspublic java.lang.String[] getOriginalArgs()
public java.util.List getInitCatalogs()
protected void initDone()
public static boolean isDisplayXmlFile(java.lang.String name)
name
- The file namepublic java.util.List<PatternFileFilter> getBundleFileFilters()
public PatternFileFilter getXidvFileFilter()
public PatternFileFilter getZidvFileFilter()
public PatternFileFilter getXidvZidvFileFilter()
public boolean isXidvFile(java.lang.String name)
name
- The file namepublic boolean isBundleFile(java.lang.String name)
name
- the file to checkpublic boolean isIslFile(java.lang.String name)
name
- The file namepublic boolean isZidvFile(java.lang.String name)
name
- filepublic boolean isRbiFile(java.lang.String name)
name
- The file namepublic boolean isJnlpFile(java.lang.String name)
name
- The file namepublic boolean getNoGui()
public void usage(java.lang.String err)
err
- The usage messageprotected java.lang.String msg(java.lang.String arg, java.lang.String desc)
arg
- argdesc
- descpublic boolean getIslInteractive()
protected java.lang.String getUsageMessage()
protected java.lang.String[] preprocessArgs(java.lang.String[] args)
args
- The incoming argument arraypublic void parseArgs() throws java.lang.Exception
java.lang.Exception
- When something untoward happensprotected void parseArgs(java.lang.String[] args) throws java.lang.Exception
args
- The command line argumentsjava.lang.Exception
- When something untoward happensprotected boolean checkArg(java.lang.String arg, java.lang.String lookingFor, java.lang.String[] args, int idx, int howManyMore)
arg
- The current value in the args arraylookingFor
- The flag we are looking forargs
- The full args arrayidx
- The index of the current arghowManyMore
- If arg==lookingFor then this is how many
more values the lookingFor flag requires.
If there are not that many left in the args
array then call usage and exitprotected int parseArg(java.lang.String arg, java.lang.String[] args, int idx) throws java.lang.Exception
arg
- The current argument we are looking atargs
- The full args arrayidx
- The index into args that we are looking atjava.lang.Exception
- When something untoward happensprotected void processInitialBundles() throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
- When something untoward happensjava.rmi.RemoteException
- When something untoward happenspublic void processInstanceArgs(java.lang.String[] args)
args
- command line argspublic java.lang.String getCollabHostName()
public boolean getDoCollabServer()
public int getCollabPort()
public java.lang.String getFixedTimeString()
public boolean getIsOffScreen()
public void setIsOffScreen(boolean v)
v
- offscreenpublic boolean isScriptingMode()