001/*
002 * Copyright 2020 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.io.Serializable;
021import java.net.URI;
022import java.util.List;
023
024import javax.annotation.Nullable;
025import javax.validation.constraints.Size;
026
027/**
028 * A package visible providing the commonality for addresses, including the constraint validations.
029 */
030@SuppressWarnings("unused")
031public interface Address extends Serializable {
032
033  /**
034   * electronicMailAddress in EML
035   */
036  List<String> getEmail();
037
038  void setEmail(List<String> email);
039
040  /**
041   * phone in EML
042   */
043  List<String> getPhone();
044
045  void setPhone(List<String> phone);
046
047  /**
048   * deliveryPoint in EML
049   */
050  List<String> getAddress();
051
052  void setAddress(List<String> address);
053
054  /**
055   * city in EML
056   */
057  @Nullable
058  @Size(min = 1)
059  String getCity();
060
061  void setCity(String city);
062
063  /**
064   * administrativeArea in EML
065   */
066  @Nullable
067  @Size(min = 1)
068  String getProvince();
069
070  void setProvince(String province);
071
072  /**
073   * country in EML
074   */
075  @Nullable
076  Country getCountry();
077
078  void setCountry(Country country);
079
080  /**
081   * postalCode in EML
082   */
083  @Nullable
084  @Size(min = 1)
085  String getPostalCode();
086
087  void setPostalCode(String postalCode);
088
089  /**
090   * Institution name as part of the address
091   */
092  @Nullable
093  @Size(min = 2)
094  String getOrganization();
095
096  void setOrganization(String organization);
097
098  /**
099   * List of homepage websites.
100   */
101  List<URI> getHomepage();
102
103  void setHomepage(List<URI> homepage);
104}