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/PolygonPointAbstractValidation.java $
032: * @version $Id: PolygonPointAbstractValidation.java 20884 2006-08-07 14:10:46Z jgarnett $
033: */
034: public abstract class PolygonPointAbstractValidation extends
035: DefaultIntegrityValidation {
036: private String polygonTypeRef;
037: private String restrictedPointTypeRef;
038:
039: /**
040: * PointCoveredByLineValidation constructor.
041: *
042: * <p>
043: * Super
044: * </p>
045: */
046: public PolygonPointAbstractValidation() {
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 ((restrictedPointTypeRef == null)
060: || (polygonTypeRef == null)) {
061: return null;
062: }
063:
064: return new String[] { restrictedPointTypeRef, polygonTypeRef };
065: }
066:
067: /**
068: * Access restrictedPointTypeRef property.
069: *
070: * @return Returns the restrictedPointTypeRef.
071: */
072: public final String getPolygonTypeRef() {
073: return polygonTypeRef;
074: }
075:
076: /**
077: * Set restrictedPointTypeRef to restrictedPointTypeRef.
078: *
079: * @param lineTypeRef The restrictedPointTypeRef to set.
080: */
081: public final void setPolygonTypeRef(String lineTypeRef) {
082: this .polygonTypeRef = lineTypeRef;
083: }
084:
085: /**
086: * Access polygonTypeRef property.
087: *
088: * @return Returns the polygonTypeRef.
089: */
090: public final String getRestrictedPointTypeRef() {
091: return restrictedPointTypeRef;
092: }
093:
094: /**
095: * Set polygonTypeRef to polygonTypeRef.
096: *
097: * @param polygonTypeRef The polygonTypeRef to set.
098: */
099: public final void setRestrictedPointTypeRef(String polygonTypeRef) {
100: this.restrictedPointTypeRef = polygonTypeRef;
101: }
102: }
|