001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/model/metadata/iso19115/ContactInfo.java $
002    /*
003    /*----------------------------------------------------------------------------
004     This file is part of deegree, http://deegree.org/
005     Copyright (C) 2001-2009 by:
006       Department of Geography, University of Bonn
007     and
008       lat/lon GmbH
009    
010     This library is free software; you can redistribute it and/or modify it under
011     the terms of the GNU Lesser General Public License as published by the Free
012     Software Foundation; either version 2.1 of the License, or (at your option)
013     any later version.
014     This library is distributed in the hope that it will be useful, but WITHOUT
015     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
016     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
017     details.
018     You should have received a copy of the GNU Lesser General Public License
019     along with this library; if not, write to the Free Software Foundation, Inc.,
020     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
021    
022     Contact information:
023    
024     lat/lon GmbH
025     Aennchenstr. 19, 53177 Bonn
026     Germany
027     http://lat-lon.de/
028    
029     Department of Geography, University of Bonn
030     Prof. Dr. Klaus Greve
031     Postfach 1147, 53001 Bonn
032     Germany
033     http://www.geographie.uni-bonn.de/deegree/
034    
035     e-mail: info@deegree.org
036    ----------------------------------------------------------------------------*/
037    
038    package org.deegree.model.metadata.iso19115;
039    
040    /**
041     * Represents ContactInfo entity compliant to ISO 19115 schema.
042     *
043     *
044     * @author <a href="mailto:schaefer@lat-lon.de">Axel Schaefer </a>
045     * @version $Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
046     * @see <a href="http://http://www.iso.ch">International Organization for Standardization</a>
047     */
048    public class ContactInfo {
049    
050        private Address address = null;
051    
052        private String contactinstructions = null;
053    
054        private String hoursofservice = null;
055    
056        private OnlineResource onlineresource = null;
057    
058        private Phone phone = null;
059    
060        /**
061         * Creates a new instance of ContactInfo
062         *
063         * @param address
064         * @param contactinstructions
065         * @param hoursofservice
066         * @param onlineresource
067         * @param phone
068         */
069        public ContactInfo( Address address, String contactinstructions, String hoursofservice,
070                            OnlineResource onlineresource, Phone phone ) {
071            setAddress( address );
072            setContactInstructions( contactinstructions );
073            setHoursOfService( hoursofservice );
074            setOnLineResource( onlineresource );
075            setPhone( phone );
076        }
077    
078        /**
079         * @return address
080         */
081        public Address getAddress() {
082            return address;
083        }
084    
085        /**
086         * @see ContactInfo#getAddress()
087         */
088        public void setAddress( Address address ) {
089            this.address = address;
090        }
091    
092        /**
093         * @return contact instructions
094         *
095         */
096        public String getContactInstructions() {
097            return contactinstructions;
098        }
099    
100        /**
101         * @see ContactInfo#getContactInstructions()
102         */
103        public void setContactInstructions( String contactinstructions ) {
104            this.contactinstructions = contactinstructions;
105        }
106    
107        /**
108         * @return hours of service
109         *
110         */
111        public String getHoursOfService() {
112            return hoursofservice;
113        }
114    
115        /**
116         * @see ContactInfo#getHoursOfService()
117         */
118        public void setHoursOfService( String hoursofservice ) {
119            this.hoursofservice = hoursofservice;
120        }
121    
122        /**
123         * @return online resource
124         *
125         */
126        public OnlineResource getOnLineResource() {
127            return onlineresource;
128        }
129    
130        /**
131         * @see ContactInfo#getOnLineResource()
132         */
133        public void setOnLineResource( OnlineResource onlineresource ) {
134            this.onlineresource = onlineresource;
135        }
136    
137        /**
138         * @return phone
139         */
140        public Phone getPhone() {
141            return phone;
142        }
143    
144        /**
145         * @see ContactInfo#getPhone()
146         */
147        public void setPhone( Phone phone ) {
148            this.phone = phone;
149        }
150    
151        /**
152         * to String method
153         */
154        public String toString() {
155            StringBuffer buf = new StringBuffer( 64 );
156            buf.append( "address = " + address + "\n" );
157            buf.append( "contactinstructions = " + contactinstructions + "\n" );
158            buf.append( "hoursofservice = " + hoursofservice + "\n" );
159            buf.append( "onlineresource = " + onlineresource + "\n" );
160            buf.append( "phone = " + phone + "\n" );
161            return buf.toString();
162        }
163    
164    }