From 6f408cbce7f5ade794af11b1c7d14a8c69bc7b70 Mon Sep 17 00:00:00 2001 From: "Stefan E. Funk" <funk@sub.uni-goettingen.de> Date: Tue, 15 Oct 2019 11:32:09 +0200 Subject: [PATCH] Fix some uppercase logging Add internal class for schems location addition --- .../info/textgrid/middleware/OAIPMHImpl.java | 4 +- .../java/info/textgrid/middleware/Rest.java | 74 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java index f4f455a4..dcc18738 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java @@ -578,7 +578,7 @@ public class OAIPMHImpl implements OAIPMHProducer { } catch (ParseException e) { this.log.debug("can not parse date format"); } catch (DatatypeConfigurationException e) { - this.log.debug("Datatype configuration failed"); + this.log.debug("datatype configuration failed"); } // Convert the request values. @@ -636,7 +636,7 @@ public class OAIPMHImpl implements OAIPMHProducer { JAXBElement<OAIPMHtype> result = obf.createOAIPMH(oai); - // Add DC XSD URL for xsi:schemaLocation. + // TODO Add DC XSD URL for xsi:schemaLocation. return result; } diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/Rest.java b/oaipmh-core/src/main/java/info/textgrid/middleware/Rest.java index 391f12fa..fd9a73c6 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/Rest.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/Rest.java @@ -16,49 +16,49 @@ import info.textgrid.utils.httpclient.TGHttpConnection; */ public class Rest { - private Log log = LogFactory.getLog(Rest.class); + private Log log = LogFactory.getLog(Rest.class); - /** - * @return - */ - @GET - @Path("/buildinfo") - @Produces("text/html") - public String getBuildInfo() { + /** + * @return + */ + @GET + @Path("/buildinfo") + @Produces("text/html") + public String getBuildInfo() { - InputStream is = this.getClass().getResourceAsStream("buildinfo.txt"); - Properties prop = new Properties(); - try { - prop.load(is); - } catch (IOException e) { - return "Error opening buildinfo.txt"; - } finally { - try { - is.close(); - } catch (IOException e) { - this.log.error("error closing stream", e); - } - } + InputStream is = this.getClass().getResourceAsStream("buildinfo.txt"); + Properties prop = new Properties(); + try { + prop.load(is); + } catch (IOException e) { + return "error opening buildinfo.txt"; + } finally { + try { + is.close(); + } catch (IOException e) { + this.log.error("error closing stream", e); + } + } - String info = "This is oaipmh " + prop.get("version") + " built " - + prop.get("time") + " from git: " + prop.get("branch") - + " (rev:" + prop.get("build") + ")"; + String info = "this is oaipmh " + prop.get("version") + " built " + + prop.get("time") + " from git: " + prop.get("branch") + + " (rev:" + prop.get("build") + ")"; - return info; - } + return info; + } - /** - * @return - */ - @GET - @Path("/cmstat") - @Produces("text/plain") - public Response getConManStat() { + /** + * @return + */ + @GET + @Path("/cmstat") + @Produces("text/plain") + public Response getConManStat() { - String[] routes = {}; - String cmstats = TGHttpConnection.generateInfoString(routes); + String[] routes = {}; + String cmstats = TGHttpConnection.generateInfoString(routes); - return Response.ok(cmstats).build(); - } + return Response.ok(cmstats).build(); + } } -- GitLab