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 09:19:12 UTC

[jira] [Created] (MARMOTTA-95) InterceptingRepositoryConnection not working as expected

Sergio Fernández created MARMOTTA-95:
----------------------------------------

             Summary: 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: Sebastian Schaffert
            Priority: Critical
             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:

{code:java}
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();
} 
{code}

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