Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultCollectionItem.java @ 9499:853f2dafc16e
VegetationZones in CrossSectionsDiagram
author | gernotbelger |
---|---|
date | Thu, 27 Sep 2018 18:06:26 +0200 |
parents | ea9eef426962 |
children |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultCollectionItem.java Wed Sep 26 15:48:05 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultCollectionItem.java Thu Sep 27 18:06:26 2018 +0200 @@ -11,7 +11,6 @@ import java.util.List; import java.util.Map; - /** * The default implementation of a CollectionItem (artifact). * @@ -19,6 +18,8 @@ */ public class DefaultCollectionItem implements CollectionItem { + private static final long serialVersionUID = 1L; + /** The identifier that specifies the artifact related to this item. */ protected String identifier; @@ -31,52 +32,46 @@ /** The map of datanames to data values. */ protected Map<String, String> data; - /** * An empty constructor. */ public DefaultCollectionItem() { } - /** * The default constructor to create a new CollectionItem related to an * artifact with output modes. * - * @param identifier The identifier of an artifact. - * @param outputModes The output modes supported by this item. + * @param identifier + * The identifier of an artifact. + * @param outputModes + * The output modes supported by this item. */ - public DefaultCollectionItem( - String identifier, - String hash, - List<OutputMode> modes, - Map<String,String> data - ) { - this.identifier = identifier; - this.hash = hash; + public DefaultCollectionItem(final String identifier, final String hash, final List<OutputMode> modes, final Map<String, String> data) { + this.identifier = identifier; + this.hash = hash; this.outputModes = modes; - this.data = data; + this.data = data; } - - + @Override public String identifier() { - return identifier; + return this.identifier; } - + @Override public String hash() { - return hash; + return this.hash; } - + @Override public List<OutputMode> getOutputModes() { - return outputModes; + return this.outputModes; } - - public List<Facet> getFacets(String outputmode) { - for (OutputMode mode: outputModes) { + @Override + public List<Facet> getFacets(final String outputmode) { + for (final OutputMode mode : this.outputModes) { if (outputmode.equals(mode.getName())) { // TODO Return facets, but facets are not implemented for // OutputModes yet! @@ -86,11 +81,12 @@ return null; } - /** * Returns artifact data. + * * @return key/value data map */ + @Override public Map<String, String> getData() { return this.data; }