changeset 7434:505b05e223b1

Experimental patch: Do not run datacage on artifacts that are loaded from datacage. His hopefully minimizes the datacage runs when a lot of data is loaded.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 25 Oct 2013 03:47:04 +0200
parents 73946c0007ff
children 1688aca02eb0
files artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Thu Oct 24 23:06:40 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Fri Oct 25 03:47:04 2013 +0200
@@ -45,6 +45,12 @@
     public void execute(Artifact artifact, CallContext context, Document doc) {
         D4EArtifact flys = (D4EArtifact) artifact;
 
+        // Do not generate recommendations for a loaded artifact.
+        String out = flys.getBoundToOut();
+        if (out != null && !out.isEmpty()) {
+            return;
+        }
+
         Element result = (Element) XMLUtils.xpath(
             doc,
             XPATH_RESULT,

http://dive4elements.wald.intevation.org