Mercurial > dive4elements > river
changeset 9546:abf4d0b10270
FlowDepths: DataCage AWSPL from "Betrieb und Unterhaltung"
author | gernotbelger |
---|---|
date | Fri, 19 Oct 2018 13:34:11 +0200 |
parents | f303d693a70f |
children | 26ac94cff0b6 |
files | artifacts/doc/conf/meta-data.xml artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FixAnalysisYearXPathFunction.java |
diffstat | 2 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml Thu Oct 18 14:10:20 2018 +0200 +++ b/artifacts/doc/conf/meta-data.xml Fri Oct 19 13:34:11 2018 +0200 @@ -676,7 +676,7 @@ </dc:macro> <dc:macro name="longitudinal"> - <dc:filter expr="$out_name = 'longitudinal_section' and $a_state != 'state.fix.vollmer.compute'"> + <dc:filter expr="$out_name = 'longitudinal_section' and $a_state != 'state.fix.vollmer.compute' and $a_state != 'state.bundu.vollmer.compute'"> <dc:if test="dc:has-result()"> <waterlevels_ls> <dc:call-macro name="collection-group"> @@ -700,16 +700,14 @@ </dc:macro> <dc:macro name="longitudinal-section-fix-vollmer"> - <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and - ($facet_name = 'longitudinal_section.w' or - $facet_name = 'longitudinal_section.q') - "> + <dc:filter expr="($a_state = 'state.fix.vollmer.compute' or $a_state = 'state.bundu.vollmer.compute') and + ($facet_name = 'longitudinal_section.w' or $facet_name = 'longitudinal_section.q')"> <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> </dc:filter> </dc:macro> <dc:macro name="longitudinal-section-fix-vollmer_w"> - <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.w'"> + <dc:filter expr=" ($a_state = 'state.fix.vollmer.compute' or $a_state = 'state.bundu.vollmer.compute') and $facet_name = 'longitudinal_section.w'"> <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> </dc:filter> </dc:macro> @@ -723,7 +721,11 @@ <dc:element name="${facet_name}"> <dc:attribute name="description" value="${facet_description}"/> <dc:attribute name="ids" value="${facet_num}"/> + <!-- FIXME --> <dc:attribute name="factory" value="fixanalysis"/> + <!-- bundu works due to same implementation + <dc:attribute name="factory" value="bundu"/> + --> <dc:attribute name="target_out" value="${out}"/> <dc:attribute name="artifact-id" value="${a_gid}"/> <dc:attribute name="out" value="longitudinal_section"/> @@ -938,7 +940,7 @@ <dc:comment comment="For building differences."/> <dc:macro name="differences-fix"> <dc:comment comment="Vollmer curves need own factory"/> - <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.w'"> + <dc:filter expr="($a_state = 'state.fix.vollmer.compute' or $a_state = 'state.bundu.vollmer.compute') and $facet_name = 'longitudinal_section.w'"> <dc:if test="dc:has-result()"> <vollmer_waterlevels> <dc:call-macro name="collection-group"> @@ -956,6 +958,7 @@ <dc:element name="${facet_name}"> <dc:attribute name="description" value="${combined_desc}"/> <dc:attribute name="ids" value="${facet_num}"/> + <!-- FIXME: different factories! --> <dc:attribute name="factory" value="fixanalysis"/> <dc:attribute name="target_out" value="${out}"/> <dc:attribute name="artifact-id" value="${a_gid}"/> @@ -967,7 +970,7 @@ </vollmer_waterlevels> </dc:if> </dc:filter> - <dc:filter expr="not($a_state = 'state.fix.vollmer.compute') and (($out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w') and + <dc:filter expr="not($a_state = 'state.fix.vollmer.compute' or $a_state = 'state.bundu.vollmer.compute') and (($out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w') and (not ($current-state-id = 'state.winfo.uesk.wsp' and $ld_m = 'location')))"> <dc:if test="dc:has-result()"> <waterlevels>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FixAnalysisYearXPathFunction.java Thu Oct 18 14:10:20 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FixAnalysisYearXPathFunction.java Fri Oct 19 13:34:11 2018 +0200 @@ -16,8 +16,8 @@ import javax.xml.xpath.XPathFunctionException; import org.dive4elements.artifacts.CallContext; +import org.dive4elements.river.artifacts.AbstractFixBunduArtifact; import org.dive4elements.river.artifacts.D4EArtifact; -import org.dive4elements.river.artifacts.FixationArtifact; import org.dive4elements.river.artifacts.access.FixRealizingAccess; import org.dive4elements.river.artifacts.model.fixings.FixRealizingCalculationExtended; import org.dive4elements.river.utils.RiverUtils; @@ -48,10 +48,10 @@ return null; final D4EArtifact artifact = RiverUtils.getArtifact(uuid.toString(), this.context); - if (!(artifact instanceof FixationArtifact)) + if (!(artifact instanceof AbstractFixBunduArtifact)) return null; - final FixationArtifact fixation = (FixationArtifact) artifact; + final AbstractFixBunduArtifact fixation = (AbstractFixBunduArtifact) artifact; // Get W/Q input per gauge for this case. final FixRealizingAccess fixAccess = new FixRealizingAccess(fixation);