Mercurial > hg > openmind
changeset 85:1aff84e5048d
configuration option for queryBrowserUrl.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 20 Oct 2017 12:48:31 +0200 |
parents | 68e3e4b569f9 |
children | d4b456623d43 |
files | src/main/java/org/mpi/openmind/configuration/ConfigurationService.java |
diffstat | 1 files changed, 42 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/configuration/ConfigurationService.java Mon Jul 10 18:53:40 2017 +0200 +++ b/src/main/java/org/mpi/openmind/configuration/ConfigurationService.java Fri Oct 20 12:48:31 2017 +0200 @@ -31,6 +31,7 @@ public static String SCHEDULING_PATH = "scheduling-path"; public static String SCHEDULING_ENABLE = "scheduling-enable"; public static String INSTANCE_NAME = "instance-name"; + public static String QUERY_BROWSER_URL = "query-browser-url"; public static String DEBUG_MODUS = "debug-modus"; @@ -46,6 +47,7 @@ private List<PrintRule> printRules = new ArrayList<PrintRule>(); private String schedulingPath; private String instanceName; + private String queryBrowserUrl; private boolean schedulingEnable = false; private boolean debugModus = false; @@ -57,36 +59,39 @@ private void loadProperties(){ - try { - InputStream in = this.getClass().getClassLoader().getResourceAsStream(OM_PROPERTIES); - props.load(in); - in.close(); - String s = "Property's List"; - for(Object key : props.keySet()){ - s += "\n" + key + "=\t" + props.getProperty(key.toString()); - - if(SCHEDULING_ENABLE.equals(key.toString())){ - try{ - Boolean b = new Boolean(props.getProperty(key.toString())); - this.schedulingEnable = b; - }catch(Exception e){} - }else if(SCHEDULING_PATH.equals(key.toString())){ - this.schedulingPath = props.getProperty(key.toString()); - }else if(INSTANCE_NAME.equals(key.toString())){ + try { + InputStream in = this.getClass().getClassLoader().getResourceAsStream(OM_PROPERTIES); + props.load(in); + in.close(); + String s = "Property's List"; + for (Object key : props.keySet()) { + s += "\n" + key + "=\t" + props.getProperty(key.toString()); + + if (SCHEDULING_ENABLE.equals(key.toString())) { + try { + Boolean b = new Boolean(props.getProperty(key.toString())); + this.schedulingEnable = b; + } catch (Exception e) { + } + } else if (SCHEDULING_PATH.equals(key.toString())) { + this.schedulingPath = props.getProperty(key.toString()); + } else if (INSTANCE_NAME.equals(key.toString())) { this.instanceName = props.getProperty(key.toString()); - }else if(DEBUG_MODUS.equals(key.toString())){ - try{ - Boolean b = new Boolean(props.getProperty(key.toString())); - this.debugModus = b; - }catch(Exception e){} - } - } - s += "\n"; - logger.info(s); - } catch (IOException e) { - logger.error("Properties file \'" + OM_PROPERTIES + " no found."); - } - + } else if (QUERY_BROWSER_URL.equals(key.toString())) { + this.queryBrowserUrl = props.getProperty(key.toString()); + } else if (DEBUG_MODUS.equals(key.toString())) { + try { + Boolean b = new Boolean(props.getProperty(key.toString())); + this.debugModus = b; + } catch (Exception e) { + } + } + } + s += "\n"; + logger.info(s); + } catch (IOException e) { + logger.error("Properties file \'" + OM_PROPERTIES + " no found."); + } } @@ -144,7 +149,14 @@ return instanceName; } - public boolean isDebugModus() { + /** + * @return the queryBrowserUrl + */ + public String getQueryBrowserUrl() { + return queryBrowserUrl; + } + + public boolean isDebugModus() { return debugModus; } }