<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Luca<br>
<br>
Have a look to [1]. The method doPostInitialize registers the provider
for the DBF format.<br>
<br>
Regards,<br>
Jorge<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="https://forge.osor.eu/plugins/scmsvn/viewcvs.php/*checkout*/branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/dbf/DBFLibrary.java?content-type=text%2Fplain&root=gvsig-desktop">https://forge.osor.eu/plugins/scmsvn/viewcvs.php/*checkout*/branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/store/dbf/DBFLibrary.java?content-type=text%2Fplain&root=gvsig-desktop</a><br>
<br>
El 05/08/2010 16:18, luca bianconi escribió:
<blockquote
cite="mid:AANLkTi=k1z_MozFJkTWT+BabJ9pD-KWkJtfjCYW2+r5C@mail.gmail.com"
type="cite">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>
<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><<a
moz-do-not-send="true" href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div class="im">On 08/04/2010 01:31 AM, luca bianconi wrote:
<blockquote>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><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><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>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><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><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>
<div class="im"><br>
Thanks a lot for the help,<br>
Luca<br>
<br>
<br>
[1] <a moz-do-not-send="true"
href="http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore">http://www.gvsig.org/web/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/featurestore</a><br>
[2] <a moz-do-not-send="true"
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">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 moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a>
<a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
<br>
<pre>--
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 moz-do-not-send="true" href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>
<a moz-do-not-send="true" href="http://www.prodevelop.es">http://www.prodevelop.es</a>
<a moz-do-not-send="true" href="http://www.gvsig.org">http://www.gvsig.org</a>
</pre>
</div>
<br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a moz-do-not-send="true"
href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a>
<a class="moz-txt-link-freetext" href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jorge Piera Llodrá
Equipo desarrollo gvSIG
PRODEVELOP
Plaza Don Juan de Villarrasa, 14 - 5
46001 Valencia
Tef: +34 963510612
Fax: +34 963510908
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>
<a class="moz-txt-link-freetext" href="http://www.prodevelop.es">http://www.prodevelop.es</a>
<a class="moz-txt-link-freetext" href="http://www.gvsig.org">http://www.gvsig.org</a></pre>
</body>
</html>