X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=engine%2Fcompbio%2Fengine%2FProteoCachePropertyHelperManager.java;h=f5f67bb8f47b1a245ca2504c942542a584337b03;hb=006363dc999cef4e9c49dd6a38ea0d78cbb62472;hp=461529748b8a0ab65995755181307fda222971a6;hpb=6823d2f36ff55b7ab11d674e3fe4d04dc57d6bbf;p=proteocache.git diff --git a/engine/compbio/engine/ProteoCachePropertyHelperManager.java b/engine/compbio/engine/ProteoCachePropertyHelperManager.java index 4615297..f5f67bb 100644 --- a/engine/compbio/engine/ProteoCachePropertyHelperManager.java +++ b/engine/compbio/engine/ProteoCachePropertyHelperManager.java @@ -34,26 +34,22 @@ public final class ProteoCachePropertyHelperManager { private static PropertyHelper ph = null; /** - * Ways to fix path problem: - * 1) find a path to WEB-INF directory based on the path to a known class. - * Then prepend this absolute path to the rest of paths - * pros: no input from user - * cons: relocation of the source may cause problems + * Ways to fix path problem: 1) find a path to WEB-INF directory based on + * the path to a known class. Then prepend this absolute path to the rest of + * paths pros: no input from user cons: relocation of the source may cause + * problems * - * 2) Require users to add configuration directories to the class - * path and then load entries from it. - * pros: - * cons: Many paths needs to be added. Put significant burden on the user. - * Hard to tell web appl server to add these entries to its class path. + * 2) Require users to add configuration directories to the class path and + * then load entries from it. pros: cons: Many paths needs to be added. Put + * significant burden on the user. Hard to tell web appl server to add these + * entries to its class path. * - * 3) Ask for project source directory explicitly in the configuration. - * pros: - * cons: similar to 1, but this initial configuration file must reside in - * well known location! Why ask users what can be found automatically? + * 3) Ask for project source directory explicitly in the configuration. + * pros: cons: similar to 1, but this initial configuration file must reside + * in well known location! Why ask users what can be found automatically? * - * 4) Have everything in the location already in class path for tomcat. - * pros: - * cons: only classes and lib/*.jar are added, Eclipse will remove non + * 4) Have everything in the location already in class path for tomcat. + * pros: cons: only classes and lib/*.jar are added, Eclipse will remove non * classses from classes dir. * * Try 1 - succeed. @@ -84,11 +80,8 @@ public final class ProteoCachePropertyHelperManager { /** * Method return the absolute path to the project root directory. It assumes - * the following structure of the project: - * project-root: - * conf/settings - * binaries - * WEB-INF/classes/compbio/engine/conf/PropertyHelperManager.class + * the following structure of the project: project-root: conf/settings + * binaries WEB-INF/classes/compbio/engine/conf/PropertyHelperManager.class * If the structure changes it must be reflected in this method * * @return the local path @@ -112,8 +105,8 @@ public final class ProteoCachePropertyHelperManager { } catch (IllegalArgumentException e) { // Classes are in the jar file, using different method to determine // the path new File(INCORRECT URL) throws it - String mes = "It looks like classes are in the jar file. " - + "Attempting a different method to determinine the path to the resources"; + String mes = "It looks like classes are in the jar file. " + + "Attempting a different method to determinine the path to the resources"; log.debug(mes + e.getLocalizedMessage(), e.getCause()); try { f = new File(ProteoCachePropertyHelperManager.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); @@ -147,4 +140,5 @@ public final class ProteoCachePropertyHelperManager { return Boolean.parseBoolean(propValue); } return false; - }} + } +}