001/*
002 * Copyright 2013 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.model.registry;
017
018import org.gbif.api.vocabulary.Country;
019
020import java.net.URI;
021import java.util.List;
022import javax.annotation.Nullable;
023import javax.validation.constraints.Size;
024
025/**
026 * A package visible providing the commonality for addresses, including the constraint validations.
027 */
028public interface Address {
029
030  /**
031   * electronicMailAddress in EML
032   */
033  List<String> getEmail();
034
035  void setEmail(List<String> email);
036
037  /**
038   * phone in EML
039   */
040  List<String> getPhone();
041
042  void setPhone(List<String> phone);
043
044  /**
045   * deliveryPoint in EML
046   */
047  List<String> getAddress();
048
049  void setAddress(List<String> address);
050
051  /**
052   * city in EML
053   */
054  @Nullable
055  @Size(min = 1)
056  String getCity();
057
058  void setCity(String city);
059
060  /**
061   * administrativeArea in EML
062   */
063  @Nullable
064  @Size(min = 1)
065  String getProvince();
066
067  void setProvince(String province);
068
069  /**
070   * country in EML
071   */
072  @Nullable
073  Country getCountry();
074
075  void setCountry(Country country);
076
077  /**
078   * postalCode in EML
079   */
080  @Nullable
081  @Size(min = 1)
082  String getPostalCode();
083
084  void setPostalCode(String postalCode);
085
086  /**
087   * Institution name as part of the address
088   */
089  @Nullable
090  @Size(min = 2)
091  String getOrganization();
092
093  void setOrganization(String organization);
094
095  /**
096   * List of homepage websites.
097   */
098  List<URI> getHomepage();
099
100  void setHomepage(List<URI> homepage);
101}