Class DSpaceSkipUnknownArgumentsParser

java.lang.Object
org.apache.commons.cli.DefaultParser
org.dspace.cli.DSpaceSkipUnknownArgumentsParser
All Implemented Interfaces:
org.apache.commons.cli.CommandLineParser

public class DSpaceSkipUnknownArgumentsParser extends org.apache.commons.cli.DefaultParser
Extended version of the DefaultParser. This parser skip/ignore unknown arguments.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.commons.cli.DefaultParser

    org.apache.commons.cli.DefaultParser.Builder
  • Field Summary

    Fields inherited from class org.apache.commons.cli.DefaultParser

    cmd, currentOption, currentToken, expectedOpts, options, skipParsing, stopAtNonOption
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.cli.CommandLine
    parse(org.apache.commons.cli.Options options, String[] arguments)
     
    org.apache.commons.cli.CommandLine
    parse(org.apache.commons.cli.Options options, String[] arguments, boolean stopAtNonOption)
    Parse the arguments according to the specified options and properties.
    org.apache.commons.cli.CommandLine
    parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties)
     
    org.apache.commons.cli.CommandLine
    parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties, boolean stopAtNonOption)
    Parse the arguments according to the specified options and properties.

    Methods inherited from class org.apache.commons.cli.DefaultParser

    builder, checkRequiredOptions, handleConcatenatedOptions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DSpaceSkipUnknownArgumentsParser

      public DSpaceSkipUnknownArgumentsParser()
  • Method Details

    • parse

      public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments) throws org.apache.commons.cli.ParseException
      Specified by:
      parse in interface org.apache.commons.cli.CommandLineParser
      Overrides:
      parse in class org.apache.commons.cli.DefaultParser
      Throws:
      org.apache.commons.cli.ParseException
    • parse

      public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties) throws org.apache.commons.cli.ParseException
      Overrides:
      parse in class org.apache.commons.cli.DefaultParser
      Throws:
      org.apache.commons.cli.ParseException
    • parse

      public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, boolean stopAtNonOption) throws org.apache.commons.cli.ParseException
      Parse the arguments according to the specified options and properties.
      Specified by:
      parse in interface org.apache.commons.cli.CommandLineParser
      Overrides:
      parse in class org.apache.commons.cli.DefaultParser
      Parameters:
      options - the specified Options
      arguments - the command line arguments
      stopAtNonOption - can be ignored - an unrecognized argument is ignored, an unrecognized argument doesn't stop the parsing and doesn't trigger a ParseException
      Returns:
      the list of atomic option and value tokens
      Throws:
      org.apache.commons.cli.ParseException - if there are any problems encountered while parsing the command line tokens.
    • parse

      public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties, boolean stopAtNonOption) throws org.apache.commons.cli.ParseException
      Parse the arguments according to the specified options and properties.
      Overrides:
      parse in class org.apache.commons.cli.DefaultParser
      Parameters:
      options - the specified Options
      arguments - the command line arguments
      properties - command line option name-value pairs
      stopAtNonOption - can be ignored - an unrecognized argument is ignored, an unrecognized argument doesn't stop the parsing and doesn't trigger a ParseException
      Returns:
      the list of atomic option and value tokens
      Throws:
      org.apache.commons.cli.ParseException - if there are any problems encountered while parsing the command line tokens.