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