I think there is an error in your HTTPUtil.createPost(), as the
authentication syntax is "user:pwd" and not "user;pwd"
String.format("%s;%s"
should be
String.format("%s:%s"

Another question/proposal:
in ImportClient.uploadDataset(), errors would go totaly unnoticed by
the client.
The code being: 
public Boolean handleResponse(HttpResponse response) throws
ClientProtocolException, IOException {
EntityUtils.consume(response.getEntity());
switch(response.getStatusLine().getStatusCode()) {
case 200:
log.debug("dataset uploaded updated successfully");
return true;
case 412:
log.error("mime type {} not acceptable by import service",mimeType);
return false;
default:
log.error("error uploading dataset: {} {}",new Object[]
{response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
return false;
}
}
 
only error logs are generated on the server.
 
thus, in my version of uploadDataset(), I did replace the 'return
false' by exception:
switch(response.getStatusLine().getStatusCode()) {
case 200:
log.debug("dataset uploaded updated successfully");
return true;
case 412:
log.error("mime type {} not acceptable by import service",mimeType);
throw new IOException("mime type not acceptable by import service: "+
mimeType) ;
// return false;
default:
log.error("error uploading dataset: {} {}",new Object[]
{response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
throw new IOException("error uploading: "+
response.getStatusLine().getStatusCode());
// return false;
}
 
if that does make sense, that could be a change in your implementation
as well. Otherwise I will keep my version in OverLOD.
 
Then, I did implement LDClients that can import RDF files (instead of
using the import service). They are just like the "linked data" code,
except I don't check if the subject of the triple correspond to the
URI.
My goal is to handle all imports with LDClient, which allows me to do
other things on the temporary imported data.
If you want this code, just tell me how to do.
I understand I can fill a JIRA, but then I am not a git/github
specialist.
 
Fabian
>>> Sergio Fernández<[email protected]> 31.10.2014 12:46 >>>
On 31/10/14 12:18, Fabian Cretton wrote:
> thank you Sergio,
> I will try it.

Perfect. thanks.

> on the other hand, I am ready to do "pull request" from my own
marmotta
> fork.
> If so, as I do have my own 'dev-overLOD' and 'develop' branch, I
guess
> I should implement the change in 'develop' and do a pull request for
> 'develop', is that right ?

More or less, yes. Please, file a Jira issue for each PR you want to do

at GitHub. Then we'll manage it according the process described at:

http://wiki.apache.org/marmotta/Patches#Pull-Request_from_Github

Cheers,

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: [email protected]
w: http://redlink.co

Reply via email to