001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2004, Institut de Recherche pour le Développement
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * This package contains documentation from OpenGIS specifications.
018: * OpenGIS consortium's work is fully acknowledged here.
019: */
020: package org.geotools.metadata.iso;
021:
022: // J2SE direct dependencies
023: import java.util.Collection;
024: import java.util.Locale;
025:
026: // OpenGIS dependencies
027: import org.opengis.metadata.citation.Citation;
028: import org.opengis.metadata.content.FeatureCatalogueDescription;
029: import org.opengis.util.GenericName;
030:
031: // Geotools dependencies
032: import org.geotools.metadata.iso.content.ContentInformationImpl;
033:
034: /**
035: * Location of the responsible individual or organization.
036: *
037: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/FeatureCatalogueDescriptionImpl.java $
038: * @version $Id: FeatureCatalogueDescriptionImpl.java 25189 2007-04-17 13:23:47Z desruisseaux $
039: * @author Martin Desruisseaux
040: * @author Touraïvane
041: *
042: * @since 2.1
043: */
044: public class FeatureCatalogueDescriptionImpl extends
045: ContentInformationImpl implements FeatureCatalogueDescription {
046: /**
047: * Serial number for interoperability with different versions.
048: */
049: private static final long serialVersionUID = -5361236546997056467L;
050:
051: /**
052: * Indication of whether or not the cited feature catalogue complies with ISO 19110.
053: */
054: private Boolean compliant;
055:
056: /**
057: * Language(s) used within the catalogue
058: */
059: private Collection language;
060:
061: /**
062: * Indication of whether or not the feature catalogue is included with the dataset.
063: */
064: private Boolean includeWithDataset;
065:
066: /**
067: * Subset of feature types from cited feature catalogue occurring in dataset.
068: */
069: private Collection featureTypes;
070:
071: /**
072: * Complete bibliographic reference to one or more external feature catalogues.
073: */
074: private Collection featureCatalogueCitations;
075:
076: /**
077: * Construct an initially empty feature catalogue description.
078: */
079: public FeatureCatalogueDescriptionImpl() {
080: }
081:
082: /**
083: * Constructs a metadata entity initialized with the values from the specified metadata.
084: *
085: * @since 2.4
086: */
087: public FeatureCatalogueDescriptionImpl(
088: final FeatureCatalogueDescription source) {
089: super (source);
090: }
091:
092: /**
093: * Returns whether or not the cited feature catalogue complies with ISO 19110.
094: */
095: public Boolean isCompliant() {
096: return compliant;
097: }
098:
099: /**
100: * Set whether or not the cited feature catalogue complies with ISO 19110.
101: */
102: public synchronized void setCompliant(final Boolean newValue) {
103: checkWritePermission();
104: compliant = newValue;
105: }
106:
107: /**
108: * Returns the language(s) used within the catalogue
109: */
110: public synchronized Collection getLanguages() {
111: return language = nonNullCollection(language, Locale.class);
112: }
113:
114: /**
115: * Returns the language(s) used within the catalogue
116: */
117: public synchronized void setLanguages(final Collection newValues) {
118: language = copyCollection(newValues, language, Locale.class);
119: }
120:
121: /**
122: * Returns whether or not the feature catalogue is included with the dataset.
123: *
124: * @todo Return type should be {@link Boolean}.
125: */
126: public boolean isIncludedWithDataset() {
127: return includeWithDataset.booleanValue();
128: }
129:
130: /**
131: * Set whether or not the feature catalogue is included with the dataset.
132: */
133: public synchronized void setIncludedWithDataset(
134: final Boolean newValue) {
135: checkWritePermission();
136: includeWithDataset = newValue;
137: }
138:
139: /**
140: * Returns the Complete bibliographic reference to one or more external feature catalogues.
141: */
142: public synchronized Collection getFeatureTypes() {
143: return featureTypes = nonNullCollection(featureTypes,
144: GenericName.class);
145: }
146:
147: /**
148: * Returns the Complete bibliographic reference to one or more external feature catalogues.
149: */
150: public synchronized void setFeatureTypes(final Collection newValues) {
151: featureTypes = copyCollection(newValues, featureTypes,
152: GenericName.class);
153: }
154:
155: /**
156: * Returns the Complete bibliographic reference to one or more external feature catalogues.
157: */
158: public synchronized Collection getFeatureCatalogueCitations() {
159: return featureCatalogueCitations = nonNullCollection(
160: featureCatalogueCitations, Citation.class);
161: }
162:
163: /**
164: * Returns the Complete bibliographic reference to one or more external feature catalogues.
165: */
166: public synchronized void setFeatureCatalogueCitations(
167: final Collection newValues) {
168: featureCatalogueCitations = copyCollection(newValues,
169: featureCatalogueCitations, Citation.class);
170: }
171: }
|