Mercurial > dive4elements > river
changeset 8292:86e532106abb
Set facet activity for middle bed height.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Wed, 17 Sep 2014 17:56:37 +0200 |
parents | 84ac8549e87b |
children | 301a32bd7045 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java |
diffstat | 1 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Wed Sep 17 17:35:36 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MiddleBedHeight.java Wed Sep 17 17:56:37 2014 +0200 @@ -14,8 +14,10 @@ import org.apache.log4j.Logger; import org.dive4elements.artifacts.CallContext; +import org.dive4elements.artifacts.Artifact; import org.dive4elements.artifactdatabase.state.Facet; +import org.dive4elements.artifactdatabase.state.FacetActivity; import org.dive4elements.river.artifacts.D4EArtifact; import org.dive4elements.river.artifacts.access.BedHeightAccess; @@ -136,5 +138,24 @@ return res; } + + static { + // Active/deactivate facets. + FacetActivity.Registry.getInstance().register( + "minfo", + new FacetActivity() { + @Override + public Boolean isInitialActive( + Artifact artifact, + Facet facet, + String output + ) { + if (facet.getName().equals(MIDDLE_BED_HEIGHT_SINGLE)) { + return Boolean.TRUE; + } + return null; + } + }); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :