Github user stain commented on the issue:
    Thanks, @ajs6f !
    I found some old code where I had tried to make a fluent interface.. I 
managed to update it to the current master and sorted some issues.
    I pushed it to the `fluent-parser` branch
    I haven't implemented the `Parser` yet or written any tests.
    Basically the idea is this:
          Parsed<Dataset, IRI> p = rdf.parserBuilder()
      .target(quad -> System.out.println(quad.getSubject()))  
    Now there is a set of interfaces, one for each step along the way, e.g. 
`NeedTarget`, and 
    some internal `_` package interfaces to ensure consistency (but this can be 
flattened). Note that it is easier in this code to explore this in Eclipse with 
auto-complete as the interfaces have not been flattened yet.
    It is implemented by a single `AbstractParserBuilder` which keeps all its 
state (except async executor) in a `ParserConfig` bean. The builder can be made 
immutable using `.build()` after which any change will make it mutable again.  
While it's mutable it will mutate the bean without any copies.
    There is also a more low-level `Parser` which takes a `ParserConfig` - this 
is basically how the RDF implementations can be invoked.
    I have not moved over the preflight checks in AbstractRDFParser there.
    Feel free to use it as a starting ground or inspiration! It's quite hard to 
do fluent interfaces..


To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to