001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/owscommon_1_1_0/Reference.java $
002    /*----------------------------------------------------------------------------
003     This file is part of deegree, http://deegree.org/
004     Copyright (C) 2001-2009 by:
005       Department of Geography, University of Bonn
006     and
007       lat/lon GmbH
008    
009     This library is free software; you can redistribute it and/or modify it under
010     the terms of the GNU Lesser General Public License as published by the Free
011     Software Foundation; either version 2.1 of the License, or (at your option)
012     any later version.
013     This library is distributed in the hope that it will be useful, but WITHOUT
014     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
015     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
016     details.
017     You should have received a copy of the GNU Lesser General Public License
018     along with this library; if not, write to the Free Software Foundation, Inc.,
019     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020    
021     Contact information:
022    
023     lat/lon GmbH
024     Aennchenstr. 19, 53177 Bonn
025     Germany
026     http://lat-lon.de/
027    
028     Department of Geography, University of Bonn
029     Prof. Dr. Klaus Greve
030     Postfach 1147, 53001 Bonn
031     Germany
032     http://www.geographie.uni-bonn.de/deegree/
033    
034     e-mail: info@deegree.org
035    ----------------------------------------------------------------------------*/
036    
037    package org.deegree.owscommon_1_1_0;
038    
039    import java.util.ArrayList;
040    import java.util.List;
041    
042    import org.deegree.framework.util.Pair;
043    
044    /**
045     * <code>Reference</code> encapsulates the reference element of ows 1.1.0
046     *
047     * @author <a href="mailto:bezema@lat-lon.de">Rutger Bezema</a>
048     *
049     * @author last edited by: $Author: mschneider $
050     *
051     * @version $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
052     *
053     */
054    public class Reference {
055    
056        private final String hrefAttribute;
057    
058        private final String roleAttribute;
059    
060        private final String typeAttribute;
061    
062        private final Pair<String, String> identifier;
063    
064        private final List<String> abstracts;
065    
066        private final String format;
067    
068        private final List<Metadata> metadatas;
069    
070        /**
071         * @param hrefAttribute
072         * @param roleAttribute
073         * @param typeAttribute
074         * @param identifier
075         *            a &lt; value, codeSpace &gt; pair
076         * @param abstracts
077         * @param format
078         * @param metadatas
079         *            a list of metadatas
080         */
081        public Reference( String hrefAttribute, String roleAttribute, String typeAttribute,
082                          Pair<String, String> identifier, List<String> abstracts, String format, List<Metadata> metadatas ) {
083            this.hrefAttribute = hrefAttribute;
084            this.roleAttribute = roleAttribute;
085            this.typeAttribute = typeAttribute;
086            this.identifier = identifier;
087            if ( abstracts == null ) {
088                abstracts = new ArrayList<String>();
089            }
090            this.abstracts = abstracts;
091            this.format = format;
092            if ( metadatas == null ) {
093                this.metadatas = new ArrayList<Metadata>();
094            } else {
095                this.metadatas = metadatas;
096            }
097        }
098    
099        /**
100         * @return the hrefAttribute.
101         */
102        public final String getHrefAttribute() {
103            return hrefAttribute;
104        }
105    
106        /**
107         * @return the typeAttribute.
108         */
109        public final String getTypeAttribute() {
110            return typeAttribute;
111        }
112    
113        /**
114         * @return the identifier &lt; value, codeSpace &gt; pair, may be <code>null</code>
115         */
116        public final Pair<String, String> getIdentifier() {
117            return identifier;
118        }
119    
120        /**
121         * @return the abstracts, which may be empty but never <code>null</code>
122         */
123        public final List<String> getAbstracts() {
124            return abstracts;
125        }
126    
127        /**
128         * @return the format.
129         */
130        public final String getFormat() {
131            return format;
132        }
133    
134        /**
135         * @return the metadatas a list of metadatas may be empty but never <code>null</code>
136         */
137        public final List<Metadata> getMetadatas() {
138            return metadatas;
139        }
140    
141        /**
142         * @return the roleAttribute.
143         */
144        public final String getRoleAttribute() {
145            return roleAttribute;
146        }
147    
148    }