01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2004, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * This package contains documentation from OpenGIS specifications.
18: * OpenGIS consortium's work is fully acknowledged here.
19: */
20: package org.geotools.metadata.iso.extent;
21:
22: // OpenGIS dependencies
23: import org.opengis.metadata.extent.GeographicExtent;
24:
25: // Geotools dependencies
26: import org.geotools.metadata.iso.MetadataEntity;
27:
28: /**
29: * Base class for geographic area of the dataset.
30: *
31: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/extent/GeographicExtentImpl.java $
32: * @version $Id: GeographicExtentImpl.java 25189 2007-04-17 13:23:47Z desruisseaux $
33: * @author Martin Desruisseaux
34: * @author Touraïvane
35: *
36: * @since 2.1
37: */
38: public class GeographicExtentImpl extends MetadataEntity implements
39: GeographicExtent {
40: /**
41: * Serial number for interoperability with different versions.
42: */
43: private static final long serialVersionUID = -8844015895495563161L;
44:
45: /**
46: * Indication of whether the bounding polygon encompasses an area covered by the data
47: * (<cite>inclusion</cite>) or an area where data is not present (<cite>exclusion</cite>).
48: */
49: private Boolean inclusion;
50:
51: /**
52: * Constructs an initially empty geographic extent.
53: */
54: public GeographicExtentImpl() {
55: }
56:
57: /**
58: * Constructs a geographic extent initialized to the same values than the specified one.
59: *
60: * @since 2.2
61: */
62: public GeographicExtentImpl(final GeographicExtent extent) {
63: super (extent);
64: }
65:
66: /**
67: * Constructs a geographic extent initialized with the specified inclusion value.
68: */
69: public GeographicExtentImpl(final boolean inclusion) {
70: setInclusion(Boolean.valueOf(inclusion));
71: }
72:
73: /**
74: * Indication of whether the bounding polygon encompasses an area covered by the data
75: * (<cite>inclusion</cite>) or an area where data is not present (<cite>exclusion</cite>).
76: *
77: * @return {@code true} for inclusion, or {@code false} for exclusion.
78: */
79: public Boolean getInclusion() {
80: return inclusion;
81: }
82:
83: /**
84: * Set whether the bounding polygon encompasses an area covered by the data
85: * (<cite>inclusion</cite>) or an area where data is not present (<cite>exclusion</cite>).
86: */
87: public synchronized void setInclusion(final Boolean newValue) {
88: checkWritePermission();
89: inclusion = newValue;
90: }
91: }
|