You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bu...@apache.org on 2012/02/20 18:56:07 UTC
svn commit: r805541 - in /websites/staging/stanbol/trunk: ./
content/stanbol/docs/trunk/enhancer/enhancerrest.html
content/stanbol/docs/trunk/enhancer/index.html
Author: buildbot
Date: Mon Feb 20 17:56:07 2012
New Revision: 805541
Log:
Staging update by buildbot for stanbol
Modified:
websites/staging/stanbol/trunk/ (props changed)
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.html
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/index.html
Propchange: websites/staging/stanbol/trunk/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Feb 20 17:56:07 2012
@@ -1 +1 @@
-1291389
+1291391
Modified: websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.html (original)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/enhancerrest.html Mon Feb 20 17:56:07 2012
@@ -70,7 +70,8 @@
<p>The content to analyze should be sent in a POST request with the mimetype specified in
the <code>Content-type</code> header. The response will hold the RDF enhancement serialized in the format specified in the <code>Accept</code> header:</p>
<div class="codehilite"><pre>curl -X POST -H <span class="s2">"Accept: text/turtle"</span> -H <span class="s2">"Content-type: text/plain"</span> <span class="se">\</span>
- --data <span class="s2">"John Smith was born in London."</span> http://localhost:8080/enhancer
+ --data <span class="s2">"The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley."</span> <span class="se">\</span>
+ http://localhost:8080/enhancer
</pre></div>
@@ -92,7 +93,7 @@ text/rdf+nt (N-TRIPLES)
<p>The following example shows how to send an enhancement request with a custom content item URI that will include the execution metadata in the response.
In addition this request is directed to the <a href="chains">Enhancement Chain</a> with the name "dbpedia-keyword"</p>
<div class="codehilite"><pre>curl -X POST -H <span class="s2">"Accept: text/turtle"</span> -H <span class="s2">"Content-type: text/plain"</span> <span class="se">\</span>
- --data <span class="s2">"John Smith was born in London."</span> <span class="se">\</span>
+ --data <span class="s2">"The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley."</span> <span class="se">\</span>
<span class="s2">"http://localhost:8080/enhancer/chain/dbpedia-keyword?uri=urn:fise-example-content-item&executionmetadata=true"</span>
</pre></div>
@@ -113,7 +114,7 @@ In addition this request is directed to
<p>Responses to requests with this parameter will be encoded as <code>multipart/from-data</code>. If the "Accept" header of the request is not compatible to <code>multipart/from-data</code> it is assumed as a <code>400 BAD_REQUEST</code>. For details see the documentation of the <a href="contentitem.html#multipart_mime_serialization">Multipart MIME format for ContentItems</a>.</p>
</li>
<li>
-<p><strong>omitParsed=[true/false]:</strong> Makes only sense in combination with the <code>outputContent</code> parameter. This allows to exclude all content included in the request from the response. A typical combination is <code>outputContent=<em>/</em>&omitParsed=true</code>. The default value of this parameter is <code>false</code></p>
+<p><strong>omitParsed=[true/false]:</strong> Makes only sense in combination with the <code>outputContent</code> parameter. This allows to exclude all content included in the request from the response. A typical combination is <code>outputContentPart=<em>/</em>&omitParsed=true</code>. The default value of this parameter is <code>false</code></p>
</li>
<li>
<p><strong>outputContentPart=[uri/'*']:</strong> This parameter allows to explicitly include content parts with a specific URI in the response. Currently this only supports <a href="contentitem.html#content_parts">ContentParts</a> that are stored as RDF graphs. </p>
@@ -138,7 +139,7 @@ Requests that use an <code>Accept: {mime
This can be achieved relatively easy by using the "<code>outputContent=<em>/</em></code>" in combination with "<code>omitParsed=true</code>".</p>
<div class="codehilite"><pre>curl -v -X POST -H <span class="s2">"Accept: multipart/from-data"</span> <span class="se">\</span>
-H <span class="s2">"Content-type: text/html; charset=UTF-8"</span> <span class="se">\</span>
- --data <span class="s2">"<html><body><p>John Smith was born in London.</p></body></html>"</span> <span class="se">\</span>
+ --data <span class="s2">"<html><body><p>The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.</p></body></html>"</span> <span class="se">\</span>
<span class="s2">"${it.serviceUrl}?outputContent=*/*&omitParsed=true&rdfFormat=application/rdf+xml"</span>
</pre></div>
@@ -164,7 +165,7 @@ Content-Disposition: form-data; name=&qu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-John Smith was born in London.
+The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.
--contentParts--
--contentItem--
@@ -176,13 +177,13 @@ John Smith was born in London.
<p>The using the '<code> omitMetadata=true</code>' together with the "Accept: {requested-content-type}" the multi-part content API allows to directly request the transcoded version of the content with the format {requested-content-type}. </p>
<div class="codehilite"><pre>curl -v -X POST -H "Accept: text/plain" \
-H "Content-type: text/html; charset=UTF-8" \
- --data "<span class="nt"><html><body><p></span>John Smith was born in London.<span class="nt"></p></body></html></span>" \
+ --data "<span class="nt"><html><body><p></span>The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.<span class="nt"></p></body></html></span>" \
"<span class="cp">${</span><span class="n">it</span><span class="o">.</span><span class="n">serviceUrl</span><span class="cp">}</span>?omitMetadata=true"
</pre></div>
<p>The response will use <code>Content-Type: text/plain</code> and contain the string</p>
-<div class="codehilite"><pre>John Smith was born in London.
+<div class="codehilite"><pre>The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.
</pre></div>
Modified: websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/index.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/index.html (original)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/trunk/enhancer/index.html Mon Feb 20 17:56:07 2012
@@ -64,14 +64,15 @@
<h3 id="restful_service">RESTful service:</h3>
<p>The content to analyze should be sent in a POST request with the mimetype specified in the Content-type header. The response will hold the RDF enhancement serialized in the format specified in the Accept header:</p>
<div class="codehilite"><pre>curl -X POST -H <span class="s2">"Accept: text/turtle"</span> -H <span class="s2">"Content-type: text/plain"</span> <span class="se">\</span>
- --data <span class="s2">"John Smith was born in London."</span> http://localhost:8080/enhancer
+ --data <span class="s2">"The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley."</span> <span class="se">\</span>
+ http://localhost:8080/enhancer
</pre></div>
<p>The RESTful interface also provides parameters that can be used to parse/request additional informations. The following Example shows a request that would answer with the plain/text version of the parsed HTML content</p>
<div class="codehilite"><pre>curl -v -X POST -H <span class="s2">"Accept: text/plain"</span> <span class="se">\</span>
-H <span class="s2">"Content-type: text/html; charset=UTF-8"</span> <span class="se">\</span>
- --data <span class="s2">"<html><body><p>John Smith was born in London.</p></body></html>"</span> <span class="se">\</span>
+ --data <span class="s2">"<html><body><p>The Stanbol enhancer can detect famous cities such as Paris and people such as Bob Marley.</p></body></html>"</span> <span class="se">\</span>
<span class="s2">"http://localhost:8080/enhancer/chain/language?omitMetadata=true"</span>
</pre></div>