view flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultCollectionItem.java @ 87:c8cd1b918901

Bugfix: Step back will remove duplicated output tab and an extended chart image URL bypasses the browser cache. flys-client/trunk@1599 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 28 Mar 2011 17:04:17 +0000
parents 74257b95567b
children f6fbfdc813f0
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.util.List;


/**
 * The default implementation of a CollectionItem.
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class DefaultCollectionItem implements CollectionItem {

    /** The identifier that specifies the artifact related to this item.*/
    protected String identifier;

    /** The hash that specifies the artifact related to this item.*/
    protected String hash;

    /** The list of output modes supported by the artifact of this item.*/
    protected List<OutputMode> outputModes;


    /**
     * 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.
     */
    public DefaultCollectionItem(
        String           identifier,
        String           hash,
        List<OutputMode> modes) {
        this.identifier  = identifier;
        this.hash        = hash;
        this.outputModes = modes;
    }


    public String identifier() {
        return identifier;
    }


    public String hash() {
        return hash;
    }


    public List<OutputMode> getOutputModes() {
        return outputModes;
    }


    public List<Facet> getFacets(String outputmode) {
        for (OutputMode mode: outputModes) {
            if (outputmode.equals(mode.getName())) {
                // TODO Return facets, but facets are not implemented for
                // OutputModes yet!
            }
        }

        return null;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org