changeset 5867:59ff03ff48f1

River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 15:23:01 +0200
parents 9a6741ccf6d4
children 35b2d86c3fb5
files artifacts/doc/conf/conf.xml artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/AreaArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/ChartArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/ExternalWMSArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/FLYSArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/HYKArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/MINFOArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/StaticFLYSArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/WQKmsInterpolArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/Access.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/Calculation4Access.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAnalysisAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixRealizingAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/FlowVelocityAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/GaugeAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/HistoricalDischargeAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/MapAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/RiverAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/SQRelationAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/DurationCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeDifferenceFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReferenceCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReportFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisEventsFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixEventFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAvSectorFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixOutlierFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixReferenceEventsFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierCurveFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierMeasurementFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/services/MetaDataService.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelectMinfo.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DGMSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DefaultState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterLocationState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/InputDoubleState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/IntRangeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiStringArrayState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/QSectorSingleState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceGaugeState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/RiverSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/ScenarioSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/UserRGDState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/EventSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQStaticState.java artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/ValueCompareTransition.java artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java artifacts/src/main/java/org/dive4elements/river/collections/FLYSArtifactCollection.java artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java
diffstat 199 files changed, 3023 insertions(+), 3023 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/conf.xml	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/doc/conf/conf.xml	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
             name="DefaultArtifactCollectionFactory"
             description="The default artifact collection factory"
             ttl="21600000"
-            artifact-collection="org.dive4elements.river.collections.FLYSArtifactCollection">org.dive4elements.artifactdatabase.DefaultArtifactCollectionFactory</collection-factory>
+            artifact-collection="org.dive4elements.river.collections.D4EArtifactCollection">org.dive4elements.artifactdatabase.DefaultArtifactCollectionFactory</collection-factory>
 
         <artifact-factories>
             <!-- All Artifactfactories which are available in this Database. -->
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -37,7 +37,7 @@
  *
  * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
  */
-public abstract class AbstractStaticStateArtifact extends StaticFLYSArtifact {
+public abstract class AbstractStaticStateArtifact extends StaticD4EArtifact {
 
     private transient StaticState staticstate;
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -42,7 +42,7 @@
  * Artifact to access names of Points Of Interest along a segment of a river.
  */
 public class AnnotationArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes {
 
     /** The logger for this class. */
@@ -86,7 +86,7 @@
         Document        data)
     {
         logger.debug("AnnotationArtifact.setup");
-        String filter = StaticFLYSArtifact.getDatacageIDValue(data);
+        String filter = StaticD4EArtifact.getDatacageIDValue(data);
         String[] splits = filter.split(":");
         if (splits.length > 1) {
             addStringData("nameFilter", splits[1]);
@@ -102,7 +102,7 @@
         logger.debug("AnnotationArtifact.initialize, id: "
             + artifact.identifier());
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         // TODO issue880: make annotations available _per type_
         importData(flys, "river");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AreaArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AreaArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -32,7 +32,7 @@
 /**
  * Artifact describing the area between two WKms.
  */
-public class AreaArtifact extends StaticFLYSArtifact {
+public class AreaArtifact extends StaticD4EArtifact {
 
     /** Name of Artifact. */
     public static final String AREA_ARTIFACT_NAME = "area_artifact";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -135,8 +135,8 @@
         // do not clone facets, etc. from master artifact
 
         logger.debug("initialize");
-        importData((FLYSArtifact)artifact, "ld_from");
-        importData((FLYSArtifact)artifact, "ld_to");
+        importData((D4EArtifact)artifact, "ld_from");
+        importData((D4EArtifact)artifact, "ld_to");
 
         logger.debug("ld_from " + getDataAsString("ld_from"));
         logger.debug("ld_to " + getDataAsString("ld_to"));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ChartArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ChartArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -38,7 +38,7 @@
 
 
 /** Artifact, open to generate any (?) out. */
-public class ChartArtifact extends FLYSArtifact {
+public class ChartArtifact extends D4EArtifact {
 
     private static final Logger logger =
         Logger.getLogger(ChartArtifact.class);
@@ -175,7 +175,7 @@
 
         @Override
         public Object computeAdvance(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             String       hash,
             CallContext  context,
             List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Sun Apr 28 15:23:01 2013 +0200
@@ -43,7 +43,7 @@
 
     @Override
     public void execute(Artifact artifact, CallContext context, Document doc) {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         Element result = (Element) XMLUtils.xpath(
             doc,
@@ -75,7 +75,7 @@
      * facets exist).
      */
     public static String[] extractOutputNames(
-        FLYSArtifact flys,
+        D4EArtifact flys,
         CallContext  context)
     {
         if (flys instanceof ChartArtifact) {
@@ -100,7 +100,7 @@
      * Creates Map from Strings "recommended" to "true".
      */
     protected Map<String, Object> getNoneUserSpecificParameters(
-        FLYSArtifact flys,
+        D4EArtifact flys,
         CallContext  context)
     {
         Map<String, Object> params = new HashMap<String, Object>(1);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -42,7 +42,7 @@
 /**
  * Artifact describing a cross-section.
  */
-public class CrossSectionArtifact extends StaticFLYSArtifact {
+public class CrossSectionArtifact extends StaticD4EArtifact {
 
     /** Name of Artifact. */
     public static final String CS_ARTIFACT_NAME = "cross_section";
@@ -83,8 +83,8 @@
                     Facet    facet,
                     String   outputName
                 ) {
-                    if (artifact instanceof FLYSArtifact) {
-                        FLYSArtifact flys = (FLYSArtifact)artifact;
+                    if (artifact instanceof D4EArtifact) {
+                        D4EArtifact flys = (D4EArtifact)artifact;
                         String data = flys.getDataAsString(DATA_IS_NEWEST);
                         return data != null && data.equals("1");
                     }
@@ -160,7 +160,7 @@
         Object   context,
         CallMeta callMeta)
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         RangeAccess rangeAccess = new RangeAccess(flys, null);
         double[] range = rangeAccess.getKmRange();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -0,0 +1,1572 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3) 
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details. 
+ */
+
+package org.dive4elements.river.artifacts;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.xml.xpath.XPathConstants;
+
+import net.sf.ehcache.Cache;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.dive4elements.artifactdatabase.ArtifactDatabaseImpl;
+import org.dive4elements.artifactdatabase.DefaultArtifact;
+import org.dive4elements.artifactdatabase.ProtocolUtils;
+import org.dive4elements.artifactdatabase.data.DefaultStateData;
+import org.dive4elements.artifactdatabase.data.StateData;
+import org.dive4elements.artifactdatabase.state.DefaultFacet;
+import org.dive4elements.artifactdatabase.state.DefaultOutput;
+import org.dive4elements.artifactdatabase.state.Facet;
+import org.dive4elements.artifactdatabase.state.Output;
+import org.dive4elements.artifactdatabase.state.State;
+import org.dive4elements.artifactdatabase.state.StateEngine;
+import org.dive4elements.artifactdatabase.transition.TransitionEngine;
+import org.dive4elements.artifacts.Artifact;
+import org.dive4elements.artifacts.ArtifactDatabase;
+import org.dive4elements.artifacts.ArtifactDatabaseException;
+import org.dive4elements.artifacts.ArtifactFactory;
+import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.artifacts.CallMeta;
+import org.dive4elements.artifacts.Message;
+import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
+import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
+import org.dive4elements.river.artifacts.cache.CacheFactory;
+import org.dive4elements.river.artifacts.context.RiverContext;
+import org.dive4elements.river.artifacts.model.CalculationMessage;
+import org.dive4elements.river.artifacts.states.DefaultState;
+import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
+import org.dive4elements.river.utils.RiverUtils;
+
+/**
+ * The default FLYS artifact with convenience added.
+ * (Subclass to get fully functional artifacts).
+ *
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public abstract class D4EArtifact extends DefaultArtifact {
+
+    /** The logger that is used in this artifact. */
+    private static Logger log = Logger.getLogger(D4EArtifact.class);
+
+    public static final String COMPUTING_CACHE = "computed.values";
+
+    /** The XPath that points to the input data elements of the FEED document. */
+    public static final String XPATH_FEED_INPUT =
+        "/art:action/art:data/art:input";
+
+    /** The XPath that points to the name of the target state of ADVANCE. */
+    public static final String XPATH_ADVANCE_TARGET =
+        "/art:action/art:target/@art:name";
+
+    public static final String XPATH_MODEL_ARTIFACT =
+        "/art:action/art:template/@uuid";
+
+    public static final String XPATH_FILTER =
+        "/art:action/art:filter/art:out";
+
+    /** The constant string that shows that an operation was successful. */
+    public static final String OPERATION_SUCCESSFUL = "SUCCESS";
+
+    /** The constant string that shows that an operation failed. */
+    public static final String OPERATION_FAILED = "FAILURE";
+
+    /** The identifier of the current state. */
+    protected String currentStateId;
+
+    /** The identifiers of previous states on a stack. */
+    protected List<String> previousStateIds;
+
+    /** The name of the artifact. */
+    protected String name;
+
+    /** The data that have been inserted into this artifact. */
+    private Map<String, StateData> data;
+
+    /** Mapping of state names to created facets. */
+    private Map<String, List<Facet>> facets;
+
+    /**
+     * Used to generates "view" on the facets (hides facets not matching the
+     * filter in output of collection);  out -&gt; facets.
+     */
+    protected Map<String, List<Facet>> filterFacets;
+
+
+    /**
+     * The default constructor that creates an empty D4EArtifact.
+     */
+    public D4EArtifact() {
+        data             = new TreeMap<String, StateData>();
+        previousStateIds = new ArrayList<String>();
+        facets           = new HashMap<String, List<Facet>>();
+    }
+
+
+    /**
+     * This method appends the static data - that has already been inserted by
+     * the user - to the static node of the DESCRIBE document.
+     *
+     * @param doc The document.
+     * @param ui The root node.
+     * @param context The CallContext.
+     * @param uuid The identifier of the artifact.
+     */
+    protected void appendStaticUI(
+        Document    doc,
+        Node        ui,
+        CallContext context,
+        String uuid)
+    {
+        List<String> stateIds = getPreviousStateIds();
+
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+        StateEngine engine      = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+
+        boolean debug = log.isDebugEnabled();
+
+        for (String stateId: stateIds) {
+            if (debug) {
+                log.debug("Append static data for state: " + stateId);
+            }
+            DefaultState state = (DefaultState) engine.getState(stateId);
+
+            ui.appendChild(state.describeStatic(this, doc, ui, context, uuid));
+        }
+    }
+
+
+    /**
+     * Returns the name of the concrete artifact.
+     *
+     * @return the name of the concrete artifact.
+     */
+    public String getName() {
+        return name;
+    }
+
+
+    /**
+     * Initialize the artifact and insert new data if <code>data</code> contains
+     * information necessary for this artifact.
+     *
+     * @param identifier The UUID.
+     * @param factory The factory that is used to create this artifact.
+     * @param context The CallContext.
+     * @param data Some optional data.
+     */
+    @Override
+    public void setup(
+        String          identifier,
+        ArtifactFactory factory,
+        Object          context,
+        CallMeta        callMeta,
+        Document        data)
+    {
+        boolean debug = log.isDebugEnabled();
+
+        if (debug) {
+            log.debug("Setup this artifact with the uuid: " + identifier);
+        }
+
+        super.setup(identifier, factory, context, callMeta, data);
+
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+
+        List<State> states = getStates(context);
+
+        String name = getName();
+
+        if (debug) {
+            log.debug("setup(): Set initial state for artifact '" + name + "'");
+        }
+
+        if (states == null) {
+            log.error("No states found from which an initial "
+                + "state could be picked.");
+        }
+        setCurrentState(states.get(0));
+
+        String model = XMLUtils.xpathString(
+            data,
+            XPATH_MODEL_ARTIFACT,
+            ArtifactNamespaceContext.INSTANCE);
+
+        if (model != null && model.length() > 0) {
+            ArtifactDatabase db = (ArtifactDatabase) flysContext.get(
+                ArtifactDatabaseImpl.GLOBAL_CONTEXT_KEY);
+
+            try {
+                initialize(db.getRawArtifact(model), context, callMeta);
+            }
+            catch (ArtifactDatabaseException adbe) {
+                log.error(adbe, adbe);
+            }
+        }
+
+        filterFacets = buildFilterFacets(data);
+    }
+
+
+    /** Get copy of previous state ids as Strings in list. */
+    protected List<String> clonePreviousStateIds() {
+        return new ArrayList<String>(previousStateIds);
+    }
+
+
+    /**
+     * Copies data item from other artifact to this artifact.
+     *
+     * @param other Artifact from which to get data.
+     * @param name  Name of data.
+     */
+    protected void importData(D4EArtifact other, final String name) {
+        if (other == null) {
+            log.error("No other art. to import data " + name + " from.");
+            return;
+        }
+
+        StateData sd = other.getData(name);
+
+        if (sd == null) {
+            log.warn("Other artifact has no data " + name + ".");
+            return;
+        }
+
+        this.addData(name, sd);
+    }
+
+
+    /** Clone the internal map of map of state-name to state-data. */
+    protected Map<String, StateData> cloneData() {
+        Map<String, StateData> copy = new TreeMap<String, StateData>();
+
+        for (Map.Entry<String, StateData> entry: data.entrySet()) {
+            copy.put(entry.getKey(), entry.getValue().deepCopy());
+        }
+
+        return copy;
+    }
+
+
+    /**
+     * Return a copy of the facet mapping.
+     * @return Mapping of state-ids to facets.
+     */
+    protected Map<String, List<Facet>> cloneFacets() {
+        Map<String, List<Facet>> copy = new HashMap<String, List<Facet>>();
+
+        for (Map.Entry<String, List<Facet>> entry: facets.entrySet()) {
+            List<Facet> facets      = entry.getValue();
+            List<Facet> facetCopies = new ArrayList<Facet>(facets.size());
+            for (Facet facet: facets) {
+                facetCopies.add(facet.deepCopy());
+            }
+            copy.put(entry.getKey(), facetCopies);
+        }
+
+        return copy;
+    }
+
+
+    /**
+     * (called from setup).
+     * @param artifact master-artifact (if any, otherwise initialize is not called).
+     */
+    protected void initialize(
+        Artifact artifact,
+        Object   context,
+        CallMeta callMeta)
+    {
+        if (!(artifact instanceof D4EArtifact)) {
+            return;
+        }
+
+        D4EArtifact flys = (D4EArtifact)artifact;
+
+        currentStateId   = flys.currentStateId;
+        previousStateIds = flys.clonePreviousStateIds();
+        name             = flys.name;
+        data             = flys.cloneData();
+        facets           = flys.cloneFacets();
+        // Do not clone filter facets!
+
+        ArrayList<String> stateIds     = (ArrayList<String>) getPreviousStateIds();
+        ArrayList<String> toInitialize = (ArrayList<String>) stateIds.clone();
+
+        toInitialize.add(getCurrentStateId());
+
+        for (String stateId: toInitialize) {
+            State state = getState(context, stateId);
+
+            if (state != null) {
+                state.initialize(artifact, this, context, callMeta);
+            }
+        }
+    }
+
+
+    /**
+     * Builds filter facets from document.
+     * @see filterFacets
+     */
+    protected Map<String, List<Facet>> buildFilterFacets(Document document) {
+        if (log.isDebugEnabled()) {
+            log.debug("Building filter factes for artifact " + this.getName());
+        }
+
+        NodeList nodes = (NodeList)XMLUtils.xpath(
+            document,
+            XPATH_FILTER,
+            XPathConstants.NODESET,
+            ArtifactNamespaceContext.INSTANCE);
+
+        if (nodes == null || nodes.getLength() == 0) {
+            return null;
+        }
+
+        Map<String, List<Facet>> result = new HashMap<String, List<Facet>>();
+
+        for (int i = 0, N = nodes.getLength(); i < N; ++i) {
+            Element element = (Element)nodes.item(i);
+            String oName = element.getAttribute("name");
+            if (oName == null || oName.isEmpty()) {
+                continue;
+            }
+
+            List<Facet> facets = new ArrayList<Facet>();
+
+            NodeList facetNodes = element.getElementsByTagNameNS(
+                ArtifactNamespaceContext.NAMESPACE_URI,
+                "facet");
+
+            for (int j = 0, M = facetNodes.getLength(); j < M; ++j) {
+                Element facetElement = (Element)facetNodes.item(j);
+
+                String fName = facetElement.getAttribute("name");
+
+                int index;
+                try {
+                    index = Integer.parseInt(facetElement.getAttribute("index"));
+                }
+                catch (NumberFormatException nfe) {
+                    log.warn(nfe);
+                    index = 0;
+                }
+                if (log.isDebugEnabled()) {
+                    log.debug("Creating filter facet " + fName + " with  index " + index +
+                            " for out " + oName);
+                }
+                facets.add(new DefaultFacet(index, fName, ""));
+            }
+
+            if (!facets.isEmpty()) {
+                result.put(oName, facets);
+            }
+        }
+
+        return result;
+    }
+
+
+    /**
+     * Insert new data included in <code>input</code> into the current state.
+     *
+     * @param target XML document that contains new data.
+     * @param context The CallContext.
+     *
+     * @return a document that contains a SUCCESS or FAILURE message.
+     */
+    @Override
+    public Document feed(Document target, CallContext context) {
+        log.debug("D4EArtifact.feed()");
+
+        Document doc = XMLUtils.newDocument();
+
+        XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
+            doc,
+            ArtifactNamespaceContext.NAMESPACE_URI,
+            ArtifactNamespaceContext.NAMESPACE_PREFIX);
+
+        Element result = creator.create("result");
+        doc.appendChild(result);
+
+        try {
+            saveData(target, context);
+
+            compute(context, ComputeType.FEED, true);
+
+            return describe(target, context);
+        }
+        catch (IllegalArgumentException iae) {
+            // do not store state if validation fails.
+            context.afterCall(CallContext.NOTHING);
+            creator.addAttr(result, "type", OPERATION_FAILED, true);
+
+            result.setTextContent(iae.getMessage());
+        }
+
+        return doc;
+    }
+
+
+    /**
+     * This method returns a description of this artifact.
+     *
+     * @param data Some data.
+     * @param context The CallContext.
+     *
+     * @return the description of this artifact.
+     */
+    @Override
+    public Document describe(Document data, CallContext context) {
+
+        if (log.isDebugEnabled()) {
+            log.debug(
+                "Describe: the current state is: " + getCurrentStateId());
+            dumpArtifact();
+        }
+
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+
+        StateEngine stateEngine = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+
+        TransitionEngine transitionEngine = (TransitionEngine) flysContext.get(
+            RiverContext.TRANSITION_ENGINE_KEY);
+
+        List<State> reachable = transitionEngine.getReachableStates(
+            this, getCurrentState(context), stateEngine);
+
+        Document description            = XMLUtils.newDocument();
+        XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
+            description,
+            ArtifactNamespaceContext.NAMESPACE_URI,
+            ArtifactNamespaceContext.NAMESPACE_PREFIX);
+
+        Element root = ProtocolUtils.createRootNode(creator);
+        description.appendChild(root);
+
+        State current = getCurrentState(context);
+
+        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        ProtocolUtils.appendState(creator, root, current);
+        ProtocolUtils.appendReachableStates(creator, root, reachable);
+
+        appendBackgroundActivity(creator, root, context);
+
+        Element ui = ProtocolUtils.createArtNode(
+            creator, "ui", null, null);
+
+        Element staticUI  = ProtocolUtils.createArtNode(
+            creator, "static", null, null);
+
+        Element outs = ProtocolUtils.createArtNode(
+            creator, "outputmodes", null, null);
+        appendOutputModes(description, outs, context, identifier());
+
+        appendStaticUI(description, staticUI, context, identifier());
+
+        Element name = ProtocolUtils.createArtNode(
+            creator, "name",
+            new String[] { "value" },
+            new String[] { getName() });
+
+        Element dynamic = current.describe(
+            this,
+            description,
+            root,
+            context,
+            identifier());
+
+        if (dynamic != null) {
+            ui.appendChild(dynamic);
+        }
+
+        ui.appendChild(staticUI);
+
+        root.appendChild(name);
+        root.appendChild(ui);
+        root.appendChild(outs);
+
+        return description;
+    }
+
+    /** Override me! */
+
+    protected void appendBackgroundActivity(
+        ElementCreator cr,
+        Element        root,
+        CallContext    context
+    ) {
+        LinkedList<Message> messages = context.getBackgroundMessages();
+
+        if (messages == null) {
+            return;
+        }
+
+        Element inBackground = cr.create("background-processing");
+        root.appendChild(inBackground);
+
+        cr.addAttr(
+            inBackground,
+            "value",
+            String.valueOf(context.isInBackground()),
+            true);
+
+        CalculationMessage message = (CalculationMessage) messages.getLast();
+        cr.addAttr(
+            inBackground,
+            "steps",
+            String.valueOf(message.getSteps()),
+            true);
+
+        cr.addAttr(
+            inBackground,
+            "currentStep",
+            String.valueOf(message.getCurrentStep()),
+            true);
+
+        inBackground.setTextContent(message.getMessage());
+    }
+
+    /**
+     * Append output mode nodes to a document.
+     */
+    protected void appendOutputModes(
+        Document    doc,
+        Element     outs,
+        CallContext context,
+        String      uuid)
+    {
+        List<Output> generated = getOutputs(context);
+
+        if (log.isDebugEnabled()) {
+            log.debug("This Artifact has " + generated.size() + " Outputs.");
+        }
+
+        ProtocolUtils.appendOutputModes(doc, outs, generated);
+    }
+
+
+    /**
+     * This method handles request for changing the current state of an
+     * artifact. It is possible to step forward or backward.
+     *
+     * @param target The incoming ADVANCE document.
+     * @param context The CallContext.
+     *
+     * @return a document that contains a SUCCESS or FAILURE message.
+     */
+    @Override
+    public Document advance(Document target, CallContext context) {
+
+        boolean debug = log.isDebugEnabled();
+
+        Document doc = XMLUtils.newDocument();
+
+        XMLUtils.ElementCreator ec = new XMLUtils.ElementCreator(
+            doc,
+            ArtifactNamespaceContext.NAMESPACE_URI,
+            ArtifactNamespaceContext.NAMESPACE_PREFIX);
+
+        Element result = ec.create("result");
+
+        String currentStateId = getCurrentStateId();
+        String targetState    = XMLUtils.xpathString(
+            target, XPATH_ADVANCE_TARGET, ArtifactNamespaceContext.INSTANCE);
+
+        if (debug) {
+            log.debug("D4EArtifact.advance() to '" + targetState + "'");
+        }
+
+        if (!currentStateId.equals(targetState)
+            && isStateReachable(targetState, context))
+        {
+            if (debug) {
+                log.debug("Advance: Step forward");
+            }
+
+            List<String> prev = getPreviousStateIds();
+            prev.add(currentStateId);
+
+            setCurrentStateId(targetState);
+
+            if (debug) {
+                log.debug("Compute data for state: " + targetState);
+            }
+            compute(context, ComputeType.ADVANCE, true);
+
+            return describe(target, context);
+        }
+        else if (isPreviousState(targetState, context)) {
+            if (debug) {
+                log.debug("Advance: Step back to");
+            }
+
+            List<String> prevs   = getPreviousStateIds();
+            int targetIdx        = prevs.indexOf(targetState);
+            int start            = prevs.size() - 1;
+
+            destroyStates(prevs, context);
+
+            for (int i = start; i >= targetIdx; i--) {
+                String prev = prevs.get(i);
+                if (debug) {
+                    log.debug("Remove state id '" + prev + "'");
+                }
+
+                prevs.remove(prev);
+                facets.remove(prev);
+            }
+
+            destroyState(getCurrentStateId(), context);
+            setCurrentStateId(targetState);
+
+            return describe(target, context);
+        }
+
+        log.warn("Advance: Cannot advance to '" + targetState + "'");
+        ec.addAttr(result, "type", OPERATION_FAILED, true);
+
+        doc.appendChild(result);
+
+        return doc;
+    }
+
+
+    /**
+     * Returns the identifier of the current state.
+     *
+     * @return the identifier of the current state.
+     */
+    public String getCurrentStateId() {
+        return currentStateId;
+    }
+
+
+    /**
+     * Sets the identifier of the current state.
+     *
+     * @param id the identifier of a state.
+     */
+    protected void setCurrentStateId(String id) {
+        currentStateId = id;
+    }
+
+
+    /**
+     * Set the current state of this artifact. <b>NOTE</b>We don't store the
+     * State object itself - which is not necessary - but its identifier. So
+     * this method will just call the setCurrentStateId() method with the
+     * identifier of <i>state</i>.
+     *
+     * @param state The new current state.
+     */
+    protected void setCurrentState(State state) {
+        setCurrentStateId(state.getID());
+    }
+
+
+    /**
+     * Returns the current state of the artifact.
+     *
+     * @return the current State of the artifact.
+     */
+    public State getCurrentState(Object context) {
+        return getState(context, getCurrentStateId());
+    }
+
+
+    /**
+     * Get list of existant states for this Artifact.
+     * @param context Contex to get StateEngine from.
+     * @return list of states.
+     */
+    protected List<State> getStates(Object context) {
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+        StateEngine engine      = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+        return engine.getStates(getName());
+    }
+
+
+    /**
+     * Get state with given ID.
+     * @param context Context to get StateEngine from.
+     * @param stateID ID of state to get.
+     * @return state with given ID.
+     */
+    protected State getState(Object context, String stateID) {
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+        StateEngine engine      = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+        return engine.getState(stateID);
+    }
+
+
+    /**
+     * Returns the vector of previous state identifiers.
+     *
+     * @return the vector of previous state identifiers.
+     */
+    protected List<String> getPreviousStateIds() {
+        return previousStateIds;
+    }
+
+
+    /**
+     * Get all previous and the current state id.
+     * @return #getPreviousStateIds() + #getCurrentStateId()
+     */
+    public List<String> getStateHistoryIds() {
+        ArrayList<String> prevIds = (ArrayList) getPreviousStateIds();
+        ArrayList<String> allIds  = (ArrayList) prevIds.clone();
+
+        allIds.add(getCurrentStateId());
+        return allIds;
+    }
+
+
+    /**
+     * Adds a new StateData item to the data pool of this artifact.
+     *
+     * @param name the name of the data object.
+     * @param data the data object itself.
+     */
+    protected void addData(String name, StateData data) {
+        this.data.put(name, data);
+    }
+
+
+    /** Remove and return statedata associated to name. */
+    protected StateData removeData(String name) {
+        return this.data.remove(name);
+    }
+
+
+    /**
+     * This method returns a specific StateData object that is stored in the
+     * data pool of this artifact.
+     *
+     * @param name The name of the data object.
+     *
+     * @return the StateData object if existing, otherwise null.
+     */
+    public StateData getData(String name) {
+        return data.get(name);
+    }
+
+
+    /**
+     * A derived Artifact class can use this method to set the data
+     */
+    protected void setData(Map<String, StateData> data) {
+        this.data = data;
+    }
+
+
+    /** Return named data item, null if not found. */
+    public String getDataAsString(String name) {
+        StateData data = getData(name);
+        return data != null ? (String) data.getValue() : null;
+    }
+
+
+    /**
+     * This method returns the value of a StateData object stored in the data
+     * pool of this Artifact as Integer.
+     *
+     * @param name The name of the StateData object.
+     *
+     * @return an Integer representing the value of the data object or null if
+     * no object was found for <i>name</i>.
+     *
+     * @throws NumberFormatException if the value of the data object could not
+     * be transformed into an Integer.
+     */
+    public Integer getDataAsInteger(String name)
+    throws NumberFormatException
+    {
+        String value = getDataAsString(name);
+
+        if (value != null && value.length() > 0) {
+            return Integer.parseInt(value);
+        }
+
+        return null;
+    }
+
+
+    /**
+     * This method returns the value of a StateData object stored in the data
+     * pool of this Artifact as Double.
+     *
+     * @param name The name of the StateData object.
+     *
+     * @return an Double representing the value of the data object or null if
+     * no object was found for <i>name</i>.
+     *
+     * @throws NumberFormatException if the value of the data object could not
+     * be transformed into a Double.
+     */
+    public Double getDataAsDouble(String name)
+    throws NumberFormatException
+    {
+        String value = getDataAsString(name);
+
+        if (value != null && value.length() > 0) {
+            return Double.parseDouble(value);
+        }
+
+        return null;
+    }
+
+
+    /**
+     * This method returns the value of a StateData object stored in the data
+     * pool of this Artifact as Long.
+     *
+     * @param name The name of the StateData object.
+     *
+     * @return a Long representing the value of the data object or null if
+     * no object was found for <i>name</i>.
+     *
+     * @throws NumberFormatException if the value of the data object could not
+     * be transformed into a Long.
+     */
+    public Long getDataAsLong(String name)
+    throws NumberFormatException
+    {
+        String value = getDataAsString(name);
+
+        if (value != null && value.length() > 0) {
+            return Long.parseLong(value);
+        }
+
+        return null;
+    }
+
+
+    /**
+     * This method returns the value of a StateData object stored in the data
+     * pool of this Artifact is Boolean using Boolean.valueOf().
+     *
+     * @param name The name of the StateData object.
+     *
+     * @return a Boolean representing the value of the data object or null if no
+     * such object is existing.
+     */
+    public Boolean getDataAsBoolean(String name) {
+        String value = getDataAsString(name);
+
+        if (value == null || value.length() == 0) {
+            return null;
+        }
+
+        return Boolean.valueOf(value);
+    }
+
+
+    /**
+     * Add StateData containing a given string.
+     * @param name Name of the data object.
+     * @param value String to store.
+     */
+    public void addStringData(String name, String value) {
+        addData(name, new DefaultStateData(name, null, null, value));
+    }
+
+    /**
+     * This method returns all stored StateData in this artifact as a Collection
+     * @return a Collection of all StateData objects in this artifact
+     */
+    public Collection<StateData> getAllData() {
+        return data.values();
+    }
+
+
+    /** Return all produced facets. */
+    public List<Facet> getFacets() {
+        List<Facet> all = new ArrayList<Facet>();
+
+        // Iterate over facets of each state.
+        for (List<Facet> fs: facets.values()) {
+            all.addAll(fs);
+        }
+
+        return all;
+    }
+
+
+    /**
+     * Get facet as stored internally, with equalling name and index than given
+     * facet.
+     * @param facet that defines index and name of facet searched.
+     * @return facet instance or null if not found.
+     */
+    public Facet getNativeFacet(Facet facet) {
+        String name  = facet.getName();
+        int    index = facet.getIndex();
+
+        for (List<Facet> fs: facets.values()) {
+            for (Facet f: fs) {
+                if (f.getIndex() == index && f.getName().equals(name)) {
+                    return f;
+                }
+            }
+        }
+
+        log.warn("Could not find facet: " + name + " at " + index);
+        log.warn("Available facets for : " + getName() + " " + identifier() +
+                ": " + facets.values());
+        return null;
+    }
+
+
+    /**
+     * This method stores the data that is contained in the FEED document.
+     *
+     * @param feed The FEED document.
+     * @param xpath The XPath that points to the data nodes.
+     */
+    public void saveData(Document feed, CallContext context)
+    throws IllegalArgumentException
+    {
+        if (feed == null) {
+            throw new IllegalArgumentException("error_feed_no_data");
+        }
+
+        NodeList nodes = (NodeList) XMLUtils.xpath(
+            feed,
+            XPATH_FEED_INPUT,
+            XPathConstants.NODESET,
+            ArtifactNamespaceContext.INSTANCE);
+
+        if (nodes == null || nodes.getLength() == 0) {
+            throw new IllegalArgumentException("error_feed_no_data");
+        }
+
+        boolean debug = log.isDebugEnabled();
+
+        int count = nodes.getLength();
+
+        if (debug) {
+            log.debug("Try to save " + count + " data items.");
+        }
+
+        String uri = ArtifactNamespaceContext.NAMESPACE_URI;
+
+        DefaultState current = (DefaultState) getCurrentState(context);
+
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+        StateEngine engine      = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+
+        for (int i = 0; i < count; i++) {
+            Element node = (Element)nodes.item(i);
+
+            String name  = node.getAttributeNS(uri, "name");
+            String value = node.getAttributeNS(uri, "value");
+
+            if (name.length() > 0 && value.length() > 0) {
+                if (debug) {
+                    log.debug("Save data item for '" + name + "' : " + value);
+                }
+
+                StateData model = engine.getStateData(getName(), name);
+
+                StateData sd = model != null
+                    ? model.deepCopy()
+                    : new DefaultStateData(name, null, null, value);
+
+                addData(
+                    name, current.transform(this, context, sd, name, value));
+            }
+            else if (name.length() > 0 && value.length() == 0) {
+                if (removeData(name) != null && debug) {
+                    log.debug("Removed data '" + name + "' successfully.");
+                }
+            }
+        }
+
+        current.validate(this);
+    }
+
+
+    /**
+     * Determines if the state with the identifier <i>stateId</i> is reachable
+     * from the current state. The determination itself takes place in the
+     * TransitionEngine.
+     *
+     * @param stateId The identifier of a state.
+     * @param context The context object.
+     *
+     * @return true, if the state specified by <i>stateId</i> is reacahble,
+     * otherwise false.
+     */
+    protected boolean isStateReachable(String stateId, Object context) {
+
+        if (log.isDebugEnabled()) {
+            log.debug("Determine if the state '" + stateId + "' is reachable.");
+        }
+
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+
+        State currentState  = getCurrentState(context);
+        StateEngine sEngine = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+
+        TransitionEngine tEngine = (TransitionEngine) flysContext.get(
+            RiverContext.TRANSITION_ENGINE_KEY);
+
+        return tEngine.isStateReachable(this, stateId, currentState, sEngine);
+    }
+
+
+    /**
+     * Determines if the state with the identifier <i>stateId</i> is a previous
+     * state of the current state.
+     *
+     * @param stateId The target state identifier.
+     * @param context The context object.
+     */
+    protected boolean isPreviousState(String stateId, Object context) {
+        if (log.isDebugEnabled()) {
+            log.debug("Determine if the state '" + stateId + "' is old.");
+        }
+
+        return getPreviousStateIds().contains(stateId);
+    }
+
+
+    /**
+     * Computes the hash code of the entered values.
+     *
+     * @return a hash code.
+     */
+    @Override
+    public String hash() {
+
+        long hash  = 0L;
+        int  shift = 3;
+
+        for (Map.Entry<String, StateData> entry: data.entrySet()) {
+            String key   = entry.getKey();
+            Object value = entry.getValue().getValue();
+
+            hash ^= ((long)key.hashCode() << shift)
+                 |  ((long)value.hashCode() << (shift + 3));
+            shift += 2;
+        }
+
+        return getCurrentStateId() + hash;
+    }
+
+
+    /**
+     * Return List of outputs, where combinations of outputname and filtername
+     * that match content in filterFacets is left out.
+     * @return filtered Outputlist.
+     */
+    protected List<Output> filterOutputs(List<Output> outs) {
+        if (filterFacets == null || filterFacets.isEmpty()) {
+            log.debug("No filter for Outputs.");
+            return outs;
+        }
+
+        boolean debug = log.isDebugEnabled();
+
+        if (debug) {
+            log.debug(
+                "Filter Facets with " + filterFacets.size() + " filters.");
+        }
+
+        List<Output> filtered = new ArrayList<Output>();
+
+        for (Output out: outs) {
+            String outName = out.getName();
+
+            if (debug) {
+                log.debug("  filter Facets for Output: " + outName);
+            }
+
+            List<Facet> fFacets = filterFacets.get(outName);
+            if (fFacets != null) {
+                if (debug) {
+                    log.debug("" + fFacets.size() + " filters for: " + outName);
+                    for (Facet tmp: fFacets) {
+                        log.debug("   filter = '" + tmp.getName() + "'");
+                    }
+                }
+
+                List<Facet> resultFacets = new ArrayList<Facet>();
+
+                for (Facet facet: out.getFacets()) {
+                    for (Facet fFacet: fFacets) {
+                        if (facet.getIndex() == fFacet.getIndex()
+                        &&  facet.getName().equals(fFacet.getName())) {
+                            resultFacets.add(facet);
+                            break;
+                        }
+                    }
+                }
+
+                if (debug) {
+                    log.debug(
+                        "Facets after filtering = " + resultFacets.size());
+                }
+
+                if (!resultFacets.isEmpty()) {
+                    DefaultOutput nout = new DefaultOutput(
+                        out.getName(),
+                        out.getDescription(),
+                        out.getMimeType(),
+                        resultFacets);
+                    filtered.add(nout);
+                }
+            }
+            else if (debug) {
+                log.debug("No filter Factes for Output: " + outName);
+            }
+        }
+
+        if (debug) {
+            log.debug("Number of outs after filtering = " + filtered.size());
+        }
+
+        return filtered;
+    }
+
+
+    /**
+     * Get all outputs that the Artifact can do in this state (which includes
+     * all previous states).
+     *
+     * @return list of outputs
+     */
+    public List<Output> getOutputs(Object context) {
+        if (log.isDebugEnabled()) {
+            log.debug("##### Get Outputs for: " + identifier() + " #####");
+            dumpArtifact();
+        }
+
+        List<String> stateIds  = getPreviousStateIds();
+        List<Output> generated = new ArrayList<Output>();
+
+        for (String stateId: stateIds) {
+            DefaultState state = (DefaultState) getState(context, stateId);
+            generated.addAll(getOutputForState(state));
+        }
+
+        generated.addAll(getCurrentOutputs(context));
+
+        return filterOutputs(generated);
+    }
+
+
+    /**
+     * Get output(s) for current state.
+     * @return list of outputs for current state.
+     */
+    public List<Output> getCurrentOutputs(Object context) {
+        DefaultState cur = (DefaultState) getCurrentState(context);
+
+        try {
+            if (cur.validate(this)) {
+                return getOutputForState(cur);
+            }
+        }
+        catch (IllegalArgumentException iae) { }
+
+        return new ArrayList<Output>();
+    }
+
+
+    /**
+     * Get output(s) for a specific state.
+     * @param state State of interest
+     * @return list of output(s) for given state.
+     */
+    protected List<Output> getOutputForState(DefaultState state) {
+
+        if (state == null) {
+            log.error("state == null: This should not happen!");
+            return new ArrayList<Output>();
+        }
+
+        boolean debug = log.isDebugEnabled();
+
+        if (debug) {
+            log.debug("Find Outputs for State: " + state.getID());
+        }
+
+        List<Output> list = state.getOutputs();
+        if (list == null || list.isEmpty()) {
+            if (debug) {
+                log.debug("-> No output modes for this state.");
+            }
+            return new ArrayList<Output>();
+        }
+
+        String stateId = state.getID();
+
+        List<Facet> fs = getFacets(stateId);
+
+        if (fs == null || fs.isEmpty()) {
+            if (debug) {
+                log.debug("No facets found.");
+            }
+            return new ArrayList<Output>();
+        }
+        if (debug) {
+            log.debug("State '" + stateId + "' has facets " + fs);
+        }
+
+        List<Output> gen = generateOutputs(list, fs);
+
+        if (debug) {
+            log.debug("State '" + stateId + "' has " + gen.size() + " outs");
+        }
+
+        return gen;
+    }
+
+
+    /**
+     * Generate a list of outputs with facets from fs if type is found in list
+     * of output.
+     *
+     * @param list List of outputs
+     * @param fs List of facets
+     */
+    protected List<Output> generateOutputs(List<Output> list, List<Facet> fs) {
+        List<Output> generated = new ArrayList<Output>();
+        log.debug("generateOutputs for Artifact " + getName() + " "
+                + identifier());
+
+        boolean debug = log.isDebugEnabled();
+
+        for (Output out: list) {
+            log.debug("check facets for output: " + out.getName());
+            Output o = new DefaultOutput(
+                out.getName(),
+                out.getDescription(),
+                out.getMimeType(),
+                out.getType());
+
+            Set<String> outTypes = new HashSet<String>();
+
+            for (Facet f: out.getFacets()) {
+                if (outTypes.add(f.getName()) && debug) {
+                    log.debug("configured facet " + f);
+                }
+            }
+
+            boolean facetAdded = false;
+            for (Facet f: fs) {
+                String type = f.getName();
+
+                if (outTypes.contains(type)) {
+                    if (debug) {
+                        log.debug("Add facet " + f);
+                    }
+                    facetAdded = true;
+                    o.addFacet(f);
+                }
+            }
+
+            if (facetAdded) {
+                generated.add(o);
+            }
+        }
+
+        return generated;
+    }
+
+
+    /**
+     * Dispatches the computation request to compute(CallContext context, String
+     * hash) with the current hash value of the artifact which is provided by
+     * hash().
+     *
+     * @param context The CallContext.
+     */
+    public Object compute(
+        CallContext context,
+        ComputeType type,
+        boolean     generateFacets
+    ) {
+        return compute(context, hash(), type, generateFacets);
+    }
+
+
+    /**
+     * Dispatches computation requests to the current state which needs to
+     * implement a createComputeCallback(String hash, D4EArtifact artifact)
+     * method.
+     *
+     * @param context The CallContext.
+     * @param hash The hash value which is used to fetch computed data from
+     * cache.
+     *
+     * @return the computed data.
+     */
+    public Object compute(
+        CallContext context,
+        String      hash,
+        ComputeType type,
+        boolean     generateFacets
+    ) {
+        DefaultState current = (DefaultState) getCurrentState(context);
+        return compute(context, hash, current, type, generateFacets);
+    }
+
+
+    /**
+     * Like compute, but identify State by it id (string).
+     */
+    public Object compute(
+        CallContext context,
+        String      hash,
+        String      stateID,
+        ComputeType type,
+        boolean     generateFacets
+    ) {
+        DefaultState current =
+            (stateID == null)
+            ? (DefaultState)getCurrentState(context)
+            : (DefaultState)getState(context, stateID);
+
+        if (hash == null) {
+            hash = hash();
+        }
+
+        return compute(context, hash, current, type, generateFacets);
+    }
+
+
+    /**
+     * Let current state compute and register facets.
+     *
+     * @param key key of state
+     * @param state state
+     * @param type Type of compute
+     * @param generateFacets Whether new facets shall be generated.
+     */
+    public Object compute(
+        CallContext   context,
+        String        key,
+        DefaultState  state,
+        ComputeType   type,
+        boolean       generateFacets
+    ) {
+        String stateID = state.getID();
+
+        List<Facet> fs = (generateFacets) ? new ArrayList<Facet>() : null;
+
+        try {
+            Cache cache = CacheFactory.getCache(COMPUTING_CACHE);
+
+            Object old = null;
+
+            if (cache != null) {
+                net.sf.ehcache.Element element = cache.get(key);
+                if (element != null) {
+                    log.debug("Got computation result from cache.");
+                    old = element.getValue();
+                }
+            }
+            else {
+                log.debug("cache not configured.");
+            }
+
+            Object res;
+            switch (type) {
+                case FEED:
+                    res = state.computeFeed(this, key, context, fs, old);
+                    break;
+                case ADVANCE:
+                    res = state.computeAdvance(this, key, context, fs, old);
+                    break;
+                case INIT:
+                    res = state.computeInit(this, key, context, context.getMeta(), fs);
+                default:
+                    res = null;
+            }
+
+            if (cache != null && old != res && res != null) {
+                log.debug("Store computation result to cache.");
+                net.sf.ehcache.Element element =
+                    new net.sf.ehcache.Element(key, res);
+                cache.put(element);
+            }
+
+            return res;
+        }
+        finally {
+            if (generateFacets) {
+                if (fs.isEmpty()) {
+                    facets.remove(stateID);
+                }
+                else {
+                    addFacets(stateID, fs);
+                }
+            }
+        }
+    }
+
+    /**
+     * Sets the facets for an ID
+     *
+     * Normally the id is a state ID.
+     *
+     * @param id ID to map the facets to
+     * @param facets List of facets to be stored
+     */
+    protected void addFacets(String id, List<Facet> facets) {
+        this.facets.put(id, facets);
+    }
+
+
+    /**
+     * Method to dump the artifacts state/data.
+     */
+    protected void dumpArtifact() {
+        log.debug("++++++++++++++ DUMP ARTIFACT DATA +++++++++++++++++");
+        // Include uuid, type, name
+        log.debug(" - Name: " + getName());
+        log.debug(" - UUID: " + identifier());
+        log.debug(" - Class: " + this.getClass().getName());
+
+        log.debug("------ DUMP DATA ------");
+        Collection<StateData> allData = data.values();
+
+        for (StateData d: allData) {
+            String name  = d.getName();
+            String value = (String) d.getValue();
+
+            log.debug("- " + name + ": " + value);
+        }
+
+        log.debug("------ DUMP PREVIOUS STATES ------");
+        List<String> stateIds = getPreviousStateIds();
+
+        for (String id: stateIds) {
+            log.debug("- State: " + id);
+        }
+
+        log.debug("CURRENT STATE: " + getCurrentStateId());
+
+        debugFacets();
+        dumpFilterFacets();
+
+        log.debug("++++++++++++++ END ARTIFACT DUMP +++++++++++++++++");
+    }
+
+
+    protected void debugFacets() {
+        log.debug("######### FACETS #########");
+
+        for (Map.Entry<String, List<Facet>> entry: facets.entrySet()) {
+            String out = entry.getKey();
+            List<Facet> fs = entry.getValue();
+            for (Facet f: fs) {
+                log.debug("  # " + out + " : " + f.getName());
+            }
+        }
+
+        log.debug("######## FACETS END ########");
+    }
+
+
+    protected void dumpFilterFacets() {
+        log.debug("######## FILTER FACETS ########");
+
+        if (filterFacets == null || filterFacets.isEmpty()) {
+            log.debug("No Filter Facets defined.");
+            return;
+        }
+
+        for (Map.Entry<String, List<Facet>> entry: filterFacets.entrySet()) {
+            String      out     = entry.getKey();
+            List<Facet> filters = entry.getValue();
+
+            log.debug("There are " + filters.size() + " filters for: " +out);
+
+            for (Facet filter: filters) {
+                log.debug("  filter: " + filter.getName());
+            }
+        }
+
+        log.debug("######## FILTER FACETS END ########");
+    }
+
+
+    /** Destroy and clean up state with given id. */
+    protected void destroyState(String id, Object context) {
+        State s = getState(context, id);
+        s.endOfLife(this, context);
+    }
+
+
+    /**
+     * Calls endOfLife() for each state in the list <i>ids</i>.
+     *
+     * @param ids The State IDs that should be destroyed.
+     * @param context The RiverContext.
+     */
+    protected void destroyStates(List<String> ids, Object context) {
+        for (int i = 0, num = ids.size(); i < num; i++) {
+            destroyState(ids.get(i), context);
+        }
+    }
+
+
+    /**
+     * Destroy the states.
+     */
+    @Override
+    public void endOfLife(Object context) {
+        if (log.isDebugEnabled()) {
+            log.debug("D4EArtifact.endOfLife: " + identifier());
+        }
+
+        ArrayList<String> ids       = (ArrayList<String>) getPreviousStateIds();
+        ArrayList<String> toDestroy = (ArrayList<String>) ids.clone();
+
+        toDestroy.add(getCurrentStateId());
+
+        destroyStates(toDestroy, context);
+    }
+
+    /**
+     * Return the Facets which a state provides
+     * @param stateid String that identifies the state
+     * @return List of Facets belonging to the state identifier
+     */
+    protected List<Facet> getFacets(String stateid) {
+        return this.facets.get(stateid);
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ExternalWMSArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ExternalWMSArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -26,7 +26,7 @@
 import org.dive4elements.river.artifacts.states.WMSBackgroundState;
 
 
-public class ExternalWMSArtifact extends StaticFLYSArtifact {
+public class ExternalWMSArtifact extends StaticD4EArtifact {
 
     public static final String NAME = "external_wms";
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FLYSArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1572 +0,0 @@
-/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU AGPL (>=v3) 
- * and comes with ABSOLUTELY NO WARRANTY! Check out the
- * documentation coming with Dive4Elements River for details. 
- */
-
-package org.dive4elements.river.artifacts;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-
-import javax.xml.xpath.XPathConstants;
-
-import net.sf.ehcache.Cache;
-
-import org.apache.log4j.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.dive4elements.artifactdatabase.ArtifactDatabaseImpl;
-import org.dive4elements.artifactdatabase.DefaultArtifact;
-import org.dive4elements.artifactdatabase.ProtocolUtils;
-import org.dive4elements.artifactdatabase.data.DefaultStateData;
-import org.dive4elements.artifactdatabase.data.StateData;
-import org.dive4elements.artifactdatabase.state.DefaultFacet;
-import org.dive4elements.artifactdatabase.state.DefaultOutput;
-import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.artifactdatabase.state.Output;
-import org.dive4elements.artifactdatabase.state.State;
-import org.dive4elements.artifactdatabase.state.StateEngine;
-import org.dive4elements.artifactdatabase.transition.TransitionEngine;
-import org.dive4elements.artifacts.Artifact;
-import org.dive4elements.artifacts.ArtifactDatabase;
-import org.dive4elements.artifacts.ArtifactDatabaseException;
-import org.dive4elements.artifacts.ArtifactFactory;
-import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.artifacts.Message;
-import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
-import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.cache.CacheFactory;
-import org.dive4elements.river.artifacts.context.RiverContext;
-import org.dive4elements.river.artifacts.model.CalculationMessage;
-import org.dive4elements.river.artifacts.states.DefaultState;
-import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
-import org.dive4elements.river.utils.RiverUtils;
-
-/**
- * The default FLYS artifact with convenience added.
- * (Subclass to get fully functional artifacts).
- *
- * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
- */
-public abstract class FLYSArtifact extends DefaultArtifact {
-
-    /** The logger that is used in this artifact. */
-    private static Logger log = Logger.getLogger(FLYSArtifact.class);
-
-    public static final String COMPUTING_CACHE = "computed.values";
-
-    /** The XPath that points to the input data elements of the FEED document. */
-    public static final String XPATH_FEED_INPUT =
-        "/art:action/art:data/art:input";
-
-    /** The XPath that points to the name of the target state of ADVANCE. */
-    public static final String XPATH_ADVANCE_TARGET =
-        "/art:action/art:target/@art:name";
-
-    public static final String XPATH_MODEL_ARTIFACT =
-        "/art:action/art:template/@uuid";
-
-    public static final String XPATH_FILTER =
-        "/art:action/art:filter/art:out";
-
-    /** The constant string that shows that an operation was successful. */
-    public static final String OPERATION_SUCCESSFUL = "SUCCESS";
-
-    /** The constant string that shows that an operation failed. */
-    public static final String OPERATION_FAILED = "FAILURE";
-
-    /** The identifier of the current state. */
-    protected String currentStateId;
-
-    /** The identifiers of previous states on a stack. */
-    protected List<String> previousStateIds;
-
-    /** The name of the artifact. */
-    protected String name;
-
-    /** The data that have been inserted into this artifact. */
-    private Map<String, StateData> data;
-
-    /** Mapping of state names to created facets. */
-    private Map<String, List<Facet>> facets;
-
-    /**
-     * Used to generates "view" on the facets (hides facets not matching the
-     * filter in output of collection);  out -&gt; facets.
-     */
-    protected Map<String, List<Facet>> filterFacets;
-
-
-    /**
-     * The default constructor that creates an empty FLYSArtifact.
-     */
-    public FLYSArtifact() {
-        data             = new TreeMap<String, StateData>();
-        previousStateIds = new ArrayList<String>();
-        facets           = new HashMap<String, List<Facet>>();
-    }
-
-
-    /**
-     * This method appends the static data - that has already been inserted by
-     * the user - to the static node of the DESCRIBE document.
-     *
-     * @param doc The document.
-     * @param ui The root node.
-     * @param context The CallContext.
-     * @param uuid The identifier of the artifact.
-     */
-    protected void appendStaticUI(
-        Document    doc,
-        Node        ui,
-        CallContext context,
-        String uuid)
-    {
-        List<String> stateIds = getPreviousStateIds();
-
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-        StateEngine engine      = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-
-        boolean debug = log.isDebugEnabled();
-
-        for (String stateId: stateIds) {
-            if (debug) {
-                log.debug("Append static data for state: " + stateId);
-            }
-            DefaultState state = (DefaultState) engine.getState(stateId);
-
-            ui.appendChild(state.describeStatic(this, doc, ui, context, uuid));
-        }
-    }
-
-
-    /**
-     * Returns the name of the concrete artifact.
-     *
-     * @return the name of the concrete artifact.
-     */
-    public String getName() {
-        return name;
-    }
-
-
-    /**
-     * Initialize the artifact and insert new data if <code>data</code> contains
-     * information necessary for this artifact.
-     *
-     * @param identifier The UUID.
-     * @param factory The factory that is used to create this artifact.
-     * @param context The CallContext.
-     * @param data Some optional data.
-     */
-    @Override
-    public void setup(
-        String          identifier,
-        ArtifactFactory factory,
-        Object          context,
-        CallMeta        callMeta,
-        Document        data)
-    {
-        boolean debug = log.isDebugEnabled();
-
-        if (debug) {
-            log.debug("Setup this artifact with the uuid: " + identifier);
-        }
-
-        super.setup(identifier, factory, context, callMeta, data);
-
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-
-        List<State> states = getStates(context);
-
-        String name = getName();
-
-        if (debug) {
-            log.debug("setup(): Set initial state for artifact '" + name + "'");
-        }
-
-        if (states == null) {
-            log.error("No states found from which an initial "
-                + "state could be picked.");
-        }
-        setCurrentState(states.get(0));
-
-        String model = XMLUtils.xpathString(
-            data,
-            XPATH_MODEL_ARTIFACT,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (model != null && model.length() > 0) {
-            ArtifactDatabase db = (ArtifactDatabase) flysContext.get(
-                ArtifactDatabaseImpl.GLOBAL_CONTEXT_KEY);
-
-            try {
-                initialize(db.getRawArtifact(model), context, callMeta);
-            }
-            catch (ArtifactDatabaseException adbe) {
-                log.error(adbe, adbe);
-            }
-        }
-
-        filterFacets = buildFilterFacets(data);
-    }
-
-
-    /** Get copy of previous state ids as Strings in list. */
-    protected List<String> clonePreviousStateIds() {
-        return new ArrayList<String>(previousStateIds);
-    }
-
-
-    /**
-     * Copies data item from other artifact to this artifact.
-     *
-     * @param other Artifact from which to get data.
-     * @param name  Name of data.
-     */
-    protected void importData(FLYSArtifact other, final String name) {
-        if (other == null) {
-            log.error("No other art. to import data " + name + " from.");
-            return;
-        }
-
-        StateData sd = other.getData(name);
-
-        if (sd == null) {
-            log.warn("Other artifact has no data " + name + ".");
-            return;
-        }
-
-        this.addData(name, sd);
-    }
-
-
-    /** Clone the internal map of map of state-name to state-data. */
-    protected Map<String, StateData> cloneData() {
-        Map<String, StateData> copy = new TreeMap<String, StateData>();
-
-        for (Map.Entry<String, StateData> entry: data.entrySet()) {
-            copy.put(entry.getKey(), entry.getValue().deepCopy());
-        }
-
-        return copy;
-    }
-
-
-    /**
-     * Return a copy of the facet mapping.
-     * @return Mapping of state-ids to facets.
-     */
-    protected Map<String, List<Facet>> cloneFacets() {
-        Map<String, List<Facet>> copy = new HashMap<String, List<Facet>>();
-
-        for (Map.Entry<String, List<Facet>> entry: facets.entrySet()) {
-            List<Facet> facets      = entry.getValue();
-            List<Facet> facetCopies = new ArrayList<Facet>(facets.size());
-            for (Facet facet: facets) {
-                facetCopies.add(facet.deepCopy());
-            }
-            copy.put(entry.getKey(), facetCopies);
-        }
-
-        return copy;
-    }
-
-
-    /**
-     * (called from setup).
-     * @param artifact master-artifact (if any, otherwise initialize is not called).
-     */
-    protected void initialize(
-        Artifact artifact,
-        Object   context,
-        CallMeta callMeta)
-    {
-        if (!(artifact instanceof FLYSArtifact)) {
-            return;
-        }
-
-        FLYSArtifact flys = (FLYSArtifact)artifact;
-
-        currentStateId   = flys.currentStateId;
-        previousStateIds = flys.clonePreviousStateIds();
-        name             = flys.name;
-        data             = flys.cloneData();
-        facets           = flys.cloneFacets();
-        // Do not clone filter facets!
-
-        ArrayList<String> stateIds     = (ArrayList<String>) getPreviousStateIds();
-        ArrayList<String> toInitialize = (ArrayList<String>) stateIds.clone();
-
-        toInitialize.add(getCurrentStateId());
-
-        for (String stateId: toInitialize) {
-            State state = getState(context, stateId);
-
-            if (state != null) {
-                state.initialize(artifact, this, context, callMeta);
-            }
-        }
-    }
-
-
-    /**
-     * Builds filter facets from document.
-     * @see filterFacets
-     */
-    protected Map<String, List<Facet>> buildFilterFacets(Document document) {
-        if (log.isDebugEnabled()) {
-            log.debug("Building filter factes for artifact " + this.getName());
-        }
-
-        NodeList nodes = (NodeList)XMLUtils.xpath(
-            document,
-            XPATH_FILTER,
-            XPathConstants.NODESET,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (nodes == null || nodes.getLength() == 0) {
-            return null;
-        }
-
-        Map<String, List<Facet>> result = new HashMap<String, List<Facet>>();
-
-        for (int i = 0, N = nodes.getLength(); i < N; ++i) {
-            Element element = (Element)nodes.item(i);
-            String oName = element.getAttribute("name");
-            if (oName == null || oName.isEmpty()) {
-                continue;
-            }
-
-            List<Facet> facets = new ArrayList<Facet>();
-
-            NodeList facetNodes = element.getElementsByTagNameNS(
-                ArtifactNamespaceContext.NAMESPACE_URI,
-                "facet");
-
-            for (int j = 0, M = facetNodes.getLength(); j < M; ++j) {
-                Element facetElement = (Element)facetNodes.item(j);
-
-                String fName = facetElement.getAttribute("name");
-
-                int index;
-                try {
-                    index = Integer.parseInt(facetElement.getAttribute("index"));
-                }
-                catch (NumberFormatException nfe) {
-                    log.warn(nfe);
-                    index = 0;
-                }
-                if (log.isDebugEnabled()) {
-                    log.debug("Creating filter facet " + fName + " with  index " + index +
-                            " for out " + oName);
-                }
-                facets.add(new DefaultFacet(index, fName, ""));
-            }
-
-            if (!facets.isEmpty()) {
-                result.put(oName, facets);
-            }
-        }
-
-        return result;
-    }
-
-
-    /**
-     * Insert new data included in <code>input</code> into the current state.
-     *
-     * @param target XML document that contains new data.
-     * @param context The CallContext.
-     *
-     * @return a document that contains a SUCCESS or FAILURE message.
-     */
-    @Override
-    public Document feed(Document target, CallContext context) {
-        log.debug("FLYSArtifact.feed()");
-
-        Document doc = XMLUtils.newDocument();
-
-        XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
-            doc,
-            ArtifactNamespaceContext.NAMESPACE_URI,
-            ArtifactNamespaceContext.NAMESPACE_PREFIX);
-
-        Element result = creator.create("result");
-        doc.appendChild(result);
-
-        try {
-            saveData(target, context);
-
-            compute(context, ComputeType.FEED, true);
-
-            return describe(target, context);
-        }
-        catch (IllegalArgumentException iae) {
-            // do not store state if validation fails.
-            context.afterCall(CallContext.NOTHING);
-            creator.addAttr(result, "type", OPERATION_FAILED, true);
-
-            result.setTextContent(iae.getMessage());
-        }
-
-        return doc;
-    }
-
-
-    /**
-     * This method returns a description of this artifact.
-     *
-     * @param data Some data.
-     * @param context The CallContext.
-     *
-     * @return the description of this artifact.
-     */
-    @Override
-    public Document describe(Document data, CallContext context) {
-
-        if (log.isDebugEnabled()) {
-            log.debug(
-                "Describe: the current state is: " + getCurrentStateId());
-            dumpArtifact();
-        }
-
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-
-        StateEngine stateEngine = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-
-        TransitionEngine transitionEngine = (TransitionEngine) flysContext.get(
-            RiverContext.TRANSITION_ENGINE_KEY);
-
-        List<State> reachable = transitionEngine.getReachableStates(
-            this, getCurrentState(context), stateEngine);
-
-        Document description            = XMLUtils.newDocument();
-        XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
-            description,
-            ArtifactNamespaceContext.NAMESPACE_URI,
-            ArtifactNamespaceContext.NAMESPACE_PREFIX);
-
-        Element root = ProtocolUtils.createRootNode(creator);
-        description.appendChild(root);
-
-        State current = getCurrentState(context);
-
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
-        ProtocolUtils.appendState(creator, root, current);
-        ProtocolUtils.appendReachableStates(creator, root, reachable);
-
-        appendBackgroundActivity(creator, root, context);
-
-        Element ui = ProtocolUtils.createArtNode(
-            creator, "ui", null, null);
-
-        Element staticUI  = ProtocolUtils.createArtNode(
-            creator, "static", null, null);
-
-        Element outs = ProtocolUtils.createArtNode(
-            creator, "outputmodes", null, null);
-        appendOutputModes(description, outs, context, identifier());
-
-        appendStaticUI(description, staticUI, context, identifier());
-
-        Element name = ProtocolUtils.createArtNode(
-            creator, "name",
-            new String[] { "value" },
-            new String[] { getName() });
-
-        Element dynamic = current.describe(
-            this,
-            description,
-            root,
-            context,
-            identifier());
-
-        if (dynamic != null) {
-            ui.appendChild(dynamic);
-        }
-
-        ui.appendChild(staticUI);
-
-        root.appendChild(name);
-        root.appendChild(ui);
-        root.appendChild(outs);
-
-        return description;
-    }
-
-    /** Override me! */
-
-    protected void appendBackgroundActivity(
-        ElementCreator cr,
-        Element        root,
-        CallContext    context
-    ) {
-        LinkedList<Message> messages = context.getBackgroundMessages();
-
-        if (messages == null) {
-            return;
-        }
-
-        Element inBackground = cr.create("background-processing");
-        root.appendChild(inBackground);
-
-        cr.addAttr(
-            inBackground,
-            "value",
-            String.valueOf(context.isInBackground()),
-            true);
-
-        CalculationMessage message = (CalculationMessage) messages.getLast();
-        cr.addAttr(
-            inBackground,
-            "steps",
-            String.valueOf(message.getSteps()),
-            true);
-
-        cr.addAttr(
-            inBackground,
-            "currentStep",
-            String.valueOf(message.getCurrentStep()),
-            true);
-
-        inBackground.setTextContent(message.getMessage());
-    }
-
-    /**
-     * Append output mode nodes to a document.
-     */
-    protected void appendOutputModes(
-        Document    doc,
-        Element     outs,
-        CallContext context,
-        String      uuid)
-    {
-        List<Output> generated = getOutputs(context);
-
-        if (log.isDebugEnabled()) {
-            log.debug("This Artifact has " + generated.size() + " Outputs.");
-        }
-
-        ProtocolUtils.appendOutputModes(doc, outs, generated);
-    }
-
-
-    /**
-     * This method handles request for changing the current state of an
-     * artifact. It is possible to step forward or backward.
-     *
-     * @param target The incoming ADVANCE document.
-     * @param context The CallContext.
-     *
-     * @return a document that contains a SUCCESS or FAILURE message.
-     */
-    @Override
-    public Document advance(Document target, CallContext context) {
-
-        boolean debug = log.isDebugEnabled();
-
-        Document doc = XMLUtils.newDocument();
-
-        XMLUtils.ElementCreator ec = new XMLUtils.ElementCreator(
-            doc,
-            ArtifactNamespaceContext.NAMESPACE_URI,
-            ArtifactNamespaceContext.NAMESPACE_PREFIX);
-
-        Element result = ec.create("result");
-
-        String currentStateId = getCurrentStateId();
-        String targetState    = XMLUtils.xpathString(
-            target, XPATH_ADVANCE_TARGET, ArtifactNamespaceContext.INSTANCE);
-
-        if (debug) {
-            log.debug("FLYSArtifact.advance() to '" + targetState + "'");
-        }
-
-        if (!currentStateId.equals(targetState)
-            && isStateReachable(targetState, context))
-        {
-            if (debug) {
-                log.debug("Advance: Step forward");
-            }
-
-            List<String> prev = getPreviousStateIds();
-            prev.add(currentStateId);
-
-            setCurrentStateId(targetState);
-
-            if (debug) {
-                log.debug("Compute data for state: " + targetState);
-            }
-            compute(context, ComputeType.ADVANCE, true);
-
-            return describe(target, context);
-        }
-        else if (isPreviousState(targetState, context)) {
-            if (debug) {
-                log.debug("Advance: Step back to");
-            }
-
-            List<String> prevs   = getPreviousStateIds();
-            int targetIdx        = prevs.indexOf(targetState);
-            int start            = prevs.size() - 1;
-
-            destroyStates(prevs, context);
-
-            for (int i = start; i >= targetIdx; i--) {
-                String prev = prevs.get(i);
-                if (debug) {
-                    log.debug("Remove state id '" + prev + "'");
-                }
-
-                prevs.remove(prev);
-                facets.remove(prev);
-            }
-
-            destroyState(getCurrentStateId(), context);
-            setCurrentStateId(targetState);
-
-            return describe(target, context);
-        }
-
-        log.warn("Advance: Cannot advance to '" + targetState + "'");
-        ec.addAttr(result, "type", OPERATION_FAILED, true);
-
-        doc.appendChild(result);
-
-        return doc;
-    }
-
-
-    /**
-     * Returns the identifier of the current state.
-     *
-     * @return the identifier of the current state.
-     */
-    public String getCurrentStateId() {
-        return currentStateId;
-    }
-
-
-    /**
-     * Sets the identifier of the current state.
-     *
-     * @param id the identifier of a state.
-     */
-    protected void setCurrentStateId(String id) {
-        currentStateId = id;
-    }
-
-
-    /**
-     * Set the current state of this artifact. <b>NOTE</b>We don't store the
-     * State object itself - which is not necessary - but its identifier. So
-     * this method will just call the setCurrentStateId() method with the
-     * identifier of <i>state</i>.
-     *
-     * @param state The new current state.
-     */
-    protected void setCurrentState(State state) {
-        setCurrentStateId(state.getID());
-    }
-
-
-    /**
-     * Returns the current state of the artifact.
-     *
-     * @return the current State of the artifact.
-     */
-    public State getCurrentState(Object context) {
-        return getState(context, getCurrentStateId());
-    }
-
-
-    /**
-     * Get list of existant states for this Artifact.
-     * @param context Contex to get StateEngine from.
-     * @return list of states.
-     */
-    protected List<State> getStates(Object context) {
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-        StateEngine engine      = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-        return engine.getStates(getName());
-    }
-
-
-    /**
-     * Get state with given ID.
-     * @param context Context to get StateEngine from.
-     * @param stateID ID of state to get.
-     * @return state with given ID.
-     */
-    protected State getState(Object context, String stateID) {
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-        StateEngine engine      = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-        return engine.getState(stateID);
-    }
-
-
-    /**
-     * Returns the vector of previous state identifiers.
-     *
-     * @return the vector of previous state identifiers.
-     */
-    protected List<String> getPreviousStateIds() {
-        return previousStateIds;
-    }
-
-
-    /**
-     * Get all previous and the current state id.
-     * @return #getPreviousStateIds() + #getCurrentStateId()
-     */
-    public List<String> getStateHistoryIds() {
-        ArrayList<String> prevIds = (ArrayList) getPreviousStateIds();
-        ArrayList<String> allIds  = (ArrayList) prevIds.clone();
-
-        allIds.add(getCurrentStateId());
-        return allIds;
-    }
-
-
-    /**
-     * Adds a new StateData item to the data pool of this artifact.
-     *
-     * @param name the name of the data object.
-     * @param data the data object itself.
-     */
-    protected void addData(String name, StateData data) {
-        this.data.put(name, data);
-    }
-
-
-    /** Remove and return statedata associated to name. */
-    protected StateData removeData(String name) {
-        return this.data.remove(name);
-    }
-
-
-    /**
-     * This method returns a specific StateData object that is stored in the
-     * data pool of this artifact.
-     *
-     * @param name The name of the data object.
-     *
-     * @return the StateData object if existing, otherwise null.
-     */
-    public StateData getData(String name) {
-        return data.get(name);
-    }
-
-
-    /**
-     * A derived Artifact class can use this method to set the data
-     */
-    protected void setData(Map<String, StateData> data) {
-        this.data = data;
-    }
-
-
-    /** Return named data item, null if not found. */
-    public String getDataAsString(String name) {
-        StateData data = getData(name);
-        return data != null ? (String) data.getValue() : null;
-    }
-
-
-    /**
-     * This method returns the value of a StateData object stored in the data
-     * pool of this Artifact as Integer.
-     *
-     * @param name The name of the StateData object.
-     *
-     * @return an Integer representing the value of the data object or null if
-     * no object was found for <i>name</i>.
-     *
-     * @throws NumberFormatException if the value of the data object could not
-     * be transformed into an Integer.
-     */
-    public Integer getDataAsInteger(String name)
-    throws NumberFormatException
-    {
-        String value = getDataAsString(name);
-
-        if (value != null && value.length() > 0) {
-            return Integer.parseInt(value);
-        }
-
-        return null;
-    }
-
-
-    /**
-     * This method returns the value of a StateData object stored in the data
-     * pool of this Artifact as Double.
-     *
-     * @param name The name of the StateData object.
-     *
-     * @return an Double representing the value of the data object or null if
-     * no object was found for <i>name</i>.
-     *
-     * @throws NumberFormatException if the value of the data object could not
-     * be transformed into a Double.
-     */
-    public Double getDataAsDouble(String name)
-    throws NumberFormatException
-    {
-        String value = getDataAsString(name);
-
-        if (value != null && value.length() > 0) {
-            return Double.parseDouble(value);
-        }
-
-        return null;
-    }
-
-
-    /**
-     * This method returns the value of a StateData object stored in the data
-     * pool of this Artifact as Long.
-     *
-     * @param name The name of the StateData object.
-     *
-     * @return a Long representing the value of the data object or null if
-     * no object was found for <i>name</i>.
-     *
-     * @throws NumberFormatException if the value of the data object could not
-     * be transformed into a Long.
-     */
-    public Long getDataAsLong(String name)
-    throws NumberFormatException
-    {
-        String value = getDataAsString(name);
-
-        if (value != null && value.length() > 0) {
-            return Long.parseLong(value);
-        }
-
-        return null;
-    }
-
-
-    /**
-     * This method returns the value of a StateData object stored in the data
-     * pool of this Artifact is Boolean using Boolean.valueOf().
-     *
-     * @param name The name of the StateData object.
-     *
-     * @return a Boolean representing the value of the data object or null if no
-     * such object is existing.
-     */
-    public Boolean getDataAsBoolean(String name) {
-        String value = getDataAsString(name);
-
-        if (value == null || value.length() == 0) {
-            return null;
-        }
-
-        return Boolean.valueOf(value);
-    }
-
-
-    /**
-     * Add StateData containing a given string.
-     * @param name Name of the data object.
-     * @param value String to store.
-     */
-    public void addStringData(String name, String value) {
-        addData(name, new DefaultStateData(name, null, null, value));
-    }
-
-    /**
-     * This method returns all stored StateData in this artifact as a Collection
-     * @return a Collection of all StateData objects in this artifact
-     */
-    public Collection<StateData> getAllData() {
-        return data.values();
-    }
-
-
-    /** Return all produced facets. */
-    public List<Facet> getFacets() {
-        List<Facet> all = new ArrayList<Facet>();
-
-        // Iterate over facets of each state.
-        for (List<Facet> fs: facets.values()) {
-            all.addAll(fs);
-        }
-
-        return all;
-    }
-
-
-    /**
-     * Get facet as stored internally, with equalling name and index than given
-     * facet.
-     * @param facet that defines index and name of facet searched.
-     * @return facet instance or null if not found.
-     */
-    public Facet getNativeFacet(Facet facet) {
-        String name  = facet.getName();
-        int    index = facet.getIndex();
-
-        for (List<Facet> fs: facets.values()) {
-            for (Facet f: fs) {
-                if (f.getIndex() == index && f.getName().equals(name)) {
-                    return f;
-                }
-            }
-        }
-
-        log.warn("Could not find facet: " + name + " at " + index);
-        log.warn("Available facets for : " + getName() + " " + identifier() +
-                ": " + facets.values());
-        return null;
-    }
-
-
-    /**
-     * This method stores the data that is contained in the FEED document.
-     *
-     * @param feed The FEED document.
-     * @param xpath The XPath that points to the data nodes.
-     */
-    public void saveData(Document feed, CallContext context)
-    throws IllegalArgumentException
-    {
-        if (feed == null) {
-            throw new IllegalArgumentException("error_feed_no_data");
-        }
-
-        NodeList nodes = (NodeList) XMLUtils.xpath(
-            feed,
-            XPATH_FEED_INPUT,
-            XPathConstants.NODESET,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (nodes == null || nodes.getLength() == 0) {
-            throw new IllegalArgumentException("error_feed_no_data");
-        }
-
-        boolean debug = log.isDebugEnabled();
-
-        int count = nodes.getLength();
-
-        if (debug) {
-            log.debug("Try to save " + count + " data items.");
-        }
-
-        String uri = ArtifactNamespaceContext.NAMESPACE_URI;
-
-        DefaultState current = (DefaultState) getCurrentState(context);
-
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-        StateEngine engine      = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-
-        for (int i = 0; i < count; i++) {
-            Element node = (Element)nodes.item(i);
-
-            String name  = node.getAttributeNS(uri, "name");
-            String value = node.getAttributeNS(uri, "value");
-
-            if (name.length() > 0 && value.length() > 0) {
-                if (debug) {
-                    log.debug("Save data item for '" + name + "' : " + value);
-                }
-
-                StateData model = engine.getStateData(getName(), name);
-
-                StateData sd = model != null
-                    ? model.deepCopy()
-                    : new DefaultStateData(name, null, null, value);
-
-                addData(
-                    name, current.transform(this, context, sd, name, value));
-            }
-            else if (name.length() > 0 && value.length() == 0) {
-                if (removeData(name) != null && debug) {
-                    log.debug("Removed data '" + name + "' successfully.");
-                }
-            }
-        }
-
-        current.validate(this);
-    }
-
-
-    /**
-     * Determines if the state with the identifier <i>stateId</i> is reachable
-     * from the current state. The determination itself takes place in the
-     * TransitionEngine.
-     *
-     * @param stateId The identifier of a state.
-     * @param context The context object.
-     *
-     * @return true, if the state specified by <i>stateId</i> is reacahble,
-     * otherwise false.
-     */
-    protected boolean isStateReachable(String stateId, Object context) {
-
-        if (log.isDebugEnabled()) {
-            log.debug("Determine if the state '" + stateId + "' is reachable.");
-        }
-
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-
-        State currentState  = getCurrentState(context);
-        StateEngine sEngine = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-
-        TransitionEngine tEngine = (TransitionEngine) flysContext.get(
-            RiverContext.TRANSITION_ENGINE_KEY);
-
-        return tEngine.isStateReachable(this, stateId, currentState, sEngine);
-    }
-
-
-    /**
-     * Determines if the state with the identifier <i>stateId</i> is a previous
-     * state of the current state.
-     *
-     * @param stateId The target state identifier.
-     * @param context The context object.
-     */
-    protected boolean isPreviousState(String stateId, Object context) {
-        if (log.isDebugEnabled()) {
-            log.debug("Determine if the state '" + stateId + "' is old.");
-        }
-
-        return getPreviousStateIds().contains(stateId);
-    }
-
-
-    /**
-     * Computes the hash code of the entered values.
-     *
-     * @return a hash code.
-     */
-    @Override
-    public String hash() {
-
-        long hash  = 0L;
-        int  shift = 3;
-
-        for (Map.Entry<String, StateData> entry: data.entrySet()) {
-            String key   = entry.getKey();
-            Object value = entry.getValue().getValue();
-
-            hash ^= ((long)key.hashCode() << shift)
-                 |  ((long)value.hashCode() << (shift + 3));
-            shift += 2;
-        }
-
-        return getCurrentStateId() + hash;
-    }
-
-
-    /**
-     * Return List of outputs, where combinations of outputname and filtername
-     * that match content in filterFacets is left out.
-     * @return filtered Outputlist.
-     */
-    protected List<Output> filterOutputs(List<Output> outs) {
-        if (filterFacets == null || filterFacets.isEmpty()) {
-            log.debug("No filter for Outputs.");
-            return outs;
-        }
-
-        boolean debug = log.isDebugEnabled();
-
-        if (debug) {
-            log.debug(
-                "Filter Facets with " + filterFacets.size() + " filters.");
-        }
-
-        List<Output> filtered = new ArrayList<Output>();
-
-        for (Output out: outs) {
-            String outName = out.getName();
-
-            if (debug) {
-                log.debug("  filter Facets for Output: " + outName);
-            }
-
-            List<Facet> fFacets = filterFacets.get(outName);
-            if (fFacets != null) {
-                if (debug) {
-                    log.debug("" + fFacets.size() + " filters for: " + outName);
-                    for (Facet tmp: fFacets) {
-                        log.debug("   filter = '" + tmp.getName() + "'");
-                    }
-                }
-
-                List<Facet> resultFacets = new ArrayList<Facet>();
-
-                for (Facet facet: out.getFacets()) {
-                    for (Facet fFacet: fFacets) {
-                        if (facet.getIndex() == fFacet.getIndex()
-                        &&  facet.getName().equals(fFacet.getName())) {
-                            resultFacets.add(facet);
-                            break;
-                        }
-                    }
-                }
-
-                if (debug) {
-                    log.debug(
-                        "Facets after filtering = " + resultFacets.size());
-                }
-
-                if (!resultFacets.isEmpty()) {
-                    DefaultOutput nout = new DefaultOutput(
-                        out.getName(),
-                        out.getDescription(),
-                        out.getMimeType(),
-                        resultFacets);
-                    filtered.add(nout);
-                }
-            }
-            else if (debug) {
-                log.debug("No filter Factes for Output: " + outName);
-            }
-        }
-
-        if (debug) {
-            log.debug("Number of outs after filtering = " + filtered.size());
-        }
-
-        return filtered;
-    }
-
-
-    /**
-     * Get all outputs that the Artifact can do in this state (which includes
-     * all previous states).
-     *
-     * @return list of outputs
-     */
-    public List<Output> getOutputs(Object context) {
-        if (log.isDebugEnabled()) {
-            log.debug("##### Get Outputs for: " + identifier() + " #####");
-            dumpArtifact();
-        }
-
-        List<String> stateIds  = getPreviousStateIds();
-        List<Output> generated = new ArrayList<Output>();
-
-        for (String stateId: stateIds) {
-            DefaultState state = (DefaultState) getState(context, stateId);
-            generated.addAll(getOutputForState(state));
-        }
-
-        generated.addAll(getCurrentOutputs(context));
-
-        return filterOutputs(generated);
-    }
-
-
-    /**
-     * Get output(s) for current state.
-     * @return list of outputs for current state.
-     */
-    public List<Output> getCurrentOutputs(Object context) {
-        DefaultState cur = (DefaultState) getCurrentState(context);
-
-        try {
-            if (cur.validate(this)) {
-                return getOutputForState(cur);
-            }
-        }
-        catch (IllegalArgumentException iae) { }
-
-        return new ArrayList<Output>();
-    }
-
-
-    /**
-     * Get output(s) for a specific state.
-     * @param state State of interest
-     * @return list of output(s) for given state.
-     */
-    protected List<Output> getOutputForState(DefaultState state) {
-
-        if (state == null) {
-            log.error("state == null: This should not happen!");
-            return new ArrayList<Output>();
-        }
-
-        boolean debug = log.isDebugEnabled();
-
-        if (debug) {
-            log.debug("Find Outputs for State: " + state.getID());
-        }
-
-        List<Output> list = state.getOutputs();
-        if (list == null || list.isEmpty()) {
-            if (debug) {
-                log.debug("-> No output modes for this state.");
-            }
-            return new ArrayList<Output>();
-        }
-
-        String stateId = state.getID();
-
-        List<Facet> fs = getFacets(stateId);
-
-        if (fs == null || fs.isEmpty()) {
-            if (debug) {
-                log.debug("No facets found.");
-            }
-            return new ArrayList<Output>();
-        }
-        if (debug) {
-            log.debug("State '" + stateId + "' has facets " + fs);
-        }
-
-        List<Output> gen = generateOutputs(list, fs);
-
-        if (debug) {
-            log.debug("State '" + stateId + "' has " + gen.size() + " outs");
-        }
-
-        return gen;
-    }
-
-
-    /**
-     * Generate a list of outputs with facets from fs if type is found in list
-     * of output.
-     *
-     * @param list List of outputs
-     * @param fs List of facets
-     */
-    protected List<Output> generateOutputs(List<Output> list, List<Facet> fs) {
-        List<Output> generated = new ArrayList<Output>();
-        log.debug("generateOutputs for Artifact " + getName() + " "
-                + identifier());
-
-        boolean debug = log.isDebugEnabled();
-
-        for (Output out: list) {
-            log.debug("check facets for output: " + out.getName());
-            Output o = new DefaultOutput(
-                out.getName(),
-                out.getDescription(),
-                out.getMimeType(),
-                out.getType());
-
-            Set<String> outTypes = new HashSet<String>();
-
-            for (Facet f: out.getFacets()) {
-                if (outTypes.add(f.getName()) && debug) {
-                    log.debug("configured facet " + f);
-                }
-            }
-
-            boolean facetAdded = false;
-            for (Facet f: fs) {
-                String type = f.getName();
-
-                if (outTypes.contains(type)) {
-                    if (debug) {
-                        log.debug("Add facet " + f);
-                    }
-                    facetAdded = true;
-                    o.addFacet(f);
-                }
-            }
-
-            if (facetAdded) {
-                generated.add(o);
-            }
-        }
-
-        return generated;
-    }
-
-
-    /**
-     * Dispatches the computation request to compute(CallContext context, String
-     * hash) with the current hash value of the artifact which is provided by
-     * hash().
-     *
-     * @param context The CallContext.
-     */
-    public Object compute(
-        CallContext context,
-        ComputeType type,
-        boolean     generateFacets
-    ) {
-        return compute(context, hash(), type, generateFacets);
-    }
-
-
-    /**
-     * Dispatches computation requests to the current state which needs to
-     * implement a createComputeCallback(String hash, FLYSArtifact artifact)
-     * method.
-     *
-     * @param context The CallContext.
-     * @param hash The hash value which is used to fetch computed data from
-     * cache.
-     *
-     * @return the computed data.
-     */
-    public Object compute(
-        CallContext context,
-        String      hash,
-        ComputeType type,
-        boolean     generateFacets
-    ) {
-        DefaultState current = (DefaultState) getCurrentState(context);
-        return compute(context, hash, current, type, generateFacets);
-    }
-
-
-    /**
-     * Like compute, but identify State by it id (string).
-     */
-    public Object compute(
-        CallContext context,
-        String      hash,
-        String      stateID,
-        ComputeType type,
-        boolean     generateFacets
-    ) {
-        DefaultState current =
-            (stateID == null)
-            ? (DefaultState)getCurrentState(context)
-            : (DefaultState)getState(context, stateID);
-
-        if (hash == null) {
-            hash = hash();
-        }
-
-        return compute(context, hash, current, type, generateFacets);
-    }
-
-
-    /**
-     * Let current state compute and register facets.
-     *
-     * @param key key of state
-     * @param state state
-     * @param type Type of compute
-     * @param generateFacets Whether new facets shall be generated.
-     */
-    public Object compute(
-        CallContext   context,
-        String        key,
-        DefaultState  state,
-        ComputeType   type,
-        boolean       generateFacets
-    ) {
-        String stateID = state.getID();
-
-        List<Facet> fs = (generateFacets) ? new ArrayList<Facet>() : null;
-
-        try {
-            Cache cache = CacheFactory.getCache(COMPUTING_CACHE);
-
-            Object old = null;
-
-            if (cache != null) {
-                net.sf.ehcache.Element element = cache.get(key);
-                if (element != null) {
-                    log.debug("Got computation result from cache.");
-                    old = element.getValue();
-                }
-            }
-            else {
-                log.debug("cache not configured.");
-            }
-
-            Object res;
-            switch (type) {
-                case FEED:
-                    res = state.computeFeed(this, key, context, fs, old);
-                    break;
-                case ADVANCE:
-                    res = state.computeAdvance(this, key, context, fs, old);
-                    break;
-                case INIT:
-                    res = state.computeInit(this, key, context, context.getMeta(), fs);
-                default:
-                    res = null;
-            }
-
-            if (cache != null && old != res && res != null) {
-                log.debug("Store computation result to cache.");
-                net.sf.ehcache.Element element =
-                    new net.sf.ehcache.Element(key, res);
-                cache.put(element);
-            }
-
-            return res;
-        }
-        finally {
-            if (generateFacets) {
-                if (fs.isEmpty()) {
-                    facets.remove(stateID);
-                }
-                else {
-                    addFacets(stateID, fs);
-                }
-            }
-        }
-    }
-
-    /**
-     * Sets the facets for an ID
-     *
-     * Normally the id is a state ID.
-     *
-     * @param id ID to map the facets to
-     * @param facets List of facets to be stored
-     */
-    protected void addFacets(String id, List<Facet> facets) {
-        this.facets.put(id, facets);
-    }
-
-
-    /**
-     * Method to dump the artifacts state/data.
-     */
-    protected void dumpArtifact() {
-        log.debug("++++++++++++++ DUMP ARTIFACT DATA +++++++++++++++++");
-        // Include uuid, type, name
-        log.debug(" - Name: " + getName());
-        log.debug(" - UUID: " + identifier());
-        log.debug(" - Class: " + this.getClass().getName());
-
-        log.debug("------ DUMP DATA ------");
-        Collection<StateData> allData = data.values();
-
-        for (StateData d: allData) {
-            String name  = d.getName();
-            String value = (String) d.getValue();
-
-            log.debug("- " + name + ": " + value);
-        }
-
-        log.debug("------ DUMP PREVIOUS STATES ------");
-        List<String> stateIds = getPreviousStateIds();
-
-        for (String id: stateIds) {
-            log.debug("- State: " + id);
-        }
-
-        log.debug("CURRENT STATE: " + getCurrentStateId());
-
-        debugFacets();
-        dumpFilterFacets();
-
-        log.debug("++++++++++++++ END ARTIFACT DUMP +++++++++++++++++");
-    }
-
-
-    protected void debugFacets() {
-        log.debug("######### FACETS #########");
-
-        for (Map.Entry<String, List<Facet>> entry: facets.entrySet()) {
-            String out = entry.getKey();
-            List<Facet> fs = entry.getValue();
-            for (Facet f: fs) {
-                log.debug("  # " + out + " : " + f.getName());
-            }
-        }
-
-        log.debug("######## FACETS END ########");
-    }
-
-
-    protected void dumpFilterFacets() {
-        log.debug("######## FILTER FACETS ########");
-
-        if (filterFacets == null || filterFacets.isEmpty()) {
-            log.debug("No Filter Facets defined.");
-            return;
-        }
-
-        for (Map.Entry<String, List<Facet>> entry: filterFacets.entrySet()) {
-            String      out     = entry.getKey();
-            List<Facet> filters = entry.getValue();
-
-            log.debug("There are " + filters.size() + " filters for: " +out);
-
-            for (Facet filter: filters) {
-                log.debug("  filter: " + filter.getName());
-            }
-        }
-
-        log.debug("######## FILTER FACETS END ########");
-    }
-
-
-    /** Destroy and clean up state with given id. */
-    protected void destroyState(String id, Object context) {
-        State s = getState(context, id);
-        s.endOfLife(this, context);
-    }
-
-
-    /**
-     * Calls endOfLife() for each state in the list <i>ids</i>.
-     *
-     * @param ids The State IDs that should be destroyed.
-     * @param context The RiverContext.
-     */
-    protected void destroyStates(List<String> ids, Object context) {
-        for (int i = 0, num = ids.size(); i < num; i++) {
-            destroyState(ids.get(i), context);
-        }
-    }
-
-
-    /**
-     * Destroy the states.
-     */
-    @Override
-    public void endOfLife(Object context) {
-        if (log.isDebugEnabled()) {
-            log.debug("FLYSArtifact.endOfLife: " + identifier());
-        }
-
-        ArrayList<String> ids       = (ArrayList<String>) getPreviousStateIds();
-        ArrayList<String> toDestroy = (ArrayList<String>) ids.clone();
-
-        toDestroy.add(getCurrentStateId());
-
-        destroyStates(toDestroy, context);
-    }
-
-    /**
-     * Return the Facets which a state provides
-     * @param stateid String that identifies the state
-     * @return List of Facets belonging to the state identifier
-     */
-    protected List<Facet> getFacets(String stateid) {
-        return this.facets.get(stateid);
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -29,7 +29,7 @@
  * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
  */
 public class FixationArtifact
-extends      FLYSArtifact
+extends      D4EArtifact
 implements   WaterLineArtifact
 {
     /** The logger for this class. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -32,7 +32,7 @@
 
 /** Artefact to access flow velocity measurements. */
 public class FlowVelocityMeasurementArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes
 {
     /** The logger for this class. */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -76,7 +76,7 @@
         Document        data)
     {
         logger.debug("GaugeDischargeArtifact.setup");
-        String ids = StaticFLYSArtifact.getDatacageIDValue(data);
+        String ids = StaticD4EArtifact.getDatacageIDValue(data);
         addStringData("ids", ids);
         logger.debug("id for gaugedischarge: " + ids);
         super.setup(identifier, factory, context, callMeta, data);
@@ -96,7 +96,7 @@
     protected void initialize(Artifact art, Object context, CallMeta meta) {
         logger.debug("GaugeDischargeArtifact.initialize");
         List<Facet> fs = new ArrayList<Facet>();
-        FLYSArtifact artifact = (FLYSArtifact) art;
+        D4EArtifact artifact = (D4EArtifact) art;
         importData(artifact, "river");
 
         // Get the location(s)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/HYKArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/HYKArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -29,7 +29,7 @@
 /**
  * Artifact to get hydr zones (HYKs).
  */
-public class HYKArtifact extends StaticFLYSArtifact {
+public class HYKArtifact extends StaticD4EArtifact {
 
     /** Name of Artifact. */
     public static final String HYK_ARTIFACT_NAME = "hyk";
@@ -113,7 +113,7 @@
         CallMeta callMeta)
     {
         logger.debug("HYKArtifact.initialize");
-        importData((FLYSArtifact)artifact, "river");
+        importData((D4EArtifact)artifact, "river");
 
         List<Facet> fs = new ArrayList<Facet>();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MINFOArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MINFOArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class MINFOArtifact
-extends      FLYSArtifact
+extends      D4EArtifact
 {
     /** The name of the artifact. */
     public static final String ARTIFACT_NAME = "minfo";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -46,11 +46,11 @@
 
 /**
  * Artifact to access main and extreme values of a river.
- * This artifact neglects (Static)FLYSArtifacts capabilities of interaction
+ * This artifact neglects (Static)D4EArtifacts capabilities of interaction
  * with the StateEngine by overriding the getState*-methods.
  */
 public class MainValuesArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes
 {
     /** The logger for this class. */
@@ -199,7 +199,7 @@
     @Override
     protected void initialize(Artifact artifact, Object context, CallMeta meta) {
         logger.debug("MainValuesArtifact.initialize");
-        FLYSArtifact winfo = (FLYSArtifact) artifact;
+        D4EArtifact winfo = (D4EArtifact) artifact;
         RangeAccess rangeAccess = new RangeAccess(winfo, null);
         double [] locations = rangeAccess.getKmRange();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -32,7 +32,7 @@
  * Artifact to store user-added points and water lines.
  */
 public class ManualPointsArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes, WaterLineArtifact
 {
     private static final long serialVersionUID = 7096025125474986011L;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -32,7 +32,7 @@
 import org.w3c.dom.Element;
 
 
-public class MapArtifact extends FLYSArtifact {
+public class MapArtifact extends D4EArtifact {
 
     private static final Logger logger =
         Logger.getLogger(MapArtifact.class);
@@ -146,7 +146,7 @@
 
         @Override
         public Object computeAdvance(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             String       hash,
             CallContext  context,
             List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -38,7 +38,7 @@
  * Artifact to produce sector markers.
  */
 public class QSectorArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 {
     /** The logger for this class. */
     private static Logger logger = Logger.getLogger(QSectorArtifact.class);
@@ -121,7 +121,7 @@
         logger.debug("QSectorArtifact.initialize");
         List<Facet> fs = new ArrayList<Facet>();
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         importData(flys, "river");
 
         DefaultState state = (DefaultState) getCurrentState(context);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -87,7 +87,7 @@
 
         public RiverAxisState(){}
 
-        public RiverAxisState(FLYSArtifact artifact) {
+        public RiverAxisState(D4EArtifact artifact) {
             super(artifact);
         }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -0,0 +1,143 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3) 
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details. 
+ */
+
+package org.dive4elements.river.artifacts;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import org.dive4elements.artifacts.ArtifactNamespaceContext;
+import org.dive4elements.artifacts.CallContext;
+
+import org.dive4elements.artifactdatabase.data.StateData;
+import org.dive4elements.artifactdatabase.ProtocolUtils;
+import org.dive4elements.artifactdatabase.state.Facet;
+import org.dive4elements.artifactdatabase.state.Output;
+import org.dive4elements.artifactdatabase.state.State;
+
+import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
+
+/**
+ * A basic D4EArtifact.
+ */
+public abstract class StaticD4EArtifact extends D4EArtifact {
+
+    /** Private logger. */
+    private static final Logger logger =
+        Logger.getLogger(StaticD4EArtifact.class);
+
+    /** Path to 'ids' (data) in doc that comes from datacage. */
+    public static final String XPATH_IDS = "/art:action/art:ids/@value";
+
+    /**
+     * Create description document which includes outputmodes.
+     * @param data ignored.
+     */
+    @Override
+    public Document describe(Document data, CallContext cc) {
+        logger.debug("Describe artifact: " + identifier());
+
+        Document desc = XMLUtils.newDocument();
+
+        ElementCreator creator = new ElementCreator(
+            desc,
+            ArtifactNamespaceContext.NAMESPACE_URI,
+            ArtifactNamespaceContext.NAMESPACE_PREFIX);
+
+        Element root = ProtocolUtils.createRootNode(creator);
+        desc.appendChild(root);
+
+        Element name = ProtocolUtils.createArtNode(
+            creator, "name",
+            new String[] { "value" },
+            new String[] { getName() });
+
+        root.appendChild(name);
+
+        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        root.appendChild(createOutputModes(cc, desc, creator));
+
+        // Add the data to an anonymous state.
+        Collection<StateData> datas = getAllData();
+        if (datas.size() > 0) {
+            Element ui = creator.create("ui");
+            Element staticE = creator.create("static");
+            Element state = creator.create("state");
+            ui.appendChild(staticE);
+            staticE.appendChild(state);
+            root.appendChild(ui);
+
+            for (StateData dataItem : datas) {
+                Element itemelent = creator.create("data");
+                creator.addAttr(itemelent, "name", dataItem.getName(), true);
+                creator.addAttr(itemelent, "type", dataItem.getType(), true);
+                state.appendChild(itemelent);
+                Element valuement = creator.create("item");
+                creator.addAttr(valuement, "label", dataItem.getDescription(), true);
+                creator.addAttr(valuement, "value", dataItem.getValue().toString(), true);
+                itemelent.appendChild(valuement);
+            }
+        }
+
+        return desc;
+    }
+
+
+    /**
+     * Return the value of id element in Datacage data document.
+     * @param data Document as passed by datacage.
+     * @return the id element value of data document.
+     */
+    public static String getDatacageIDValue(Document data) {
+        return XMLUtils.xpathString(data, XPATH_IDS,
+            ArtifactNamespaceContext.INSTANCE);
+    }
+
+
+    protected Element createOutputModes(
+        CallContext    cc,
+        Document       doc,
+        ElementCreator creator)
+    {
+        logger.debug("createOutputModes");
+
+        Element outs = ProtocolUtils.createArtNode(
+            creator, "outputmodes", null, null);
+
+        State state       = getCurrentState(cc);
+
+        logger.debug("Current state is " + state.getID());
+
+        List<Output> list = state.getOutputs();
+
+        if (list != null && list.size() > 0) {
+            List<Facet> fs = getFacets(state.getID());
+            if (fs != null && fs.size() > 0) {
+                List<Output> generated = generateOutputs(list, fs);
+
+                logger.debug("Found " + fs.size() + " current facets.");
+                if (!generated.isEmpty()) {
+                    ProtocolUtils.appendOutputModes(
+                        doc, outs, generated);
+                }
+            }
+            else {
+                logger.debug("No facets found for the current state.");
+            }
+        }
+
+        return outs;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticFLYSArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU AGPL (>=v3) 
- * and comes with ABSOLUTELY NO WARRANTY! Check out the
- * documentation coming with Dive4Elements River for details. 
- */
-
-package org.dive4elements.river.artifacts;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.dive4elements.artifacts.ArtifactNamespaceContext;
-import org.dive4elements.artifacts.CallContext;
-
-import org.dive4elements.artifactdatabase.data.StateData;
-import org.dive4elements.artifactdatabase.ProtocolUtils;
-import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.artifactdatabase.state.Output;
-import org.dive4elements.artifactdatabase.state.State;
-
-import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-
-/**
- * A basic FLYSArtifact.
- */
-public abstract class StaticFLYSArtifact extends FLYSArtifact {
-
-    /** Private logger. */
-    private static final Logger logger =
-        Logger.getLogger(StaticFLYSArtifact.class);
-
-    /** Path to 'ids' (data) in doc that comes from datacage. */
-    public static final String XPATH_IDS = "/art:action/art:ids/@value";
-
-    /**
-     * Create description document which includes outputmodes.
-     * @param data ignored.
-     */
-    @Override
-    public Document describe(Document data, CallContext cc) {
-        logger.debug("Describe artifact: " + identifier());
-
-        Document desc = XMLUtils.newDocument();
-
-        ElementCreator creator = new ElementCreator(
-            desc,
-            ArtifactNamespaceContext.NAMESPACE_URI,
-            ArtifactNamespaceContext.NAMESPACE_PREFIX);
-
-        Element root = ProtocolUtils.createRootNode(creator);
-        desc.appendChild(root);
-
-        Element name = ProtocolUtils.createArtNode(
-            creator, "name",
-            new String[] { "value" },
-            new String[] { getName() });
-
-        root.appendChild(name);
-
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
-        root.appendChild(createOutputModes(cc, desc, creator));
-
-        // Add the data to an anonymous state.
-        Collection<StateData> datas = getAllData();
-        if (datas.size() > 0) {
-            Element ui = creator.create("ui");
-            Element staticE = creator.create("static");
-            Element state = creator.create("state");
-            ui.appendChild(staticE);
-            staticE.appendChild(state);
-            root.appendChild(ui);
-
-            for (StateData dataItem : datas) {
-                Element itemelent = creator.create("data");
-                creator.addAttr(itemelent, "name", dataItem.getName(), true);
-                creator.addAttr(itemelent, "type", dataItem.getType(), true);
-                state.appendChild(itemelent);
-                Element valuement = creator.create("item");
-                creator.addAttr(valuement, "label", dataItem.getDescription(), true);
-                creator.addAttr(valuement, "value", dataItem.getValue().toString(), true);
-                itemelent.appendChild(valuement);
-            }
-        }
-
-        return desc;
-    }
-
-
-    /**
-     * Return the value of id element in Datacage data document.
-     * @param data Document as passed by datacage.
-     * @return the id element value of data document.
-     */
-    public static String getDatacageIDValue(Document data) {
-        return XMLUtils.xpathString(data, XPATH_IDS,
-            ArtifactNamespaceContext.INSTANCE);
-    }
-
-
-    protected Element createOutputModes(
-        CallContext    cc,
-        Document       doc,
-        ElementCreator creator)
-    {
-        logger.debug("createOutputModes");
-
-        Element outs = ProtocolUtils.createArtNode(
-            creator, "outputmodes", null, null);
-
-        State state       = getCurrentState(cc);
-
-        logger.debug("Current state is " + state.getID());
-
-        List<Output> list = state.getOutputs();
-
-        if (list != null && list.size() > 0) {
-            List<Facet> fs = getFacets(state.getID());
-            if (fs != null && fs.size() > 0) {
-                List<Output> generated = generateOutputs(list, fs);
-
-                logger.debug("Found " + fs.size() + " current facets.");
-                if (!generated.isEmpty()) {
-                    ProtocolUtils.appendOutputModes(
-                        doc, outs, generated);
-                }
-            }
-            else {
-                logger.debug("No facets found for the current state.");
-            }
-        }
-
-        return outs;
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -51,11 +51,11 @@
  * Artifact to access additional "waterlevel"-type of data, like the height
  * of protective measures (dikes).
  *
- * This artifact neglects (Static)FLYSArtifacts capabilities of interaction
+ * This artifact neglects (Static)D4EArtifacts capabilities of interaction
  * with the StateEngine by overriding the getState*-methods.
  */
 public class StaticWKmsArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes, WaterLineArtifact
 {
     /** The logger for this class. */
@@ -203,7 +203,7 @@
         CallMeta meta)
     {
         logger.debug("StaticWKmsArtifact.initialize");
-        FLYSArtifact winfo = (FLYSArtifact) artifact;
+        D4EArtifact winfo = (D4EArtifact) artifact;
         // TODO: The river is of no interest, so far.
         addData("river", winfo.getData("river"));
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -43,11 +43,11 @@
  * Artifact to access additional "waterlevel/discharge"-type of data, like
  * fixation measurements.
  *
- * This artifact neglects (Static)FLYSArtifacts capabilities of interaction
+ * This artifact neglects (Static)D4EArtifacts capabilities of interaction
  * with the StateEngine by overriding the getState*-methods.
  */
 public class StaticWQKmsArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes, WaterLineArtifact
 {
     /** The logger for this class. */
@@ -122,7 +122,7 @@
         CallMeta meta)
     {
         logger.debug("StaticWQKmsArtifact.initialize");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         // TODO: The river is of no interest, so far., also use importData
         importData(flys, "river");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -72,7 +72,7 @@
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class WINFOArtifact
-extends      FLYSArtifact
+extends      D4EArtifact
 implements   FacetTypes, WaterLineArtifact {
 
     /** The logger for this class. */
@@ -696,7 +696,7 @@
         boolean debug = logger.isDebugEnabled();
 
         if (debug) {
-            logger.debug("FLYSArtifact.getQsForWs");
+            logger.debug("D4EArtifact.getQsForWs");
         }
 
         River r = RiverUtils.getRiver(this);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 import org.dive4elements.river.artifacts.states.DefaultState;
 
 
-public class WMSBackgroundArtifact extends StaticFLYSArtifact {
+public class WMSBackgroundArtifact extends StaticD4EArtifact {
 
     public static final String NAME = "wmsbackground";
 
@@ -39,7 +39,7 @@
     protected void initialize(Artifact artifact, Object context, CallMeta meta) {
         logger.debug("Initialize internal state with: "+ artifact.identifier());
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         addData("river", flys.getData("river"));
 
         List<Facet> fs = new ArrayList<Facet>();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -31,7 +31,7 @@
 import org.w3c.dom.Document;
 
 
-public abstract class WMSDBArtifact extends StaticFLYSArtifact {
+public abstract class WMSDBArtifact extends StaticD4EArtifact {
 
     private static final Logger logger = Logger.getLogger(WMSDBArtifact.class);
 
@@ -101,7 +101,7 @@
     public static abstract class WMSDBState extends DefaultState {
         private static final Logger logger = Logger.getLogger(WMSDBState.class);
 
-        protected FLYSArtifact artifact;
+        protected D4EArtifact artifact;
 
         protected String name;
         protected int    riverId;
@@ -109,7 +109,7 @@
 
         public WMSDBState() {}
 
-        public WMSDBState(FLYSArtifact artifact) {
+        public WMSDBState(D4EArtifact artifact) {
             this.artifact = artifact;
             this.name     = null;
             this.riverId  = 0;
@@ -117,7 +117,7 @@
 
         @Override
         public Object computeInit(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             String       hash,
             Object       context,
             CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WQKmsInterpolArtifact.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WQKmsInterpolArtifact.java	Sun Apr 28 15:23:01 2013 +0200
@@ -40,11 +40,11 @@
  * Artifact to access additional "waterlevel/discharge"-type of data, like
  * fixation measurements, but doing so with costy interpolation.
  *
- * This artifact neglects (Static)FLYSArtifacts capabilities of interaction
+ * This artifact neglects (Static)D4EArtifacts capabilities of interaction
  * with the StateEngine by overriding the getState*-methods.
  */
 public class WQKmsInterpolArtifact
-extends      StaticFLYSArtifact
+extends      StaticD4EArtifact
 implements   FacetTypes
 {
     /** The logger for this class. */
@@ -185,7 +185,7 @@
         CallMeta meta)
     {
         logger.debug("WQKmsInterpolArtifact.initialize");
-        FLYSArtifact winfo = (FLYSArtifact) artifact;
+        D4EArtifact winfo = (D4EArtifact) artifact;
         importData(winfo, "river");
         importData(winfo, "ld_locations");
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Access.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Access.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.DateRange;
 
@@ -28,20 +28,20 @@
 {
     private static Logger log = Logger.getLogger(Access.class);
 
-    protected FLYSArtifact artifact;
+    protected D4EArtifact artifact;
 
     public Access() {
     }
 
-    public Access(FLYSArtifact artifact) {
+    public Access(D4EArtifact artifact) {
         this.artifact = artifact;
     }
 
-    public FLYSArtifact getArtifact() {
+    public D4EArtifact getArtifact() {
         return artifact;
     }
 
-    public void setArtifact(FLYSArtifact artifact) {
+    public void setArtifact(D4EArtifact artifact) {
         this.artifact = artifact;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.apache.log4j.Logger;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 import org.dive4elements.river.utils.StringUtil;
 
@@ -27,7 +27,7 @@
 
     private CallContext context;
 
-    public BedDifferencesAccess(FLYSArtifact artifact, CallContext context) {
+    public BedDifferencesAccess(D4EArtifact artifact, CallContext context) {
         super(artifact);
         this.context = context;
     }
@@ -37,10 +37,10 @@
         return yearEpoch;
     }
 
-    public FLYSArtifact[][] getDifferenceArtifacts() {
+    public D4EArtifact[][] getDifferenceArtifacts() {
         diffs = getString("diffids").split("#");
         logger.debug("diffs: " + Arrays.toString(diffs));
-        FLYSArtifact[][] artifacts = new FLYSArtifact[diffs.length/2][2];
+        D4EArtifact[][] artifacts = new D4EArtifact[diffs.length/2][2];
         for (int i = 0; i < diffs.length; i += 2) {
             String diff1 = StringUtil.unbracket(diffs[0 + 2*i]);
             String diff2 = StringUtil.unbracket(diffs[1 + 2*i]);
@@ -53,7 +53,7 @@
         return artifacts;
     }
 
-    public static int getHeightId(FLYSArtifact artifact) {
+    public static int getHeightId(D4EArtifact artifact) {
         Access a = new Access(artifact);
         return a.getInteger("height_id");
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.minfo.BedHeight;
 import org.dive4elements.river.artifacts.model.minfo.BedHeightFactory;
 import org.dive4elements.river.artifacts.states.SoundingsSelect;
@@ -35,7 +35,7 @@
 
     private String time;
 
-    public BedHeightAccess(FLYSArtifact artifact, CallContext context) {
+    public BedHeightAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedQualityAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DateRange;
 
 
@@ -32,7 +32,7 @@
     private List<DateRange> ranges;
 
 
-    public BedQualityAccess(FLYSArtifact artifact, CallContext context) {
+    public BedQualityAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Calculation4Access.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Calculation4Access.java	Sun Apr 28 15:23:01 2013 +0200
@@ -8,7 +8,7 @@
 
 package org.dive4elements.river.artifacts.access;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.Segment;
 
@@ -33,7 +33,7 @@
     protected Boolean isRange;
 
 
-    public Calculation4Access(FLYSArtifact artifact) {
+    public Calculation4Access(D4EArtifact artifact) {
         super(artifact, null);
     }
 
@@ -74,7 +74,7 @@
                 return null;
             }
 
-            // XXX: FLYSArtifact sucks!
+            // XXX: D4EArtifact sucks!
             // TODO further use RangeAccess functionality.
             double [] fromTo = getKmRange();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.RangeWithValues;
 
@@ -38,7 +38,7 @@
     protected List<RangeWithValues> ranges;
 
 
-    public ExtremeAccess(FLYSArtifact artifact, CallContext context) {
+    public ExtremeAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -9,7 +9,7 @@
 package org.dive4elements.river.artifacts.access;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import java.util.Arrays;
 
@@ -33,7 +33,7 @@
 
     protected String  function;
 
-    public FixAccess(FLYSArtifact artifact, CallContext context) {
+    public FixAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAnalysisAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixAnalysisAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifactdatabase.data.StateData;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.DateRange;
 
@@ -30,7 +30,7 @@
 
     protected double [] qs;
 
-    public FixAnalysisAccess(FLYSArtifact artifact, CallContext context) {
+    public FixAnalysisAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixRealizingAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FixRealizingAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -9,7 +9,7 @@
 package org.dive4elements.river.artifacts.access;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.Segment;
 
@@ -28,7 +28,7 @@
 
     protected List<Segment> segments;
 
-    public FixRealizingAccess(FLYSArtifact artifact, CallContext context) {
+    public FixRealizingAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FlowVelocityAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/FlowVelocityAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /** Access to data that deals with flow velocity stuff. */
@@ -21,7 +21,7 @@
     private int[] mainChannels;
     private int[] totalChannels;
 
-    public FlowVelocityAccess(FLYSArtifact artifact, CallContext context) {
+    public FlowVelocityAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/GaugeAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/GaugeAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.apache.log4j.Logger;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 /** For the moment, light-weight wrapper around RiverUtils. */
@@ -21,7 +21,7 @@
 {
     private static Logger logger = Logger.getLogger(GaugeAccess.class);
 
-    public GaugeAccess(FLYSArtifact artifact, CallContext context) {
+    public GaugeAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/HistoricalDischargeAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/HistoricalDischargeAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import java.util.Date;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.Timerange;
 
 
@@ -30,7 +30,7 @@
     private double[] qs;
     private double[] ws;
 
-    public HistoricalDischargeAccess(FLYSArtifact artifact) {
+    public HistoricalDischargeAccess(D4EArtifact artifact) {
         super(artifact);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/MapAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/MapAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,14 +13,14 @@
 import java.util.List;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class MapAccess
 extends RangeAccess
 {
 
-    public MapAccess(FLYSArtifact artifact, CallContext context) {
+    public MapAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import gnu.trove.TDoubleArrayList;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.utils.RiverUtils;
@@ -40,7 +40,7 @@
     private KM_MODE mode;
 
 
-    public RangeAccess(FLYSArtifact artifact, CallContext context) {
+    public RangeAccess(D4EArtifact artifact, CallContext context) {
         super(artifact);
         this.context = context;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RiverAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RiverAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -8,7 +8,7 @@
 
 package org.dive4elements.river.artifacts.access;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.apache.log4j.Logger;
 
@@ -26,7 +26,7 @@
     public RiverAccess() {
     }
 
-    public RiverAccess(FLYSArtifact artifact) {
+    public RiverAccess(D4EArtifact artifact) {
         super(artifact);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SQRelationAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SQRelationAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DateRange;
 
 public class SQRelationAccess
@@ -31,7 +31,7 @@
     public SQRelationAccess() {
     }
 
-    public SQRelationAccess(FLYSArtifact artifact) {
+    public SQRelationAccess(D4EArtifact artifact) {
         super(artifact);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class SedimentLoadAccess
@@ -28,7 +28,7 @@
     private String time;
     private String unit;
 
-    public SedimentLoadAccess(FLYSArtifact artifact, CallContext context) {
+    public SedimentLoadAccess(D4EArtifact artifact, CallContext context) {
         super(artifact, context);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/StaticSQRelationAccess.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class StaticSQRelationAccess
@@ -22,7 +22,7 @@
 
     private String measurementStation;
 
-    public StaticSQRelationAccess(FLYSArtifact artifact) {
+    public StaticSQRelationAccess(D4EArtifact artifact) {
         super(artifact);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java	Sun Apr 28 15:23:01 2013 +0200
@@ -95,11 +95,11 @@
 
 
     /**
-     * Creates a new FLYSArtifactContext object and initialize all
+     * Creates a new D4EArtifactContext object and initialize all
      * components required by the application.
      *
      * @param config The artifact server configuration.
-     * @return a FLYSArtifactContext.
+     * @return a D4EArtifactContext.
      */
     @Override
     public GlobalContext createArtifactContext(Document config) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java	Sun Apr 28 15:23:01 2013 +0200
@@ -36,7 +36,7 @@
 import org.dive4elements.artifacts.ArtifactDatabase;
 import org.dive4elements.artifacts.ArtifactDatabaseException;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.artifacts.common.utils.LRUCache;
 
@@ -122,12 +122,12 @@
             Date     artifactCreated,
             Artifact artifact
         ) {
-            if (!(artifact instanceof FLYSArtifact)) {
+            if (!(artifact instanceof D4EArtifact)) {
                 log.warn("ignoring none FLYS artifacts");
                 return;
             }
 
-            FLYSArtifact flysArtifact = (FLYSArtifact)artifact;
+            D4EArtifact flysArtifact = (D4EArtifact)artifact;
 
             Integer uId = getUserId(userId);
             Integer cId = getCollectionId(
@@ -173,7 +173,7 @@
         protected void storeArtifact(
             final String       artifactId,
             Integer            collectionId,
-            final FLYSArtifact artifact,
+            final D4EArtifact artifact,
             final Date         artifactCreated
         ) {
             Integer aId = getId(artifacts, artifactId, SQL_ARTIFACT_BY_GID);
@@ -500,12 +500,12 @@
             return;
         }
 
-        if (!(artifact instanceof FLYSArtifact)) {
-            log.warn("need FLYSArtifact here (have " + artifact.getClass() + ")");
+        if (!(artifact instanceof D4EArtifact)) {
+            log.warn("need D4EArtifact here (have " + artifact.getClass() + ")");
             return;
         }
 
-        final FLYSArtifact flys = (FLYSArtifact)artifact;
+        final D4EArtifact flys = (D4EArtifact)artifact;
 
         final int [] res = new int[1];
 
@@ -547,12 +547,12 @@
         GlobalContext context
     ) {
         log.debug("storedArtifact");
-        if (!(artifact instanceof FLYSArtifact)) {
-            log.warn("need FLYSArtifact here but have a " + artifact.getClass());
+        if (!(artifact instanceof D4EArtifact)) {
+            log.warn("need D4EArtifact here but have a " + artifact.getClass());
             return;
         }
 
-        final FLYSArtifact flys = (FLYSArtifact)artifact;
+        final D4EArtifact flys = (D4EArtifact)artifact;
 
         final Integer [] res = new Integer[1];
 
@@ -886,7 +886,7 @@
 
     protected void storeData(
         final int     artifactId,
-        FLYSArtifact  artifact
+        D4EArtifact  artifact
     ) {
         final Collection<StateData> data = artifact.getAllData();
 
@@ -938,7 +938,7 @@
 
     protected void storeOuts(
         final int          artifactId,
-        final FLYSArtifact artifact,
+        final D4EArtifact artifact,
         GlobalContext      context
     ) {
         final List<Output> outs = artifact.getOutputs(context);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Recommendations.java	Sun Apr 28 15:23:01 2013 +0200
@@ -36,7 +36,7 @@
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.artifacts.common.utils.StringUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.backend.SessionFactoryProvider;
 import org.dive4elements.river.backend.SessionHolder;
@@ -136,7 +136,7 @@
     }
 
     protected static void artifactToParameters(
-        FLYSArtifact        artifact,
+        D4EArtifact        artifact,
         Map<String, Object> parameters
     ) {
         parameters.put("CURRENT-STATE-ID", artifact.getCurrentStateId());
@@ -171,7 +171,7 @@
      * @param extraParameters parameters (typicall example: 'recommended')
      */
     public void  recommend(
-        FLYSArtifact        artifact,
+        D4EArtifact        artifact,
         String              userId,
         String []           outs,
         Map<String, Object> extraParameters,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AnnotationFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -30,7 +30,7 @@
 
 import org.dive4elements.river.utils.RiverUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -74,7 +74,7 @@
         // TODO issue880: Make annotations available _per type_
         AnnotationArtifact annotationArtifact = (AnnotationArtifact) artifact;
 
-        String riverName = RiverUtils.getRivername((FLYSArtifact)artifact);
+        String riverName = RiverUtils.getRivername((D4EArtifact)artifact);
 
         FastAnnotations fas = LocationProvider.getAnnotations(riverName);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DataFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
@@ -90,7 +90,7 @@
      */
     @Override
     public Object getData(Artifact artifact, CallContext context) {
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
         String    theHash = (hash != null) ? hash : flys.hash();
 
         return (stateId != null && stateId.length() > 0)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DurationCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DurationCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifactdatabase.state.DefaultFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -87,7 +87,7 @@
             return getData(artifact, context);
         }
         else if (key.equals(BB_DURATIONCURVE_KM)) {
-            return ((FLYSArtifact)artifact).getDataAsString("ld_locations");
+            return ((D4EArtifact)artifact).getDataAsString("ld_locations");
         }
         else {
             return null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
@@ -46,7 +46,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for flow velocity at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.RiverAccess;
 import org.dive4elements.river.artifacts.context.RiverContext;
@@ -52,7 +52,7 @@
 
         Double start = (Double)context.getContextValue("startkm");
         Double end = (Double)context.getContextValue("endkm");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type, false);
@@ -61,7 +61,7 @@
         if(start != null && end != null) {
             RiverContext fc = (RiverContext)context.globalContext();
             ZoomScale scales = (ZoomScale)fc.get("zoomscale");
-            RiverAccess access = new RiverAccess((FLYSArtifact)artifact);
+            RiverAccess access = new RiverAccess((D4EArtifact)artifact);
             String river = access.getRiver();
 
             double radius = scales.getRadius(river, start, end);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.DefaultFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.model.Gauge;
 
@@ -47,12 +47,12 @@
     }
 
     protected WQKms getWQKms(Artifact art, CallContext context) {
-        if (!(art instanceof FLYSArtifact)) {
+        if (!(art instanceof D4EArtifact)) {
             log.warn("Invalid artifact type");
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact)art;
+        D4EArtifact flys = (D4EArtifact)art;
 
         String river = flys.getDataAsString("river");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -81,7 +81,7 @@
         if (stateId == null) {
             logger.error("GaugeDischargeFacet.getData: stateId is null.");
         }
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type, true);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -42,7 +42,7 @@
 
     @Override
     public Object getData(Artifact artifact, CallContext context) {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeDifferenceFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeDifferenceFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -57,7 +57,7 @@
                 " at index: " + index + " / stateId: " + stateId);
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type,  false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -68,7 +68,7 @@
                 index + " / stateId: " + stateId);
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type,  false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MiddleBedHeightFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
@@ -48,7 +48,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for middle bed height at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             flys.compute(context, hash, stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReferenceCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReferenceCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -101,7 +101,7 @@
 
 
     protected WWQQ getWWQQ(Artifact artifact, CallContext context) {
-        FLYSArtifact winfo = (FLYSArtifact)artifact;
+        D4EArtifact winfo = (D4EArtifact)artifact;
 
         CalculationResult res = (CalculationResult)
             winfo.compute(context, hash, stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReportFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ReportFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 import org.apache.log4j.Logger;
@@ -51,7 +51,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("get report data");
 
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
 
         CalculationResult cr = (CalculationResult)flys.compute(
             context, hash, stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.math.Linear;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 import org.dive4elements.river.artifacts.model.extreme.ExtremeResult;
@@ -72,7 +72,7 @@
             return null;
         }
 
-        FLYSArtifact winfo = (FLYSArtifact) artifact;
+        D4EArtifact winfo = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult)
             winfo.compute(context, hash, stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.ExtremeAccess;
 
@@ -77,8 +77,8 @@
     @Override
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("ExtremeCurveFacet.getData");
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
                                                  ComputeType.ADVANCE,
@@ -114,7 +114,7 @@
             }
         }
         else {
-            logger.debug("Not an instance of FLYSArtifact / WINFOArtifact.");
+            logger.debug("Not an instance of D4EArtifact / WINFOArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisEventsFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisEventsFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -64,8 +64,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixAnalysisEventsFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
 
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisPeriodsFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -67,8 +67,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixAnalysisPeriodsFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -67,8 +67,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixAvSectorFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
@@ -114,7 +114,7 @@
             return new QWDDateRange(qwdData[sectorNdx], periods[periodNdx].getDateRange());
         }
         else {
-            logger.warn("Artifact is no instance of FLYSArtifact.");
+            logger.warn("Artifact is no instance of D4EArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDerivateFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -69,12 +69,12 @@
     public Object getData(Artifact artifact, CallContext context) {
 
         logger.debug("FixDerivateFacet.getData");
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             logger.debug("Not an instance of FixationArtifact.");
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
         FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
         CalculationResult res =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixDeviationFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -65,8 +65,8 @@
     @Override
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixDeviationFacet.getData");
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixEventFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixEventFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WQKmsFactory;
@@ -50,7 +50,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixEventFacet.getData");
 
-        FixRealizingAccess access = new FixRealizingAccess((FLYSArtifact) artifact, context);
+        FixRealizingAccess access = new FixRealizingAccess((D4EArtifact) artifact, context);
         int wstColID = access.getEvents()[index];
         return WQKmsFactory.getWQKmsCID(wstColID);
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -63,8 +63,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixLongitudinalAnalysisFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
 
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
@@ -96,7 +96,7 @@
             return resPeriods;
         }
         else {
-            logger.warn("Artifact is no instance of FLYSArtifact.");
+            logger.warn("Artifact is no instance of D4EArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAvSectorFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAvSectorFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -59,8 +59,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixLongitudinalAvSectorFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
 
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
@@ -85,7 +85,7 @@
             return resPeriods;
         }
         else {
-            logger.warn("Artifact is no instance of FLYSArtifact.");
+            logger.warn("Artifact is no instance of D4EArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -70,8 +70,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixLongitudinalDeviationFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
@@ -106,7 +106,7 @@
             return kmIndex;
         }
         else {
-            logger.warn("Artifact is no instance of FLYSArtifact.");
+            logger.warn("Artifact is no instance of D4EArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -70,8 +70,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixLongitudinalReferenceFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
@@ -102,7 +102,7 @@
             return resReference;
         }
         else {
-            logger.warn("Artifact is no instance of FLYSArtifact.");
+            logger.warn("Artifact is no instance of D4EArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixOutlierFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixOutlierFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -50,7 +50,7 @@
     /**
      * Returns the data this facet requires.
      *
-     * @param artifact the owner artifact; needs to be a FLYSArtifact.
+     * @param artifact the owner artifact; needs to be a D4EArtifact.
      * @param context  the CallContext; required to retrieve the value of
      * <i>currentKm</i>.
      *
@@ -60,8 +60,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixOutlierFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
 
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
@@ -90,7 +90,7 @@
             return qws;
         }
 
-        logger.warn("Not an instance of FLYSArtifact.");
+        logger.warn("Not an instance of D4EArtifact.");
         return null;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixReferenceEventsFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixReferenceEventsFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -61,8 +61,8 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("FixReferenceEventsFacet.getData");
 
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
 
             CalculationResult res =
                 (CalculationResult) flys.compute(context,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 
@@ -67,8 +67,8 @@
     @Override
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("getData");
-        if (artifact instanceof FLYSArtifact) {
-            FLYSArtifact flys = (FLYSArtifact)artifact;
+        if (artifact instanceof D4EArtifact) {
+            D4EArtifact flys = (D4EArtifact)artifact;
             FixAnalysisAccess access = new FixAnalysisAccess(flys, context);
 
             CalculationResult res =
@@ -114,7 +114,7 @@
             return fix;
         }
         else {
-            logger.debug("Not an instance of FLYSArtifact / FixationArtifact.");
+            logger.debug("Not an instance of D4EArtifact / FixationArtifact.");
             return null;
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.wsplgen.FacetCreator;
 
 
@@ -28,7 +28,7 @@
     public static final String GEL_NOSPERRE = "NOSPERRE";
 
 
-    protected FLYSArtifact artifact;
+    protected D4EArtifact artifact;
 
     protected CallContext callContext;
 
@@ -61,7 +61,7 @@
 
 
     public WSPLGENJob(
-        FLYSArtifact       flys,
+        D4EArtifact       flys,
         File               workingDir,
         FacetCreator       facetCreator,
         CallContext        context,
@@ -89,7 +89,7 @@
     }
 
 
-    public FLYSArtifact getArtifact() {
+    public D4EArtifact getArtifact() {
         return artifact;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDensityFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -41,7 +41,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed density at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -41,7 +41,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed diameter at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedDifferencesAccess;
 import org.dive4elements.river.artifacts.model.Calculation;
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -31,7 +31,7 @@
 
     protected String river;
     protected String yearEpoch;
-    protected FLYSArtifact[][] artifacts;
+    protected D4EArtifact[][] artifacts;
 
     public BedDiffCalculation() {
     }
@@ -41,7 +41,7 @@
 
         String river = access.getRiver();
         String yearEpoch = access.getYearEpoch();
-        FLYSArtifact[][] artifacts = access.getDifferenceArtifacts();
+        D4EArtifact[][] artifacts = access.getDifferenceArtifacts();
 
         logger.debug("got artifacts: " + artifacts.length + "; " + artifacts[0].length);
         if (river == null) {
@@ -99,8 +99,8 @@
     }
 
     private BedHeight[] getHeightPair(
-        FLYSArtifact art1,
-        FLYSArtifact art2,
+        D4EArtifact art1,
+        D4EArtifact art2,
         String type
     ) {
         int id1 = BedDifferencesAccess.getHeightId(art1);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -35,7 +35,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed density at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffEpochFilterFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.RiverAccess;
 import org.dive4elements.river.artifacts.context.RiverContext;
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -39,7 +39,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed density at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
@@ -52,7 +52,7 @@
         if(start != null && end != null) {
             RiverContext fc = (RiverContext)context.globalContext();
             ZoomScale scales = (ZoomScale)fc.get("zoomscale");
-            RiverAccess access = new RiverAccess((FLYSArtifact)artifact);
+            RiverAccess access = new RiverAccess((D4EArtifact)artifact);
             String river = access.getRiver();
 
             double radius = scales.getRadius(river, start, end);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -35,7 +35,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed density at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearFilterFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.RiverAccess;
 import org.dive4elements.river.artifacts.context.RiverContext;
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -39,7 +39,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed density at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
@@ -51,7 +51,7 @@
         if(start != null && end != null) {
             RiverContext fc = (RiverContext)context.globalContext();
             ZoomScale scales = (ZoomScale)fc.get("zoomscale");
-            RiverAccess access = new RiverAccess((FLYSArtifact)artifact);
+            RiverAccess access = new RiverAccess((D4EArtifact)artifact);
             String river = access.getRiver();
 
             double radius = scales.getRadius(river, start, end);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedHeightAccess;
 import org.dive4elements.river.artifacts.model.BlackboardDataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -38,7 +38,7 @@
      */
     @Override
     public Object getData(Artifact artifact, CallContext context) {
-        BedHeightAccess access = new BedHeightAccess((FLYSArtifact)artifact, context);
+        BedHeightAccess access = new BedHeightAccess((D4EArtifact)artifact, context);
         if (type.equals("singlevalues")) {
             return access.getSingleValues();
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedPorosityFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -41,7 +41,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bed porosity at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -42,7 +42,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for bedload diameter at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -40,7 +40,7 @@
 
     public Object getData(Artifact artifact, CallContext context) {
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         String width_id = flys.getDataAsString("width_id");
 
         MorphologicWidth width =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -56,7 +56,7 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for sediment load at index: " + index);
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(context, hash,
             stateId, type, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.math.fitting.Function;
 import org.dive4elements.river.artifacts.math.fitting.FunctionFactory;
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -61,11 +61,11 @@
     public Object getData(Artifact artifact, CallContext context) {
         log.debug("SQCurveFacet.getData");
 
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(
             context, ComputeType.ADVANCE, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -54,11 +54,11 @@
     public Object getData(Artifact artifact, CallContext context) {
         log.debug("SQMeasurementFacet.getData");
 
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(
             context, ComputeType.ADVANCE, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierCurveFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierCurveFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.math.fitting.Function;
 import org.dive4elements.river.artifacts.math.fitting.FunctionFactory;
@@ -60,11 +60,11 @@
     public Object getData(Artifact artifact, CallContext context) {
         log.debug("SQOutlierCurveFacet.getData");
 
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(
             context, ComputeType.ADVANCE, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -11,7 +11,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -54,11 +54,11 @@
     public Object getData(Artifact artifact, CallContext context) {
         log.debug("SQOutlierFacet.getData");
 
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(
             context, ComputeType.ADVANCE, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierMeasurementFacet.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQOutlierMeasurementFacet.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -53,11 +53,11 @@
     public Object getData(Artifact artifact, CallContext context) {
         log.debug("SQOutlierMeasurementFacet.getData");
 
-        if (!(artifact instanceof FLYSArtifact)) {
+        if (!(artifact instanceof D4EArtifact)) {
             return null;
         }
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         CalculationResult res = (CalculationResult) flys.compute(
             context, ComputeType.ADVANCE, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MetaDataService.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MetaDataService.java	Sun Apr 28 15:23:01 2013 +0200
@@ -28,7 +28,7 @@
 
 import org.dive4elements.river.artifacts.datacage.Recommendations;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -130,7 +130,7 @@
     ) {
         Document result = XMLUtils.newDocument();
 
-        FLYSArtifact flysArtifact;
+        D4EArtifact flysArtifact;
 
         if (log.isDebugEnabled()) {
             log.debug("artifact  : " + artifactId);
@@ -170,12 +170,12 @@
                 return result;
             }
 
-            if (!(artifact instanceof FLYSArtifact)) {
+            if (!(artifact instanceof D4EArtifact)) {
                 log.warn("artifact is not a FLYS artifact.");
                 return result;
             }
 
-            flysArtifact = (FLYSArtifact)artifact;
+            flysArtifact = (D4EArtifact)artifact;
         }
         else {
             flysArtifact = null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 
 import org.dive4elements.river.artifacts.AnnotationArtifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.AnnotationFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -52,7 +52,7 @@
      */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.AreaArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 
@@ -43,7 +43,7 @@
 
     /** Just reproduce the Facet. */
     protected Object compute(
-        FLYSArtifact  areaArtifact,
+        D4EArtifact  areaArtifact,
         CallContext   cc,
         String        hash,
         List<Facet>   facets,
@@ -67,13 +67,13 @@
      */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
         Object       old
     ) {
-        return compute((FLYSArtifact) artifact, context, hash, facets, old);
+        return compute((D4EArtifact) artifact, context, hash, facets, old);
     }
 
 
@@ -82,13 +82,13 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
         Object       old
     ) {
-        return compute((FLYSArtifact) artifact, context, hash, facets, old);
+        return compute((D4EArtifact) artifact, context, hash, facets, old);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 
 /**
@@ -127,7 +127,7 @@
     throws IllegalArgumentException
     {
         logger.debug("CalculationSelect.validate");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData data = getData(flys, FIELD_MODE);
         String    calc = (data != null) ? (String) data.getValue() : null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelectMinfo.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/CalculationSelectMinfo.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 
 /**
@@ -94,7 +94,7 @@
     throws IllegalArgumentException
     {
         logger.debug("CalculationSelect.validate");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData data = getData(flys, FIELD_MODE);
         String    calc = (data != null) ? (String) data.getValue() : null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputationRangeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 import org.dive4elements.artifactdatabase.ProtocolUtils;
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.resources.Resources;
@@ -141,7 +141,7 @@
 
     @Override
     protected double[] getMinMax(Artifact artifact) {
-        FLYSArtifact flysArtifact = (FLYSArtifact) artifact;
+        D4EArtifact flysArtifact = (D4EArtifact) artifact;
         return RiverUtils.getRiverMinMax(flysArtifact);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.ChartArtifact;
 
@@ -57,7 +57,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DGMSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DGMSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,7 +22,7 @@
 import org.dive4elements.river.model.DGM;
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 
@@ -47,7 +47,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -89,7 +89,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         DGM dgm = getDGM(flys);
 
@@ -120,14 +120,14 @@
     /**
      * Returns the DGM specified in the parameters of <i>flys</i>.
      *
-     * @param flys The FLYSArtifact that knows the ID of a DGM.
+     * @param flys The D4EArtifact that knows the ID of a DGM.
      *
-     * @throws IllegalArgumentException If the FLYSArtifact doesn't know the ID
+     * @throws IllegalArgumentException If the D4EArtifact doesn't know the ID
      * of a DGM.
      *
-     * @return the DGM specified by FLYSArtifact's parameters.
+     * @return the DGM specified by D4EArtifact's parameters.
      */
-    public static DGM getDGM(FLYSArtifact flys)
+    public static DGM getDGM(D4EArtifact flys)
     throws IllegalArgumentException
     {
         try {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DefaultState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DefaultState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -34,7 +34,7 @@
 import org.dive4elements.artifactdatabase.state.AbstractState;
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.resources.Resources;
 
@@ -59,7 +59,7 @@
     }
 
 
-    protected StateData getData(FLYSArtifact artifact,  String name) {
+    protected StateData getData(D4EArtifact artifact,  String name) {
         return artifact.getData(name);
     }
 
@@ -96,7 +96,7 @@
             return ui;
         }
 
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
 
         for (String name: theData.keySet()) {
             appendStaticData(flys, context, creator, ui, name);
@@ -107,7 +107,7 @@
 
 
     protected void appendStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         CallContext    context,
         ElementCreator cr,
         Element        ui,
@@ -147,7 +147,7 @@
      * @return an Element.
      */
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -268,7 +268,7 @@
             return ui;
         }
 
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
 
         for (String name: theData.keySet()) {
             StateData data = getData(flys, name);
@@ -403,14 +403,14 @@
     /**
      * This method transform a given value into a StateData object.
      *
-     * @param flys The FLYSArtifact.
+     * @param flys The D4EArtifact.
      * @param name The name of the data object.
      * @param val The value of the data object.
      *
      * @return a StateData object with <i>name</i> and <i>val</i>ue.
      */
     public StateData transform(
-        FLYSArtifact flys,
+        D4EArtifact flys,
         CallContext  cc,
         StateData    stateData,
         String       name,
@@ -450,7 +450,7 @@
 
 
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -461,7 +461,7 @@
 
 
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -472,7 +472,7 @@
 
 
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 import org.dive4elements.artifacts.CallContext;
 
 import org.dive4elements.river.artifacts.ChartArtifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.Calculation4Access;
 
@@ -64,7 +64,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 import org.dive4elements.river.model.DischargeZone;
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 
@@ -46,7 +46,7 @@
      * DischargeZone and the value is a string that consists of lower discharge
      * and upper discharge.
      *
-     * @param artifact Needs to be a FLYSArtifact that provides river
+     * @param artifact Needs to be a D4EArtifact that provides river
      * information.
      * @param parameterName The name of a parameter.
      *
@@ -143,7 +143,7 @@
      * Returns all discharge zones for a given river. The river information is
      * extracted from <i>artifact</i> using RiverUtils.getRiver().
      *
-     * @param artifact Needs to be a FLYSArtifact that stores a rivername.
+     * @param artifact Needs to be a D4EArtifact that stores a rivername.
      *
      * @return a list of DischargeZones.
      *
@@ -153,7 +153,7 @@
     protected List<DischargeZone> getDischargeZones(Artifact artifact)
     throws IllegalArgumentException
     {
-        River river = RiverUtils.getRiver((FLYSArtifact) artifact);
+        River river = RiverUtils.getRiver((D4EArtifact) artifact);
 
         if (river == null) {
             throw new IllegalArgumentException("No river found");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DistanceOnlySelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.Artifact;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class DistanceOnlySelect extends DistanceSelect {
@@ -31,7 +31,7 @@
     throws IllegalArgumentException
     {
         // TODO think about better hierarchy wrt RangeState#validate.
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         try {
             RangeAccess rangeAccess = new RangeAccess(flys, null);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DurationCurveState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.ChartArtifact;
 
@@ -54,7 +54,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterLocationState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterLocationState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -8,7 +8,7 @@
 
 package org.dive4elements.river.artifacts.states;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.utils.RiverUtils;
 
@@ -27,7 +27,7 @@
 
     /** Allow from min km of river. */
     @Override
-    protected Object getLower(FLYSArtifact flys) {
+    protected Object getLower(D4EArtifact flys) {
         double[] lowerUpper = RiverUtils.getRiverMinMax(flys);
 
         return lowerUpper != null
@@ -38,7 +38,7 @@
 
     /** Allow to max km of river. */
     @Override
-    protected Object getUpper(FLYSArtifact flys) {
+    protected Object getUpper(D4EArtifact flys) {
         double[] lowerUpper = RiverUtils.getRiverMinMax(flys);
 
         return lowerUpper != null
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -45,7 +45,7 @@
 
 import org.dive4elements.artifacts.common.utils.FileTools;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
 
@@ -154,8 +154,8 @@
 
 
     protected void copyShapeDir(Artifact orig, Artifact owner) {
-        File origDir = getDirectory((FLYSArtifact) orig);
-        File thisDir = getDirectory((FLYSArtifact) owner);
+        File origDir = getDirectory((D4EArtifact) orig);
+        File thisDir = getDirectory((D4EArtifact) owner);
 
         FileTools.copyDirectory(origDir, thisDir);
     }
@@ -167,7 +167,7 @@
         Object   context,
         CallMeta callMeta
     ) {
-        FLYSArtifact flys  = (FLYSArtifact) owner;
+        D4EArtifact flys  = (D4EArtifact) owner;
         List<Facet> facets = flys.getFacets();
         if (facets == null || facets.isEmpty()) {
             logger.warn("No facets for '" + OUTPUT_NAME + "' given!");
@@ -200,7 +200,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -274,7 +274,7 @@
      *
      * @return the directory for WSPLEN data.
      */
-    protected File getDirectory(FLYSArtifact artifact) {
+    protected File getDirectory(D4EArtifact artifact) {
         String shapePath = RiverUtils.getXPathString(
             RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
 
@@ -289,7 +289,7 @@
      * Removes the directory and all its content where the required data and the
      * results of WSPLGEN are stored. Should be called in endOfLife().
      */
-    protected void removeDirectory(FLYSArtifact artifact) {
+    protected void removeDirectory(D4EArtifact artifact) {
         String shapePath = RiverUtils.getXPathString(
             RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
 
@@ -312,7 +312,7 @@
     public void endOfLife(Artifact artifact, Object callContext) {
         logger.info("FloodMapState.endOfLife: " + artifact.identifier());
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         Scheduler scheduler = Scheduler.getInstance();
         scheduler.cancelJob(flys.identifier());
@@ -320,7 +320,7 @@
 
 
     protected WSPLGENJob prepareWSPLGENJob(
-        FLYSArtifact       artifact,
+        D4EArtifact       artifact,
         FacetCreator       facetCreator,
         File               artifactDir,
         CallContext        context,
@@ -377,7 +377,7 @@
 
 
     private void setAdditionalHWS(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         FacetCreator facetCreator,
         File dir,
         WSPLGENJob job) {
@@ -402,7 +402,7 @@
 
 
     private void setOfficialHWS(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         FacetCreator facetCreator,
         File artifactDir,
         WSPLGENJob job) {
@@ -441,7 +441,7 @@
 
 
     private void createMapfile(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         File artifactDir,
         String name,
         String hwsShapefile,
@@ -476,12 +476,12 @@
     }
 
 
-    protected void setOut(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setOut(D4EArtifact artifact, WSPLGENJob job) {
         job.setOut(WSPLGEN_DEFAULT_OUTPUT);
     }
 
 
-    protected void setRange(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setRange(D4EArtifact artifact, WSPLGENJob job) {
         RangeAccess rangeAccess = new RangeAccess(artifact, null);
         double[] range = rangeAccess.getKmRange();
 
@@ -490,7 +490,7 @@
     }
 
 
-    protected void setDelta(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setDelta(D4EArtifact artifact, WSPLGENJob job) {
         String from = artifact.getDataAsString("diff_from");
         String to   = artifact.getDataAsString("diff_to");
         String diff = artifact.getDataAsString("diff_diff");
@@ -515,7 +515,7 @@
     }
 
 
-    protected void setGel(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setGel(D4EArtifact artifact, WSPLGENJob job) {
         String gel = artifact.getDataAsString("scenario");
 
         logger.debug("Selected gel = '" + gel + "'");
@@ -535,7 +535,7 @@
     }
 
 
-    protected void setDist(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setDist(D4EArtifact artifact, WSPLGENJob job) {
         String dist = artifact.getDataAsString("profile_distance");
 
         try {
@@ -548,7 +548,7 @@
 
 
     protected void setLine(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         FacetCreator facetCreator,
         File         dir,
         WSPLGENJob   job
@@ -643,7 +643,7 @@
 
 
     protected void setUserShape(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         FacetCreator facetCreator,
         File         dir,
         WSPLGENJob   job
@@ -764,7 +764,7 @@
     }
 
 
-    protected void setAxis(FLYSArtifact artifact, File dir, WSPLGENJob job) {
+    protected void setAxis(D4EArtifact artifact, File dir, WSPLGENJob job) {
         String river = artifact.getDataAsString("river");
         String srid    = RiverUtils.getRiverDGMSrid(river);
         String srs     = "EPSG:" + srid;
@@ -810,7 +810,7 @@
     }
 
 
-    protected void setPro(FLYSArtifact artifact, File dir, WSPLGENJob job) {
+    protected void setPro(D4EArtifact artifact, File dir, WSPLGENJob job) {
         String river = artifact.getDataAsString("river");
         String srid    = RiverUtils.getRiverDGMSrid(river);
         String srs     = "EPSG:" + srid;
@@ -854,7 +854,7 @@
 
 
     protected void setDgm(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         WSPLGENJob job,
         CallContext context
     ) {
@@ -886,7 +886,7 @@
     }
 
 
-    protected void setArea(FLYSArtifact artifact, File dir, WSPLGENJob job) {
+    protected void setArea(D4EArtifact artifact, File dir, WSPLGENJob job) {
         String useFloodplain = artifact.getDataAsString("use_floodplain");
         if (!Boolean.valueOf(useFloodplain)) {
             logger.debug("WSPLGEN will not use floodplain.");
@@ -921,12 +921,12 @@
     }
 
 
-    protected void setOutFile(FLYSArtifact artifact, WSPLGENJob job) {
+    protected void setOutFile(D4EArtifact artifact, WSPLGENJob job) {
         job.setOutFile(WSPLGEN_OUTPUT_FILE);
     }
 
 
-    protected WQKms getWQKms(FLYSArtifact flys, CallContext cc) {
+    protected WQKms getWQKms(D4EArtifact flys, CallContext cc) {
         String   wspString = flys.getDataAsString(WSP_ARTIFACT);
         if (wspString == null) {
             logger.debug("getWQKms(): wspString == null");
@@ -941,7 +941,7 @@
         }
         catch (NumberFormatException nfe) { /* do nothing */ }
 
-        FLYSArtifact src = otherArtifact != null
+        D4EArtifact src = otherArtifact != null
             ? RiverUtils.getArtifact(otherArtifact, cc)
             : flys;
 
@@ -963,7 +963,7 @@
 
 
     protected void setWsp(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         CallContext  context,
         File         dir,
         WSPLGENJob   job)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -60,7 +60,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -221,7 +221,7 @@
 
 
     protected String buildFacetName(
-        FLYSArtifact     flys,
+        D4EArtifact     flys,
         CallContext      cc,
         FlowVelocityData data,
         String           resourceId
@@ -239,7 +239,7 @@
 
 
     protected String buildMainChannelName(
-        FLYSArtifact     flys,
+        D4EArtifact     flys,
         CallContext      cc,
         FlowVelocityData data
     ) {
@@ -248,7 +248,7 @@
 
 
     protected String buildTotalChannelName(
-        FLYSArtifact     flys,
+        D4EArtifact     flys,
         CallContext      cc,
         FlowVelocityData data
     ) {
@@ -257,7 +257,7 @@
 
 
     protected String buildDischargeName(
-        FLYSArtifact     flys,
+        D4EArtifact     flys,
         CallContext      cc,
         FlowVelocityData data
     ) {
@@ -265,7 +265,7 @@
     }
 
     protected String buildTauName(
-        FLYSArtifact     flys,
+        D4EArtifact     flys,
         CallContext      cc,
         FlowVelocityData data
     ) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 
 import org.dive4elements.river.artifacts.ChartArtifact;
 import org.dive4elements.river.artifacts.GaugeDischargeArtifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.GaugeDischargeFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -86,7 +86,7 @@
      */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
@@ -110,7 +110,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 import org.hibernate.Session;
 import org.hibernate.type.StandardBasicTypes;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.backend.SessionHolder;
 import org.dive4elements.river.model.Gauge;
 import org.dive4elements.river.utils.RiverUtils;
@@ -33,7 +33,7 @@
 
 
     /** Get 'min' and 'max'times of gauge time intervals. */
-    protected long[] getLowerUpper(FLYSArtifact flys) {
+    protected long[] getLowerUpper(D4EArtifact flys) {
         Gauge gauge = RiverUtils.getReferenceGauge(flys);
 
         if (gauge == null) {
@@ -74,7 +74,7 @@
 
 
     @Override
-    protected Object getLower(FLYSArtifact flys) {
+    protected Object getLower(D4EArtifact flys) {
         long[] lowerUpper = getLowerUpper(flys);
 
         return lowerUpper != null ? lowerUpper[0] : 0;
@@ -82,7 +82,7 @@
 
 
     @Override
-    protected Object getUpper(FLYSArtifact flys) {
+    protected Object getUpper(D4EArtifact flys) {
         long[] lowerUpper = getLowerUpper(flys);
 
         return lowerUpper != null ? lowerUpper[1] : 0;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -40,7 +40,7 @@
 
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.MapAccess;
 
@@ -74,7 +74,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -97,7 +97,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String hash,
         CallContext context,
         List<Facet> facets,
@@ -277,7 +277,7 @@
     }
 
     private void createMapfile(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         File artifactDir,
         String name,
         String hwsShapefile,
@@ -317,7 +317,7 @@
         super.endOfLife(artifact, callContext);
         logger.info("ScenarioSelect.endOfLife: " + artifact.identifier());
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         removeDirectory(flys);
     }
 
@@ -327,7 +327,7 @@
      * results of WSPLGEN are stored. Should be called in endOfLife().
      */
     // FIXME: I've seen this code somewhere else...
-    protected void removeDirectory(FLYSArtifact artifact) {
+    protected void removeDirectory(D4EArtifact artifact) {
         String shapePath = RiverUtils.getXPathString(
             RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
 
@@ -353,7 +353,7 @@
      *
      * @return the directory for WSPLEN data.
      */
-    protected File getDirectory(FLYSArtifact artifact) {
+    protected File getDirectory(D4EArtifact artifact) {
         String shapePath = RiverUtils.getXPathString(
             RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSDatacageState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class HWSDatacageState
@@ -31,7 +31,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -63,7 +63,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         String hws = flys.getDataAsString("uesk.hws");
         logger.debug("hws: " + hws);
         return true;
@@ -73,14 +73,14 @@
     /**
      * Returns the DGM specified in the parameters of <i>flys</i>.
      *
-     * @param flys The FLYSArtifact that knows the ID of a DGM.
+     * @param flys The D4EArtifact that knows the ID of a DGM.
      *
-     * @throws IllegalArgumentException If the FLYSArtifact doesn't know the ID
+     * @throws IllegalArgumentException If the D4EArtifact doesn't know the ID
      * of a DGM.
      *
-     * @return the DGM specified by FLYSArtifact's parameters.
+     * @return the DGM specified by D4EArtifact's parameters.
      */
-    public static String getHWS(FLYSArtifact flys)
+    public static String getHWS(D4EArtifact flys)
     throws IllegalArgumentException
     {
         String hws= flys.getDataAsString("uesk.hws");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess;
 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess.EvaluationMode;
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public Object computeAdvance(FLYSArtifact artifact, String hash,
+    public Object computeAdvance(D4EArtifact artifact, String hash,
         CallContext context, List<Facet> facets, Object old) {
         logger.debug("HistoricalDischargeComputeState.computeAdvance");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/InputDoubleState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/InputDoubleState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -28,13 +28,13 @@
 
 
     @Override
-    protected Object getLower(FLYSArtifact flys) {
+    protected Object getLower(D4EArtifact flys) {
         return 0;
     }
 
 
     @Override
-    protected Object getUpper(FLYSArtifact flys) {
+    protected Object getUpper(D4EArtifact flys) {
         return 0;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/IntRangeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/IntRangeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -28,13 +28,13 @@
 
 
     @Override
-    protected Object getLower(FLYSArtifact flys) {
+    protected Object getLower(D4EArtifact flys) {
         return 0;
     }
 
 
     @Override
-    protected Object getUpper(FLYSArtifact flys) {
+    protected Object getUpper(D4EArtifact flys) {
         return 0;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationDistanceSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 
@@ -57,7 +57,7 @@
     {
         logger.debug("LocationDistanceSelect.validate");
 
-        FLYSArtifact flys = (FLYSArtifact)artifact;
+        D4EArtifact flys = (D4EArtifact)artifact;
         StateData mode = getData(flys, MODE);
         String mValue = mode != null ? (String)mode.getValue() : null;
         if (mValue != null) {
@@ -73,7 +73,7 @@
 
 
     /** Validate selected locations. */
-    protected boolean validateLocations(FLYSArtifact flys)
+    protected boolean validateLocations(D4EArtifact flys)
     throws    IllegalArgumentException
     {
         StateData dValues = getData(flys, LOCATIONS);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/LocationSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 
 import org.dive4elements.artifactdatabase.data.StateData;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -92,7 +92,7 @@
     {
         logger.debug("LocationSelect.validate");
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         StateData    data = getData(flys, LOCATIONS);
 
         String locationStr = data != null
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.ManualPointsArtifact;
 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -59,7 +59,7 @@
      * @return null.
      */
     public Object compute(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallMeta     meta,
         List<Facet>  facets
@@ -124,7 +124,7 @@
     /** Call compute. */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
@@ -137,7 +137,7 @@
     /** Call compute. */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String hash,
         CallContext context,
         List<Facet> facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedHeightAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -36,7 +36,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 
 import org.dive4elements.artifactdatabase.ProtocolUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -40,7 +40,7 @@
         CallContext    context,
         Element        select
     ) {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         select.setAttributeNS(
             ArtifactNamespaceContext.NAMESPACE_URI,
@@ -112,7 +112,7 @@
      * by the user is returned as string. Otherwise, the absolute minimum and
      * maximum are returned.
      *
-     * @param artifact The FLYSArtifact.
+     * @param artifact The D4EArtifact.
      * @param name The name of the parameter.
      *
      * @return a string array [min,max] that contains the minimum and maximum
@@ -134,13 +134,13 @@
      * Returns a string array with minimum and maximum inserted by the user as
      * [min,max].
      *
-     * @param artifact The FLYSArtifact that stores the parameter.
+     * @param artifact The D4EArtifact that stores the parameter.
      * @param name The name of the parameter for raw min/max value string.
      *
      * @return a string array [min,max].
      */
     protected String[] getMinMaxByParameter(Artifact artifact, String name) {
-        FLYSArtifact flys     = (FLYSArtifact) artifact;
+        D4EArtifact flys     = (D4EArtifact) artifact;
         String       rawValue = flys.getDataAsString(name);
 
         if (rawValue == null) {
@@ -157,13 +157,13 @@
     /**
      * Returns a string array with absolute minimum and maximum as [min,max].
      *
-     * @param artifact The FLYSArtifact (not used in this implementation).
+     * @param artifact The D4EArtifact (not used in this implementation).
      * @param name The parameter name (not used in this implementation).
      *
      * @return a string array [min,max].
      */
     protected String[] getMinMaxDefaults(Artifact artifact, String name) {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         Object lower = getLower(flys);
         Object upper = getUpper(flys);
@@ -172,9 +172,9 @@
     }
 
 
-    protected abstract Object getLower(FLYSArtifact flys);
+    protected abstract Object getLower(D4EArtifact flys);
 
-    protected abstract Object getUpper(FLYSArtifact flys);
+    protected abstract Object getUpper(D4EArtifact flys);
 
     protected abstract String getType();
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 import org.dive4elements.artifacts.common.model.KVP;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.utils.RiverUtils;
 
@@ -61,7 +61,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiStringArrayState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiStringArrayState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 import org.dive4elements.artifacts.common.model.KVP;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 
 
@@ -59,7 +59,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/QSectorSingleState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/QSectorSingleState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.QSectorArtifact;
 
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -52,7 +52,7 @@
      * @return null.
      */
     public Object compute(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallMeta     meta,
         List<Facet>  facets
@@ -74,7 +74,7 @@
     /** Call compute. */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
@@ -87,7 +87,7 @@
     /** Call compute. */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String hash,
         CallContext context,
         List<Facet> facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RangeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
 
@@ -80,7 +80,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         try {
             RangeAccess rangeAccess = new RangeAccess(flys, null);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -41,7 +41,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceGaugeState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceGaugeState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 import org.dive4elements.river.model.Gauge;
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 
@@ -40,7 +40,7 @@
         String      name,
         CallContext context)
     {
-        River       river   = RiverUtils.getRiver((FLYSArtifact) artifact);
+        River       river   = RiverUtils.getRiver((D4EArtifact) artifact);
         List<Gauge> gauges  = river.getGauges();
         Collections.sort(gauges);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RiverSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RiverSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -25,7 +25,7 @@
 
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.RiverFactory;
 import org.dive4elements.river.artifacts.resources.Resources;
 
@@ -148,7 +148,7 @@
     {
         logger.debug("RiverSelect.validate");
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData dRiver = getData(flys, "river");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifacts.common.utils.StringUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.SQRelationAccess;
 
@@ -134,7 +134,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ScenarioSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ScenarioSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 import org.dive4elements.artifacts.common.utils.FileTools;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.utils.RiverUtils;
 
@@ -75,7 +75,7 @@
             return scenarios;
         }
         else {
-            FLYSArtifact flys = (FLYSArtifact) artifact;
+            D4EArtifact flys = (D4EArtifact) artifact;
             String       data = flys.getDataAsString(name);
 
             return new Element[] { createItem(
@@ -113,7 +113,7 @@
         super.endOfLife(artifact, callContext);
         logger.info("ScenarioSelect.endOfLife: " + artifact.identifier());
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         removeDirectory(flys);
     }
 
@@ -123,7 +123,7 @@
      * results of WSPLGEN are stored. Should be called in endOfLife().
      */
     // FIXME: I've seen this code somewhere else...
-    protected void removeDirectory(FLYSArtifact artifact) {
+    protected void removeDirectory(D4EArtifact artifact) {
         String shapePath = RiverUtils.getXPathString(
             RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,7 +22,7 @@
 import org.dive4elements.river.model.BedHeightSingle;
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 
@@ -59,9 +59,9 @@
                 "Invalid parameter for state: '" + parameterName + "'");
         }
 
-        River river = RiverUtils.getRiver((FLYSArtifact) artifact);
-        double lo = ((FLYSArtifact) artifact).getDataAsDouble("ld_from");
-        double hi = ((FLYSArtifact) artifact).getDataAsDouble("ld_to");
+        River river = RiverUtils.getRiver((D4EArtifact) artifact);
+        double lo = ((D4EArtifact) artifact).getDataAsDouble("ld_from");
+        double hi = ((D4EArtifact) artifact).getDataAsDouble("ld_to");
 
         double kmLo = Math.min(lo, hi);
         double kmHi = Math.max(lo, hi);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.HYKArtifact;
 
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -88,7 +88,7 @@
      */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -105,7 +105,7 @@
      */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.artifactdatabase.state.DefaultOutput;
 import org.dive4elements.artifactdatabase.state.Output;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
@@ -76,7 +76,7 @@
      * Do nothing (override to include your logic).
      * @param facets List of facets (to add to).
      */
-    public Object staticCompute(List<Facet> facets, FLYSArtifact artifact) {
+    public Object staticCompute(List<Facet> facets, D4EArtifact artifact) {
         return staticCompute(facets);
     }
 
@@ -88,7 +88,7 @@
     /** Call staticCompute to allow easy adjustments. */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -101,7 +101,7 @@
     /** Call staticCompute to allow easy adjustments. */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -114,7 +114,7 @@
     /** Call staticCompute to allow easy adjustments. */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticWQKmsState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.StaticWQKmsArtifact;
 
 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
@@ -123,7 +123,7 @@
      */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -140,7 +140,7 @@
      */
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/UserRGDState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/UserRGDState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 public class UserRGDState
@@ -25,7 +25,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.Artifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.StaticWKmsArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.ChartArtifact;
@@ -61,7 +61,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData data = flys.getData("diffids");
 
@@ -122,7 +122,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,7 +22,7 @@
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.Config;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.map.WMSLayerFacet;
 import org.dive4elements.river.artifacts.resources.Resources;
 
@@ -63,7 +63,7 @@
 
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
@@ -114,7 +114,7 @@
     }
 
 
-    protected void initVariables(FLYSArtifact artifact) {
+    protected void initVariables(D4EArtifact artifact) {
         String river = artifact.getDataAsString("river");
 
         variables = new HashMap<String, String>();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java	Sun Apr 28 15:23:01 2013 +0200
@@ -32,7 +32,7 @@
 import org.dive4elements.river.model.River;
 import org.dive4elements.river.model.Wst;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.RangeWithValues;
 import org.dive4elements.river.artifacts.model.WstFactory;
@@ -135,7 +135,7 @@
     {
         logger.debug("WQAdapted.createValueItems");
 
-        FLYSArtifact flysArtifact = (FLYSArtifact) artifact;
+        D4EArtifact flysArtifact = (D4EArtifact) artifact;
 
         RangeAccess rangeAccess = new RangeAccess(flysArtifact, context);
         double[]    dist   = rangeAccess.getKmRange();
@@ -303,7 +303,7 @@
     {
         logger.debug("WQAdapted.validate");
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         StateData    data = getData(flys, FIELD_WQ_MODE);
 
         String mode = data != null ? (String) data.getValue() : null;
@@ -327,7 +327,7 @@
     throws IllegalArgumentException
     {
         logger.debug("WQAdapted.validateW");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values"));
 
@@ -335,7 +335,7 @@
             throw new IllegalArgumentException("error_missing_wq_data");
         }
 
-        List<Gauge> gauges = RiverUtils.getGauges((FLYSArtifact) artifact);
+        List<Gauge> gauges = RiverUtils.getGauges((D4EArtifact) artifact);
 
         for (Gauge gauge: gauges) {
             Range range  = gauge.getRange();
@@ -357,7 +357,7 @@
     throws IllegalArgumentException
     {
         logger.debug("WQAdapted.validateQ");
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         RangeWithValues[] rwvs = extractInput(getData(flys, "wq_values"));
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -29,7 +29,7 @@
 import org.dive4elements.river.model.River;
 import org.dive4elements.river.model.Wst;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.artifacts.model.WstFactory;
@@ -87,7 +87,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -393,7 +393,7 @@
      * max values could be determined, this method will return
      * [Double.MIN_VALUE, Double.MAX_VALUE].
      *
-     * @param artifact The FLYSArtifact.
+     * @param artifact The D4EArtifact.
      *
      * @return the min and max W values for the current gauge.
      */
@@ -415,7 +415,7 @@
      * max values could be determined, this method will return
      * [Double.MIN_VALUE, Double.MAX_VALUE].
      *
-     * @param artifact The FLYSArtifact.
+     * @param artifact The D4EArtifact.
      *
      * @return the min and max W values.
      */
@@ -449,7 +449,7 @@
      * max values could be determined, this method will return
      * [Double.MIN_VALUE, Double.MAX_VALUE].
      *
-     * @param artifact The FLYSArtifact.
+     * @param artifact The D4EArtifact.
      *
      * @return the min and max Q values for the current gauge.
      */
@@ -477,7 +477,7 @@
      * Determines the min and max Q value for the current kilometer range. If no
      * min and max values could be determined, this method will return
      *
-     * @param artifact The FLYSArtifact.
+     * @param artifact The D4EArtifact.
      *
      * @return the min and max Q values for the current kilometer range.
      */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelGroundDifferences.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.apache.log4j.Logger;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
@@ -134,7 +134,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData dFrom = getData(flys, getLowerField());
         StateData dTo   = getData(flys, getUpperField());
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.ReportFacet;
@@ -45,7 +45,7 @@
 
     @Override
     public Object computeInit(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         Object       context,
         CallMeta     meta,
@@ -126,7 +126,7 @@
      */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -141,7 +141,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,7 +22,7 @@
 
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.resources.Resources;
 
@@ -57,7 +57,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -70,7 +70,7 @@
 
     /**
      * Create elements for document (prepopulated with data, if any).
-     * @param artifact FLYSArtifact to get data from.
+     * @param artifact D4EArtifact to get data from.
      * @param name DataName, expceted to be "diffids".
      */
     @Override
@@ -85,7 +85,7 @@
             Element item  = ProtocolUtils.createArtNode(cr, "item", null, null);
             Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
             Element value = ProtocolUtils.createArtNode(cr, "value", null, null);
-            FLYSArtifact flys = (FLYSArtifact) artifact;
+            D4EArtifact flys = (D4EArtifact) artifact;
             String s = flys.getDataAsString("diffids");
             value.setTextContent(s);
             item.appendChild(label);
@@ -101,7 +101,7 @@
      */
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.WQKms;
 import org.dive4elements.river.artifacts.model.extreme.ExtremeResult;
@@ -56,7 +56,7 @@
      */
     @Override
     public StateData transform(
-        FLYSArtifact flys,
+        D4EArtifact flys,
         CallContext  cc,
         StateData    stateData,
         String       name,
@@ -75,7 +75,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
 
         StateData data = flys.getData("wsp");
 
@@ -89,7 +89,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
@@ -123,7 +123,7 @@
     public static String[] getLabels(CallContext cc, String value) {
         String[] parts = value.split(SPLIT_CHAR);
 
-        FLYSArtifact artifact = RiverUtils.getArtifact(parts[0], cc);
+        D4EArtifact artifact = RiverUtils.getArtifact(parts[0], cc);
 
         CalculationResult rawData = (CalculationResult) artifact.compute(
             cc,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.ChartArtifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
@@ -125,7 +125,7 @@
      */
     @Override
     public Object computeFeed(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -144,7 +144,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.ExtremeAccess;
 
@@ -51,7 +51,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java	Sun Apr 28 15:23:01 2013 +0200
@@ -35,7 +35,7 @@
 import org.dive4elements.river.artifacts.model.Range;
 import org.dive4elements.river.model.River;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.RangeWithValues;
 import org.dive4elements.river.artifacts.states.DefaultState;
@@ -84,7 +84,7 @@
     {
         logger.debug("ExtremeQInput.createItems: " + name);
 
-        FLYSArtifact flysArtifact = (FLYSArtifact) artifact;
+        D4EArtifact flysArtifact = (D4EArtifact) artifact;
 
         ExtremeAccess access = new ExtremeAccess(flysArtifact, context);
         River river = RiverFactory.getRiver(access.getRiver());
@@ -181,7 +181,7 @@
     {
         logger.debug("ExtremeQInput.validate");
 
-        FLYSArtifact flys = (FLYSArtifact) artifact;
+        D4EArtifact flys = (D4EArtifact) artifact;
         logger.debug("ExtremeQInput: " + getData(flys, "ranges"));
 
         /*
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/EventSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/EventSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifacts.CallContext;
 
 import org.dive4elements.river.artifacts.states.DefaultState;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.utils.RiverUtils;
 
 import org.dive4elements.river.artifacts.model.FixingsOverview;
@@ -50,7 +50,7 @@
 
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.artifactdatabase.state.FacetActivity;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -123,7 +123,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FixRealizingAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
@@ -61,7 +61,7 @@
 
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/LocationSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 
 import org.dive4elements.river.utils.RiverUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.states.RangeState;
 
 
@@ -46,7 +46,7 @@
 
     @Override
     protected double[] getMinMax(Artifact artifact) {
-        FLYSArtifact flysArtifact = (FLYSArtifact) artifact;
+        D4EArtifact flysArtifact = (D4EArtifact) artifact;
         return RiverUtils.getRiverMinMax(flysArtifact);
     }
 
@@ -56,7 +56,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        ((FLYSArtifact) artifact).addStringData("ld_mode", "distance");
+        ((D4EArtifact) artifact).addStringData("ld_mode", "distance");
         return super.validate(artifact);
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedQualityAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -56,7 +56,7 @@
     public static final String I18N_FACET_BEDLOAD_DIAMETER = "facet.bedquality.bedload.diameter";
 
     @Override
-    public Object computeAdvance(FLYSArtifact artifact, String hash,
+    public Object computeAdvance(D4EArtifact artifact, String hash,
         CallContext context, List<Facet> facets, Object old) {
         logger.debug("BedQualityState.computeAdvance");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferenceSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedHeightAccess;
 import org.dive4elements.river.artifacts.states.DefaultState;
 import org.dive4elements.river.utils.StringUtil;
@@ -45,7 +45,7 @@
      */
     @Override
     public Object computeAdvance(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         String       hash,
         CallContext  context,
         List<Facet>  facets,
@@ -63,7 +63,7 @@
         CallContext             context)
     {
         Element[] elements = new Element[1];
-        BedHeightAccess bha = new BedHeightAccess((FLYSArtifact)artifact, context);
+        BedHeightAccess bha = new BedHeightAccess((D4EArtifact)artifact, context);
         String time = bha.getYearEpoch();
         elements[0] = createItem(
             ec,
@@ -77,7 +77,7 @@
      */
     @Override
     protected Element createStaticData(
-        FLYSArtifact   flys,
+        D4EArtifact   flys,
         ElementCreator creator,
         CallContext    cc,
         String         name,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.BedDifferencesAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -63,7 +63,7 @@
     }
 
     @Override
-    public Object computeAdvance(FLYSArtifact artifact, String hash,
+    public Object computeAdvance(D4EArtifact artifact, String hash,
         CallContext context, List<Facet> facets, Object old) {
         logger.debug("BedQualityState.computeAdvance");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadCalculate.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.SedimentLoadAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
@@ -49,7 +49,7 @@
     public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total";
 
     @Override
-    public Object computeAdvance(FLYSArtifact artifact, String hash,
+    public Object computeAdvance(D4EArtifact artifact, String hash,
         CallContext context, List<Facet> facets, Object old) {
         logger.debug("SedimentLoadCalculate.computeAdvance");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifacts.Artifact;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.SedimentLoadAccess;
 import org.dive4elements.river.artifacts.states.DefaultState;
@@ -44,7 +44,7 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null);
+        SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact, null);
 
         // Second year should be later than first.
         if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0])
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState;
 
@@ -43,7 +43,7 @@
     {
         CallMeta meta = context.getMeta();
         Element[] elements;
-        if (((FLYSArtifact)artifact).getCurrentStateId()
+        if (((D4EArtifact)artifact).getCurrentStateId()
             .equals("state.minfo.sediment.load.year_epoch")
         ) {
             elements = new Element[3];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQStaticState.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQStaticState.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 import org.apache.log4j.Logger;
 
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.StaticSQRelationAccess;
 import org.dive4elements.river.artifacts.model.sq.StaticSQContainer;
 import org.dive4elements.river.artifacts.model.sq.StaticSQFactory;
@@ -40,7 +40,7 @@
     @Override
     public Object staticCompute(
         List<Facet> facets,
-        FLYSArtifact artifact
+        D4EArtifact artifact
     ) {
         StaticSQRelationAccess access = new StaticSQRelationAccess(artifact);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/ValueCompareTransition.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/transitions/ValueCompareTransition.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 
 /**
@@ -99,7 +99,7 @@
     public boolean isValid(Artifact artifact, State a, State b) {
         log.debug("ValueCompareTransition.isValid");
 
-        FLYSArtifact flysArtifact = (FLYSArtifact) artifact;
+        D4EArtifact flysArtifact = (D4EArtifact) artifact;
 
         StateData dataObj = flysArtifact.getData(dataname);
         String    dataVal = dataObj != null ? (String) dataObj.getValue() : "";
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,7 +22,7 @@
 import org.dive4elements.artifactdatabase.state.FacetActivity;
 import org.dive4elements.artifactdatabase.state.Output;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.ManagedFacet;
 
 /**
@@ -218,8 +218,8 @@
         // With each genuinely new Facet, figure out whether it comes to live
         // in/activate.
         for (ManagedFacet newMF: genuinelyNewFacets) {
-            FLYSArtifact flys =
-                (FLYSArtifact)db.getRawArtifact(newMF.getArtifact());
+            D4EArtifact flys =
+                (D4EArtifact)db.getRawArtifact(newMF.getArtifact());
 
             boolean isActive = registry.isInitialActive(
                 flys.getName(), flys, newMF, outputName);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java	Sun Apr 28 15:23:01 2013 +0200
@@ -0,0 +1,633 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3) 
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details. 
+ */
+
+package org.dive4elements.river.collections;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.xpath.XPathConstants;
+
+import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.dive4elements.artifactdatabase.Backend;
+import org.dive4elements.artifactdatabase.Backend.PersistentArtifact;
+import org.dive4elements.artifactdatabase.DefaultArtifactCollection;
+import org.dive4elements.artifactdatabase.state.Facet;
+import org.dive4elements.artifactdatabase.state.Output;
+import org.dive4elements.artifactdatabase.state.Settings;
+import org.dive4elements.artifactdatabase.state.StateEngine;
+import org.dive4elements.artifacts.Artifact;
+import org.dive4elements.artifacts.ArtifactDatabase;
+import org.dive4elements.artifacts.ArtifactDatabaseException;
+import org.dive4elements.artifacts.ArtifactNamespaceContext;
+import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.artifacts.CallMeta;
+import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.context.RiverContext;
+import org.dive4elements.river.exports.OutGenerator;
+import org.dive4elements.river.exports.OutputHelper;
+import org.dive4elements.river.utils.RiverUtils;
+
+/**
+ * Collection of artifacts, can do outs, describe.
+ * Lots of stuff done in AttributeParser and AttributeWriter.
+ * Critical out and facet merging.
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class D4EArtifactCollection extends DefaultArtifactCollection {
+    /** The logger used in this class. */
+    private static Logger log = Logger.getLogger(D4EArtifactCollection.class);
+
+    /** Constant XPath that points to the outputmodes of an artifact. */
+    public static final String XPATH_ARTIFACT_OUTPUTMODES =
+        "/art:result/art:outputmodes";
+
+    public static final String XPATH_ARTIFACT_STATE_DATA =
+        "/art:result/art:ui/art:static/art:state/art:data";
+
+    public static final String XPATH_COLLECTION_ITEMS =
+        "/art:result/art:artifact-collection/art:collection-item";
+
+    public static final String XPATH_OUT_NAME = "/art:action/@art:name";
+
+    public static final String XPATH_OUT_TYPE = "/art:action/@art:type";
+
+    /** Xpath to master artifacts uuid. */
+    public static final String XPATH_MASTER_UUID =
+        "/art:artifact-collection/art:artifact/@art:uuid";
+
+    public static final String XPATH_LOADED_RECOMMENDATIONS =
+        "/art:attribute/art:loaded-recommendations";
+
+
+    /**
+     * Create and return description Document for this collection.
+     */
+    @Override
+    public Document describe(CallContext context) {
+        log.debug("D4EArtifactCollection.describe: " + identifier);
+
+        CollectionDescriptionHelper helper = new CollectionDescriptionHelper(
+            getName(), identifier(), getCreationTime(), getTTL(),
+            context);
+
+        ArtifactDatabase db = context.getDatabase();
+
+        Document        oldAttrs = getAttribute();
+        AttributeParser parser   = new AttributeParser(oldAttrs);
+
+        try {
+            String[] aUUIDs  = getArtifactUUIDs(context);
+
+            oldAttrs = removeAttributes(oldAttrs, context);
+            parser   = new AttributeParser(oldAttrs);
+
+            CollectionAttribute newAttr = mergeAttributes(
+                db, context, parser, aUUIDs);
+
+            if (checkOutputSettings(newAttr, context)) {
+                saveCollectionAttribute(db, context, newAttr);
+            }
+
+            helper.setAttribute(newAttr);
+
+            if (aUUIDs != null) {
+                for (String uuid: aUUIDs) {
+                    helper.addArtifact(uuid);
+                }
+            }
+        }
+        catch (ArtifactDatabaseException ade) {
+            log.error("Error while merging attribute documents.", ade);
+
+            helper.setAttribute(parser.getCollectionAttribute());
+        }
+
+        return helper.toXML();
+    }
+
+
+    /**
+     * Merge the current art:outputs nodes with the the outputs provided by the
+     * artifacts in the Collection.
+     *
+     * @param uuids Artifact uuids.
+     */
+    protected CollectionAttribute mergeAttributes(
+        ArtifactDatabase db,
+        CallContext      context,
+        AttributeParser  oldParser,
+        String[]         uuids
+    ) {
+        CollectionAttribute cAttribute =
+            buildOutAttributes(db, context, oldParser, uuids);
+
+        if (cAttribute == null) {
+            log.warn("mergeAttributes: cAttribute == null");
+            return null;
+        }
+
+        cAttribute.setLoadedRecommendations(
+            getLoadedRecommendations(oldParser.getAttributeDocument()));
+
+        saveCollectionAttribute(db, context, cAttribute);
+
+        return cAttribute;
+    }
+
+
+    protected Document removeAttributes(Document attrs, CallContext context) {
+        Node outs = (Node) XMLUtils.xpath(
+            attrs,
+            "/art:attribute/art:outputs",
+            XPathConstants.NODE,
+            ArtifactNamespaceContext.INSTANCE);
+
+        NodeList nodes = (NodeList) XMLUtils.xpath(
+            attrs,
+            "/art:attribute/art:outputs/art:output",
+            XPathConstants.NODESET,
+            ArtifactNamespaceContext.INSTANCE);
+
+        if (nodes != null) {
+            for (int i = 0; i < nodes.getLength(); i++) {
+                Element e = (Element)nodes.item(i);
+                if(!outputExists(e.getAttribute("name"), context)) {
+                    outs.removeChild(e);
+                }
+            }
+        }
+        return attrs;
+    }
+
+
+    /**
+     * True if current MasterArtifact has given output.
+     * @param name Name of the output of interest.
+     * @param context current context
+     * @return true if current master artifact has given output.
+     */
+    protected boolean outputExists(String name, CallContext context) {
+        D4EArtifact master = getMasterArtifact(context);
+        List<Output> outList = master.getOutputs(context);
+
+        for (Output o : outList) {
+            if (name.equals(o.getName())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * @param db The ArtifactDatabase which is required to save the attribute
+     * into.
+     * @param attribute The CollectionAttribute that should be stored in the
+     * database.
+     *
+     * @return true, if the transaction was successful, otherwise false.
+     */
+    protected boolean saveCollectionAttribute(
+        ArtifactDatabase    db,
+        CallContext         context,
+        CollectionAttribute attribute
+    ) {
+        log.info("Save new CollectionAttribute into database.");
+
+        Document doc = attribute.toXML();
+
+        try {
+            // Save the merged document into database.
+            db.setCollectionAttribute(identifier(), context.getMeta(), doc);
+
+            log.info("Saving CollectionAttribute was successful.");
+
+            return true;
+        }
+        catch (ArtifactDatabaseException adb) {
+            log.error(adb, adb);
+        }
+
+        return false;
+    }
+
+
+    /**
+     * Merge the recommendations which have already been loaded from the old
+     * attribute document into the new attribute document. This is necessary,
+     * because mergeAttributes() only merges the art:outputs nodes - all
+     * other nodes are skipped.
+     */
+    protected Node getLoadedRecommendations(Document oldAttrs) {
+        Element loadedRecoms = (Element) XMLUtils.xpath(
+            oldAttrs,
+            XPATH_LOADED_RECOMMENDATIONS,
+            XPathConstants.NODE,
+            ArtifactNamespaceContext.INSTANCE);
+
+        return loadedRecoms;
+    }
+
+
+    /**
+     * Evaluates the Output settings. If an Output has no Settings set, the
+     * relevant OutGenerator is used to initialize a default Settings object.
+     *
+     * @param attribute The CollectionAttribute.
+     * @param cc The CallContext.
+     *
+     * @return true, if the CollectionAttribute was modified, otherwise false.
+     */
+    protected boolean checkOutputSettings(
+        CollectionAttribute attribute,
+        CallContext         cc
+    ) {
+        boolean modified = false;
+
+        Map<String, Output> outputMap = attribute != null
+            ? attribute.getOutputs()
+            : null;
+
+        if (outputMap == null || outputMap.isEmpty()) {
+            log.debug("No Output Settings check necessary.");
+            return modified;
+        }
+
+
+        for (Map.Entry<String, Output> entry: outputMap.entrySet()) {
+            String outName = entry.getKey();
+            Output output  = entry.getValue();
+
+            if (outName.equals("sq_overview")) {
+                continue;
+            }
+            Settings settings = output.getSettings();
+
+            if (settings == null) {
+                log.debug("No Settings set for Output '" + outName + "'.");
+                output.setSettings(
+                    createInitialOutputSettings(cc, attribute, outName));
+
+                modified = true;
+            }
+        }
+
+        return modified;
+    }
+
+
+    /**
+     * This method uses the the OutGenerator for the specified Output
+     * <i>out</i> to create an initial Settings object.
+     *
+     * @param cc The CallContext object.
+     * @param attr The CollectionAttribute.
+     * @param out The name of the output.
+     *
+     * @return a default Settings object for the specified Output.
+     */
+    protected Settings createInitialOutputSettings(
+        CallContext         cc,
+        CollectionAttribute attr,
+        String              out
+    ) {
+        OutGenerator outGen = RiverContext.getOutGenerator(cc, out, null);
+
+        if (outGen == null) {
+            return null;
+        }
+
+        // XXX NOTE: the outGen is not able to process its generate() operation,
+        // because it has no OutputStream set!
+        outGen.init(XMLUtils.newDocument(), null, cc);
+        prepareMasterArtifact(outGen, cc);
+
+        try {
+            Document outAttr = getAttribute(cc, attr, out);
+            OutputHelper helper = new OutputHelper(identifier());
+            helper.doOut(outGen, out, out, outAttr, cc);
+        }
+        catch (ArtifactDatabaseException adbe) {
+            log.error(adbe, adbe);
+        }
+        catch (IOException ioe) {
+            log.error(ioe, ioe);
+        }
+
+        return outGen.getSettings();
+    }
+
+
+    @Override
+    public void out(
+        String       type,
+        Document     format,
+        OutputStream out,
+        CallContext  context)
+    throws IOException
+    {
+        boolean debug = log.isDebugEnabled();
+
+        long reqBegin = System.currentTimeMillis();
+
+        if (debug) {
+            log.debug(XMLUtils.toString(format));
+            log.debug("D4EArtifactCollection.out");
+        }
+
+        String name = XMLUtils.xpathString(
+            format, XPATH_OUT_NAME, ArtifactNamespaceContext.INSTANCE);
+
+        String subtype = XMLUtils.xpathString(
+            format, XPATH_OUT_TYPE, ArtifactNamespaceContext.INSTANCE);
+
+        if (debug) {
+            log.debug("-> Output name = " + name);
+            log.debug("-> Output type = " + type);
+            log.debug("-> Output subtype = " + subtype);
+        }
+
+        OutGenerator generator = null;
+        if (type != null
+             && type.length() > 0
+             && type.indexOf("chartinfo") > 0)
+        {
+            generator = RiverContext.getOutGenerator(context, type, subtype);
+        }
+        else {
+            generator = RiverContext.getOutGenerator(context, name, subtype);
+        }
+
+        if (generator == null) {
+            log.error("There is no generator specified for output: " + name);
+            // TODO Throw an exception.
+
+            return;
+        }
+
+        Document        oldAttrs  = getAttribute();
+        AttributeParser parser    = new AttributeParser(oldAttrs);
+        CollectionAttribute cAttr = parser.getCollectionAttribute();
+
+        Output output = cAttr.getOutput(name);
+        Settings settings = null;
+        if (output != null) {
+            settings = output.getSettings();
+
+            if (debug) {
+                List<Facet> facets = output.getFacets();
+                for(Facet facet: facets) {
+                    log.debug("  -- Facet " + facet.getName());
+                }
+            }
+        }
+
+        generator.init(format, out, context);
+        generator.setSettings(settings);
+        generator.setCollection(this);
+        prepareMasterArtifact(generator, context);
+
+        try {
+            Document attr = getAttribute(context, cAttr, name);
+            OutputHelper helper = new OutputHelper(identifier());
+            if (name.equals("sq_overview")) {
+                helper.doOut(generator, name, subtype, format, context);
+            }
+            helper.doOut(generator, name, subtype, attr, context);
+            generator.generate();
+        }
+        catch (ArtifactDatabaseException adbe) {
+            log.error(adbe, adbe);
+        }
+
+        if (debug) {
+            long duration = System.currentTimeMillis() -reqBegin;
+            log.info("Processing out(" + name + ") took " + duration + " ms.");
+        }
+    }
+
+
+    /**
+     * Sets the master Artifact at the given <i>generator</i>.
+     *
+     * @param generator The generator that gets a master Artifact.
+     * @param cc The CallContext.
+     */
+    protected void prepareMasterArtifact(OutGenerator generator, CallContext cc
+    ) {
+        // Get master artifact.
+        D4EArtifact master = getMasterArtifact(cc);
+        if (master != null) {
+            log.debug("Set master Artifact to uuid: " + master.identifier());
+            generator.setMasterArtifact(master);
+        }
+        else {
+            log.warn("Could not set master artifact.");
+        }
+    }
+
+
+    /**
+     * @return masterartifact or null if exception/not found.
+     */
+    protected D4EArtifact getMasterArtifact(CallContext context)
+    {
+        try {
+            ArtifactDatabase db = context.getDatabase();
+            CallMeta callMeta   = context.getMeta();
+            Document document   = db.getCollectionsMasterArtifact(
+                identifier(), callMeta);
+
+            String masterUUID   = XMLUtils.xpathString(
+                document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE);
+            D4EArtifact masterArtifact =
+                (D4EArtifact) getArtifact(masterUUID, context);
+            return masterArtifact;
+        }
+        catch (ArtifactDatabaseException ade) {
+            log.error(ade, ade);
+        }
+        return null;
+    }
+
+
+    /**
+     * Return merged output document.
+     * @param uuids List of artifact uuids.
+     */
+    protected CollectionAttribute buildOutAttributes(
+        ArtifactDatabase db,
+        CallContext      context,
+        AttributeParser  aParser,
+        String[]         uuids)
+    {
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+        StateEngine engine = (StateEngine) flysContext.get(
+            RiverContext.STATE_ENGINE_KEY);
+
+        if (engine == null) {
+            log.error("buildOutAttributes: engine == null");
+            return null;
+        }
+
+        D4EArtifact masterArtifact = getMasterArtifact(context);
+
+        if (masterArtifact == null) {
+            log.debug("buildOutAttributes: masterArtifact == null");
+            return null;
+        }
+
+        OutputParser oParser = new OutputParser(db, context);
+
+        if (uuids != null) {
+            for (String uuid: uuids) {
+                try {
+                    oParser.parse(uuid);
+                }
+                catch (ArtifactDatabaseException ade) {
+                    log.warn(ade, ade);
+                }
+            }
+        }
+
+        aParser.parse();
+
+        AttributeWriter aWriter = new AttributeWriter(
+            db,
+            aParser.getCollectionAttribute(),
+            aParser.getOuts(),
+            aParser.getFacets(),
+            oParser.getOuts(),
+            oParser.getFacets(),
+            engine.getCompatibleFacets(masterArtifact.getStateHistoryIds())
+            );
+        return aWriter.write();
+    }
+
+
+    /**
+     * Returns the "attribute" (part of description document) for a specific
+     * output type.
+     *
+     * @param context The CallContext object.
+     * @param cAttr The CollectionAttribute.
+     * @param output The name of the desired output type.
+     *
+     * @return the attribute for the desired output type.
+     */
+    protected Document getAttribute(
+        CallContext         context,
+        CollectionAttribute cAttr,
+        String              output)
+    throws    ArtifactDatabaseException
+    {
+        Document attr = cAttr.toXML();
+
+        Map<String, String> vars = new HashMap<String, String>();
+        vars.put("output", output);
+
+        Node out = (Node) XMLUtils.xpath(
+            attr,
+            "art:attribute/art:outputs/art:output[@name=$output]",
+            XPathConstants.NODE,
+            ArtifactNamespaceContext.INSTANCE,
+            vars);
+
+
+        if (out != null) {
+            Document o = XMLUtils.newDocument();
+
+            o.appendChild(o.importNode(out, true));
+
+            return o;
+        }
+
+        return null;
+    }
+
+
+    /**
+     * This method returns the list of artifact UUIDs that this collections
+     * contains.
+     *
+     * @param context The CallContext that is necessary to get information about
+     * the ArtifactDatabase.
+     *
+     * @return a list of uuids.
+     */
+    protected String[] getArtifactUUIDs(CallContext context)
+    throws    ArtifactDatabaseException
+    {
+        log.debug("D4EArtifactCollection.getArtifactUUIDs");
+
+        ArtifactDatabase db = context.getDatabase();
+        CallMeta meta       = context.getMeta();
+
+        Document itemList = db.listCollectionArtifacts(identifier(), meta);
+        NodeList items    = (NodeList) XMLUtils.xpath(
+            itemList,
+            XPATH_COLLECTION_ITEMS,
+            XPathConstants.NODESET,
+            ArtifactNamespaceContext.INSTANCE);
+
+        if (items == null || items.getLength() == 0) {
+            log.debug("No artifacts found in this collection.");
+            return null;
+        }
+
+        int num = items.getLength();
+
+        List<String> uuids = new ArrayList<String>(num);
+
+        for (int i = 0; i < num; i++) {
+            String uuid = XMLUtils.xpathString(
+                items.item(i),
+                "@art:uuid",
+                ArtifactNamespaceContext.INSTANCE);
+
+            if (uuid != null && uuid.trim().length() != 0) {
+                uuids.add(uuid);
+            }
+        }
+
+        return uuids.toArray(new String[uuids.size()]);
+    }
+
+
+    /**
+     * Returns a concrete Artifact of this collection specified by its uuid.
+     *
+     * @param uuid The Artifact's uuid.
+     * @param context The CallContext.
+     *
+     * @return an Artifact.
+     */
+    protected Artifact getArtifact(String uuid, CallContext context)
+    throws    ArtifactDatabaseException
+    {
+        log.debug("D4EArtifactCollection.getArtifact");
+
+        Backend backend               = Backend.getInstance();
+        PersistentArtifact persistent = backend.getArtifact(uuid);
+
+        return persistent != null ? persistent.getArtifact() : null;
+    }
+
+
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/collections/FLYSArtifactCollection.java	Sun Apr 28 15:14:30 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,633 +0,0 @@
-/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU AGPL (>=v3) 
- * and comes with ABSOLUTELY NO WARRANTY! Check out the
- * documentation coming with Dive4Elements River for details. 
- */
-
-package org.dive4elements.river.collections;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.xpath.XPathConstants;
-
-import org.apache.log4j.Logger;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.dive4elements.artifactdatabase.Backend;
-import org.dive4elements.artifactdatabase.Backend.PersistentArtifact;
-import org.dive4elements.artifactdatabase.DefaultArtifactCollection;
-import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.artifactdatabase.state.Output;
-import org.dive4elements.artifactdatabase.state.Settings;
-import org.dive4elements.artifactdatabase.state.StateEngine;
-import org.dive4elements.artifacts.Artifact;
-import org.dive4elements.artifacts.ArtifactDatabase;
-import org.dive4elements.artifacts.ArtifactDatabaseException;
-import org.dive4elements.artifacts.ArtifactNamespaceContext;
-import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.artifacts.CallMeta;
-import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
-import org.dive4elements.river.artifacts.context.RiverContext;
-import org.dive4elements.river.exports.OutGenerator;
-import org.dive4elements.river.exports.OutputHelper;
-import org.dive4elements.river.utils.RiverUtils;
-
-/**
- * Collection of artifacts, can do outs, describe.
- * Lots of stuff done in AttributeParser and AttributeWriter.
- * Critical out and facet merging.
- * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
- */
-public class FLYSArtifactCollection extends DefaultArtifactCollection {
-    /** The logger used in this class. */
-    private static Logger log = Logger.getLogger(FLYSArtifactCollection.class);
-
-    /** Constant XPath that points to the outputmodes of an artifact. */
-    public static final String XPATH_ARTIFACT_OUTPUTMODES =
-        "/art:result/art:outputmodes";
-
-    public static final String XPATH_ARTIFACT_STATE_DATA =
-        "/art:result/art:ui/art:static/art:state/art:data";
-
-    public static final String XPATH_COLLECTION_ITEMS =
-        "/art:result/art:artifact-collection/art:collection-item";
-
-    public static final String XPATH_OUT_NAME = "/art:action/@art:name";
-
-    public static final String XPATH_OUT_TYPE = "/art:action/@art:type";
-
-    /** Xpath to master artifacts uuid. */
-    public static final String XPATH_MASTER_UUID =
-        "/art:artifact-collection/art:artifact/@art:uuid";
-
-    public static final String XPATH_LOADED_RECOMMENDATIONS =
-        "/art:attribute/art:loaded-recommendations";
-
-
-    /**
-     * Create and return description Document for this collection.
-     */
-    @Override
-    public Document describe(CallContext context) {
-        log.debug("FLYSArtifactCollection.describe: " + identifier);
-
-        CollectionDescriptionHelper helper = new CollectionDescriptionHelper(
-            getName(), identifier(), getCreationTime(), getTTL(),
-            context);
-
-        ArtifactDatabase db = context.getDatabase();
-
-        Document        oldAttrs = getAttribute();
-        AttributeParser parser   = new AttributeParser(oldAttrs);
-
-        try {
-            String[] aUUIDs  = getArtifactUUIDs(context);
-
-            oldAttrs = removeAttributes(oldAttrs, context);
-            parser   = new AttributeParser(oldAttrs);
-
-            CollectionAttribute newAttr = mergeAttributes(
-                db, context, parser, aUUIDs);
-
-            if (checkOutputSettings(newAttr, context)) {
-                saveCollectionAttribute(db, context, newAttr);
-            }
-
-            helper.setAttribute(newAttr);
-
-            if (aUUIDs != null) {
-                for (String uuid: aUUIDs) {
-                    helper.addArtifact(uuid);
-                }
-            }
-        }
-        catch (ArtifactDatabaseException ade) {
-            log.error("Error while merging attribute documents.", ade);
-
-            helper.setAttribute(parser.getCollectionAttribute());
-        }
-
-        return helper.toXML();
-    }
-
-
-    /**
-     * Merge the current art:outputs nodes with the the outputs provided by the
-     * artifacts in the Collection.
-     *
-     * @param uuids Artifact uuids.
-     */
-    protected CollectionAttribute mergeAttributes(
-        ArtifactDatabase db,
-        CallContext      context,
-        AttributeParser  oldParser,
-        String[]         uuids
-    ) {
-        CollectionAttribute cAttribute =
-            buildOutAttributes(db, context, oldParser, uuids);
-
-        if (cAttribute == null) {
-            log.warn("mergeAttributes: cAttribute == null");
-            return null;
-        }
-
-        cAttribute.setLoadedRecommendations(
-            getLoadedRecommendations(oldParser.getAttributeDocument()));
-
-        saveCollectionAttribute(db, context, cAttribute);
-
-        return cAttribute;
-    }
-
-
-    protected Document removeAttributes(Document attrs, CallContext context) {
-        Node outs = (Node) XMLUtils.xpath(
-            attrs,
-            "/art:attribute/art:outputs",
-            XPathConstants.NODE,
-            ArtifactNamespaceContext.INSTANCE);
-
-        NodeList nodes = (NodeList) XMLUtils.xpath(
-            attrs,
-            "/art:attribute/art:outputs/art:output",
-            XPathConstants.NODESET,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (nodes != null) {
-            for (int i = 0; i < nodes.getLength(); i++) {
-                Element e = (Element)nodes.item(i);
-                if(!outputExists(e.getAttribute("name"), context)) {
-                    outs.removeChild(e);
-                }
-            }
-        }
-        return attrs;
-    }
-
-
-    /**
-     * True if current MasterArtifact has given output.
-     * @param name Name of the output of interest.
-     * @param context current context
-     * @return true if current master artifact has given output.
-     */
-    protected boolean outputExists(String name, CallContext context) {
-        FLYSArtifact master = getMasterArtifact(context);
-        List<Output> outList = master.getOutputs(context);
-
-        for (Output o : outList) {
-            if (name.equals(o.getName())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * @param db The ArtifactDatabase which is required to save the attribute
-     * into.
-     * @param attribute The CollectionAttribute that should be stored in the
-     * database.
-     *
-     * @return true, if the transaction was successful, otherwise false.
-     */
-    protected boolean saveCollectionAttribute(
-        ArtifactDatabase    db,
-        CallContext         context,
-        CollectionAttribute attribute
-    ) {
-        log.info("Save new CollectionAttribute into database.");
-
-        Document doc = attribute.toXML();
-
-        try {
-            // Save the merged document into database.
-            db.setCollectionAttribute(identifier(), context.getMeta(), doc);
-
-            log.info("Saving CollectionAttribute was successful.");
-
-            return true;
-        }
-        catch (ArtifactDatabaseException adb) {
-            log.error(adb, adb);
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Merge the recommendations which have already been loaded from the old
-     * attribute document into the new attribute document. This is necessary,
-     * because mergeAttributes() only merges the art:outputs nodes - all
-     * other nodes are skipped.
-     */
-    protected Node getLoadedRecommendations(Document oldAttrs) {
-        Element loadedRecoms = (Element) XMLUtils.xpath(
-            oldAttrs,
-            XPATH_LOADED_RECOMMENDATIONS,
-            XPathConstants.NODE,
-            ArtifactNamespaceContext.INSTANCE);
-
-        return loadedRecoms;
-    }
-
-
-    /**
-     * Evaluates the Output settings. If an Output has no Settings set, the
-     * relevant OutGenerator is used to initialize a default Settings object.
-     *
-     * @param attribute The CollectionAttribute.
-     * @param cc The CallContext.
-     *
-     * @return true, if the CollectionAttribute was modified, otherwise false.
-     */
-    protected boolean checkOutputSettings(
-        CollectionAttribute attribute,
-        CallContext         cc
-    ) {
-        boolean modified = false;
-
-        Map<String, Output> outputMap = attribute != null
-            ? attribute.getOutputs()
-            : null;
-
-        if (outputMap == null || outputMap.isEmpty()) {
-            log.debug("No Output Settings check necessary.");
-            return modified;
-        }
-
-
-        for (Map.Entry<String, Output> entry: outputMap.entrySet()) {
-            String outName = entry.getKey();
-            Output output  = entry.getValue();
-
-            if (outName.equals("sq_overview")) {
-                continue;
-            }
-            Settings settings = output.getSettings();
-
-            if (settings == null) {
-                log.debug("No Settings set for Output '" + outName + "'.");
-                output.setSettings(
-                    createInitialOutputSettings(cc, attribute, outName));
-
-                modified = true;
-            }
-        }
-
-        return modified;
-    }
-
-
-    /**
-     * This method uses the the OutGenerator for the specified Output
-     * <i>out</i> to create an initial Settings object.
-     *
-     * @param cc The CallContext object.
-     * @param attr The CollectionAttribute.
-     * @param out The name of the output.
-     *
-     * @return a default Settings object for the specified Output.
-     */
-    protected Settings createInitialOutputSettings(
-        CallContext         cc,
-        CollectionAttribute attr,
-        String              out
-    ) {
-        OutGenerator outGen = RiverContext.getOutGenerator(cc, out, null);
-
-        if (outGen == null) {
-            return null;
-        }
-
-        // XXX NOTE: the outGen is not able to process its generate() operation,
-        // because it has no OutputStream set!
-        outGen.init(XMLUtils.newDocument(), null, cc);
-        prepareMasterArtifact(outGen, cc);
-
-        try {
-            Document outAttr = getAttribute(cc, attr, out);
-            OutputHelper helper = new OutputHelper(identifier());
-            helper.doOut(outGen, out, out, outAttr, cc);
-        }
-        catch (ArtifactDatabaseException adbe) {
-            log.error(adbe, adbe);
-        }
-        catch (IOException ioe) {
-            log.error(ioe, ioe);
-        }
-
-        return outGen.getSettings();
-    }
-
-
-    @Override
-    public void out(
-        String       type,
-        Document     format,
-        OutputStream out,
-        CallContext  context)
-    throws IOException
-    {
-        boolean debug = log.isDebugEnabled();
-
-        long reqBegin = System.currentTimeMillis();
-
-        if (debug) {
-            log.debug(XMLUtils.toString(format));
-            log.debug("FLYSArtifactCollection.out");
-        }
-
-        String name = XMLUtils.xpathString(
-            format, XPATH_OUT_NAME, ArtifactNamespaceContext.INSTANCE);
-
-        String subtype = XMLUtils.xpathString(
-            format, XPATH_OUT_TYPE, ArtifactNamespaceContext.INSTANCE);
-
-        if (debug) {
-            log.debug("-> Output name = " + name);
-            log.debug("-> Output type = " + type);
-            log.debug("-> Output subtype = " + subtype);
-        }
-
-        OutGenerator generator = null;
-        if (type != null
-             && type.length() > 0
-             && type.indexOf("chartinfo") > 0)
-        {
-            generator = RiverContext.getOutGenerator(context, type, subtype);
-        }
-        else {
-            generator = RiverContext.getOutGenerator(context, name, subtype);
-        }
-
-        if (generator == null) {
-            log.error("There is no generator specified for output: " + name);
-            // TODO Throw an exception.
-
-            return;
-        }
-
-        Document        oldAttrs  = getAttribute();
-        AttributeParser parser    = new AttributeParser(oldAttrs);
-        CollectionAttribute cAttr = parser.getCollectionAttribute();
-
-        Output output = cAttr.getOutput(name);
-        Settings settings = null;
-        if (output != null) {
-            settings = output.getSettings();
-
-            if (debug) {
-                List<Facet> facets = output.getFacets();
-                for(Facet facet: facets) {
-                    log.debug("  -- Facet " + facet.getName());
-                }
-            }
-        }
-
-        generator.init(format, out, context);
-        generator.setSettings(settings);
-        generator.setCollection(this);
-        prepareMasterArtifact(generator, context);
-
-        try {
-            Document attr = getAttribute(context, cAttr, name);
-            OutputHelper helper = new OutputHelper(identifier());
-            if (name.equals("sq_overview")) {
-                helper.doOut(generator, name, subtype, format, context);
-            }
-            helper.doOut(generator, name, subtype, attr, context);
-            generator.generate();
-        }
-        catch (ArtifactDatabaseException adbe) {
-            log.error(adbe, adbe);
-        }
-
-        if (debug) {
-            long duration = System.currentTimeMillis() -reqBegin;
-            log.info("Processing out(" + name + ") took " + duration + " ms.");
-        }
-    }
-
-
-    /**
-     * Sets the master Artifact at the given <i>generator</i>.
-     *
-     * @param generator The generator that gets a master Artifact.
-     * @param cc The CallContext.
-     */
-    protected void prepareMasterArtifact(OutGenerator generator, CallContext cc
-    ) {
-        // Get master artifact.
-        FLYSArtifact master = getMasterArtifact(cc);
-        if (master != null) {
-            log.debug("Set master Artifact to uuid: " + master.identifier());
-            generator.setMasterArtifact(master);
-        }
-        else {
-            log.warn("Could not set master artifact.");
-        }
-    }
-
-
-    /**
-     * @return masterartifact or null if exception/not found.
-     */
-    protected FLYSArtifact getMasterArtifact(CallContext context)
-    {
-        try {
-            ArtifactDatabase db = context.getDatabase();
-            CallMeta callMeta   = context.getMeta();
-            Document document   = db.getCollectionsMasterArtifact(
-                identifier(), callMeta);
-
-            String masterUUID   = XMLUtils.xpathString(
-                document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE);
-            FLYSArtifact masterArtifact =
-                (FLYSArtifact) getArtifact(masterUUID, context);
-            return masterArtifact;
-        }
-        catch (ArtifactDatabaseException ade) {
-            log.error(ade, ade);
-        }
-        return null;
-    }
-
-
-    /**
-     * Return merged output document.
-     * @param uuids List of artifact uuids.
-     */
-    protected CollectionAttribute buildOutAttributes(
-        ArtifactDatabase db,
-        CallContext      context,
-        AttributeParser  aParser,
-        String[]         uuids)
-    {
-        RiverContext flysContext = RiverUtils.getFlysContext(context);
-        StateEngine engine = (StateEngine) flysContext.get(
-            RiverContext.STATE_ENGINE_KEY);
-
-        if (engine == null) {
-            log.error("buildOutAttributes: engine == null");
-            return null;
-        }
-
-        FLYSArtifact masterArtifact = getMasterArtifact(context);
-
-        if (masterArtifact == null) {
-            log.debug("buildOutAttributes: masterArtifact == null");
-            return null;
-        }
-
-        OutputParser oParser = new OutputParser(db, context);
-
-        if (uuids != null) {
-            for (String uuid: uuids) {
-                try {
-                    oParser.parse(uuid);
-                }
-                catch (ArtifactDatabaseException ade) {
-                    log.warn(ade, ade);
-                }
-            }
-        }
-
-        aParser.parse();
-
-        AttributeWriter aWriter = new AttributeWriter(
-            db,
-            aParser.getCollectionAttribute(),
-            aParser.getOuts(),
-            aParser.getFacets(),
-            oParser.getOuts(),
-            oParser.getFacets(),
-            engine.getCompatibleFacets(masterArtifact.getStateHistoryIds())
-            );
-        return aWriter.write();
-    }
-
-
-    /**
-     * Returns the "attribute" (part of description document) for a specific
-     * output type.
-     *
-     * @param context The CallContext object.
-     * @param cAttr The CollectionAttribute.
-     * @param output The name of the desired output type.
-     *
-     * @return the attribute for the desired output type.
-     */
-    protected Document getAttribute(
-        CallContext         context,
-        CollectionAttribute cAttr,
-        String              output)
-    throws    ArtifactDatabaseException
-    {
-        Document attr = cAttr.toXML();
-
-        Map<String, String> vars = new HashMap<String, String>();
-        vars.put("output", output);
-
-        Node out = (Node) XMLUtils.xpath(
-            attr,
-            "art:attribute/art:outputs/art:output[@name=$output]",
-            XPathConstants.NODE,
-            ArtifactNamespaceContext.INSTANCE,
-            vars);
-
-
-        if (out != null) {
-            Document o = XMLUtils.newDocument();
-
-            o.appendChild(o.importNode(out, true));
-
-            return o;
-        }
-
-        return null;
-    }
-
-
-    /**
-     * This method returns the list of artifact UUIDs that this collections
-     * contains.
-     *
-     * @param context The CallContext that is necessary to get information about
-     * the ArtifactDatabase.
-     *
-     * @return a list of uuids.
-     */
-    protected String[] getArtifactUUIDs(CallContext context)
-    throws    ArtifactDatabaseException
-    {
-        log.debug("FLYSArtifactCollection.getArtifactUUIDs");
-
-        ArtifactDatabase db = context.getDatabase();
-        CallMeta meta       = context.getMeta();
-
-        Document itemList = db.listCollectionArtifacts(identifier(), meta);
-        NodeList items    = (NodeList) XMLUtils.xpath(
-            itemList,
-            XPATH_COLLECTION_ITEMS,
-            XPathConstants.NODESET,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (items == null || items.getLength() == 0) {
-            log.debug("No artifacts found in this collection.");
-            return null;
-        }
-
-        int num = items.getLength();
-
-        List<String> uuids = new ArrayList<String>(num);
-
-        for (int i = 0; i < num; i++) {
-            String uuid = XMLUtils.xpathString(
-                items.item(i),
-                "@art:uuid",
-                ArtifactNamespaceContext.INSTANCE);
-
-            if (uuid != null && uuid.trim().length() != 0) {
-                uuids.add(uuid);
-            }
-        }
-
-        return uuids.toArray(new String[uuids.size()]);
-    }
-
-
-    /**
-     * Returns a concrete Artifact of this collection specified by its uuid.
-     *
-     * @param uuid The Artifact's uuid.
-     * @param context The CallContext.
-     *
-     * @return an Artifact.
-     */
-    protected Artifact getArtifact(String uuid, CallContext context)
-    throws    ArtifactDatabaseException
-    {
-        log.debug("FLYSArtifactCollection.getArtifact");
-
-        Backend backend               = Backend.getInstance();
-        PersistentArtifact persistent = backend.getArtifact(uuid);
-
-        return persistent != null ? persistent.getArtifact() : null;
-    }
-
-
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java	Sun Apr 28 15:23:01 2013 +0200
@@ -24,7 +24,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifactdatabase.state.Output;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.ManagedFacetAdapter;
 
 
@@ -73,7 +73,7 @@
     {
         logger.debug("OutputParser.parse: " + uuid);
 
-        FLYSArtifact flys = (FLYSArtifact) db.getRawArtifact(uuid);
+        D4EArtifact flys = (D4EArtifact) db.getRawArtifact(uuid);
 
         List<Output> outList = flys.getOutputs(context);
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -22,10 +22,10 @@
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Settings;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.model.WQ;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 
 import org.dive4elements.river.model.Gauge;
 import org.dive4elements.river.model.River;
@@ -43,9 +43,9 @@
     protected WQ           data;
     protected CallContext  context;
     protected OutputStream out;
-    protected FLYSArtifact master;
+    protected D4EArtifact master;
 
-    protected FLYSArtifactCollection collection;
+    protected D4EArtifactCollection collection;
 
 
     public ATExporter() {
@@ -60,11 +60,11 @@
 
     @Override
     public void setMasterArtifact(Artifact master) {
-        this.master = (FLYSArtifact) master;
+        this.master = (D4EArtifact) master;
     }
 
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         this.collection = collection;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -30,7 +30,7 @@
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 
 import org.dive4elements.river.artifacts.resources.Resources;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 
 import org.dive4elements.river.utils.Formatter;
 
@@ -77,7 +77,7 @@
     protected String facet;
 
     /** The collection.*/
-    protected FLYSArtifactCollection collection;
+    protected D4EArtifactCollection collection;
 
     /** The master artifact. */
     protected Artifact master;
@@ -138,7 +138,7 @@
 
 
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         this.collection = collection;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,9 +17,9 @@
 import org.dive4elements.artifacts.PreferredLocale;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.river.artifacts.access.RangeAccess;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.resources.Resources;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 import org.dive4elements.river.jfree.Bounds;
 import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation;
 import org.dive4elements.river.jfree.DoubleBounds;
@@ -123,7 +123,7 @@
     /** The CallContext object.*/
     protected CallContext context;
 
-    protected FLYSArtifactCollection collection;
+    protected D4EArtifactCollection collection;
 
     /** The artifact that is used to decorate the chart with meta information.*/
     protected Artifact master;
@@ -719,7 +719,7 @@
 
     /** Sets the collection. */
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         this.collection = collection;
     }
 
@@ -1422,7 +1422,7 @@
 
 
     protected String getRiverName() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         River river = RiverUtils.getRiver(flys);
         return (river != null) ? river.getName() : "";
@@ -1430,7 +1430,7 @@
 
 
     protected double[] getRange() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         RangeAccess rangeAccess = new RangeAccess(flys, null);
         return rangeAccess.getKmRange();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -8,7 +8,7 @@
 
 package org.dive4elements.river.exports;
 
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 import org.dive4elements.river.java2d.NOPGraphics2D;
 
 import java.io.IOException;
@@ -98,7 +98,7 @@
      *
      * @param collection The collection.
      */
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         generator.setCollection(collection);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -35,7 +35,7 @@
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -126,7 +126,7 @@
     protected void writeCSVHeader(CSVWriter writer) {
         logger.debug("ComputedDischargeCurveExporter.writeCSVHeader");
 
-        String unit = RiverUtils.getRiver((FLYSArtifact) master).getWstUnit().getName();
+        String unit = RiverUtils.getRiver((D4EArtifact) master).getWstUnit().getName();
 
         writer.writeNext(new String[] {
             msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER, new Object[] { unit }),
@@ -194,7 +194,7 @@
     protected void addMetaData(WKmsJRDataSource source) {
         CallMeta meta = context.getMeta();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         source.addMetaData ("river", RiverUtils.getRivername(flys));
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.StaticWKmsArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -85,7 +85,7 @@
 
     @Override
     protected String getDefaultYAxisLabel(int pos) {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -25,7 +25,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifacts.DataProvider;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.geom.Lines;
 import org.dive4elements.river.artifacts.model.CrossSectionFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -242,7 +242,7 @@
 
     @Override
     protected String getDefaultYAxisLabel(int pos) {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
 
@@ -357,7 +357,7 @@
         if (ThemeUtil.parseShowLevel(theme) && lines.points.length > 1
                 && lines.points[1].length > 0) {
             NumberFormat nf = Formatter.getMeterFormat(this.context);
-            FLYSArtifact flys = (FLYSArtifact) master;
+            D4EArtifact flys = (D4EArtifact) master;
 
             String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -9,7 +9,7 @@
 package org.dive4elements.river.exports;
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WQKms;
 import org.dive4elements.river.jfree.Bounds;
@@ -132,7 +132,7 @@
         if (name.equals(DISCHARGE_CURVE)
                 || name.equals(GAUGE_DISCHARGE_CURVE)) {
             doDischargeOut(
-                (FLYSArtifact)artifactFacet.getArtifact(),
+                (D4EArtifact)artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(),
                 theme,
@@ -162,7 +162,7 @@
      * Add series with discharge curve to diagram.
      */
     protected void doDischargeOut(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         Object        o,
         String        description,
         Document      theme,
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -33,7 +33,7 @@
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.Config;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.RangeAccess;
 import org.dive4elements.river.artifacts.model.WQDay;
@@ -218,7 +218,7 @@
     protected void addMetaData(WKmsJRDataSource source) {
         CallMeta meta = context.getMeta();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         source.addMetaData ("river", RiverUtils.getRivername(flys));
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.FlowVelocityData;
 import org.dive4elements.river.utils.RiverUtils;
@@ -106,7 +106,7 @@
     protected void data2CSV(CSVWriter writer, FlowVelocityData[] fData) {
         logger.debug("Add next FlowVelocityData to CSV");
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         for (FlowVelocityData data: fData) {
             for (int i = 0, n = data.size(); i < n; i++) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,7 +19,7 @@
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -142,7 +142,7 @@
      */
     @Override
     protected String getDefaultXAxisLabel() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         return msg(
             I18N_XAXIS_LABEL,
@@ -239,13 +239,13 @@
             context.putContextValue("endkm", getXBounds(0).getUpper());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() == null) {
-            FLYSArtifact artifact = (FLYSArtifact)artifactAndFacet.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
             FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
             context.putContextValue("startkm", access.getLowerKM());
             context.putContextValue("endkm", access.getUpperKM());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() != null){
-            FLYSArtifact artifact = (FLYSArtifact)artifactAndFacet.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
             FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
             Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM());
             Bounds bounds =
@@ -408,7 +408,7 @@
      *
      * @param data A FlowVelocityData object
      * @param aandf The facet. This facet does NOT support any data objects. Use
-     * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
+     * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
      * data.
      * @param theme The theme that contains styling information.
      * @param visible The visibility of the curve.
@@ -478,7 +478,7 @@
     /**
      * @param data A FlowVelocityData object
      * @param aandf The facet. This facet does NOT support any data objects. Use
-     * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
+     * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
      * data.
      * @param theme The theme that contains styling information.
      * @param visible The visibility of the curve.
@@ -501,7 +501,7 @@
     /**
      * @param data A FlowVelocityData object
      * @param aandf The facet. This facet does NOT support any data objects. Use
-     * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
+     * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
      * data.
      * @param theme The theme that contains styling information.
      * @param visible The visibility of the curve.
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -34,7 +34,7 @@
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.HistoricalDischargeData;
 import org.dive4elements.river.artifacts.model.Timerange;
@@ -208,7 +208,7 @@
     protected void addMetaData(WQTJRDataSource source) {
         CallMeta meta = context.getMeta();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         source.addMetaData ("river", RiverUtils.getRivername(flys));
 
@@ -252,7 +252,7 @@
 
 
     public String getReferenceGaugename() {
-        return RiverUtils.getReferenceGaugeName((FLYSArtifact) master);
+        return RiverUtils.getReferenceGaugeName((D4EArtifact) master);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -20,7 +20,7 @@
 import org.w3c.dom.Document;
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.HistoricalWQTimerange;
@@ -83,7 +83,7 @@
 
     @Override
     protected String getDefaultChartSubtitle() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
         Timerange evalTime = new HistoricalDischargeAccess(flys)
             .getEvaluationTimerange();
 
@@ -127,25 +127,25 @@
 
         if (name.equals(HISTORICAL_DISCHARGE_Q)) {
             doHistoricalDischargeOutQ(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (name.equals(HISTORICAL_DISCHARGE_W)) {
             doHistoricalDischargeOutW(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (name.equals(HISTORICAL_DISCHARGE_Q_DIFF)) {
             doHistoricalDischargeDifferenceOutQ(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (name.equals(HISTORICAL_DISCHARGE_W_DIFF)) {
             doHistoricalDischargeDifferenceOutW(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
@@ -159,7 +159,7 @@
         }
     }
 
-    protected void doHistoricalDischargeOutQ(FLYSArtifact artifact,
+    protected void doHistoricalDischargeOutQ(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         logger.debug("doHistoricalDischargeOut(): description = " + desc);
 
@@ -171,7 +171,7 @@
         addAxisDataset(tsc, YAXIS.Q.idx, visible);
     }
 
-    protected void doHistoricalDischargeOutW(FLYSArtifact artifact,
+    protected void doHistoricalDischargeOutW(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         logger.debug("doHistoricalDischargeOut(): description = " + desc);
 
@@ -183,7 +183,7 @@
         addAxisDataset(tsc, YAXIS.W.idx, visible);
     }
 
-    protected void doHistoricalDischargeDifferenceOutQ(FLYSArtifact artifact,
+    protected void doHistoricalDischargeDifferenceOutQ(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc);
 
@@ -195,7 +195,7 @@
         addAxisDataset(tsc, YAXIS.Q.idx, visible);
     }
 
-    protected void doHistoricalDischargeDifferenceOutW(FLYSArtifact artifact,
+    protected void doHistoricalDischargeDifferenceOutW(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         logger.debug("doHistoricalDischargeDifferenceOut: desc = " + desc);
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeWQCurveGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.w3c.dom.Document;
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.Timerange;
@@ -79,7 +79,7 @@
 
     @Override
     protected String getDefaultChartSubtitle() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
         Timerange evalTime = new HistoricalDischargeAccess(flys)
             .getEvaluationTimerange();
 
@@ -114,19 +114,19 @@
 
         if (name.equals(HISTORICAL_DISCHARGE_WQ_Q)) {
             doHistoricalDischargeOutQ(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (name.equals(HISTORICAL_DISCHARGE_WQ_W)) {
             doHistoricalDischargeOutW(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
         else if (name.equals(HISTORICAL_DISCHARGE_WQ_CURVE)) {
             doHistoricalDischargeCurveOut(
-                (FLYSArtifact) artifactFacet.getArtifact(),
+                (D4EArtifact) artifactFacet.getArtifact(),
                 artifactFacet.getData(context),
                 artifactFacet.getFacetDescription(), theme, visible);
         }
@@ -148,19 +148,19 @@
         }
     }
 
-    protected void doHistoricalDischargeOutQ(FLYSArtifact artifact,
+    protected void doHistoricalDischargeOutQ(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         double value = Double.valueOf(data.toString());
         addDomainMarker(new StyledValueMarker(value, theme), visible);
     }
 
-    protected void doHistoricalDischargeOutW(FLYSArtifact artifact,
+    protected void doHistoricalDischargeOutW(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         double value = Double.valueOf(data.toString());
         addValueMarker(new StyledValueMarker(value, theme), visible);
     }
 
-    protected void doHistoricalDischargeCurveOut(FLYSArtifact artifact,
+    protected void doHistoricalDischargeCurveOut(D4EArtifact artifact,
         Object data, String desc, Document theme, boolean visible) {
         XYSeries series = new StyledXYSeries(desc, theme);
         StyledSeriesBuilder.addPointsQW(series, (WQKms) data);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.geom.Lines;
 import org.dive4elements.river.artifacts.model.AreaFacet;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -203,7 +203,7 @@
      */
     @Override
     protected String getDefaultXAxisLabel() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         return msg(
             I18N_XAXIS_LABEL,
@@ -234,7 +234,7 @@
      * Get internationalized label for the y axis.
      */
     protected String getWAxisLabel() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
 
@@ -426,7 +426,7 @@
      *
      * @param wqkms An array of WQKms values.
      * @param aandf The facet and artifact. This facet does NOT support any data objects. Use
-     * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
+     * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
      * data.
      * @param theme The theme that contains styling information.
      * @param visible The visibility of the curve.
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -19,13 +19,13 @@
 import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.map.WMSDBLayerFacet;
 import org.dive4elements.river.artifacts.model.map.WMSLayerFacet;
 import org.dive4elements.river.artifacts.model.map.WSPLGENLayerFacet;
 import org.dive4elements.river.artifacts.states.WaterlevelGroundDifferences;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 import org.dive4elements.river.utils.ArtifactMapfileGenerator;
 import org.dive4elements.river.utils.GeometryUtils;
 import org.dive4elements.river.utils.ThemeUtil;
@@ -46,7 +46,7 @@
 
     private static Logger logger = Logger.getLogger(MapGenerator.class);
 
-    protected FLYSArtifactCollection collection;
+    protected D4EArtifactCollection collection;
 
     protected Artifact master;
 
@@ -89,7 +89,7 @@
     }
 
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         this.collection = collection;
     }
 
@@ -103,7 +103,7 @@
 
         logger.debug("MapGenerator.doOut: " +
             artifactFacet.getArtifact().identifier() + " | " + name);
-        FLYSArtifact flys = (FLYSArtifact) artifactFacet.getArtifact();
+        D4EArtifact flys = (D4EArtifact) artifactFacet.getArtifact();
 
         Facet nativeFacet = artifactFacet.getFacet();
 
@@ -138,7 +138,7 @@
 
 
     protected void createWSPLGENLayer(
-        FLYSArtifact  flys,
+        D4EArtifact  flys,
         WMSLayerFacet wms,
         Document      attr
     ) {
@@ -175,7 +175,7 @@
     }
 
 
-    protected void createBarriersLayer(FLYSArtifact flys, WMSLayerFacet wms) {
+    protected void createBarriersLayer(D4EArtifact flys, WMSLayerFacet wms) {
         ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator();
 
         try {
@@ -190,7 +190,7 @@
     }
 
 
-    protected void createUserShapeLayer(FLYSArtifact flys, WMSLayerFacet wms) {
+    protected void createUserShapeLayer(D4EArtifact flys, WMSLayerFacet wms) {
         ArtifactMapfileGenerator mfg = new ArtifactMapfileGenerator();
 
         try {
@@ -206,7 +206,7 @@
 
 
     protected void createDatabaseLayer(
-        FLYSArtifact  flys,
+        D4EArtifact  flys,
         WMSLayerFacet wms,
         Document      attr
     ) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -21,7 +21,7 @@
 
 import org.dive4elements.artifacts.CallContext;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.MiddleBedHeightData;
 import org.dive4elements.river.utils.RiverUtils;
@@ -114,7 +114,7 @@
     protected void data2CSV(CSVWriter writer, MiddleBedHeightData[] mData) {
         logger.debug("Add next MiddleBedHeightData to CSV");
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         NumberFormat kmF     = Formatter.getMiddleBedHeightKM(context);
         NumberFormat heightF = Formatter.getMiddleBedHeightHeight(context);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.MiddleBedHeightData;
 import org.dive4elements.river.exports.process.BedheightProcessor;
@@ -111,7 +111,7 @@
      */
     @Override
     protected String getDefaultXAxisLabel() {
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         return msg(
             I18N_XAXIS_LABEL,
@@ -128,7 +128,7 @@
             label = getHAxisLabel();
         }
         else if (index == YAXIS.W.idx) {
-           FLYSArtifact flys = (FLYSArtifact) master;
+           D4EArtifact flys = (D4EArtifact) master;
            String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
 
            label = msg(
@@ -228,7 +228,7 @@
     /**
      * @param data A data object
      * @param aandf The artifact and facet. This facet does NOT support any data objects. Use
-     * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
+     * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
      * data.
      * @param theme The theme that contains styling information.
      * @param visible The visibility of the curve.
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -17,7 +17,7 @@
 import org.dive4elements.artifactdatabase.state.Settings;
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 
 
 /**
@@ -51,7 +51,7 @@
      *
      * @param collection A reference to the collection.
      */
-    void setCollection(FLYSArtifactCollection collection);
+    void setCollection(D4EArtifactCollection collection);
 
     /**
      * Creates the output of an Artifact and appends that single output to the
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java	Sun Apr 28 15:23:01 2013 +0200
@@ -34,7 +34,7 @@
 import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
 import org.dive4elements.artifacts.common.utils.ClientProtocolUtils;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.context.RiverContext;
 import org.dive4elements.river.artifacts.model.ManagedDomFacet;
 import org.dive4elements.river.artifacts.model.ManagedFacet;
@@ -70,7 +70,7 @@
         boolean debug = log.isDebugEnabled();
 
         if (debug) {
-            log.debug("FLYSArtifactCollection.doOut: " + outName);
+            log.debug("D4EArtifactCollection.doOut: " + outName);
         }
 
         ThemeList themeList = new ThemeList(attributes);
@@ -158,7 +158,7 @@
 
         if (debug) {
             log.debug(
-                "FLYSArtifactCollection.getFacetThemeFromAttribute(facet="
+                "D4EArtifactCollection.getFacetThemeFromAttribute(facet="
                 + facet + ", index=" + index + ")");
         }
 
@@ -239,7 +239,7 @@
         Theme       t,
         CallContext context)
     {
-        log.debug("FLYSArtifactCollection.addThemeToAttribute: " + uuid);
+        log.debug("D4EArtifactCollection.addThemeToAttribute: " + uuid);
 
         if (t == null) {
             log.warn("Theme is empty - cancel adding it to attribute!");
@@ -338,7 +338,7 @@
                 }
                 String uuid        = theme.getArtifact();
                 Artifact artifact  = getArtifact(uuid, context);
-                FLYSArtifact flys  = (FLYSArtifact) artifact;
+                D4EArtifact flys  = (D4EArtifact) artifact;
 
                 ArtifactAndFacet artifactAndFacet = new ArtifactAndFacet(
                     artifact,
@@ -371,7 +371,7 @@
     protected Artifact getArtifact(String uuid, CallContext context)
     throws    ArtifactDatabaseException
     {
-        log.debug("FLYSArtifactCollection.getArtifact");
+        log.debug("D4EArtifactCollection.getArtifact");
 
         Backend backend               = Backend.getInstance();
         PersistentArtifact persistent = backend.getArtifact(uuid);
@@ -400,7 +400,7 @@
         boolean debug = log.isDebugEnabled();
 
         if (debug) {
-            log.debug("FLYSArtifactCollection.initItemAttribute");
+            log.debug("D4EArtifactCollection.initItemAttribute");
         }
 
         Theme t = getThemeForFacet(uuid, facet, pattern, index, outName, context);
@@ -438,7 +438,7 @@
         String outName,
         CallContext context)
     {
-        log.info("FLYSArtifactCollection.getThemeForFacet: " + facet);
+        log.info("D4EArtifactCollection.getThemeForFacet: " + facet);
 
         RiverContext flysContext = context instanceof RiverContext
             ? (RiverContext) context
@@ -447,7 +447,7 @@
         // Push artifact in flysContext.
         ArtifactDatabase db = context.getDatabase();
         try {
-            FLYSArtifact artifact = (FLYSArtifact) db.getRawArtifact(uuid);
+            D4EArtifact artifact = (D4EArtifact) db.getRawArtifact(uuid);
             log.debug("Got raw artifact");
             flysContext.put(RiverContext.ARTIFACT_KEY, artifact);
         }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -15,7 +15,7 @@
 
 import org.dive4elements.artifacts.common.utils.Config;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 
 import org.dive4elements.river.artifacts.model.CalculationResult;
@@ -227,7 +227,7 @@
 
         int         size = ww.size();
 
-        FLYSArtifact flys       = (FLYSArtifact) master;
+        D4EArtifact flys       = (D4EArtifact) master;
 
         StepCSVWriter stepWriter = new StepCSVWriter();
         stepWriter.setCSVWriter(writer);
@@ -343,7 +343,7 @@
 
         int          size = ww.size();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         String startLocationDescription = RiverUtils.getLocationDescription(
             flys, ww.getStartKm());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -23,7 +23,7 @@
 import org.dive4elements.artifactdatabase.state.Settings;
 
 import org.dive4elements.river.artifacts.model.Calculation;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 
 import org.w3c.dom.Document;
 
@@ -53,7 +53,7 @@
     }
 
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         // not needed
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Sun Apr 28 15:23:01 2013 +0200
@@ -43,7 +43,7 @@
 import org.dive4elements.river.artifacts.access.FixRealizingAccess;
 import org.dive4elements.river.artifacts.access.RangeAccess;
 import org.dive4elements.river.artifacts.FixationArtifact;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.Segment;
@@ -285,11 +285,11 @@
     protected void writeCSVData(CSVWriter writer) {
         logger.info("WaterlevelExporter.writeData");
 
-        WQ_MODE mode    = RiverUtils.getWQMode((FLYSArtifact)master);
+        WQ_MODE mode    = RiverUtils.getWQMode((D4EArtifact)master);
         boolean atGauge = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.WGAUGE;
         boolean isQ     = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.QFREE;
         RiverUtils.WQ_INPUT input
-            = RiverUtils.getWQInputMode((FLYSArtifact)master);
+            = RiverUtils.getWQInputMode((D4EArtifact)master);
 
         writeCSVMeta(writer);
         writeCSVHeader(writer, atGauge, isQ);
@@ -309,7 +309,7 @@
 
         CallMeta meta = context.getMeta();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         writer.writeNext(new String[] {
             Resources.getMsg(
@@ -434,7 +434,7 @@
     ) {
         logger.info("WaterlevelExporter.writeCSVHeader");
 
-        String unit = RiverUtils.getRiver((FLYSArtifact) master).getWstUnit().getName();
+        String unit = RiverUtils.getRiver((D4EArtifact) master).getWstUnit().getName();
 
         if (atGauge) {
             writer.writeNext(new String[] {
@@ -480,7 +480,7 @@
     }
 
 
-    private void writeRow4(CSVWriter writer, double wqkm[], FLYSArtifact flys) {
+    private void writeRow4(CSVWriter writer, double wqkm[], D4EArtifact flys) {
         NumberFormat kmf = getKmFormatter();
         NumberFormat wf  = getWFormatter();
         NumberFormat qf  = getQFormatter();
@@ -496,7 +496,7 @@
 
     /** Write an csv-row at gauge location. */
     private void writeRow6(CSVWriter writer, double wqkm[], String wOrQDesc,
-        FLYSArtifact flys, String gaugeName) {
+        D4EArtifact flys, String gaugeName) {
         NumberFormat kmf = getKmFormatter();
         NumberFormat wf  = getWFormatter();
         NumberFormat qf  = getQFormatter();
@@ -535,7 +535,7 @@
         int      size   = wqkms.size();
         double[] result = new double[3];
 
-        FLYSArtifact flys       = (FLYSArtifact) master;
+        D4EArtifact flys       = (D4EArtifact) master;
         List<Gauge>  gauges     = RiverUtils.getGauges(flys);
         Gauge        gauge      = RiverUtils.getGauge(flys);
         String       gaugeName  = gauge.getName();
@@ -743,7 +743,7 @@
     protected WKmsJRDataSource createJRData() {
         WKmsJRDataSource source = new WKmsJRDataSource();
 
-        WQ_MODE mode    = RiverUtils.getWQMode((FLYSArtifact)master);
+        WQ_MODE mode    = RiverUtils.getWQMode((D4EArtifact)master);
         boolean atGauge = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.WGAUGE;
         boolean isQ     = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.QFREE;
 
@@ -759,7 +759,7 @@
     protected void addMetaData(WKmsJRDataSource source) {
         CallMeta meta = context.getMeta();
 
-        FLYSArtifact flys = (FLYSArtifact) master;
+        D4EArtifact flys = (D4EArtifact) master;
 
         source.addMetaData ("river", RiverUtils.getRivername(flys));
 
@@ -800,7 +800,7 @@
         int      size   = wqkms.size();
         double[] result = new double[3];
 
-        FLYSArtifact flys       = (FLYSArtifact) master;
+        D4EArtifact flys       = (D4EArtifact) master;
         Gauge        gauge      = RiverUtils.getGauge(flys);
         String       gaugeName  = gauge.getName();
         String       desc       = "";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java	Sun Apr 28 15:23:01 2013 +0200
@@ -12,7 +12,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 import org.dive4elements.river.artifacts.access.FixAccess;
 
@@ -62,7 +62,7 @@
             logger.debug("No CalculationResult found for AT export.");
             return;
         }
-        FixAccess access = new FixAccess((FLYSArtifact)this.master, context);
+        FixAccess access = new FixAccess((D4EArtifact)this.master, context);
         String f = access.getFunction();
         if (f == null || f.length() == 0) {
             logger.debug("No function found for AT export.");
@@ -80,7 +80,7 @@
 
         Writer writer = new OutputStreamWriter(out, DEFAULT_CSV_CHARSET);
 
-        FixAccess access = new FixAccess((FLYSArtifact)this.master, context);
+        FixAccess access = new FixAccess((D4EArtifact)this.master, context);
         FixATWriter atWriter = new FixATWriter(this.function, this.parameters);
         NodeList nodes = request.getElementsByTagName("km");
         String km = nodes.item(0).getTextContent();
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
 import org.dive4elements.river.artifacts.model.DateRange;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -79,7 +79,7 @@
     }
 
 
-    private FLYSArtifact artifact = null;
+    private D4EArtifact artifact = null;
 
 
     @Override
@@ -162,11 +162,11 @@
         logger.debug("FixDeltaWtGenerator.doOut: " + name);
         logger.debug("Theme description is: " + artifactFacet.getFacetDescription());
 
-        this.artifact = (FLYSArtifact)artifactFacet.getArtifact();
+        this.artifact = (D4EArtifact)artifactFacet.getArtifact();
 
         if (name.contains(FIX_SECTOR_AVERAGE_DWT)) {
             doSectorAverageOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -174,7 +174,7 @@
         }
         else if (name.equals(FIX_REFERENCE_EVENTS_DWT)) {
             doReferenceEventsOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -182,7 +182,7 @@
         }
         else if (name.equals(FIX_ANALYSIS_EVENTS_DWT)) {
             doAnalysisEventsOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -190,7 +190,7 @@
         }
         else if (name.equals(FIX_DEVIATION_DWT)) {
             doDeviationOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -198,7 +198,7 @@
         }
         else if (name.equals(FIX_ANALYSIS_PERIODS_DWT)) {
             doAnalysisPeriodsOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -206,7 +206,7 @@
         }
         else if (name.equals(FIX_REFERENCE_PERIOD_DWT)) {
             doReferencePeriodsOut(
-                    (FLYSArtifact) artifactFacet.getArtifact(),
+                    (D4EArtifact) artifactFacet.getArtifact(),
                     artifactFacet.getData(context),
                     artifactFacet.getFacetDescription(),
                     theme,
@@ -225,7 +225,7 @@
 
 
     protected void doReferencePeriodsOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
@@ -249,7 +249,7 @@
 
 
     protected void doSectorAverageOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
@@ -294,7 +294,7 @@
 
 
     protected void doAnalysisEventsOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
@@ -389,7 +389,7 @@
 
 
     protected void doReferenceEventsOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
@@ -403,7 +403,7 @@
 
 
     protected void doDeviationOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
@@ -425,7 +425,7 @@
 
 
     protected void doAnalysisPeriodsOut(
-            FLYSArtifact artifact,
+            D4EArtifact artifact,
             Object       data,
             String       desc,
             Document     theme,
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -28,7 +28,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.StaticWKmsArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.access.FixAnalysisAccess;
@@ -104,7 +104,7 @@
 
 
     /** Needed to access data to create subtitle. */
-    protected FLYSArtifact artifact;
+    protected D4EArtifact artifact;
 
 
     @Override
@@ -120,7 +120,7 @@
     public boolean prepareChartData(ArtifactAndFacet aaf, Document doc, boolean visible) {
         String name = aaf.getFacetName();
 
-        this.artifact = (FLYSArtifact)aaf.getArtifact();
+        this.artifact = (D4EArtifact)aaf.getArtifact();
 
         if(name.startsWith(FIX_SECTOR_AVERAGE_WQ)) {
             doSectorAverageOut(aaf, doc, visible);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceEpochGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.WKms;
@@ -112,13 +112,13 @@
             context.putContextValue("endkm", getXBounds(0).getUpper());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() == null) {
-            FLYSArtifact artifact = (FLYSArtifact)bundle.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
             FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
             context.putContextValue("startkm", access.getLowerKM());
             context.putContextValue("endkm", access.getUpperKM());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() != null){
-            FLYSArtifact artifact = (FLYSArtifact)bundle.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
             FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
             Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM());
             Bounds bounds =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/SedimentLoadLSGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -16,7 +16,7 @@
 
 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
 import org.dive4elements.artifactdatabase.state.Facet;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.RangeAccess;
 import org.dive4elements.river.artifacts.access.SedimentLoadAccess;
 import org.dive4elements.river.artifacts.model.FacetTypes;
@@ -70,7 +70,7 @@
     public static final String I18N_YAXIS_D_LABEL_DEFAULT = "delta S [m]";
     public static final String I18N_YAXIS_V_LABEL_DEFAULT = "Geschwindigkeit v [m/s]";
 
-    private FLYSArtifact artifact;
+    private D4EArtifact artifact;
 
     @Override
     protected YAxisWalker getYAxisWalker() {
@@ -101,7 +101,7 @@
         }
 
         Facet facet = bundle.getFacet();
-        artifact = (FLYSArtifact)bundle.getArtifact();
+        artifact = (D4EArtifact)bundle.getArtifact();
 
         if (facet == null) {
             return;
@@ -118,13 +118,13 @@
             context.putContextValue("endkm", getXBounds(0).getUpper());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() == null) {
-            FLYSArtifact artifact = (FLYSArtifact)bundle.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
             RangeAccess access = new RangeAccess(artifact, context);
             context.putContextValue("startkm", access.getFrom());
             context.putContextValue("endkm", access.getTo());
         }
         else if (getXBounds(0) == null && getDomainAxisRange() != null){
-            FLYSArtifact artifact = (FLYSArtifact)bundle.getArtifact();
+            D4EArtifact artifact = (D4EArtifact)bundle.getArtifact();
             RangeAccess access = new RangeAccess(artifact, context);
             Bounds b = new DoubleBounds(access.getFrom(), access.getTo());
             Bounds bounds =
--- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -34,7 +34,7 @@
 import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.river.artifacts.context.RiverContext;
-import org.dive4elements.river.collections.FLYSArtifactCollection;
+import org.dive4elements.river.collections.D4EArtifactCollection;
 import org.dive4elements.river.exports.ChartGenerator;
 import org.dive4elements.river.exports.OutGenerator;
 import org.dive4elements.river.exports.OutputHelper;
@@ -47,7 +47,7 @@
     public static final String XPATH_CHART_SIZE =
         "/art:action/art:attributes/art:size";
 
-    protected FLYSArtifactCollection collection;
+    protected D4EArtifactCollection collection;
 
     protected Artifact master;
 
@@ -123,7 +123,7 @@
     }
 
     @Override
-    public void setCollection(FLYSArtifactCollection collection) {
+    public void setCollection(D4EArtifactCollection collection) {
         this.collection = collection;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java	Sun Apr 28 15:23:01 2013 +0200
@@ -9,7 +9,7 @@
 package org.dive4elements.river.themes;
 
 import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.context.RiverContext;
 
 import java.util.ArrayList;
@@ -116,7 +116,7 @@
 
         Map<String, Theme> t = group.getThemes();
 
-        FLYSArtifact artifact = (FLYSArtifact) c.get(RiverContext.ARTIFACT_KEY);
+        D4EArtifact artifact = (D4EArtifact) c.get(RiverContext.ARTIFACT_KEY);
 
         if (map == null || map.isEmpty() || t == null || t.isEmpty()) {
             logger.warn("No mappings or themes found. Cannot retrieve theme!");
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeMapping.java	Sun Apr 28 15:23:01 2013 +0200
@@ -14,7 +14,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 
 /**
  * Represents mapping to a theme (including conditions).
@@ -119,7 +119,7 @@
      * @param artifact Artifact of which to inspect data.
      * @return true if no condition is specified or condition is met.
      */
-    public boolean masterAttrMatches(FLYSArtifact artifact) {
+    public boolean masterAttrMatches(D4EArtifact artifact) {
         if (masterAttr == null || masterAttr.length() == 0) {
            return true;
         }
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -9,7 +9,7 @@
 package org.dive4elements.river.utils;
 
 import org.dive4elements.artifacts.CallContext;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.access.RiverAccess;
 import org.dive4elements.river.artifacts.model.LayerInfo;
 import org.dive4elements.river.artifacts.model.map.WMSDBLayerFacet;
@@ -65,11 +65,11 @@
      * Creates a layer file used for Mapserver's mapfile which represents the
      * floodmap.
      *
-     * @param flys The FLYSArtifact that owns <i>wms</i>.
+     * @param flys The D4EArtifact that owns <i>wms</i>.
      * @param wms The WMSLayerFacet that contains information for the layer.
      */
     public void createUeskLayer(
-        FLYSArtifact  flys,
+        D4EArtifact  flys,
         WSPLGENLayerFacet wms,
         String        style,
         CallContext context
@@ -113,10 +113,10 @@
      * Creates a layer file used for Mapserver's mapfile which represents the
      * user defined barriers.
      *
-     * @param flys The FLYSArtifact that owns <i>wms</i>.
+     * @param flys The D4EArtifact that owns <i>wms</i>.
      * @param wms The WMSLayerFacet that contains information for the layer.
      */
-    public void createBarriersLayer(FLYSArtifact flys, WMSLayerFacet wms)
+    public void createBarriersLayer(D4EArtifact flys, WMSLayerFacet wms)
     throws FileNotFoundException, IOException
     {
         logger.debug("createBarriersLayer");
@@ -130,7 +130,7 @@
 
 
     protected void createBarriersLineLayer(
-        FLYSArtifact  flys,
+        D4EArtifact  flys,
         WMSLayerFacet wms
     )
     throws FileNotFoundException, IOException
@@ -175,7 +175,7 @@
     }
 
     protected void createBarriersPolygonLayer(
-            FLYSArtifact  flys,
+            D4EArtifact  flys,
             WMSLayerFacet wms
         )
         throws FileNotFoundException, IOException
@@ -224,10 +224,10 @@
          * Creates a layer file used for Mapserver's mapfile which represents the
          * shape files uploaded by the user.
          *
-         * @param flys The FLYSArtifact that owns <i>wms</i>.
+         * @param flys The D4EArtifact that owns <i>wms</i>.
          * @param wms The WMSLayerFacet that contains information for the layer.
          */
-        public void createUserShapeLayer(FLYSArtifact flys, WMSLayerFacet wms)
+        public void createUserShapeLayer(D4EArtifact flys, WMSLayerFacet wms)
         throws FileNotFoundException, IOException
         {
             logger.debug("createUserShapeLayer");
@@ -290,11 +290,11 @@
          * Creates a layer file used for Mapserver's mapfile which represents
          * geometries from database.
          *
-         * @param flys The FLYSArtifact that owns <i>wms</i>.
+         * @param flys The D4EArtifact that owns <i>wms</i>.
          * @param wms The WMSLayerFacet that contains information for the layer.
          */
         public void createDatabaseLayer(
-            FLYSArtifact    flys,
+            D4EArtifact    flys,
             WMSDBLayerFacet wms,
             String          style
         )
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Sun Apr 28 15:23:01 2013 +0200
@@ -13,7 +13,7 @@
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.common.utils.Config;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.StaticWKmsArtifact;
 import org.dive4elements.river.artifacts.WINFOArtifact;
 import org.dive4elements.river.artifacts.access.RangeAccess;
@@ -50,7 +50,7 @@
 
 
 /**
- * Static helper methods to e.g. access FLYSArtifacts data.
+ * Static helper methods to e.g. access D4EArtifacts data.
  *
  * @deprecated Don't use RiverUtils to get data from an {@link Artifact} anymore.
  * Instead use and/or create a {@link Access} class hierarchy.
@@ -111,9 +111,9 @@
 
     /**
      * Pulls Artifact with given UUID fromm database.
-     * @return FLYSArtifact with given UUID or null (in case of errors).
+     * @return D4EArtifact with given UUID or null (in case of errors).
      */
-    public static FLYSArtifact getArtifact(String uuid, CallContext context) {
+    public static D4EArtifact getArtifact(String uuid, CallContext context) {
         try {
             Artifact artifact = context.getDatabase().getRawArtifact(uuid);
 
@@ -122,16 +122,16 @@
                 return null;
             }
 
-            if (!(artifact instanceof FLYSArtifact)) {
-                logger.error("Artifact '" +uuid+ "' is no valid FLYSArtifact.");
+            if (!(artifact instanceof D4EArtifact)) {
+                logger.error("Artifact '" +uuid+ "' is no valid D4EArtifact.");
                 return null;
             }
 
-            return (FLYSArtifact) artifact;
+            return (D4EArtifact) artifact;
         }
         // TODO: catch more selective
         catch (Exception e) {
-            logger.error("Cannot get FLYSArtifact " + uuid
+            logger.error("Cannot get D4EArtifact " + uuid
                 + " from database (" + e.getMessage() + ").");
             return null;
         }
@@ -182,11 +182,11 @@
      * stored in <i>flys</i> Artifact. If there is no <i>wq_isq</i> parameter
      * existing, WQ_MODE.NONE is returned.
      *
-     * @param flys The FLYSArtifact that stores wq mode relevant parameters.
+     * @param flys The D4EArtifact that stores wq mode relevant parameters.
      *
      * @return an enum WQ_MODE.
      */
-    public static WQ_MODE getWQMode(FLYSArtifact flys) {
+    public static WQ_MODE getWQMode(D4EArtifact flys) {
         if (flys == null) {
             return WQ_MODE.NONE;
         }
@@ -212,7 +212,7 @@
     }
 
 
-    public static WQ_INPUT getWQInputMode(FLYSArtifact flys) {
+    public static WQ_INPUT getWQInputMode(D4EArtifact flys) {
         if (flys == null) {
             return WQ_INPUT.NONE;
         }
@@ -238,7 +238,7 @@
      * @param flysArtifact artifact which has a "river" data.
      * @return double array. min is at[0], max at[1]. null if given artifact is null
      */
-    public static double[] getRiverMinMax(FLYSArtifact flysArtifact) {
+    public static double[] getRiverMinMax(D4EArtifact flysArtifact) {
         if (flysArtifact == null) {
             return null;
         }
@@ -259,7 +259,7 @@
     }
 
 
-    public static double[] getKmFromTo(FLYSArtifact flys) {
+    public static double[] getKmFromTo(D4EArtifact flys) {
         String strFrom = flys.getDataAsString("ld_from");
         String strTo   = flys.getDataAsString("ld_to");
 
@@ -291,7 +291,7 @@
      * (from ld_locations data), null if not parameterized this way.
      */
     // TODO moved to RangeAccess. Resolve remaining calls.
-    private static double[] getLocations(FLYSArtifact flys) {
+    private static double[] getLocations(D4EArtifact flys) {
         String locationStr = flys.getDataAsString("ld_locations");
 
         if (locationStr == null || locationStr.length() == 0) {
@@ -327,14 +327,14 @@
 
 
     /**
-     * Returns the Qs for a given FLYSArtifact. This method currently accepts
+     * Returns the Qs for a given D4EArtifact. This method currently accepts
      * only instances of WINFOArtifact.
      *
-     * @param flys A FLYSArtifact.
+     * @param flys A D4EArtifact.
      *
      * @return the Qs.
      */
-    public static double[] getQs(FLYSArtifact flys) {
+    public static double[] getQs(D4EArtifact flys) {
         // XXX this is not nice!
         if (flys instanceof WINFOArtifact) {
             return ((WINFOArtifact) flys).getQs();
@@ -347,14 +347,14 @@
 
 
     /**
-     * Returns the Ws for a given FLYSArtifact. This method currently accepts
+     * Returns the Ws for a given D4EArtifact. This method currently accepts
      * only instances of WINFOArtifact.
      *
-     * @param flys A FLYSArtifact.
+     * @param flys A D4EArtifact.
      *
      * @return the Ws.
      */
-    public static double[] getWs(FLYSArtifact flys) {
+    public static double[] getWs(D4EArtifact flys) {
         // XXX this is not nice!
         if (flys instanceof WINFOArtifact) {
             return ((WINFOArtifact) flys).getWs();
@@ -372,7 +372,7 @@
      *
      * @return the selected River or null if no river has been chosen yet.
      */
-    public static River getRiver(FLYSArtifact flys) {
+    public static River getRiver(D4EArtifact flys) {
         String sRiver = getRivername(flys);
 
         return (sRiver != null)
@@ -385,11 +385,11 @@
      * Returns the name of the river specified in the given <i>flys</i>
      * Artifact.
      *
-     * @param flys The FLYSArtifact that stores a river relevant information.
+     * @param flys The D4EArtifact that stores a river relevant information.
      *
      * @return the name of the specified river or null.
      */
-    public static String getRivername(FLYSArtifact flys) {
+    public static String getRivername(D4EArtifact flys) {
         return flys != null ? flys.getDataAsString("river") : null;
     }
 
@@ -398,11 +398,11 @@
      * Extracts the SRID defined in the global configuration for the river
      * specified in <i>artifact</i>.
      *
-     * @param artifact The FLYSArtifact that stores the name of the river.
+     * @param artifact The D4EArtifact that stores the name of the river.
      *
      * @return the SRID as string (e.g. "31466").
      */
-    public static String getRiverSrid(FLYSArtifact artifact) {
+    public static String getRiverSrid(D4EArtifact artifact) {
         String river = artifact.getDataAsString("river");
 
         if (river == null || river.length() == 0) {
@@ -451,7 +451,7 @@
      * @param flys the artifact in question.
      * @return (First) gauge of locations of river of artifact.
      */
-    public static Gauge getGauge(FLYSArtifact flys) {
+    public static Gauge getGauge(D4EArtifact flys) {
         River river = getRiver(flys);
 
         if (river == null) {
@@ -482,14 +482,14 @@
     }
 
 
-    public static String getGaugename(FLYSArtifact flys) {
+    public static String getGaugename(D4EArtifact flys) {
         Gauge gauge = getGauge(flys);
 
         return gauge != null ? gauge.getName() : null;
     }
 
 
-    public static Gauge getReferenceGauge(FLYSArtifact flys) {
+    public static Gauge getReferenceGauge(D4EArtifact flys) {
         Long officialNumber = flys.getDataAsLong("reference_gauge");
 
         return officialNumber != null
@@ -498,7 +498,7 @@
     }
 
 
-    public static String getReferenceGaugeName(FLYSArtifact flys) {
+    public static String getReferenceGaugeName(D4EArtifact flys) {
         Gauge refGauge = getReferenceGauge(flys);
 
         return refGauge != null
@@ -698,15 +698,15 @@
 
     /**
      * This method returns the description for a given <i>km</i> for a specific
-     * river. The river is provided by the FLYSArtifact <i>flys</i>.
+     * river. The river is provided by the D4EArtifact <i>flys</i>.
      *
-     * @param flys The FLYSArtifact that provides a river.
+     * @param flys The D4EArtifact that provides a river.
      * @param km The kilometer.
      *
      * @return the description for <i>km</i> or an empty string if no
      * description was found.
      */
-    public static String getLocationDescription(FLYSArtifact flys, double km) {
+    public static String getLocationDescription(D4EArtifact flys, double km) {
         String river = getRivername(flys);
 
         if (river == null) {
@@ -907,7 +907,7 @@
      * @return the gauges based on the selected kilometer range (null if
      *         none/no range set).
      */
-    public static List<Gauge> getGauges(FLYSArtifact flys) {
+    public static List<Gauge> getGauges(D4EArtifact flys) {
 
         River river = getRiver(flys);
         if (river == null) {
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java	Sun Apr 28 15:14:30 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/FacetCreator.java	Sun Apr 28 15:23:01 2013 +0200
@@ -18,7 +18,7 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.access.RangeAccess;
-import org.dive4elements.river.artifacts.FLYSArtifact;
+import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.map.WMSLayerFacet;
 import org.dive4elements.river.artifacts.model.map.WSPLGENLayerFacet;
@@ -39,7 +39,7 @@
     public static final String I18N_USERSHAPE         = "floodmap.usershape";
     public static final String I18N_USERSHAPE_DEFAULT = "floodmap.usershape";
 
-    protected FLYSArtifact artifact;
+    protected D4EArtifact artifact;
 
     protected CallContext  cc;
 
@@ -55,7 +55,7 @@
 
 
     public FacetCreator(
-        FLYSArtifact artifact,
+        D4EArtifact artifact,
         CallContext  cc,
         String       hash,
         String       sId,

http://dive4elements.wald.intevation.org