Package ca.phon.app.modules
Class EntryPointArgs
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
Object>
Argument information for plug-in entry points.
This class includes helper methods for parsing
command line arguments and accessing commonly needed
argument values such as project, corpus, and session.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
corpus name: if defined, Phon will use the given value as the corpus name.static final String
static final String
static final String
project location: if defined, Phon will attempt to locate the project at the given path.static final String
static final String
static final String
project name: if defined, Phon will attempt to locate the named project in the current workspace folder.static final String
static final String
static final String
project: if defined, Phon will use the given Object value as the project.static final String
session name: if defined, Phon will attempt to locate the named session in the provided project.static final String
static final String
static final String
session: if defined, Phon will use the given Object as the returned Session -
Constructor Summary
ConstructorDescriptionEntryPointArgs
(int initialCapacity) EntryPointArgs
(int initialCapacity, float loadFactor) EntryPointArgs
(Map<? extends String, ? extends Object> m) -
Method Summary
Modifier and TypeMethodDescriptionGet corpus nameGet the project based on either (in order): project objectproject locationproject nameGet sessionString[]
Parse command line arguments.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
PROJECT_NAME
project name: if defined, Phon will attempt to locate the named project in the current workspace folder.- See Also:
-
PROJECT_NAME_OPT
- See Also:
-
PROJECT_NAME_DESC
- See Also:
-
PROJECT_LOCATION
project location: if defined, Phon will attempt to locate the project at the given path. This key takes priority over project name.- See Also:
-
PROJECT_LOCATION_OPT
- See Also:
-
PROJECT_LOCATION_DESC
- See Also:
-
PROJECT_OBJECT
project: if defined, Phon will use the given Object value as the project. This value overrides all others for project definition.- See Also:
-
SESSION_NAME
session name: if defined, Phon will attempt to locate the named session in the provided project. One of the project keys must be defined.
Session name can be entered as just the session name, in which a corpus name must also be given, or as 'corpus.session'
- See Also:
-
SESSION_NAME_OPT
- See Also:
-
SESSION_NAME_DESC
- See Also:
-
SESSION_OBJECT
session: if defined, Phon will use the given Object as the returned Session- See Also:
-
CORPUS_NAME
corpus name: if defined, Phon will use the given value as the corpus name. If session has a corpus name defined in it's string, this value is ignored.- See Also:
-
CORPUS_NAME_OPT
- See Also:
-
CORPUS_NAME_DESC
- See Also:
-
-
Constructor Details
-
EntryPointArgs
public EntryPointArgs() -
EntryPointArgs
public EntryPointArgs(int initialCapacity, float loadFactor) -
EntryPointArgs
public EntryPointArgs(int initialCapacity) -
EntryPointArgs
-
-
Method Details
-
getProject
Get the project based on either (in order):
- project object
- project location
- project name
- Returns:
- project or
null
if not specified
-
getCorpus
Get corpus name- Returns:
- specified corpus name or
null
-
getSession
Get session- Returns:
- session or
null
if not specified - Throws:
IOException
-
parseArgs
Parse command line arguments.- Parameters:
args
-- Returns:
- list of unparsed arguments
-