/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2013, 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.ows.xml.v200; 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.XmlType; import org.geotoolkit.ows.xml.AbstractAddress; /** * Location of the responsible individual or * organization. * * <p>Java class for AddressType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="AddressType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="DeliveryPoint" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * <element name="City" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="AdministrativeArea" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="PostalCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="Country" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="ElectronicMailAddress" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AddressType", propOrder = { "deliveryPoint", "city", "administrativeArea", "postalCode", "country", "electronicMailAddress" }) public class AddressType implements AbstractAddress{ @XmlElement(name = "DeliveryPoint") private List<String> deliveryPoint; @XmlElement(name = "City") private String city; @XmlElement(name = "AdministrativeArea") private String administrativeArea; @XmlElement(name = "PostalCode") private String postalCode; @XmlElement(name = "Country") private String country; @XmlElement(name = "ElectronicMailAddress") private List<String> electronicMailAddress; /** * Empty constructor used by JAXB */ AddressType(){ } /** * Build a new Adress. */ public AddressType(final List<String> deliveryPoint, final String city, final String administrativeArea, final String postalCode, final String country, final List<String> electronicMailAddress){ this.administrativeArea = administrativeArea; this.city = city; this.country = country; this.deliveryPoint = deliveryPoint; this.electronicMailAddress = electronicMailAddress; this.postalCode = postalCode; } /** * Build a simple new Adress. */ public AddressType(final String deliveryPoint, final String city, final String administrativeArea, final String postalCode, final String country, final String electronicMailAddress){ this.administrativeArea = administrativeArea; this.city = city; this.country = country; this.deliveryPoint = new ArrayList<>(); this.deliveryPoint.add(deliveryPoint); this.electronicMailAddress = new ArrayList<>(); this.electronicMailAddress.add(electronicMailAddress); this.postalCode = postalCode; } /** * Gets the value of the deliveryPoint property. * * */ @Override public List<String> getDeliveryPoint() { if (deliveryPoint == null) { deliveryPoint = new ArrayList<>(); } return this.deliveryPoint; } /** * Gets the value of the city property. * * @return * possible object is * {@link String } * */ @Override public String getCity() { return city; } /** * Sets the value of the city property. * * @param value * allowed object is * {@link String } * */ public void setCity(String value) { this.city = value; } /** * Gets the value of the administrativeArea property. * * @return * possible object is * {@link String } * */ @Override public String getAdministrativeArea() { return administrativeArea; } /** * Sets the value of the administrativeArea property. * * @param value * allowed object is * {@link String } * */ public void setAdministrativeArea(String value) { this.administrativeArea = value; } /** * Gets the value of the postalCode property. * * @return * possible object is * {@link String } * */ @Override public String getPostalCode() { return postalCode; } /** * Sets the value of the postalCode property. * * @param value * allowed object is * {@link String } * */ public void setPostalCode(String value) { this.postalCode = value; } /** * Gets the value of the country property. * * @return * possible object is * {@link String } * */ @Override public String getCountry() { return country; } /** * Sets the value of the country property. * * @param value * allowed object is * {@link String } * */ public void setCountry(String value) { this.country = value; } /** * Gets the value of the electronicMailAddress property. * */ @Override public List<String> getElectronicMailAddress() { if (electronicMailAddress == null) { electronicMailAddress = new ArrayList<>(); } return this.electronicMailAddress; } }