01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data;
17:
18: import java.util.List;
19:
20: import org.geotools.catalog.ServiceInfo;
21: import org.opengis.feature.type.Name;
22:
23: /**
24: * Interface providing Open Web Service style access to geo resource content.
25: *
26: * <p>
27: * The basic idea is to have simple, very general interface to access and query
28: * data that is in some way or another spatially enabled. Extending interfaces can
29: * add methods that make it easier to access data for their specific model.</p>
30: * <p><em>This should become a super interface of {@link DataStore} and may be viewed
31: * as a future direciton for feature access.</em>
32: * </p>
33: *
34: * @author Jody Garnett
35: * @author Thomas Marti
36: * @author Stefan Schmid
37: *
38: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/community-schemas/community-schema-ds/src/main/java/org/geotools/data/DataAccess.java $
39: * @version $Id: DataAccess.java 26649 2007-08-22 09:55:31Z groldan $
40: * @since 2.4
41: * @deprecated This is a Proposal, we need your feedback!
42: * @author Jody Garnett, Refractions Research Inc.
43: */
44: public interface DataAccess /*<Content,Description>*/{
45: /**
46: * Information about this data acess point.
47: * <p>
48: * Contains a human readable description of the service,
49: * with enough information for searching.
50: * </p>
51: *
52: * @return GridServiceInfo ?
53: */
54: ServiceInfo getInfo();
55:
56: /**
57: * Names for the content we are providing access to.
58: *
59: * @return List<Name>, may be emtpy, but never null
60: */
61: List /*<Name>*/getNames();
62:
63: /**
64: * Description of content in an appropriate format.
65: * <ul>
66: * <li>AttributeDescriptor: when serving up features</li>
67: * <li>Class: when providing access to a java domain model</li>
68: * <li>URL: of XSD document when working with XML document</li>
69: * <li>etc...</li>
70: * </ul>
71: * Please note this is a <strong>direct</strong> description of the
72: * content, and contains no fluffy human readible concerns (like
73: * title) for that kind of information please use {@link #getInfo()}.
74: *
75: * @see Source#getInfo()
76: * @param typeName
77: * @return FeatureType, ResultSetMetaData, Class, whatever?
78: */
79: Object /*Description*/describe(Name typeName);
80:
81: /**
82: * Provides access to the data source for the given type name.
83: *
84: * @return Data source, null if typeName is not available
85: */
86: Source access(Name typeName);
87:
88: /**
89: * Clean up any and all data connections.
90: * <p>
91: * Please note the <code>DataAccess</code> instance will <b>not</b>
92: * be useable after this method is called. All methods should throw
93: * an {@link IllegalStateException} (but probably will just throw a
94: * {@link NullPointerException} when implementators are lazy).
95: *
96: */
97: void dispose();
98: }
|