diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/util/Properties.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/util/Properties.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/util/Properties.java b/src/uk/ac/ox/cs/pagoda/util/Properties.java deleted file mode 100644 index 9ebebb6..0000000 --- a/src/uk/ac/ox/cs/pagoda/util/Properties.java +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.util; | ||
| 2 | |||
| 3 | import java.io.FileInputStream; | ||
| 4 | import java.io.IOException; | ||
| 5 | import java.io.InputStream; | ||
| 6 | |||
| 7 | public class Properties { | ||
| 8 | |||
| 9 | String dataPath = null; | ||
| 10 | public String getDataPath() { return dataPath; } | ||
| 11 | public void setDataPath(String path) { dataPath = path; } | ||
| 12 | |||
| 13 | String ontologyPath; | ||
| 14 | public String getOntologyPath() { return ontologyPath; } | ||
| 15 | public void setOntologyPath(String path) { ontologyPath = path; } | ||
| 16 | |||
| 17 | String queryPath = null; | ||
| 18 | public String getQueryPath() { return queryPath; } | ||
| 19 | public void setQueryPath(String path) { queryPath = path; } | ||
| 20 | |||
| 21 | String answerPath = null; | ||
| 22 | public String getAnswerPath() { return answerPath; } | ||
| 23 | public void setAnswerPath(String path) { answerPath = path; } | ||
| 24 | |||
| 25 | boolean toClassify = true; | ||
| 26 | public boolean getToClassify() { return toClassify; } | ||
| 27 | public void setToClassify(boolean flag) { toClassify = flag; } | ||
| 28 | |||
| 29 | boolean toCallHermiT = true; | ||
| 30 | public boolean getToCallHermiT() { return toCallHermiT; } | ||
| 31 | public void setToCallHermiT(boolean flag) { toCallHermiT = flag; } | ||
| 32 | |||
| 33 | public static boolean shellModeDefault = false; | ||
| 34 | |||
| 35 | boolean shellMode = shellModeDefault; | ||
| 36 | public boolean getShellMode() { return shellMode; } | ||
| 37 | public void setShellMode(boolean flag) { shellMode = flag; } | ||
| 38 | |||
| 39 | public Properties(String path) { | ||
| 40 | java.util.Properties m_properties = new java.util.Properties(); | ||
| 41 | InputStream inputStream = null; | ||
| 42 | try { | ||
| 43 | inputStream = new FileInputStream(path); | ||
| 44 | m_properties.load(inputStream); | ||
| 45 | |||
| 46 | setOntologyPath(m_properties.getProperty("ONTOLOGY")); | ||
| 47 | setDataPath(m_properties.getProperty("DATA")); | ||
| 48 | setQueryPath(m_properties.getProperty("QUERY")); | ||
| 49 | setAnswerPath(m_properties.getProperty("ANSWER")); | ||
| 50 | setToClassify(Boolean.parseBoolean(m_properties.getProperty("TO_CLASSIFY"))); | ||
| 51 | setToCallHermiT(Boolean.parseBoolean(m_properties.getProperty("CALL_HERMIT"))); | ||
| 52 | |||
| 53 | } catch (IOException e) { | ||
| 54 | e.printStackTrace(); | ||
| 55 | } finally { | ||
| 56 | if (inputStream != null) | ||
| 57 | try { | ||
| 58 | inputStream.close(); | ||
| 59 | } catch (IOException e) { | ||
| 60 | e.printStackTrace(); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } | ||
| 64 | public Properties() { } | ||
| 65 | |||
| 66 | } | ||
