📄 datastorefactoryspi.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_13) on Tue Jun 05 11:36:23 GMT-05:00 2007 --><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><TITLE>DataStoreFactorySpi (Geotools 2.3.x 2.3.2 API)</TITLE><META NAME="keywords" CONTENT="org.geotools.data.DataStoreFactorySpi interface"><META NAME="keywords" CONTENT="createDataStore()"><META NAME="keywords" CONTENT="createNewDataStore()"><META NAME="keywords" CONTENT="getDisplayName()"><META NAME="keywords" CONTENT="getDescription()"><META NAME="keywords" CONTENT="getParametersInfo()"><META NAME="keywords" CONTENT="canProcess()"><META NAME="keywords" CONTENT="isAvailable()"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="DataStoreFactorySpi (Geotools 2.3.x 2.3.2 API)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DataStoreFactorySpi.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data"><B>PREV CLASS</B></A> <A HREF="../../../org/geotools/data/FeatureListener.html" title="interface in org.geotools.data"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="DataStoreFactorySpi.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.geotools.data</FONT><BR>Interface DataStoreFactorySpi</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../org/geotools/factory/Factory.html" title="interface in org.geotools.factory">Factory</A></DD></DL><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../org/geotools/data/FileDataStoreFactorySpi.html" title="interface in org.geotools.data">FileDataStoreFactorySpi</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/geotools/data/AbstractDataStoreFactory.html" title="class in org.geotools.data">AbstractDataStoreFactory</A>, <A HREF="../../../org/geotools/arcsde/ArcSDEDataStoreFactory.html" title="class in org.geotools.arcsde">ArcSDEDataStoreFactory</A>, <A HREF="../../../org/geotools/data/db2/DB2DataStoreFactory.html" title="class in org.geotools.data.db2">DB2DataStoreFactory</A>, <A HREF="../../../org/geotools/data/dir/DirectoryDataStoreFactory.html" title="class in org.geotools.data.dir">DirectoryDataStoreFactory</A>, <A HREF="../../../org/geotools/data/geomedia/GeoMediaDataStoreFactory.html" title="class in org.geotools.data.geomedia">GeoMediaDataStoreFactory</A>, <A HREF="../../../org/geotools/data/gml/GMLDataStoreFactory.html" title="class in org.geotools.data.gml">GMLDataStoreFactory</A>, <A HREF="../../../org/geotools/data/hsql/HsqlDataStoreFactory.html" title="class in org.geotools.data.hsql">HsqlDataStoreFactory</A>, <A HREF="../../../org/geotools/data/shapefile/indexed/IndexedShapefileDataStoreFactory.html" title="class in org.geotools.data.shapefile.indexed">IndexedShapefileDataStoreFactory</A>, <A HREF="../../../org/geotools/data/mif/MIFDataStoreFactory.html" title="class in org.geotools.data.mif">MIFDataStoreFactory</A>, <A HREF="../../../org/geotools/data/mysql/MySQLDataStoreFactory.html" title="class in org.geotools.data.mysql">MySQLDataStoreFactory</A>, <A HREF="../../../org/geotools/data/oracle/OracleDataStoreFactory.html" title="class in org.geotools.data.oracle">OracleDataStoreFactory</A>, <A HREF="../../../org/geotools/data/oracle/OracleOCIDataStoreFactory.html" title="class in org.geotools.data.oracle">OracleOCIDataStoreFactory</A>, <A HREF="../../../org/geotools/data/postgis/PostgisDataStoreFactory.html" title="class in org.geotools.data.postgis">PostgisDataStoreFactory</A>, <A HREF="../../../org/geotools/data/property/PropertyDataStoreFactory.html" title="class in org.geotools.data.property">PropertyDataStoreFactory</A>, <A HREF="../../../org/geotools/data/shapefile/ShapefileDataStoreFactory.html" title="class in org.geotools.data.shapefile">ShapefileDataStoreFactory</A>, <A HREF="../../../org/geotools/data/tiger/TigerDataStoreFactory.html" title="class in org.geotools.data.tiger">TigerDataStoreFactory</A>, <A HREF="../../../org/geotools/data/vpf/VPFDataStoreFactory.html" title="class in org.geotools.data.vpf">VPFDataStoreFactory</A>, <A HREF="../../../org/geotools/data/vpf/file/VPFFileFactory.html" title="class in org.geotools.data.vpf.file">VPFFileFactory</A></DD></DL><HR><DL><DT>public interface <B>DataStoreFactorySpi</B><DT>extends <A HREF="../../../org/geotools/factory/Factory.html" title="interface in org.geotools.factory">Factory</A></DL><P>Constructs a live DataStore from a set of parameters. <p> An instance of this interface should exist for all data stores which want to take advantage of the dynamic plugin system. In addition to implementing this interface datastores should have a services file: </p> <p> <code>META-INF/services/org.geotools.data.DataStoreFactorySpi</code> </p> <p> The file should contain a single line which gives the full name of the implementing class. </p> <p> example:<br/><code>e.g. org.geotools.data.mytype.MyTypeDataSourceFacotry</code> </p> <p> The factories are never called directly by client code, instead the DataStoreFinder class is used. </p> <p> The following example shows how a user might connect to a PostGIS database, and maintain the resulting datastore in a registry: </p> <p> <pre><code> HashMap params = new HashMap(); params.put("namespace", "leeds"); params.put("dbtype", "postgis"); params.put("host","feathers.leeds.ac.uk"); params.put("port", "5432"); params.put("database","postgis_test"); params.put("user","postgis_ro"); params.put("passwd","postgis_ro"); DefaultRegistry registry = new DefaultRegistry(); registry.addDataStore("leeds", params); DataStore postgis = registry.getDataStore( "leeds" ); FeatureSource = postgis.getFeatureSource( "table" ); </code></pre> </p> <h2> <ul> <li> Jody - can we please get something better then Param to describe what is allowed? <br> Jody - ISO19119 has something that looks okay, WSDL/SOAP could be used? </li> <li> Jody - can we seperate out Identification of a Service from configration of the service? <br> Jody - this is mostly a problem when managing user supplied configurations in GeoServer and uDig. <br> Jody - the "Catalog API" has now been ported and contains a URI as indentification, while still allowing configuration using a Map of parameters </li> </ul><P><P><DL><DT><B>Author:</B></DT> <DD>Jody Garnett, Refractions Research</DD><DT><B>Module:</B></DT><DD><CODE><B>module/api</B></CODE> (<A HREF="http://maven.geotools.fr/repository/org/geotools/gt2-api/"><CODE>gt2-api.jar</CODE></A>) (<A HREF="http://maven.geotools.fr/reports/api/index.html">Maven report</A>) (<A HREF="http://svn.geotools.org/geotools/tags/2.3.2/module/api/src/org/geotools/data/DataStoreFactorySpi.java">SVN head</A>)</DD></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.Param.html" title="class in org.geotools.data">DataStoreFactorySpi.Param</A></B></CODE><BR> Data class used to capture Parameter requirements. </TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#canProcess(java.util.Map)">canProcess</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> Test to see if this factory is suitable for processing the data pointed to by the params map. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data">DataStore</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#createDataStore(java.util.Map)">createDataStore</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> Construct a live data source using the params specifed. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data">DataStore</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#createNewDataStore(java.util.Map)">createNewDataStore</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> params)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#getDescription()">getDescription</A></B>()</CODE><BR> Describe the nature of the datasource constructed by this factory. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#getDisplayName()">getDisplayName</A></B>()</CODE><BR> Name suitable for display to end user. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/geotools/data/DataStoreFactorySpi.Param.html" title="class in org.geotools.data">DataStoreFactorySpi.Param</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#getParametersInfo()">getParametersInfo</A></B>()</CODE><BR> MetaData about the required Parameters (for createDataStore). </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/data/DataStoreFactorySpi.html#isAvailable()">isAvailable</A></B>()</CODE><BR> Test to see if this datastore is available, if it has all the appropriate libraries to construct a datastore. </TD></TR></TABLE> <A NAME="methods_inherited_from_class_Factory"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface <A HREF="../../../org/geotools/factory/Factory.html" title="interface in org.geotools.factory">Factory</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -