001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/metadata/iso19115/Linkage.java $
002 /*
003 * ---------------- FILE HEADER ------------------------------------------
004 *
005 * This file is part of deegree. Copyright (C) 2001-2006 by: EXSE, Department of
006 * Geography, University of Bonn http://www.giub.uni-bonn.de/deegree/ lat/lon
007 * Fitzke/Fretter/Poth GbR http://www.lat-lon.de
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 *
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 *
019 * You should have received a copy of the GNU Lesser General Public License
020 * along with this library; if not, write to the Free Software Foundation, Inc.,
021 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
022 *
023 * Contact:
024 *
025 * Andreas Poth lat/lon GmbH Aennchenstr. 19 53115
026 * Bonn Germany E-Mail: poth@lat-lon.de
027 *
028 * Prof. Dr. Klaus Greve Department of Geography University of Bonn Meckenheimer Allee 166
029 * 53115 Bonn Germany E-Mail: greve@giub.uni-bonn.de
030 *
031 *
032 * ---------------------------------------------------------------------------
033 */
034
035 package org.deegree.model.metadata.iso19115;
036
037 import java.io.Serializable;
038 import java.net.URL;
039
040 /**
041 * Linkage
042 *
043 * @author <a href="mailto:schaefer@lat-lon.de">Axel Schaefer </a>
044 * @author last edited by: $Author: bezema $
045 *
046 * @version $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
047 */
048 public class Linkage implements Serializable {
049
050 /**
051 *
052 */
053 public static final String SIMPLE = "simple";
054
055 private URL href = null;
056
057 private String type = null;
058
059 /**
060 * Creates a default instance of Linkage with default xlink namespace.
061 *
062 * @see "org.deegree.ogcbase.CommonNamespace#XLNNS"
063 */
064 public Linkage() {
065 this.type = SIMPLE;
066 }
067
068 /**
069 *
070 * @param href
071 */
072 public Linkage( URL href ) {
073 this.setHref( href );
074 }
075
076 /**
077 * Creates a new instance of Linkage
078 *
079 * @param href
080 * @param type
081 *
082 */
083 public Linkage( URL href, String type ) {
084 setHref( href );
085 setType( type );
086 }
087
088 /**
089 * use="required"
090 *
091 * @return the href-attribute
092 *
093 */
094 public URL getHref() {
095 return href;
096 }
097
098 /**
099 * @param href
100 * @see #getHref()
101 *
102 */
103 public void setHref( URL href ) {
104 this.href = href;
105 }
106
107 /**
108 * fixed="simple"
109 *
110 * @return the type-attribute
111 *
112 */
113 public String getType() {
114 return type;
115 }
116
117 /**
118 * @param type
119 * @see #getType()
120 *
121 */
122 public void setType( String type ) {
123 this.type = type;
124 }
125
126 /**
127 * to String method
128 *
129 * @return
130 */
131 public String toString() {
132 String ret = null;
133 ret = "href = " + href + "\n";
134 ret += "type = " + type + "\n";
135 return ret;
136 }
137
138 }
139
140 /***************************************************************************************************
141 * <code>
142 Changes to this class. What the people have been up to:
143
144 $Log$
145 Revision 1.10 2007/03/19 10:24:48 wanhoff
146 Fixed Javadoc (@param, @see)
147
148 Revision 1.9 2006/07/12 14:46:18 poth
149 comment footer added
150
151 </code>
152 **************************************************************************************************/