Hi Beto, I think that solely depends on the amount of code/complexity one of those options would introduce. I think a simple solution might be to create a Any23 data format and then a fluent builder API on top of it.
Something like: DataFormat rdfXml = new Any23DataFormat().rdf().asXML(); DataFormat rdfPojo = new Any23DataFormat().rdf().asJavaObjects(); But, we're discussing tastes here. Perhaps you can prototype this and see how much complexity arises, zoran On Tue, May 28, 2019 at 7:13 AM Beto Flores <[email protected]> wrote: > > Hi all. > > The Apache Any23 library supports multiple input formats such as: RDFa, > Microdata, Microformat, Turtle, etc. [1]. And to my understanding a > Dataformat generally focuses on a single format let say RSS [2] or CSV > [3]. So, I was wondering which strategy we could use to fit Any23 as a > Dataformat. > > 1) Create a dataformat for each supported input format. Let say create a > RDFa dataformat, a Microformat dataformat, etc. All which will be > implemented using Any23. > 2) Create a single Any23 dataformat which uses options in order to > parametrize which specific format to use. > Which approach do you think is better? Or do you have other ideas?. > > Also, the output of Apache Any23 is essentially RDF data which could be > represented in many ways, let say RDF-XML, Turttle, JSON-LD, etc. Moreover, > it could also be retrieved as java objects through a RDF4J model [4]. So, > should a dataformat have only one way to represent the output data or could > it be configurable? > > Best, > Roberto > > [1] https://any23.apache.org/supported-formats.html > [2] http://camel.apache.org/rss.html > [3] http://camel.apache.org/csv.html > [4] https://rdf4j.eclipse.org/documentation/programming/model/ -- Zoran Regvart
