From 3ea255009531a2319432800194077ed79d365f39 Mon Sep 17 00:00:00 2001 From: Al Niessner Date: Wed, 12 Feb 2025 11:54:00 -0800 Subject: [PATCH] use default connection --- .../gov/nasa/pds/validate/ri/AuthInformation.java | 2 +- .../nasa/pds/validate/ri/CommandLineInterface.java | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/gov/nasa/pds/validate/ri/AuthInformation.java b/src/main/java/gov/nasa/pds/validate/ri/AuthInformation.java index af73c1916..b8ba0ec94 100644 --- a/src/main/java/gov/nasa/pds/validate/ri/AuthInformation.java +++ b/src/main/java/gov/nasa/pds/validate/ri/AuthInformation.java @@ -19,7 +19,7 @@ public static AuthInformation buildFrom(CommandLine cl) { return new AuthInformation( cl.getOptionValue("a",""), cl.getOptionValue("A",""), - cl.getOptionValue("r","")); + cl.getOptionValue("r","app://connections/cognito/registry.xml")); } public synchronized ConnectionFactory getConnectionFactory() throws Exception { if (this.factory == null) { diff --git a/src/main/java/gov/nasa/pds/validate/ri/CommandLineInterface.java b/src/main/java/gov/nasa/pds/validate/ri/CommandLineInterface.java index 32060ba28..262230c48 100644 --- a/src/main/java/gov/nasa/pds/validate/ri/CommandLineInterface.java +++ b/src/main/java/gov/nasa/pds/validate/ri/CommandLineInterface.java @@ -37,7 +37,7 @@ public CommandLineInterface() { this.opts.addOption(Option.builder("h").desc("show this text and exit").hasArg(false) .longOpt("help").optionalArg(true).build()); this.opts.addOption(Option.builder("r").argName("registry-connection").desc( - "URL point to the registry connection information usually of the form app://connection/direct/localhost.xml") + "URL point to the registry connection information usually of the form app://connection/direct/localhost.xml [app://connection/cognito/registry.xml]") .hasArg(true).longOpt("registry-connection").numberOfArgs(1).optionalArg(true).build()); this.opts.addOption(Option.builder("t").argName("count").desc( "process the lidvids in parallel (multiple threads) with this argument being the maximum number of threads") @@ -61,8 +61,7 @@ public void help() { "\nAn auth-file is a text file of the Java property format " + "with two variables, 'user' and 'password' for example: \n" + " user=janedoe\n" + - " password=mypassword\n\n" + - "Both -a and -r are required.\n\n", + " password=mypassword\n\n", true); } @@ -89,13 +88,6 @@ public int process(String[] args) if (cl.hasOption("A")) { throw new ParseException("Not yet implemented. Must provide OpenSearch Registry authorization information through -a and -r."); - } else { - boolean both = cl.hasOption("a") && cl.hasOption("r"); - if (!both) { - throw new ParseException("Both -a and -r must be given."); - } else { - log.warn("Using Registry OpenSearch Database to check references."); - } } if (cl.getArgList().size() < 1) throw new ParseException("Must provide at least one LIDVID, Label file path, or manifest file path as a starting point.");