aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/aai/graphgraph/ArgumentParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/aai/graphgraph/ArgumentParser.java')
-rw-r--r--src/main/java/org/onap/aai/graphgraph/ArgumentParser.java107
1 files changed, 53 insertions, 54 deletions
diff --git a/src/main/java/org/onap/aai/graphgraph/ArgumentParser.java b/src/main/java/org/onap/aai/graphgraph/ArgumentParser.java
index 4405723..e156e39 100644
--- a/src/main/java/org/onap/aai/graphgraph/ArgumentParser.java
+++ b/src/main/java/org/onap/aai/graphgraph/ArgumentParser.java
@@ -1,21 +1,21 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2019 Orange Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
+/*
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ Copyright © 2019-2020 Orange Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
*/
package org.onap.aai.graphgraph;
@@ -24,51 +24,50 @@ import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
public class ArgumentParser {
- @Option(name = "-g", usage = "generates schema model for Papyrus and exits where XY is the version", metaVar = "vXY")
- private String schemaVersion;
-
- @Option(name = "-d", usage = "connect to dev version of schema-service (use JAR bundled keystore)")
- private boolean runLocally;
- @Option(name = "-h", usage = "print help and exit")
- private boolean printHelp;
+ CmdLineParser parser;
+ @Option(name = "-g", usage = "generates schema model for Papyrus and exits where XY is the version",
+ metaVar = "vXY")
+ private String schemaVersion;
+ @Option(name = "-d", usage = "connect to dev version of schema-service (use JAR bundled keystore)")
+ private boolean runLocally;
+ @Option(name = "-h", usage = "print help and exit")
+ private boolean printHelp;
- CmdLineParser parser;
+ public ArgumentParser parseArguments(String[] args) {
+ parser = new CmdLineParser(this);
- public ArgumentParser parseArguments(String [] args){
- parser = new CmdLineParser(this);
+ try {
+ parser.parseArgument(args);
+ } catch (CmdLineException e) {
+ System.err.println(e.getMessage());
+ parser.printUsage(System.err);
+ }
- try {
- parser.parseArgument(args);
- } catch( CmdLineException e ) {
- System.err.println(e.getMessage());
- parser.printUsage(System.err);
+ return this;
}
- return this;
- }
-
- public String getSchemaVersion() {
- return schemaVersion;
- }
+ public String getSchemaVersion() {
+ return schemaVersion;
+ }
- public void setSchemaVersion(String schemaVersion) {
- this.schemaVersion = schemaVersion;
- }
+ public void setSchemaVersion(String schemaVersion) {
+ this.schemaVersion = schemaVersion;
+ }
- public boolean shoudGenerateUml(){
- return schemaVersion != null;
- }
+ public boolean shouldGenerateUrl() {
+ return schemaVersion != null;
+ }
- public boolean isRunLocally() {
- return runLocally;
- }
+ public boolean isRunLocally() {
+ return runLocally;
+ }
- public boolean isPrintHelp() {
- return printHelp;
- }
+ public boolean isPrintHelp() {
+ return printHelp;
+ }
- public void printHelp(){
- parser.printUsage(System.out);
- }
+ public void printHelp() {
+ parser.printUsage(System.out);
+ }
}