[
https://issues.apache.org/jira/browse/ANY23-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16615007#comment-16615007
]
ASF GitHub Bot commented on ANY23-396:
--------------------------------------
GitHub user HansBrende opened a pull request:
https://github.com/apache/any23/pull/122
ANY23-396 allow mapping/filtering TripleHandlers in Rover
Here is one possible alternative to the existing PR for ANY23-396.
**Pros:**
1. Fully backwards compatible
2. Extends `WriterFactory` with new `DelegatingWriterFactory` interface,
which, rather than writing a `TripleHandler` to an output stream, writes a
`TripleHandler` to another `TripleHandler`. This will allow users to produce a
final domain-specific RDF graph of their choosing in Rover by implementing
mapping/filtering `DelegatingWriterFactory` implementations.
3. the `--format` flag in rover now represents a list of WriterFactory ids,
rather than a single WriterFactory id. Each id in the list is composed with the
one previous to it to construct the final `TripleHandler`. All writers in the
list, except the last, are required to implement `DelegatingTripleHandler`.
**Cons:**
1. this solution requires deprecating 3 methods in the `WriterFactory`
interface (and then un-deprecating them in the extending `FormatWriterFactory`
interface.) However, this drawback does not affect backwards compatibility.
## ALTERNATIVE
In order to avoid the single "con" I have listed, the alternative to this
solution would be, rather than extending the `WriterFactory` interface with
`DelegatingWriterFactory`, to keep these two interfaces completely separate and
define a new `DelegatingWriterFactoryRegistry` (analogous to the
`WriterFactoryRegistry`) with a different `ServiceLoader` in order to load
`DelegatingWriterFactory` implementations.
@jgrzebyta @lewismc Thoughts?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HansBrende/any23 ANY23-396
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/any23/pull/122.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #122
----
commit cb293e22b9352652d91474cd3e35233e75dc9fb9
Author: Hans <firedrake93@...>
Date: 2018-09-14T15:29:33Z
ANY23-396 allow mapping/filtering TripleHandlers in Rover
----
> Add ability to run extractors in flow
> -------------------------------------
>
> Key: ANY23-396
> URL: https://issues.apache.org/jira/browse/ANY23-396
> Project: Apache Any23
> Issue Type: Improvement
> Components: core
> Affects Versions: 2.2
> Reporter: Jacek Grzebyta
> Assignee: Jacek Grzebyta
> Priority: Minor
>
> Currently extractors do not work in flows. I.E. Next extractor has no any
> access to triples made by previous one.
> It would be useful if an extractor has possibility to modify triples created
> by another extractor.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)