freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

[idea] Enrich with multiple templates #32

Closed ghsnd closed 8 years ago

ghsnd commented 9 years ago

An idea for a future implementation: now it is possible to enrich a document using only 1 template at a time. I can imagine that one wants documents enriched with 2 or more templates, e.g. "the birth date of writers" occurring in the text and also with "the country of places" occurring.

The request would become something like

.../e-link/documents?templateid=3,5,21
m1ci commented 8 years ago

"the birth date of writers" occurring in the text and also with "the country of places" occurring.

So you can handcraft a template which will enrich with both info, "the birth date of writers" and "the country of places" at same time.

The idea of being able to perform enrichment with several templates might seem at first sight useful BUT:

Also, you can realize this feature with unix pipes. See the example bellow:

curl "http://api-dev.freme-project.eu/current/e-link/documents?templateid=302&outformat=turtle&token=YOUR_TOKEN" -H "Content-Type: text/turtle" -d @nif.ttl  | curl -v "http://api-dev.freme-project.eu/current/e-link/documents?templateid=301&outformat=turtle&token=YOUR_TOKEN" -H "Content-Type: text/turtle" -d @-
jnehring commented 8 years ago

I also think that we can use a pipeline for this, or a special template or the user has to do two api calls. Lets not make this feature more complicated then it is.

I close the issue. @ghsnd when you still have a need for this feature you can reopen and we continue discussing it.