Uploaded image for project: 'Marmotta'
  1. Marmotta
  2. MARMOTTA-95

InterceptingRepositoryConnection not working as expected

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wikier Sergio Fernández
                Reporter:
                wikier Sergio Fernández
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: