Class 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.
    • Field Summary

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

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

      All Methods Instance Methods Concrete Methods 
      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

        handleConcatenatedOptions
    • Constructor Detail

      • DSpaceSkipUnknownArgumentsParser

        public DSpaceSkipUnknownArgumentsParser()
    • Method Detail

      • 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.