diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 1822:6ed439ff61bf

Changed theme-mapping mechanism to include further condition (on master-artifacts attributes), added point themes for longitudinal.ws for calculations at locations. flys-artifacts/trunk@3151 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 03 Nov 2011 10:25:23 +0000
parents 661dfad9910a
children 9562ca537143
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Thu Nov 03 10:19:29 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Thu Nov 03 10:25:23 2011 +0000
@@ -494,8 +494,8 @@
 
 
     /**
-     * Returns the attribute that belongs to an artifact stored in this
-     * collection.
+     * Returns the attribute that belongs to an artifact and facet stored in
+     * this collection.
      *
      * @param uuid The Artifact's uuid.
      * @param outname The name of the requested output.
@@ -723,6 +723,17 @@
             ? (FLYSContext) context
             : (FLYSContext) context.globalContext();
 
+        // Push artifact in flysContext.
+        ArtifactDatabase db = context.getDatabase();
+        try {
+            FLYSArtifact artifact = (FLYSArtifact) db.getRawArtifact(uuid);
+            log.debug("Got raw artifact");
+            flysContext.put(flysContext.ARTIFACT_KEY, artifact);
+        }
+        catch (Exception e) {
+            log.error("Exception caught when trying to get art.", e);
+        }
+
         Theme t = ThemeFactory.getTheme(flysContext, facet, pattern);
 
         if (t != null) {

http://dive4elements.wald.intevation.org