# HG changeset patch
# User gernotbelger
# Date 1519320513 -3600
# Node ID 93e6afa30045d9765224de34555ae46708713d0a
# Parent d9f2ce1d6befec6789e40b09cb85c1792c002c52# Parent 0a900d605d523ffd11ae0aedf77cd8aedfcdf387
Merge
diff -r 0a900d605d52 -r 93e6afa30045 artifacts/doc/conf/themes/default.xml
--- a/artifacts/doc/conf/themes/default.xml Thu Feb 22 17:04:06 2018 +0100
+++ b/artifacts/doc/conf/themes/default.xml Thu Feb 22 18:28:33 2018 +0100
@@ -143,16 +143,12 @@
-
-
-
-
-
+
@@ -2888,27 +2884,31 @@
-
+
-
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff -r 0a900d605d52 -r 93e6afa30045 artifacts/doc/conf/themes/second.xml
--- a/artifacts/doc/conf/themes/second.xml Thu Feb 22 17:04:06 2018 +0100
+++ b/artifacts/doc/conf/themes/second.xml Thu Feb 22 18:28:33 2018 +0100
@@ -956,6 +956,7 @@
+
@@ -2495,15 +2496,6 @@
-
-
-
-
-
-
-
-
-
@@ -2869,40 +2861,42 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 0a900d605d52 -r 93e6afa30045 artifacts/doc/conf/themes/virtual.xml
--- a/artifacts/doc/conf/themes/virtual.xml Thu Feb 22 17:04:06 2018 +0100
+++ b/artifacts/doc/conf/themes/virtual.xml Thu Feb 22 18:28:33 2018 +0100
@@ -79,16 +79,20 @@
+
+
+
+
diff -r 0a900d605d52 -r 93e6afa30045 artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/App.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/App.java Thu Feb 22 17:04:06 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/App.java Thu Feb 22 18:28:33 2018 +0100
@@ -13,17 +13,19 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.net.MalformedURLException;
import java.io.File;
import java.io.FileOutputStream;
import org.dive4elements.river.backend.SessionFactoryProvider;
import org.hibernate.Session;
-
+import org.slf4j.bridge.SLF4JBridgeHandler;
import org.w3c.dom.Document;
import org.apache.log4j.Logger;
-
+import org.apache.log4j.PropertyConfigurator;
+import org.dive4elements.artifacts.common.utils.Config;
import org.dive4elements.artifacts.common.utils.XMLUtils;
import org.dive4elements.river.artifacts.datacage.Recommendations;
@@ -32,6 +34,12 @@
{
private static Logger log = Logger.getLogger(App.class);
+ /**
+ * The logging is done via Log4j. To configure the logging
+ * a file 'log4j.properties' is search in the configuration directory.
+ */
+ private static final String LOG4J_PROPERTIES = "log4j.properties";
+
public static final String template =
System.getProperty("meta.data.template", "meta-data.xml");
@@ -58,8 +66,28 @@
return map;
}
+ /**
+ * Trys to load the Log4j configuration from ${config.dir}/log4j.properties.
+ */
+ private static final void configureLogging() {
+ File configDir = Config.getConfigDirectory();
+ File propFile = new File(configDir, LOG4J_PROPERTIES);
+
+ if (propFile.isFile() && propFile.canRead()) {
+ try {
+ PropertyConfigurator.configure(propFile.toURI().toURL());
+ SLF4JBridgeHandler.install();
+ }
+ catch (MalformedURLException mue) {
+ mue.printStackTrace(System.err);
+ }
+ }
+ }
+
public static void main(String [] args) {
+ configureLogging();
+
Recommendations rec = Recommendations.createRecommendations(
new File(template));
@@ -71,6 +99,9 @@
final Document result = XMLUtils.newDocument();
final Map parameters = getParameters();
+ parameters.put("ARTIFACT-OUTS", new String[] { "LONGITUDINAL_SECTION" });
+ parameters.put("PARAMETERS", parameters);
+ parameters.put("USER-ID", userId);
Session session = SessionFactoryProvider
.createSessionFactory()
@@ -99,7 +130,12 @@
}
try {
+ out.write('\n');
XMLUtils.toStream(result, out);
+ out.write('\n');
+ }
+ catch (IOException e) {
+ log.error(e);
}
finally {
if (OUTPUT != null) {
diff -r 0a900d605d52 -r 93e6afa30045 artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculationExtended.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculationExtended.java Thu Feb 22 17:04:06 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculationExtended.java Thu Feb 22 18:28:33 2018 +0100
@@ -35,6 +35,8 @@
final FixingsOverview overview = FixingsOverviewFactory.getOverview(this.river);
final ColumnCache cc = new ColumnCache();
+ // FIXME: dass die Hälfte der zeitlichen Differenz zwischen der ältesten und neusten WSPL
+
final List columns = getEventColumns(overview, cc);
for (final Column column : columns) {
final Date date = column.getDate();