view flys-client/src/main/java/de/intevation/flys/client/shared/model/OutputSettings.java @ 1464:c899a7ffdc8f

Extract and parse the output settings from describe document and add settings objects to collection. flys-client/trunk@3503 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 20 Dec 2011 15:32:08 +0000
parents 8da36efc839a
children 3304608baf35
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;

/**
 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
 */
public class OutputSettings implements Settings {

    /** The output name. */
    protected String name;

    /** The categories and settings container. */
    protected HashMap<String, List<Property> > categories;


    public OutputSettings() {
        this.categories = new HashMap<String, List<Property> >();
    }


    public OutputSettings(String name) {
        this.name = name;
        this.categories = new HashMap<String, List<Property> >();
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getName() {
        return this.name;
    }


    public void setSettings(String category, List<Property> settings) {
        if (this.categories == null) {
            this.categories = new HashMap<String, List<Property> >();
        }
        this.categories.put(category, settings);
    }


    public List<Property> getSettings(String category) {
        return categories.get(category);
    }


    public List getCategories() {
        ArrayList<String> list = new ArrayList<String>(categories.keySet());
        return list;
    }
}

http://dive4elements.wald.intevation.org