Exemplo n.º 1
0
 /**
  * Main method
  *
  * @param args commandline arguments
  */
 public static void main(String... args) {
   Exception error = null;
   try {
     InitLog.initLogger(args, getParser());
     log.info(getParser().getAppName() + ": Start");
     new XSLTranslator(args).execute();
   } catch (IllegalArgumentException e) {
     log.error(e.getMessage());
     log.debug("Stacktrace:", e);
     System.out.println(getParser().getUsage());
     error = e;
   } catch (UsageException e) {
     log.info("Printing Usage:");
     System.out.println(getParser().getUsage());
     error = e;
   } catch (Exception e) {
     log.error(e.getMessage());
     log.debug("Stacktrace:", e);
     error = e;
   } finally {
     log.info(getParser().getAppName() + ": End");
     if (error != null) {
       System.exit(1);
     }
   }
 }
 @Override
 public void setUp() throws Exception {
   InitLog.initLogger(null, null);
   this.jena = new MemJenaConnect();
   this.jena.truncate();
   this.label =
       this.jena.getJenaModel().createProperty("http://www.w3.org/2000/01/rdf-schema#label");
   this.scoreLabelParts =
       this.jena.getJenaModel().createProperty("http://vivoweb.org/harvester/score#LabelParts");
 }