Skip to content

Commit

Permalink
add doc and reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanetteclark committed Jul 12, 2024
1 parent 8717a40 commit 4a70996
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/main/java/edu/ucsb/nceas/mdqengine/MDQconfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ public class MDQconfig {

public static Configuration config;

public MDQconfig () throws ConfigurationException, IOException {
public MDQconfig() throws ConfigurationException, IOException {
boolean inServlet = false;

// If running in a servlet, have to get the config info from the webapp context, as we can't
// If running in a servlet, have to get the config info from the webapp context,
// as we can't
// read from external dirs on disk.
Configurations configs = new Configurations();
if (inServlet) {
Expand All @@ -43,22 +44,25 @@ public MDQconfig () throws ConfigurationException, IOException {
/**
* Read a configuration file for a String parameter values.
*/
public String getString (String paramName) throws ConfigurationException {
return(config.getString(paramName));
public String getString(String paramName) throws ConfigurationException {
return (config.getString(paramName));
}

/**
* Read a configuration file for a String parameter values.
*/
public int getInt(String paramName) throws ConfigurationException {
return(config.getInt(paramName));
return (config.getInt(paramName));
}

/**
* Read a configuration file and return all the keys.
*/
public Iterator<String> getKeys() {
return(config.getKeys());
return (config.getKeys());
}

public static String readConfigParam (String paramName) throws ConfigurationException, IOException {
public static String readConfigParam(String paramName) throws ConfigurationException, IOException {
String paramValue = null;
try {
MDQconfig cfg = new MDQconfig();
Expand Down

0 comments on commit 4a70996

Please sign in to comment.