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.content;
021:
022: // J2SE direct dependencies
023: import java.util.Collection;
024: import java.util.Locale;
025:
026: // OpenGIS dependencies
027: import org.opengis.metadata.content.FeatureCatalogueDescription;
028: import org.opengis.metadata.citation.Citation;
029: import org.opengis.util.GenericName;
030:
031: /**
032: * Information identifying the feature catalogue.
033: *
034: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/content/FeatureCatalogueDescriptionImpl.java $
035: * @version $Id: FeatureCatalogueDescriptionImpl.java 25189 2007-04-17 13:23:47Z desruisseaux $
036: * @author Martin Desruisseaux
037: * @author Touraïvane
038: *
039: * @since 2.1
040: */
041: public class FeatureCatalogueDescriptionImpl extends
042: ContentInformationImpl implements FeatureCatalogueDescription {
043: /**
044: * Serial number for interoperability with different versions.
045: */
046: private static final long serialVersionUID = -2566307080447896276L;
047:
048: /**
049: * Indication of whether or not the cited feature catalogue complies with ISO 19110.
050: */
051: private Boolean compliant;
052:
053: /**
054: * Language(s) used within the catalogue
055: */
056: private Collection language;
057:
058: /**
059: * Indication of whether or not the feature catalogue is included with the dataset.
060: */
061: private boolean includeWithDataset;
062:
063: /**
064: * Subset of feature types from cited feature catalogue occurring in dataset.
065: */
066: private Collection featureTypes;
067:
068: /**
069: * Complete bibliographic reference to one or more external feature catalogues.
070: */
071: private Collection featureCatalogueCitations;
072:
073: /**
074: * Constructs an initially empty feature catalogue description.
075: */
076: public FeatureCatalogueDescriptionImpl() {
077: }
078:
079: /**
080: * Constructs a metadata entity initialized with the values from the specified metadata.
081: *
082: * @since 2.4
083: */
084: public FeatureCatalogueDescriptionImpl(
085: final FeatureCatalogueDescription source) {
086: super (source);
087: }
088:
089: /**
090: * Returns whether or not the cited feature catalogue complies with ISO 19110.
091: */
092: public Boolean isCompliant() {
093: return compliant;
094: }
095:
096: /**
097: * Set whether or not the cited feature catalogue complies with ISO 19110.
098: */
099: public synchronized void setCompliant(final Boolean newValue) {
100: checkWritePermission();
101: compliant = newValue;
102: }
103:
104: /**
105: * Returns the language(s) used within the catalogue
106: */
107: public synchronized Collection getLanguages() {
108: return language = nonNullCollection(language, Locale.class);
109: }
110:
111: /**
112: * Returns the language(s) used within the catalogue
113: */
114: public synchronized void setLanguages(final Collection newValues) {
115: language = copyCollection(newValues, language, Locale.class);
116: }
117:
118: /**
119: * Returns whether or not the feature catalogue is included with the dataset.
120: */
121: public boolean isIncludedWithDataset() {
122: return includeWithDataset;
123: }
124:
125: /**
126: * Set whether or not the feature catalogue is included with the dataset.
127: */
128: public synchronized void setIncludedWithDataset(
129: final boolean newValue) {
130: checkWritePermission();
131: includeWithDataset = newValue;
132: }
133:
134: /**
135: * Returns the Complete bibliographic reference to one or more external feature catalogues.
136: */
137: public synchronized Collection getFeatureTypes() {
138: return featureTypes = nonNullCollection(featureTypes,
139: GenericName.class);
140: }
141:
142: /**
143: * Returns the Complete bibliographic reference to one or more external feature catalogues.
144: */
145: public synchronized void setFeatureTypes(final Collection newValues) {
146: featureTypes = copyCollection(newValues, featureTypes,
147: GenericName.class);
148: }
149:
150: /**
151: * Returns the Complete bibliographic reference to one or more external feature catalogues.
152: */
153: public synchronized Collection getFeatureCatalogueCitations() {
154: return featureCatalogueCitations = nonNullCollection(
155: featureCatalogueCitations, Citation.class);
156: }
157:
158: /**
159: * Returns the Complete bibliographic reference to one or more external feature catalogues.
160: */
161: public synchronized void setFeatureCatalogueCitations(
162: final Collection newValues) {
163: featureCatalogueCitations = copyCollection(newValues,
164: featureCatalogueCitations, Citation.class);
165: }
166: }
|