Class EntryPointArgs

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
ca.phon.app.modules.EntryPointArgs
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class EntryPointArgs extends HashMap<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:
  • Field Details

    • PROJECT_NAME

      public static final String PROJECT_NAME
      project name: if defined, Phon will attempt to locate the named project in the current workspace folder.
      See Also:
    • PROJECT_NAME_OPT

      public static final String PROJECT_NAME_OPT
      See Also:
    • PROJECT_NAME_DESC

      public static final String PROJECT_NAME_DESC
      See Also:
    • PROJECT_LOCATION

      public static final String 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

      public static final String PROJECT_LOCATION_OPT
      See Also:
    • PROJECT_LOCATION_DESC

      public static final String PROJECT_LOCATION_DESC
      See Also:
    • PROJECT_OBJECT

      public static final String 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

      public static final String 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

      public static final String SESSION_NAME_OPT
      See Also:
    • SESSION_NAME_DESC

      public static final String SESSION_NAME_DESC
      See Also:
    • SESSION_OBJECT

      public static final String SESSION_OBJECT
      session: if defined, Phon will use the given Object as the returned Session
      See Also:
    • CORPUS_NAME

      public static final String 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

      public static final String CORPUS_NAME_OPT
      See Also:
    • CORPUS_NAME_DESC

      public static final String CORPUS_NAME_DESC
      See Also:
  • Constructor Details

    • EntryPointArgs

      public EntryPointArgs()
    • EntryPointArgs

      public EntryPointArgs(int initialCapacity, float loadFactor)
    • EntryPointArgs

      public EntryPointArgs(int initialCapacity)
    • EntryPointArgs

      public EntryPointArgs(Map<? extends String,? extends Object> m)
  • Method Details

    • getProject

      public Project getProject()

      Get the project based on either (in order):

      • project object
      • project location
      • project name

      Returns:
      project or null if not specified
    • getCorpus

      public String getCorpus()
      Get corpus name
      Returns:
      specified corpus name or null
    • getSession

      public Session getSession() throws IOException
      Get session
      Returns:
      session or null if not specified
      Throws:
      IOException
    • parseArgs

      public String[] parseArgs(String[] args)
      Parse command line arguments.
      Parameters:
      args -
      Returns:
      list of unparsed arguments