001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, Geotools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or (at your option) any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * Created on Jan 24, 2004
017: */
018: package org.geotools.validation.spatial;
019:
020: import org.geotools.validation.DefaultIntegrityValidation;
021:
022: /**
023: * PointCoveredByLineValidation purpose.
024: *
025: * <p>
026: * Basic typeref functionality for a point-polygon validation.
027: * </p>
028: *
029: * @author dzwiers, Refractions Research, Inc.
030: * @author $Author: dmzwiers $ (last modification)
031: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/validation/src/main/java/org/geotools/validation/spatial/PointPolygonAbstractValidation.java $
032: * @version $Id: PointPolygonAbstractValidation.java 20884 2006-08-07 14:10:46Z jgarnett $
033: */
034: public abstract class PointPolygonAbstractValidation extends
035: DefaultIntegrityValidation {
036: private String restrictedPolygonTypeRef;
037: private String pointTypeRef;
038:
039: /**
040: * PointCoveredByLineValidation constructor.
041: *
042: * <p>
043: * Super
044: * </p>
045: */
046: public PointPolygonAbstractValidation() {
047: super ();
048: }
049:
050: /**
051: * Implementation of getTypeNames. Should be called by sub-classes is being
052: * overwritten.
053: *
054: * @return Array of typeNames, or empty array for all, null for disabled
055: *
056: * @see org.geotools.validation.Validation#getTypeNames()
057: */
058: public String[] getTypeRefs() {
059: if ((pointTypeRef == null)
060: || (restrictedPolygonTypeRef == null)) {
061: return null;
062: }
063:
064: return new String[] { pointTypeRef, restrictedPolygonTypeRef };
065: }
066:
067: /**
068: * Access pointTypeRef property.
069: *
070: * @return Returns the pointTypeRef.
071: */
072: public final String getRestrictedPolygonTypeRef() {
073: return restrictedPolygonTypeRef;
074: }
075:
076: /**
077: * Set pointTypeRef to pointTypeRef.
078: *
079: * @param lineTypeRef The pointTypeRef to set.
080: */
081: public final void setRestrictedPolygonTypeRef(String lineTypeRef) {
082: this .restrictedPolygonTypeRef = lineTypeRef;
083: }
084:
085: /**
086: * Access restrictedPolygonTypeRef property.
087: *
088: * @return Returns the restrictedPolygonTypeRef.
089: */
090: public final String getPointTypeRef() {
091: return pointTypeRef;
092: }
093:
094: /**
095: * Set restrictedPolygonTypeRef to restrictedPolygonTypeRef.
096: *
097: * @param polygonTypeRef The restrictedPolygonTypeRef to set.
098: */
099: public final void setPointTypeRef(String polygonTypeRef) {
100: this.pointTypeRef = polygonTypeRef;
101: }
102: }
|