/* * 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 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.AbstractContact; /** * For OWS use in the service metadata document, the * optional hoursOfService and contactInstructions elements were retained, * as possibly being useful in the ServiceProvider section. * * <p>Java class for ContactType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="ContactType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element name="Phone" type="{http://www.opengis.net/ows/2.0}TelephoneType" minOccurs="0"/> * <element name="Address" type="{http://www.opengis.net/ows/2.0}AddressType" minOccurs="0"/> * <element name="OnlineResource" type="{http://www.opengis.net/ows/2.0}OnlineResourceType" minOccurs="0"/> * <element name="HoursOfService" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="ContactInstructions" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ContactType", propOrder = { "phone", "address", "onlineResource", "hoursOfService", "contactInstructions" }) public class ContactType implements AbstractContact { @XmlElement(name = "Phone") private TelephoneType phone; @XmlElement(name = "Address") private AddressType address; @XmlElement(name = "OnlineResource") private OnlineResourceType onlineResource; @XmlElement(name = "HoursOfService") private String hoursOfService; @XmlElement(name = "ContactInstructions") private String contactInstructions; /** * Empty constructor used by JAXB. */ ContactType() { } /** * Build a new Contact. */ public ContactType(final TelephoneType phone, final AddressType address, final OnlineResourceType onlineResource, final String hoursOfService, final String contactInstructions) { this.address = address; this.contactInstructions = contactInstructions; this.hoursOfService = hoursOfService; this.onlineResource = onlineResource; this.phone = phone; } public ContactType(final String phone, final String fax, final String email, final String address, final String city, final String state, final String zipCode, final String country, final String hoursOfService, final String contactInstructions) { this.address = new AddressType(address, city, state, zipCode, country, email); this.phone = new TelephoneType(phone, fax); this.hoursOfService = hoursOfService; this.contactInstructions = contactInstructions; } /** * Gets the value of the phone property. * * @return * possible object is * {@link TelephoneType } * */ @Override public TelephoneType getPhone() { return phone; } /** * Sets the value of the phone property. * * @param value * allowed object is * {@link TelephoneType } * */ public void setPhone(TelephoneType value) { this.phone = value; } /** * Gets the value of the address property. * * @return * possible object is * {@link AddressType } * */ @Override public AddressType getAddress() { return address; } /** * Sets the value of the address property. * * @param value * allowed object is * {@link AddressType } * */ public void setAddress(AddressType value) { this.address = value; } /** * Gets the value of the onlineResource property. * * @return * possible object is * {@link OnlineResourceType } * */ @Override public OnlineResourceType getOnlineResource() { return onlineResource; } /** * Sets the value of the onlineResource property. * * @param value * allowed object is * {@link OnlineResourceType } * */ public void setOnlineResource(OnlineResourceType value) { this.onlineResource = value; } /** * Gets the value of the hoursOfService property. * * @return * possible object is * {@link String } * */ @Override public String getHoursOfService() { return hoursOfService; } /** * Sets the value of the hoursOfService property. * * @param value * allowed object is * {@link String } * */ public void setHoursOfService(String value) { this.hoursOfService = value; } /** * Gets the value of the contactInstructions property. * * @return * possible object is * {@link String } * */ @Override public String getContactInstructions() { return contactInstructions; } /** * Sets the value of the contactInstructions property. * * @param value * allowed object is * {@link String } * */ public void setContactInstructions(String value) { this.contactInstructions = value; } }