Hi all,<br><br>thanks for the big explanation.<br><div style="margin-left: 40px;"><i><br>This document explains how you can create a new DataStore using the
API. In this example it is creating a new DBF. The "DBF provider" has
to be previously registered with a name or the line
"serverExplorer.</i><i>getAddParameters("DBF")" will send an exception. </i><br></div><div text="#000000" bgcolor="#ffffff"><div class="im">
<br>How could I avoid it ? Could you show me how to do ?<br><br>Best regards,<br><br>Luca<br></div></div><br><br><div class="gmail_quote">2010/8/4 Jorge Piera Llodrá <span dir="ltr"><<a href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff"><div class="im">
On 08/04/2010 01:31 AM, luca bianconi wrote:
<blockquote type="cite">Hi all,<br>
<br>
it has past some time since I've started studying gvSIG DAL providing
system and, even if I've received many useful explanations (thanks kind
Cèsar!), read longly the documentation [1] about it, read other DAL
providers code, made coding tests, I'm unfortunately still plenty of
doubts.<br>
<br>
I'd like asking the community some help to understand some things (I'm
very sorry if some of them could sound very trivial to some of you).<br>
<br>
First of all, just a curiosity I'd like to ask Spanish speaking people
: <br>
I understand the word "almacèn" as "provider", referred in
documentation as the DAL provider. Is it correct ?<br>
</blockquote>
<br></div>
I'm not completely agree. An "Almacén" is a "DataStore" that uses a
provider (DataStoreProvider) to retrieve data from a data source. <br>
<br>
The "Almacen o DataStore" is the API of DAL that can be used by a data
consumer to retrieve data. Providers are a part of the Service Provider
Interface (SPI) and they register in DAL new formats that can be
managed using the DAL API.<div class="im"><br>
<br>
<blockquote type="cite"><br>
If this is correct, and I want to register a new DAL provider I guess,
after having of course read the whole available (as much as I know)
documentation [1] on fmap.dal, I should use as main reference the
chapter "<span>Creación de un nuevo almacén</span>" [2] .<br>
</blockquote>
<br></div>
This document explains how you can create a new DataStore using the
API. In this example it is creating a new DBF. The "DBF provider" has
to be previously registered with a name or the line
"serverExplorer.getAddParameters("DBF")" will send an exception. <br><div class="im">
<br>
<blockquote type="cite"><br>
I've been suggested to give a glance, as example, at the extDwg
extension for better understanding how the registration of a DAL
provider works.<br>
I see that in this provider, as in other ones, four classes are always
implemented:<br>
<br>
DWGLibrary -> Does it register the provider ? Does it in
doPostInitialize() method ? <br>
</blockquote>
<br></div>
Thats right. It registers the DWG provider and the DWG explorer that is
used to browse by a directory tree for searching DWG's of creating new
DWG's<div class="im"><br>
<br>
<blockquote type="cite">DWGFilesystemServerProvider, DWGStoreParameters,
DWGStoreProvider -> How do they work exactly ? What do they do ? <br>
</blockquote>
<br></div>
DWGFilesystemServerProvider -> It is used to browse by a directory
tree and search DWG resources. It can be used to get the
DataStoreParameters that are used to open an existing DWG creating a
new DataStore or it also can be used to get the NewDataStoreParameters
that are used to create a new DWG.<br>
<br>
DWGStoreParameters -> Defines the parameters that are needed to open
a DWG<br>
<br>
DWGStoreProvider -> This provider is created from a
DWGStoreParameters and it is able to read (or write) a DWG.<div class="im"><br>
<br>
<blockquote type="cite"><br>
After having implemented it, how can I register the provider with a
plugin ?<br>
</blockquote>
<br></div>
The project xxx.app.extension is the responsible to add a new plugin in
gvSIG. It will contain the new provider.<div class="im"><br>
<blockquote type="cite"><br>
Which class among those provided by the plugin structure should I use ?<br>
<br>
These are the classes:<br>
<br>
- A xxxManager: is the entry point to the API. Provides the main
services of the library.
<br>
- A xxxLocator: the responsible to provide access to the single Manager
instance.
<br>
- A xxxLibrary: initialization and configuration of the library.
<br>
- A xxxService: another interface for the API. You may use it or not
depending on your library's functionality.
<br>
</blockquote></div>
Well, it depends on any project. The Library class is normally located
in all the projects, but the other classes will be contained depending
on what are you developing. (e.g. extDWG is a DAL provider and it don't
need any Manager) <br>
<br>
I Hope I clarify you some doubts.<br>
<br>
Regards,<br>
Jorge<br>
<br>
<blockquote type="cite"><div class="im"><br>
Thanks a lot for the help,<br>
Luca<br>
<br>
<br>
[1] <a href="http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore" target="_blank">http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore</a><br>
[2] <a href="http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore/consumer-services/creacion-de-un-nuevo-almacen" target="_blank">http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore/consumer-services/creacion-de-un-nuevo-almacen</a><br>
</div><pre><fieldset></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Jorge Piera Llodrá
gvSIG Development Team
PRODEVELOP
Plaza Don Juan de Villarrasa, 14 - 5
46001 Valencia
Tel: +34 963510612
Fax: +34 963510908
e-mail: <a href="mailto:jpiera@prodevelop.es" target="_blank">jpiera@prodevelop.es</a>
<a href="http://www.prodevelop.es" target="_blank">http://www.prodevelop.es</a>
<a href="http://www.gvsig.org" target="_blank">http://www.gvsig.org</a>
</pre>
</div>
<br>_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br></blockquote></div><br>