teichmann@5861: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5861: * Software engineering by Intevation GmbH teichmann@5861: * teichmann@5861: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5861: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5861: * documentation coming with Dive4Elements River for details. teichmann@5861: */ teichmann@5861: teichmann@5835: package org.dive4elements.river.client.shared.model; ingo@63: ingo@63: import java.io.Serializable; ingo@275: import java.util.List; ingo@63: teichmann@5835: import org.dive4elements.river.client.client.ui.CollectionView; teichmann@5835: import org.dive4elements.river.client.client.ui.OutputTab; ingo@796: ingo@63: ingo@63: /** ingo@63: * This interface describes an output mode of an artifact. ingo@63: * ingo@63: * @author Ingo Weinzierl ingo@63: */ ingo@63: public interface OutputMode extends Serializable { ingo@63: ingo@63: /** ingo@63: * Retrieves the name of this mode. ingo@63: * ingo@63: * @return the name of this mode. ingo@63: */ ingo@63: String getName(); ingo@63: ingo@63: ingo@63: /** ingo@63: * Retrieves the description of this mode. ingo@63: * ingo@63: * @return the description of this mode. ingo@63: */ ingo@63: String getDescription(); ingo@63: ingo@63: ingo@63: /** ingo@63: * Retrieves the mime-type of this mode. ingo@63: * ingo@63: * ingo@63: * @return the mime-type of this mode. ingo@63: */ ingo@63: String getMimeType(); ingo@270: ingo@270: ingo@270: /** ingo@796: * Returns the type of this mode. ingo@796: * ingo@796: * @return the type of this mode. ingo@796: */ ingo@796: String getType(); ingo@796: ingo@796: ingo@796: /** ingo@270: * Adds a new facet to this mode. ingo@270: * ingo@270: * @param facet The new facet. ingo@270: */ ingo@270: void addFacet(Facet facet); ingo@270: ingo@270: ingo@270: /** ingo@270: * Returns the number of facets supported by this mode. ingo@270: * ingo@270: * @return the number of facets. ingo@270: */ ingo@270: int getFacetCount(); ingo@270: ingo@270: ingo@270: /** ingo@270: * Returns the facet at a given position. ingo@270: * ingo@270: * @param idx The position of a facet. ingo@270: * ingo@270: * @return a facet. ingo@270: */ ingo@270: Facet getFacet(int idx); ingo@270: ingo@270: ingo@270: /** ingo@270: * Returns a facet based on its name. ingo@270: * ingo@270: * @param name The name of the facet. ingo@270: * ingo@270: * @return a facet or null if no such facet is available. ingo@270: */ ingo@270: Facet getFacet(String name); ingo@275: ingo@275: ingo@275: /** ingo@275: * Returns all facets of this mode. ingo@275: * ingo@275: * @return all facets. ingo@275: */ ingo@275: List getFacets(); ingo@796: ingo@796: ingo@796: /** ingo@796: * Returns an OutputTab that is used to render the output mode. ingo@796: * ingo@796: * @param t The title. ingo@796: * @param c The Collection. ingo@796: * @param p The parent CollectionView. ingo@796: * ingo@796: * @return an OutputTab. ingo@796: */ ingo@796: OutputTab createOutputTab(String t, Collection c, CollectionView p); ingo@63: } ingo@63: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :