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.spatial;
021:
022: // OpenGIS dependencies
023: import org.opengis.metadata.spatial.GeometricObjects;
024: import org.opengis.metadata.spatial.GeometricObjectType;
025:
026: // Geotools dependencies
027: import org.geotools.metadata.iso.MetadataEntity;
028:
029: /**
030: * Number of objects, listed by geometric object type, used in the dataset.
031: *
032: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/spatial/GeometricObjectsImpl.java $
033: * @version $Id: GeometricObjectsImpl.java 25189 2007-04-17 13:23:47Z desruisseaux $
034: * @author Martin Desruisseaux
035: * @author Touraïvane
036: *
037: * @since 2.1
038: */
039: public class GeometricObjectsImpl extends MetadataEntity implements
040: GeometricObjects {
041: /**
042: * Serial number for interoperability with different versions.
043: */
044: private static final long serialVersionUID = 8755950031078638313L;
045:
046: /**
047: * Total number of the point or vector object type occurring in the dataset.
048: */
049: private GeometricObjectType geometricObjectType;
050:
051: /**
052: * Total number of the point or vector object type occurring in the dataset.
053: */
054: private Integer geometricObjectCount;
055:
056: /**
057: * Constructs an initially empty geometric objects.
058: */
059: public GeometricObjectsImpl() {
060: }
061:
062: /**
063: * Constructs a metadata entity initialized with the values from the specified metadata.
064: *
065: * @since 2.4
066: */
067: public GeometricObjectsImpl(final GeometricObjects source) {
068: super (source);
069: }
070:
071: /**
072: * Creates a geometric object initialized to the given type.
073: */
074: public GeometricObjectsImpl(
075: final GeometricObjectType geometricObjectType) {
076: setGeometricObjectType(geometricObjectType);
077: }
078:
079: /**
080: * Total number of the point or vector object type occurring in the dataset.
081: */
082: public GeometricObjectType getGeometricObjectType() {
083: return geometricObjectType;
084: }
085:
086: /**
087: * Set the total number of the point or vector object type occurring in the dataset.
088: */
089: public synchronized void setGeometricObjectType(
090: final GeometricObjectType newValue) {
091: checkWritePermission();
092: geometricObjectType = newValue;
093: }
094:
095: /**
096: * Total number of the point or vector object type occurring in the dataset.
097: */
098: public Integer getGeometricObjectCount() {
099: return geometricObjectCount;
100: }
101:
102: /**
103: * Set the total number of the point or vector object type occurring in the dataset.
104: */
105: public synchronized void setGeometricObjectCount(
106: final Integer newValue) {
107: checkWritePermission();
108: geometricObjectCount = newValue;
109: }
110: }
|