001 // $HeadURL: 002 // /cvsroot/deegree/src/org/deegree/ogcwebservices/csw/configuration/CatalogConfiguration.java,v 003 // 1.6 2004/07/12 12:23:21 tf Exp $ 004 /*---------------- FILE HEADER ------------------------------------------ 005 006 This file is part of deegree. 007 Copyright (C) 2001-2008 by: 008 EXSE, Department of Geography, University of Bonn 009 http://www.giub.uni-bonn.de/deegree/ 010 lat/lon GmbH 011 http://www.lat-lon.de 012 013 This library is free software; you can redistribute it and/or 014 modify it under the terms of the GNU Lesser General Public 015 License as published by the Free Software Foundation; either 016 version 2.1 of the License, or (at your option) any later version. 017 018 This library is distributed in the hope that it will be useful, 019 but WITHOUT ANY WARRANTY; without even the implied warranty of 020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 021 Lesser General Public License for more details. 022 023 You should have received a copy of the GNU Lesser General Public 024 License along with this library; if not, write to the Free Software 025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 027 Contact: 028 029 Andreas Poth 030 lat/lon GmbH 031 Aennchenstr. 19 032 53115 Bonn 033 Germany 034 E-Mail: poth@lat-lon.de 035 036 Prof. Dr. Klaus Greve 037 Department of Geography 038 University of Bonn 039 Meckenheimer Allee 166 040 53115 Bonn 041 Germany 042 E-Mail: greve@giub.uni-bonn.de 043 044 ---------------------------------------------------------------------------*/ 045 046 package org.deegree.ogcwebservices.csw.configuration; 047 048 import java.io.IOException; 049 import java.net.URL; 050 051 import org.deegree.framework.xml.InvalidConfigurationException; 052 import org.deegree.model.filterencoding.capabilities.FilterCapabilities; 053 import org.deegree.ogcwebservices.csw.capabilities.CatalogueCapabilities; 054 import org.deegree.ogcwebservices.csw.capabilities.EBRIMCapabilities; 055 import org.deegree.ogcwebservices.getcapabilities.Contents; 056 import org.deegree.ogcwebservices.getcapabilities.OperationsMetadata; 057 import org.deegree.ogcwebservices.getcapabilities.ServiceIdentification; 058 import org.deegree.ogcwebservices.getcapabilities.ServiceProvider; 059 import org.xml.sax.SAXException; 060 061 /** 062 * Represents the configuration for a deegree CSW 2.0 instance. 063 * 064 * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider </a> 065 * @author last edited by: $Author: apoth $ 066 * 067 * @version 2.0, $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $ 068 * 069 * @since 2.0 070 */ 071 public class CatalogueConfiguration extends CatalogueCapabilities { 072 073 private CatalogueDeegreeParams catalogDeegreeParams; 074 075 private URL systemId; 076 077 /** 078 * Creates a catalog configuration from an URL 079 * 080 * @param url 081 * @return 082 * @throws IOException 083 * @throws SAXException 084 */ 085 public static CatalogueConfiguration createConfiguration( URL url ) 086 throws IOException, SAXException, InvalidConfigurationException { 087 CatalogueConfigurationDocument confDoc = new CatalogueConfigurationDocument(); 088 confDoc.load( url ); 089 CatalogueConfiguration configuration = confDoc.getConfiguration(); 090 return configuration; 091 } 092 093 /** 094 * Generates a new CatalogConfiguration instance from the given parameters. 095 * 096 * @param version 097 * @param updateSequence 098 * Optional value of service metadata document version, value is increased whenever 099 * any change is made in complete service metadata document. The value must be 100 * character string type, not empty. 101 * @param serviceIdentification 102 * @param serviceProvider 103 * @param operationsMetadata 104 * @param contents 105 * @param filterCapabilities 106 * @param catalogDeegreeParams 107 * @param systemId 108 */ 109 CatalogueConfiguration( String version, String updateSequence, 110 ServiceIdentification serviceIdentification, 111 ServiceProvider serviceProvider, OperationsMetadata operationsMetadata, 112 Contents contents, FilterCapabilities filterCapabilities, 113 CatalogueDeegreeParams catalogDeegreeParams, URL systemId ) { 114 super( version, updateSequence, serviceIdentification, serviceProvider, operationsMetadata, 115 contents, filterCapabilities ); 116 this.catalogDeegreeParams = catalogDeegreeParams; 117 118 this.systemId = systemId; 119 120 } 121 122 /** 123 * Generates a new CatalogConfiguration instance from the given parameters. 124 * 125 * @param version 126 * @param updateSequence 127 * Optional value of service metadata document version, value is increased whenever 128 * any change is made in complete service metadata document. The value must be 129 * character string type, not empty. 130 * @param serviceIdentification 131 * @param serviceProvider 132 * @param operationsMetadata 133 * @param contents 134 * @param filterCapabilities 135 * @param catalogDeegreeParams 136 * @param systemId 137 * @param ebrimCaps the specified ebrim extensions 138 */ 139 CatalogueConfiguration( String version, String updateSequence, 140 ServiceIdentification serviceIdentification, 141 ServiceProvider serviceProvider, OperationsMetadata operationsMetadata, 142 Contents contents, FilterCapabilities filterCapabilities, 143 CatalogueDeegreeParams catalogDeegreeParams, URL systemId, EBRIMCapabilities ebrimCaps ) { 144 super( version, updateSequence, serviceIdentification, serviceProvider, operationsMetadata, 145 contents, filterCapabilities, ebrimCaps ); 146 this.catalogDeegreeParams = catalogDeegreeParams; 147 148 this.systemId = systemId; 149 150 } 151 152 /** 153 * Returns the <code>deegreeParams</code> -section of the configuration. 154 * 155 * @return the <code>deegreeParams</code> -section of the configuration. 156 */ 157 public CatalogueDeegreeParams getDeegreeParams() { 158 return catalogDeegreeParams; 159 } 160 161 /** 162 * Sets the <code>deegreeParams</code> -section of the configuration. 163 * 164 * @param deegreeParams 165 */ 166 public void setDeegreeParams( CatalogueDeegreeParams deegreeParams ) { 167 this.catalogDeegreeParams = deegreeParams; 168 } 169 170 public URL getSystemId() { 171 return systemId; 172 } 173 174 }