[
https://issues.apache.org/jira/browse/ANY23-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637103#comment-16637103
]
ASF GitHub Bot commented on ANY23-396:
--------------------------------------
Github user HansBrende commented on the issue:
https://github.com/apache/any23/pull/122
@lewismc One possibility that I'm considering right now is using this
opportunity to define our own `TripleFormat` class analogous to rdf4j's
`RDFFormat` (such that any `TripleFormat` could be converted to a `RDFFormat`
if desired), and then changing the method signature of `RDFFormat getFormat()`
to `TripleFormat getFormat()`.
The reason being: shouldn't all return types of methods (aside from the
ubiquitous `IRI`, `BNode`, etc.) in new interfaces (e.g. `FormatWriterFactory`)
be, preferably, part of our own API, rather than RDF4J's? Having our own
`TripleFormat` class would give us more control over our own API. For example,
suppose we were to add the following default method to the `TripleHandler`
interface:
```java
default void handleComment(String comment, ExtractionContext context) {
//default implementation = do nothing
}
```
And then we wanted to add a `supportsComments` flag to the format returned
by `FormatWriterFactory.getFormat()` (which we could set to `true` for, e.g.,
the `TurtleWriter`). Well, if we're using RDF4J's `RDFFormat` class, we could
log an issue in RDF4J asking them to add that additional parameter, but we're
pretty much at their mercy. However, if we had our own `TripleFormat` class, we
could add an additional `TripleFormat` constructor with a `boolean
supportsComments` parameter (and a default value of `false`).
What do you think about this?
(The only reason I've hesitated so far about merging this PR is that once
new interfaces are introduced as part of the core API, I'd prefer to never
change them again--so I want to get it right the first time!)
> 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)