You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "Sergio Fernández (JIRA)" <ji...@apache.org> on 2013/02/19 11:49:12 UTC
[jira] [Resolved] (MARMOTTA-95) InterceptingRepositoryConnection
not working as expected
[ https://issues.apache.org/jira/browse/MARMOTTA-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergio Fernández resolved MARMOTTA-95.
--------------------------------------
Resolution: Fixed
> InterceptingRepositoryConnection not working as expected
> --------------------------------------------------------
>
> Key: MARMOTTA-95
> URL: https://issues.apache.org/jira/browse/MARMOTTA-95
> Project: Marmotta
> Issue Type: Bug
> Components: Triple Store
> Affects Versions: 2.6
> Reporter: Sergio Fernández
> Assignee: Sergio Fernández
> Priority: Critical
> Labels: sesame, triplestore
> Fix For: 3.0-incubating
>
>
> Once I fixed MARMOTTA-91, I realized that such sequence of commands do not import data in the triple store:
> The code, for instance at MetaWebService.putMeta(), is something like:
> {{
> InterceptingRepositoryConnection connection = new InterceptingRepositoryConnectionWrapper(sesameService.getRepository(), sesameService.getConnection());
> try {
> connection.begin();
> final Resource subject = ResourceUtils.getUriResource(connection, uri);
> connection.addRepositoryConnectionInterceptor(new ResourceSubjectMetadata(subject));
> // delete all triples for given subject
> connection.remove(subject, null, null, (Resource)null);
> // add RDF data from input to the suject
> connection.add(request.getReader(), configurationService.getBaseUri(), parser, contextService.getDefaultContext());
> } finally {
> connection.commit();
> connection.close();
> }
> }}
> The same sequence of commands, just switching to a normal RepositoryConnection, ingest the data sent.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira