Mercurial > dive4elements > river
changeset 4017:e1691b74f3aa flys-2.9.2
Let AnnotationFacet have name of type, if type was chosen.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 02 Oct 2012 11:39:18 +0200 |
parents | 87aafd2c643a |
children | d8f8eaf85154 e249bd8fe72e |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/AnnotationRiverState.java |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 02 10:47:44 2012 +0200 +++ b/flys-artifacts/ChangeLog Tue Oct 02 11:39:18 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-02 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/AnnotationRiverState.java: + If type of annotation was chosen, give facet name of type. + 2012-10-02 Felix Wolfsteller <felix.wolfsteller@intevation.de> * flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/AnnotationRiverState.java Tue Oct 02 10:47:44 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/AnnotationRiverState.java Tue Oct 02 11:39:18 2012 +0200 @@ -8,6 +8,7 @@ import de.intevation.artifactdatabase.state.Facet; +import de.intevation.flys.artifacts.AnnotationArtifact; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.AnnotationFacet; @@ -51,10 +52,17 @@ ) { logger.debug("AnnotationRiverState.computeInit()"); + AnnotationArtifact annotationArtifact = (AnnotationArtifact) artifact; + + String facetName = annotationArtifact.getFilterName(); + if (facetName == null) { + facetName = Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION); + } + AnnotationFacet facet = new AnnotationFacet( 0, LONGITUDINAL_ANNOTATION, - Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION)); + facetName); facets.add(facet); return null;