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.quality;
021:
022: // OpenGIS dependencies
023: import org.opengis.metadata.citation.Citation;
024: import org.opengis.metadata.quality.ConformanceResult;
025: import org.opengis.util.InternationalString;
026:
027: /**
028: * Information about the outcome of evaluating the obtained value (or set of values) against
029: * a specified acceptable conformance quality level.
030: *
031: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/metadata/iso/quality/ConformanceResultImpl.java $
032: * @version $Id: ConformanceResultImpl.java 25189 2007-04-17 13:23:47Z desruisseaux $
033: * @author Martin Desruisseaux
034: * @author Touraïvane
035: *
036: * @since 2.1
037: */
038: public class ConformanceResultImpl extends ResultImpl implements
039: ConformanceResult {
040:
041: /**
042: * Serial number for compatibility with different versions.
043: */
044: private static final long serialVersionUID = 6429932577869033286L;
045:
046: /**
047: * Citation of product specification or user requirement against which data is being evaluated.
048: */
049: private Citation specification;
050:
051: /**
052: * Explanation of the meaning of conformance for this result.
053: */
054: private InternationalString explanation;
055:
056: /**
057: * Indication of the conformance result.
058: */
059: private boolean pass;
060:
061: /**
062: * Constructs an initially empty conformance result.
063: */
064: public ConformanceResultImpl() {
065: }
066:
067: /**
068: * Constructs a metadata entity initialized with the values from the specified metadata.
069: *
070: * @since 2.4
071: */
072: public ConformanceResultImpl(final ConformanceResult source) {
073: super (source);
074: }
075:
076: /**
077: * Creates a conformance result initialized to the given values.
078: */
079: public ConformanceResultImpl(final Citation specification,
080: final InternationalString explanation, final boolean pass) {
081: setSpecification(specification);
082: setExplanation(explanation);
083: setPass(pass);
084: }
085:
086: /**
087: * Citation of product specification or user requirement against which data is being evaluated.
088: */
089: public Citation getSpecification() {
090: return specification;
091: }
092:
093: /**
094: * Set the citation of product specification or user requirement against which data
095: * is being evaluated.
096: */
097: public synchronized void setSpecification(final Citation newValue) {
098: checkWritePermission();
099: specification = newValue;
100: }
101:
102: /**
103: * Explanation of the meaning of conformance for this result.
104: */
105: public InternationalString getExplanation() {
106: return explanation;
107: }
108:
109: /**
110: * Set the explanation of the meaning of conformance for this result.
111: */
112: public synchronized void setExplanation(
113: final InternationalString newValue) {
114: checkWritePermission();
115: explanation = newValue;
116: }
117:
118: /**
119: * Indication of the conformance result.
120: */
121: public boolean pass() {
122: return pass;
123: }
124:
125: /**
126: * Set the indication of the conformance result.
127: */
128: public synchronized void setPass(final boolean newValue) {
129: checkWritePermission();
130: pass = newValue;
131: }
132: }
|