/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2009, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.wcs.xml.v100; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.geotoolkit.gml.xml.v311.CodeType; import org.geotoolkit.ows.xml.AbstractKeywords; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="keyword" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/> * <element name="type" type="{http://www.opengis.net/gml}CodeType" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * @author Guilhem Legal * @module */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "keyword", "type" }) @XmlRootElement(name = "keywords") public class Keywords implements AbstractKeywords { @XmlElement(required = true) private List<String> keyword; private CodeType type; /** * Empty constructor used by JAXB. */ Keywords(){ } /** * Build a new list of keywords. */ public Keywords(final List<String> keyword) { this.keyword = keyword; } /** * Build a new list of keywords with the element of the list in the parameters. */ public Keywords(final String... keywords) { this.keyword = new ArrayList<String>(); for (String word: keywords){ keyword.add(word); } } /** * Gets the value of the keyword property. */ public List<String> getKeyword() { if (keyword == null) { keyword = new ArrayList<String>(); } return this.keyword; } /** * Gets the value of the type property. */ public CodeType getType() { return type; } @Override public List<String> getKeywordList() { return getKeyword(); } }