You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@marmotta.apache.org by Fabian Cretton <Fa...@hevs.ch> on 2014/10/24 09:02:00 UTC

Importing Data - API change ?

Hi,
 
I am trying to import data as explained here:
http://wiki.apache.org/marmotta/ImportData
 
writing java code as :
ImportClient importClient = new ImportClient(configuration);
InputStream is = new FileInputStream(new File(path));
RDFFormat format = Rio.getParserFormatForFileName(path);
importClient.uploadDataset(is, format.getDefaultMIMEType(), context);
 
But it seems the ImportClient.uploadDataset() now only accept two arguments, no more accepting the "context".
Is that right ?
 
if so, why ? we usually need explicitly specify in which context to load data, and it seems that 
now I need to directly call the web service "/import?context="
 
Thank you for any help
Fabian

Re: Rép. : Re: Importing Data - API change ?

Posted by Jakob Frank <ja...@apache.org>.
Great, we're always looking for "fresh blood" ;-)

For providing code/doc and related discussion, you might want to join
dev@marmotta.a.o

Best,
Jakob

On 24 October 2014 11:07, Fabian Cretton <Fa...@hevs.ch> wrote:
> Sergio,
>
> now that I start to be more familiar with Marmotta, and that I am
> developping new modules, I will try to be of some help if possible,
> providing code or doc update
>
> let me know if I can be of any help
> Fabian
>
>>>> Sergio Fernández<wi...@apache.org> 24.10.2014 11:04 >>>
> I'll do it later. Thanks for the report.
>
> On 24/10/14 09:28, Fabian Cretton wrote:
>> I think I found the answer,
>> the context must now be specified in the ClientConfiguration.
>>
>> Maybe only the doc needs an update then :-)
>> Thanks
>> Fabian
>>
>>>>> "Fabian Cretton" <Fa...@hevs.ch> 24.10.2014 09:02 >>>
>> Hi,
>>
>> I am trying to import data as explained here:
>> http://wiki.apache.org/marmotta/ImportData
>>
>> writing java code as :
>> ImportClient importClient = new ImportClient(configuration);
>> InputStream is = new FileInputStream(new File(path));
>> RDFFormat format = Rio.getParserFormatForFileName(path);
>> importClient.uploadDataset(is, format.getDefaultMIMEType(), context);
>>
>> But it seems the ImportClient.uploadDataset() now only accept two
>> arguments, no more accepting the "context".
>> Is that right ?
>>
>> if so, why ? we usually need explicitly specify in which context to load
>> data, and it seems that
>> now I need to directly call the web service "/import?context="
>>
>> Thank you for any help
>> Fabian
>>
>
> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 660 2747 925
> e: sergio.fernandez@redlink.co
> w: http://redlink.co

Re: Rép. : Re: Importing Data - API change ?

Posted by Sergio Fernández <wi...@apache.org>.
Hi Fabian,

On 24/10/14 11:07, Fabian Cretton wrote:
> now that I start to be more familiar with Marmotta, and that I am
> developping new modules, I will try to be of some help if possible,
> providing code or doc update

As you know our documentation could be much better. So any patch there 
covering missing aspects would be welcomed!

>>>> Sergio Fernández<wi...@apache.org> 24.10.2014 11:04 >>>
> I'll do it later. Thanks for the report.
>
> On 24/10/14 09:28, Fabian Cretton wrote:
>> I think I found the answer,
>> the context must now be specified in the ClientConfiguration.

BTW, in the develop branch I've just added the method 
ImportClient.uploadDataset(inputStream,  mimeType, context) to the 
client library.

Cheers,

-- 
-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Rép. : Re: Importing Data - API change ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Sergio,
 
now that I start to be more familiar with Marmotta, and that I am
developping new modules, I will try to be of some help if possible,
providing code or doc update
 
let me know if I can be of any help
Fabian

>>> Sergio Fernández<wi...@apache.org> 24.10.2014 11:04 >>>
I'll do it later. Thanks for the report.

On 24/10/14 09:28, Fabian Cretton wrote:
> I think I found the answer,
> the context must now be specified in the ClientConfiguration.
>
> Maybe only the doc needs an update then :-)
> Thanks
> Fabian
>
>>>> "Fabian Cretton" <Fa...@hevs.ch> 24.10.2014 09:02 >>>
> Hi,
>
> I am trying to import data as explained here:
> http://wiki.apache.org/marmotta/ImportData
>
> writing java code as :
> ImportClient importClient = new ImportClient(configuration);
> InputStream is = new FileInputStream(new File(path));
> RDFFormat format = Rio.getParserFormatForFileName(path);
> importClient.uploadDataset(is, format.getDefaultMIMEType(),
context);
>
> But it seems the ImportClient.uploadDataset() now only accept two
arguments, no more accepting the "context".
> Is that right ?
>
> if so, why ? we usually need explicitly specify in which context to
load data, and it seems that
> now I need to directly call the web service "/import?context="
>
> Thank you for any help
> Fabian
>

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Re: Importing Data - API change ?

Posted by Jakob Frank <ja...@apache.org>.
Updated

On 24 October 2014 11:04, Sergio Fernández <wi...@apache.org> wrote:
> I'll do it later. Thanks for the report.
>
> On 24/10/14 09:28, Fabian Cretton wrote:
>>
>> I think I found the answer,
>> the context must now be specified in the ClientConfiguration.
>>
>> Maybe only the doc needs an update then :-)
>> Thanks
>> Fabian
>>
>>>>> "Fabian Cretton" <Fa...@hevs.ch> 24.10.2014 09:02 >>>
>>
>> Hi,
>>
>> I am trying to import data as explained here:
>> http://wiki.apache.org/marmotta/ImportData
>>
>> writing java code as :
>> ImportClient importClient = new ImportClient(configuration);
>> InputStream is = new FileInputStream(new File(path));
>> RDFFormat format = Rio.getParserFormatForFileName(path);
>> importClient.uploadDataset(is, format.getDefaultMIMEType(), context);
>>
>> But it seems the ImportClient.uploadDataset() now only accept two
>> arguments, no more accepting the "context".
>> Is that right ?
>>
>> if so, why ? we usually need explicitly specify in which context to load
>> data, and it seems that
>> now I need to directly call the web service "/import?context="
>>
>> Thank you for any help
>> Fabian
>>
>
> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 660 2747 925
> e: sergio.fernandez@redlink.co
> w: http://redlink.co

Re: Importing Data - API change ?

Posted by Sergio Fernández <wi...@apache.org>.
I'll do it later. Thanks for the report.

On 24/10/14 09:28, Fabian Cretton wrote:
> I think I found the answer,
> the context must now be specified in the ClientConfiguration.
>
> Maybe only the doc needs an update then :-)
> Thanks
> Fabian
>
>>>> "Fabian Cretton" <Fa...@hevs.ch> 24.10.2014 09:02 >>>
> Hi,
>
> I am trying to import data as explained here:
> http://wiki.apache.org/marmotta/ImportData
>
> writing java code as :
> ImportClient importClient = new ImportClient(configuration);
> InputStream is = new FileInputStream(new File(path));
> RDFFormat format = Rio.getParserFormatForFileName(path);
> importClient.uploadDataset(is, format.getDefaultMIMEType(), context);
>
> But it seems the ImportClient.uploadDataset() now only accept two arguments, no more accepting the "context".
> Is that right ?
>
> if so, why ? we usually need explicitly specify in which context to load data, and it seems that
> now I need to directly call the web service "/import?context="
>
> Thank you for any help
> Fabian
>

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Rép. : Importing Data - API change ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
I think I found the answer,
the context must now be specified in the ClientConfiguration.
 
Maybe only the doc needs an update then :-)
Thanks
Fabian

>>> "Fabian Cretton" <Fa...@hevs.ch> 24.10.2014 09:02 >>>
Hi,
 
I am trying to import data as explained here:
http://wiki.apache.org/marmotta/ImportData
 
writing java code as :
ImportClient importClient = new ImportClient(configuration);
InputStream is = new FileInputStream(new File(path));
RDFFormat format = Rio.getParserFormatForFileName(path);
importClient.uploadDataset(is, format.getDefaultMIMEType(), context);
 
But it seems the ImportClient.uploadDataset() now only accept two arguments, no more accepting the "context".
Is that right ?
 
if so, why ? we usually need explicitly specify in which context to load data, and it seems that 
now I need to directly call the web service "/import?context="
 
Thank you for any help
Fabian