Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-116

DatasetGraphMap.getGraph() should call addGraph() instead of adding directly to graph collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Done
    • None
    • Jena 2.11.0
    • ARQ
    • None

    Description

      The DatasetGraphMap class is useful for implementing a quad store as a collection of triplestores, but when you attempt to retrieve a graph that does not exist, a new one is created but bypasses the addGraph() method.

      Parliament needs to register all new graphs in an internal table (so that it knows which directory and files on disk correspond to each graph). It does this by overriding the addGraph() method.

      I've attached a patch that fixes this issue and also removes the "final" modifier on the getGraph() method (not strictly necessary for our use case, but it seemed out of place since no other methods are final, and I can imagine implementations that may want to override that method).

      Attachments

        1. JENA-116-r1170776.patch
          0.7 kB
          Stephen Allen

        Activity

          People

            andy Andy Seaborne
            sallen Stephen Allen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: