If there is no constructor around at all Java invents (at the byte code
level) a no arguments constructor. For tutorials I tend to put one in
explicitly so I have a chance to talk about SPI in the comments.
This is a personal style thing, you will often find me adding methods just
so I can write a javadoc. Occasionally I get away with it...
--
Jody
--
Jody Garnett
On 18 December 2014 at 15:49, Travis Brundage <tbrund...@boundlessgeo.com>
wrote:
>
> Hi Tom,
>
> Thanks for your reply. Cool, makes sense. I realized my confusion stemmed
> from the tutorial saying there needed to be an empty constructor in the
> factory class, but in backporting geoserver's changes, they did not do
> that. Relevant section of the diff
> <https://github.com/travislbrundage/geotools/commit/309468689c68fb80bcebf0a5c27b02d142f990dd>
> :
>
> -public class CSVDataStoreFactory implements DataStoreFactorySpi {
> - /**
> - * Public "no argument" constructor called by Factory Service
> Provider (SPI) entry listed in
> - * META-INF/services/org.geotools.data.DataStoreFactorySPI
> - */
> - public CSVDataStoreFactory() {
> - }
> +public class CSVDataStoreFactory implements FileDataStoreFactorySpi {
>
> I suppose it does not need the "no argument" constructor after all?
>
> That being said, this led me to search for the files in geoserver and
> there is additionally a file for FileDataStoreFactorySpi - thus, I presume
> I actually need to add a file for things to work correctly. I'll update my
> branch accordingly.
>
> Regards,
> Travis
>
> On Thu, Dec 18, 2014 at 3:28 PM, Tom Kunicki <tom.kuni...@weather.com>
> wrote:
>>
>> Travis,
>>
>> The answer is "No". You still need to declare CSVDataStoreFactory as an
>> implementation of DataStoreFactorySpi even if the implementation is
>> transitive. This reason being... CSVDataStoreFactory still implements
>> the DataStoreFactorySpi (transitively) and that file is the method or
>> registering that class, as an implementation of DataStoreFactorySpi, for
>> lookups. If you drop that file from the source... software, like
>> GeoServer, won't be find your CSVDataStoreFactory.
>>
>> Tom
>>
>> On Thu, Dec 18, 2014 at 3:58 PM, Travis Brundage <
>> tbrund...@boundlessgeo.com> wrote:
>>
>>> So, with my update to gt-csv, the CSVDataStoreFactory no longer
>>> implements DataStoreFactorySpi, but instead implements
>>> FileDataStoreFactorySpi. (changes can be seen here
>>> <https://github.com/travislbrundage/geotools/commit/309468689c68fb80bcebf0a5c27b02d142f990dd>)
>>> I'm wondering if I should therefore get rid of the
>>> resources/META-INF/services directory which contains info for
>>> DataStoreFactorySpi? The exact file I'm talking about is this one
>>> <https://github.com/geotools/geotools/blob/master/modules/unsupported/csv/src/main/resources/META-INF/services/org.geotools.data.DataStoreFactorySpi>
>>> .
>>>
>>> --
>>> Travis Brundage
>>> Software Engineer | Boundless
>>> tbrund...@boundlessgeo.com
>>> 250.888.2820
>>> @boundlessgeo
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> GeoTools-Devel mailing list
>>> GeoTools-Devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>>
>>>
>>
>> --
>> * Tom Kunicki* | Software Engineer
>> *w:* 608 695 4251 *e:* tom.kuni...@weather.com
>>
>>
>
> --
> Travis Brundage
> Software Engineer | Boundless
> tbrund...@boundlessgeo.com
> 250.888.2820
> @boundlessgeo
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel