Uploaded image for project: 'Apache Any23 (Retired)'
  1. Apache Any23 (Retired)
  2. ANY23-398

Make use of CompositeTripleHandler

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3
    • 2.8
    • core
    • None

    Description

      The BenchmarkTripleHandler, ExtractionContextBlocker, IgnoreAccidentalRDFa, IgnoreTitlesOfEmptyDocuments, LoggingTripleHandler, and ReportingTripleHandler classes could all potentially be subclasses of CompositeTripleHandler to reduce delegation boilerplate.

      In addition, we could add the following constructor to CompositeTripleHandler for ease of subclassing by classes with a single delegate:

      public CompositeTripleHandler(TripleHandler delegate) {
          this(Collections.singleton(delegate));
      }
      

      Also, we should make CompositeTripleHandler extend FormatWriter (which extends TripleHandler) for more versatility. Actually, no. Since CompositeTripleHandler might delegate output to multiple FormatWriters, any future methods that we might add to FormatWriter interface (e.g., FormatWriterFactory getFormatWriterFactory() ) might become nonsensical when composed together by a CompositeTripleHandler.

      ADDENDUM: we could also create DelegatingWriterFactory implementations for some or all of the aforementioned classes in order to allow them to be located by a ServiceLoader and composed together directly by the rover --format flag. Prerequisite: ANY23-396, PR #122

      Attachments

        Activity

          People

            Unassigned Unassigned
            hansbrende Hans Brende
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: