예제 #1
0
파일: ProvTC2OPM.java 프로젝트: PARC/SPADE
 public boolean initialize(String arguments) {
   String filepath = Settings.getDefaultConfigFilePath(this.getClass());
   try {
     provTC2OpmMapping = FileUtility.readOPM2ProvTCFileReversed(filepath);
     return true;
   } catch (Exception e) {
     logger.log(Level.SEVERE, "Failed to read the file: " + filepath, e);
     return false;
   }
 }
예제 #2
0
 // limited = true means that only matching files in the graph should be checked for ephemeral
 // reads.
 // limited = false means that all files in the graph should be checked for ephemeral reads.
 public boolean initialize(String arguments) {
   Map<String, String> argumentsMap = CommonFunctions.parseKeyValPairs(arguments);
   if ("false".equals(argumentsMap.get("limited"))) {
     return true;
   } else {
     try {
       String filepath = Settings.getDefaultConfigFilePath(this.getClass());
       ignoreFilesPattern = FileUtility.constructRegexFromFile(filepath);
       if (ignoreFilesPattern == null) {
         throw new Exception("Regex read from file '" + filepath + "' cannot be null");
       }
       return true;
     } catch (Exception e) {
       Logger.getLogger(getClass().getName()).log(Level.WARNING, null, e);
       return false;
     }
   }
 }