Skip to content

Commit

Permalink
Move reconciliation API documentation to /reconcile page (#382)
Browse files Browse the repository at this point in the history
And add link to metadaten.community forum (#381)
  • Loading branch information
fsteeg committed Mar 28, 2024
1 parent b8afced commit 23abf88
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 50 deletions.
47 changes: 1 addition & 46 deletions app/views/api.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,50 +105,5 @@ <h2 id='jsonld'>JSON-LD <small><a href='#jsonld'><span class='glyphicon glyphico

<h2 id="openrefine">OpenRefine <small><a href="#openrefine"><span class="glyphicon glyphicon-link"></span></a></small></h2>

<p>
Dieser Dienst bietet eine Implementierung der OpenRefine
<a href="https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation">Reconciliation</a>
<a href="https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API">API</a> an:
</p>
<p><code>@controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code> (<a href='http://blog.lobid.org/2018/08/27/openrefine.html'>diese URL in OpenRefine verwenden</a>).</p>
<p>
Wir beteiligen uns an der Standardisierung dieser Schnittstellen im Rahmen der <a href="https://www.w3.org/community/reconciliation/">W3C Reconciliation Community Group</a>.
Die im Rahmen dieser Gruppe entwickelte <a href="https://reconciliation-api.github.io/testbench/">reconciliation service test bench</a> gibt einen Überblick über die von lobid-gnd
unterstützten Reconciliation APIs und bietet die Möglichkeit zur direkten Interaktion mit diesen APIs.
</p>

<h3>Allgemeine API <small>(<a href="https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API">spec</a>)</small></h3>

@desc("Service", routes.Reconcile.reconcile())
@desc("JSONP callback", routes.Reconcile.main("jsonp"))
<p><b>CORS header</b></p>
<code>curl --head @controllers.HomeController.config("host")@routes.Reconcile.reconcile() | grep Access-Control-Allow-Origin</code>

<h3>View API</h3>

@desc("Preview entities (<a href=\"https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API#preview-api\">spec</a>)", routes.HomeController.authorityDotFormat("118624822", "preview"))
@desc("View entities (<a href=\"https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API#service-metadata\">spec</a>)", routes.HomeController.authority("118624822"))

<h3>Query API <small>(<a href="https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation-Service-API#query-request">spec</a>)</small></h3>

@desc("Query: GET", routes.Reconcile.main(queries="{\"q1\":{\"query\":\"Twain, Mark\"}}"))
<p><b>Query: POST</b></p>
<p><code>curl --data 'queries={"q1":{"query":"Twain, Mark"}}' @controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code></p>

<h3>Suggest API <small>(<a href="https://github.com/OpenRefine/OpenRefine/wiki/Suggest-API">spec</a>)</small></h3>

@desc("Suggest entities ", routes.Reconcile.suggest(service="entity", prefix="hbz"))
@desc("Suggest types ", routes.Reconcile.suggest(service="type", prefix="werk"))
@desc("Suggest properties ", routes.Reconcile.suggest(service="property", prefix="beruf"))
@desc("Flyout entities ", routes.Reconcile.flyout(service="entity", id="2047974-8"))
@desc("Flyout types ", routes.Reconcile.flyout(service="type", id="Work"))
@desc("Flyout properties ", routes.Reconcile.flyout(service="property", id="professionOrOccupation"))

<h3>Data extension API</h3>

@desc("Property proposal (<a href=\"https://github.com/OpenRefine/OpenRefine/wiki/Data-Extension-API#property-proposal-protocol\">spec</a>)", routes.Reconcile.properties("","Work",""))
@desc("Extend: GET (<a href=\"https://github.com/OpenRefine/OpenRefine/wiki/Data-Extension-API#data-extension-protocol\">spec</a>)", routes.Reconcile.main(extend="{\"ids\":[\"1081942517\",\"4791358-7\"],\"properties\":[{\"id\":\"preferredName\"},{\"id\":\"firstAuthor\"}]}"))
<p><b>Extend: POST</b></p>
<p><code>curl --data 'extend={"ids":["1081942517","4791358-7"],"properties":[{"id":"preferredName"},{"id":"firstAuthor"}]}' @controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code></p>

Siehe <a href='@routes.Reconcile.reconcile()'>GND reconciliation for OpenRefine</a>.
}
57 changes: 53 additions & 4 deletions app/views/reconcile.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

@()

@desc(label: String, link: play.api.mvc.Call) = {
<dt>@Html(label)</dt> <dd><a href='@link'>@java.net.URLDecoder.decode(link.toString.replaceAll("[&?]format=json$", ""), "UTF-8")</a></dd>
}

@main("", "lobid-gnd - Reconcile") {
<div class='pull-right'>
<img src='@controllers.routes.Assets.versioned("images/gnd.jpg")' height='85px'/>
Expand All @@ -19,17 +23,62 @@ <h1>GND reconciliation for OpenRefine</h1>
<h2>Data and Tools</h2>

<p><a href='https://www.dnb.de/EN/Professionell/Standardisierung/GND/gnd_node.html'>Integrated Authority File GND</a></p>
<p><a href='http://openrefine.org/'>OpenRefine</a>, <a href="https://github.com/OpenRefine/OpenRefine/wiki/Reconciliation">Reconciliation</a></p>
<p><a href='http://openrefine.org/'>OpenRefine</a>, <a href="https://docs.openrefine.org/manual/reconciling/">Reconciliation</a></p>

<h2>Tutorials</h2>

<p><a href='http://blog.lobid.org/2018/08/27/openrefine.html'>GND reconciliation for OpenRefine</a></p>
<p><a href='http://blog.lobid.org/2019/08/19/openrefine.html'>Using the suggest APIs for searching types, properties, and entities</a></p>
<p><a href='http://blog.lobid.org/2019/09/30/openrefine-examples.html'>Using additional properties to improve matches</a></p>

<h2>API and Specs</h2>

<p><a href="@routes.HomeController.api()#openrefine">GND reconciliation for OpenRefine: API documentation</a></p>
<h2>Community</h2>
<p><a href="https://www.w3.org/community/reconciliation/">W3C entity reconciliation community group</a></p>
<p><a href="https://reconciliation-api.github.io/testbench/">Reconciliation service test bench</a></p>
<p><a href="https://metadaten.community">metadaten.community forum</a></p>

<h2>API</h2>

<p>
This service provides an implementation of the OpenRefine
<a href="https://docs.openrefine.org/manual/reconciling/">Reconciliation</a>
<a href="https://openrefine.org/docs/technical-reference/reconciliation-api">API</a>.
</p>

<h3>General API <small>(<a href="https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410">spec</a>)</small></h3>

<p><b>Service</b><br/>
<code>curl @controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code>
<p><b>JSONP callback</b><br/>
<code>curl @controllers.HomeController.config("host")@routes.Reconcile.main("jsonp")</code>
<p><b>CORS header</b><br/>
<code>curl --head @controllers.HomeController.config("host")@routes.Reconcile.reconcile() | grep Access-Control-Allow-Origin</code>
</p>

<h3>View API</h3>

@desc("Preview entities (<a href=\"https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#preview-service\">spec</a>)", routes.HomeController.authorityDotFormat("118624822", "preview"))
@desc("View entities (<a href=\"https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#dfn-view-template\">spec</a>)", routes.HomeController.authority("118624822"))

<h3>Query API <small>(<a href="https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#reconciliation-queries">spec</a>)</small></h3>

@desc("Query: GET", routes.Reconcile.main(queries="{\"q1\":{\"query\":\"Twain, Mark\"}}"))
<p><b>Query: POST</b><br/>
<code>curl --data 'queries={"q1":{"query":"Twain, Mark"}}' @controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code></p>

<h3>Suggest API <small>(<a href="https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#suggest-services">spec</a>)</small></h3>

@desc("Suggest entities ", routes.Reconcile.suggest(service="entity", prefix="hbz"))
@desc("Suggest types ", routes.Reconcile.suggest(service="type", prefix="werk"))
@desc("Suggest properties ", routes.Reconcile.suggest(service="property", prefix="beruf"))
@desc("Flyout entities ", routes.Reconcile.flyout(service="entity", id="2047974-8"))
@desc("Flyout types ", routes.Reconcile.flyout(service="type", id="Work"))
@desc("Flyout properties ", routes.Reconcile.flyout(service="property", id="professionOrOccupation"))

<h3>Data extension API</h3>

@desc("Property proposal (<a href=\"https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#data-extension-property-proposals\">spec</a>)", routes.Reconcile.properties("","Work",""))
@desc("Extend: GET (<a href=\"https://www.w3.org/community/reports/reconciliation/CG-FINAL-specs-0.2-20230410/#data-extension-service\">spec</a>)", routes.Reconcile.main(extend="{\"ids\":[\"1081942517\",\"4791358-7\"],\"properties\":[{\"id\":\"preferredName\"},{\"id\":\"firstAuthor\"}]}"))
<p><b>Extend: POST</b><br/>
<code>curl --data 'extend={"ids":["1081942517","4791358-7"],"properties":[{"id":"preferredName"},{"id":"firstAuthor"}]}' @controllers.HomeController.config("host")@routes.Reconcile.reconcile()</code></p>

}

0 comments on commit 23abf88

Please sign in to comment.