001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-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 20 novembre 2003, 21.31
017: */
018: package org.geotools.data;
019:
020: import java.net.URI;
021:
022: import org.geotools.feature.FeatureType;
023: import org.geotools.feature.GeometryAttributeType;
024:
025: /**
026: * An empty FeatureType implementation used in the AbstractDataSourceTest
027: * @author wolf
028: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/test/java/org/geotools/data/DummyFeatureType.java $
029: */
030: public class DummyFeatureType implements FeatureType {
031: private String typeName;
032:
033: /** Creates a new instance of DummyFeatureType */
034: public DummyFeatureType(String typeName) {
035: }
036:
037: public org.geotools.feature.Feature create(Object[] attributes)
038: throws org.geotools.feature.IllegalAttributeException {
039: return null;
040: }
041:
042: public org.geotools.feature.Feature create(Object[] attributes,
043: String featureID)
044: throws org.geotools.feature.IllegalAttributeException {
045: return null;
046: }
047:
048: public org.geotools.feature.Feature duplicate(
049: org.geotools.feature.Feature feature)
050: throws org.geotools.feature.IllegalAttributeException {
051: return null;
052: }
053:
054: public int find(org.geotools.feature.AttributeType type) {
055: return 0;
056: }
057:
058: public FeatureType[] getAncestors() {
059: return new FeatureType[] {};
060: }
061:
062: public int getAttributeCount() {
063: return 0;
064: }
065:
066: public org.geotools.feature.AttributeType getAttributeType(
067: String xPath) {
068: return null;
069: }
070:
071: public org.geotools.feature.AttributeType getAttributeType(
072: int position) {
073: return null;
074: }
075:
076: public org.geotools.feature.AttributeType[] getAttributeTypes() {
077: return new org.geotools.feature.AttributeType[] {};
078: }
079:
080: public GeometryAttributeType getDefaultGeometry() {
081: return null;
082: }
083:
084: public GeometryAttributeType getPrimaryGeometry() {
085: return null;
086: }
087:
088: public URI getNamespace() {
089: return null;
090: }
091:
092: public String getTypeName() {
093: return typeName;
094: }
095:
096: public boolean hasAttributeType(String xPath) {
097: return false;
098: }
099:
100: public boolean isAbstract() {
101: return true;
102: }
103:
104: public boolean isDescendedFrom(FeatureType type) {
105: return false;
106: }
107:
108: public boolean isDescendedFrom(URI nsURI, String typeName) {
109: return false;
110: }
111:
112: /* (non-Javadoc)
113: * @see org.geotools.feature.FeatureType#find(java.lang.String)
114: */
115: public int find(String attName) {
116: // TODO Auto-generated method stub
117: return 0;
118: }
119:
120: }
|