Author: buildbot
Date: Fri Jan 13 14:01:32 2012
New Revision: 802545

Log:
Staging update by buildbot for stanbol

Modified:
    
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/factstore/specification.html

Modified: 
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/factstore/specification.html
==============================================================================
--- 
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/factstore/specification.html
 (original)
+++ 
websites/staging/stanbol/trunk/content/stanbol/docs/trunk/factstore/specification.html
 Fri Jan 13 14:01:32 2012
@@ -59,7 +59,7 @@
 <li>Query language to query for combinations of facts (reasoning)</li>
 </ul>
 <p>In the following, we will define the required interfaces for the FactStore 
plus the required query language.</p>
-<p>''Note'': Interfaces will be defined as RESTful service APIs. The payload 
of service calls is specified using <a 
href="http://www.json-ld.org/spec/ED/20110507/ JSON-LD">Specification version 
20110507</a>.</p>
+<p>''Note'': Interfaces will be defined as RESTful service APIs. The payload 
of service calls is specified using <a 
href="http://www.json-ld.org/spec/ED/20110507/JSON-LD";>Specification version 
20110507</a>.</p>
 <p>''Note'': The FactStore does not provide any SPARQL endpoint so far. This 
could be part of an extended version.</p>
 <h2 id="store_interface">Store Interface</h2>
 <p>The store interface allows clients to put new fact schemata and according 
facts (instances of that schemata) to the FactStore.</p>
@@ -91,7 +91,7 @@
 
 <p>Example 2: PUT 
/factstore/facts/http%3A%2F%2Fwww.schema.org%2FEvent.attendees with the 
following data</p>
 <div class="codehilite"><pre><span class="p">{</span>
-<span class="s">&quot;@context&quot;</span> <span class="p">:</span>
+  <span class="s">&quot;@context&quot;</span> <span class="p">:</span>
   <span class="p">{</span>
     <span class="s">&quot;sorg&quot;</span>       <span class="p">:</span> 
<span class="s">&quot;http://www.schema.org/&quot;</span><span 
class="p">,</span>
     <span class="s">&quot;#types&quot;</span>     <span class="p">:</span>
@@ -127,70 +127,67 @@
 
 <p>Status: <strong>Implemented</strong></p>
 <h3 id="publish_new_facts">Publish New Facts</h3>
-<p>{|
- |valign="top"|Description:||Allows clients to publish a new facts according 
to a defined fact schema that was previously published to the FactStore. Each 
new fact is an n-tuple according to its schema where each tuple element 
identifies an entity using its unique IRI.
- |-
- |Path:||/factstore/facts
- |-
- |Method:||POST with data type application/json returns HTTP 201 (created) on 
success.
- |-
- |valign="top"|Data:||The facts are sent as the POST payload in JSON-LD format 
referring to the defined JSON-LD profile. The name of the fact is given in the 
"@profile" element of the JSON-LD object. The JSON-LD object contains a list of 
facts under the attribute "facts" where each element of that list is an n-tuple 
of entity instances according to fhe fact schema. The instance of an entity can 
be specified either by its unique IRI or by specifying the instance by example.
-Using the instance by example variant requires the FactStore to resolve the 
entity in an EntityHub. An entity by example is specified by defining 
attributes and required values of the searched entity. A fact can only be 
stored if all entities can be uniquely identified either by their IRI or by 
example.
- |-
- |valign="top"|Example 1:||POST /factstore/facts<br>
-with the following data</p>
-<p>{
-  "@context" : {
-    "iks" : "http://iks-project.eu/ont/";,
-    "upb" : "http://upb.de/persons/";
-  },
-  "@profile"     : "iks:employeeOf",
-  "person"       : { "@iri" : "upb:bnagel" },
-  "organization" : { "@iri" : "http://uni-paderborn.de"}
- }</p>
-<p><nowiki>creates a new fact of type http://iks-project.eu/ont/employeeof 
specifying that the person http://upb.de/persons/bnagel is employee of the 
organization defined by the IRI http://uni-paderborn.de.</nowiki>
- |-
- |valign="top"|Example 2:||POST /factstore/facts<br>
-with the following data to create several facts of the same type at once</p>
-<p>{
-  "@context" : {
-    "iks" : "http://iks-project.eu/ont/";,
-    "upb" : "http://upb.de/persons/";
-  },
-  "@profile"     : "iks:employeeOf",
-  "@" : [
-    { "person"       : { "@iri" : "upb:bnagel" },
-      "organization" : { "@iri" : "http://uni-paderborn.de"; }
-    },
-    { "person"       : { "@iri" : "upb:fchrist" },
-      "organization" : { "@iri" : "http://uni-paderborn.de"; }
-    }
-  ]
- }</p>
-<p><nowiki>creates two new facts of type http://iks-project.eu/ont/employeeof 
specifying that the persons http://upb.de/persons/bnagel and 
http://upb.de/persons/fchrist are employees of the organization defined by the 
IRI http://uni-paderborn.de.</nowiki>
- |-
- |valign="top"|Example 3:||POST /factstore/facts<br>
-with the following data to create several facts of different type</p>
-<p>{
-  "@context" : {
-    "iks" : "http://iks-project.eu/ont/";,
-    "upb" : "http://upb.de/persons/";
-  },
-  "@" : [
-    { "@profile"     : "iks:employeeOf",
-      "person"       : { "@iri" : "upb:bnagel" },
-      "organization" : { "@iri" : "http://uni-paderborn.de"; }
-    },
-    { "@profile"     : "iks:friendOf",
-      "person"       : { "@iri" : "upb:bnagel" },
-      "friend"       : { "@iri" : "upb:fchrist" }
-    }
-  ]
- }</p>
-<p><nowiki>creates two new facts. The first one of type 
http://iks-project.eu/ont/employeeof specifying that the person 
http://upb.de/persons/bnagel is employee of the organization defined by the IRI 
http://uni-paderborn.de. The second of type http://iks-project.eu/ont/friendOf 
specifying that http://upb.de/persons/fchrist is a friend of 
http://upb.de/persons/bnagel.</nowiki>
- |-
- |Status || Implemented in [http://incubator.apache.org/stanbol/ Apache 
Stanbol]
- |}</p>
+<p>Allows clients to publish a new facts according to a defined fact schema 
that was previously published to the FactStore. Each new fact is an n-tuple 
according to its schema where each tuple element identifies an entity using its 
unique IRI.</p>
+<p>Path: /factstore/facts</p>
+<p>Method: POST with data type application/json returns HTTP 201 (created) on 
success.</p>
+<p>Data: The facts are sent as the POST payload in JSON-LD format referring to 
the defined JSON-LD profile. The name of the fact is given in the "@profile" 
element of the JSON-LD object. The JSON-LD object contains a list of facts 
under the attribute "facts" where each element of that list is an n-tuple of 
entity instances according to fhe fact schema. The instance of an entity can be 
specified either by its unique IRI or by specifying the instance by example.</p>
+<p>Using the instance by example variant requires the FactStore to resolve the 
entity in an EntityHub. An entity by example is specified by defining 
attributes and required values of the searched entity. A fact can only be 
stored if all entities can be uniquely identified either by their IRI or by 
example.</p>
+<p>Example 1: POST /factstore/facts with the following data</p>
+<div class="codehilite"><pre><span class="p">{</span>
+  <span class="s">&quot;@context&quot;</span> <span class="p">:</span> <span 
class="p">{</span>
+    <span class="s">&quot;iks&quot;</span> <span class="p">:</span> <span 
class="s">&quot;http://iks-project.eu/ont/&quot;</span><span class="p">,</span>
+    <span class="s">&quot;upb&quot;</span> <span class="p">:</span> <span 
class="s">&quot;http://upb.de/persons/&quot;</span>
+  <span class="p">},</span>
+  <span class="s">&quot;@profile&quot;</span>     <span class="p">:</span> 
<span class="s">&quot;iks:employeeOf&quot;</span><span class="p">,</span>
+  <span class="s">&quot;person&quot;</span>       <span class="p">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="p">:</span> <span class="s">&quot;upb:bnagel&quot;</span> <span 
class="p">},</span>
+  <span class="s">&quot;organization&quot;</span> <span class="p">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="p">:</span> <span 
class="s">&quot;http://uni-paderborn.de&quot;</span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>creates a new fact of type http://iks-project.eu/ont/employeeof specifying 
that the person http://upb.de/persons/bnagel is employee of the organization 
defined by the IRI http://uni-paderborn.de.</p>
+<p>Example 2: POST /factstore/facts with the following data to create several 
facts of the same type at once</p>
+<div class="codehilite"><pre><span class="p">{</span>
+  <span class="s">&quot;@context&quot;</span> <span class="o">:</span> <span 
class="p">{</span>
+    <span class="s">&quot;iks&quot;</span> <span class="o">:</span> <span 
class="s">&quot;http://iks-project.eu/ont/&quot;</span><span class="p">,</span>
+    <span class="s">&quot;upb&quot;</span> <span class="o">:</span> <span 
class="s">&quot;http://upb.de/persons/&quot;</span>
+  <span class="p">},</span>
+  <span class="s">&quot;@profile&quot;</span>     <span class="o">:</span> 
<span class="s">&quot;iks:employeeOf&quot;</span><span class="p">,</span>
+  <span class="s">&quot;@&quot;</span> <span class="o">:</span> <span 
class="p">[</span>
+    <span class="p">{</span> <span class="s">&quot;person&quot;</span>       
<span class="o">:</span> <span class="p">{</span> <span 
class="s">&quot;@iri&quot;</span> <span class="o">:</span> <span 
class="s">&quot;upb:bnagel&quot;</span> <span class="p">},</span>
+      <span class="s">&quot;organization&quot;</span> <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;http://uni-paderborn.de&quot;</span> 
<span class="p">}</span>
+    <span class="p">},</span>
+    <span class="p">{</span> <span class="s">&quot;person&quot;</span>       
<span class="o">:</span> <span class="p">{</span> <span 
class="s">&quot;@iri&quot;</span> <span class="o">:</span> <span 
class="s">&quot;upb:fchrist&quot;</span> <span class="p">},</span>
+      <span class="s">&quot;organization&quot;</span> <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;http://uni-paderborn.de&quot;</span> 
<span class="p">}</span>
+    <span class="p">}</span>
+  <span class="p">]</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>creates two new facts of type http://iks-project.eu/ont/employeeof 
specifying that the persons http://upb.de/persons/bnagel and 
http://upb.de/persons/fchrist are employees of the organization defined by the 
IRI http://uni-paderborn.de.</p>
+<p>Example 3: POST /factstore/facts with the following data to create several 
facts of different type</p>
+<div class="codehilite"><pre><span class="p">{</span>
+  <span class="s">&quot;@context&quot;</span> <span class="o">:</span> <span 
class="p">{</span>
+    <span class="s">&quot;iks&quot;</span> <span class="o">:</span> <span 
class="s">&quot;http://iks-project.eu/ont/&quot;</span><span class="p">,</span>
+    <span class="s">&quot;upb&quot;</span> <span class="o">:</span> <span 
class="s">&quot;http://upb.de/persons/&quot;</span>
+  <span class="p">},</span>
+  <span class="s">&quot;@&quot;</span> <span class="o">:</span> <span 
class="p">[</span>
+    <span class="p">{</span> <span class="s">&quot;@profile&quot;</span>     
<span class="o">:</span> <span class="s">&quot;iks:employeeOf&quot;</span><span 
class="p">,</span>
+      <span class="s">&quot;person&quot;</span>       <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;upb:bnagel&quot;</span> <span 
class="p">},</span>
+      <span class="s">&quot;organization&quot;</span> <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;http://uni-paderborn.de&quot;</span> 
<span class="p">}</span>
+    <span class="p">},</span>
+    <span class="p">{</span> <span class="s">&quot;@profile&quot;</span>     
<span class="o">:</span> <span class="s">&quot;iks:friendOf&quot;</span><span 
class="p">,</span>
+      <span class="s">&quot;person&quot;</span>       <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;upb:bnagel&quot;</span> <span 
class="p">},</span>
+      <span class="s">&quot;friend&quot;</span>       <span class="o">:</span> 
<span class="p">{</span> <span class="s">&quot;@iri&quot;</span> <span 
class="o">:</span> <span class="s">&quot;upb:fchrist&quot;</span> <span 
class="p">}</span>
+    <span class="p">}</span>
+  <span class="p">]</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>creates two new facts. The first one of type 
http://iks-project.eu/ont/employeeof specifying that the person 
http://upb.de/persons/bnagel is employee of the organization defined by the IRI 
http://uni-paderborn.de. The second of type http://iks-project.eu/ont/friendOf 
specifying that http://upb.de/persons/fchrist is a friend of 
http://upb.de/persons/bnagel.</p>
+<p>Status: <strong>Implemented</strong></p>
 <p>=== Query Interface ===</p>
 <p>The query interface allows clients to query for facts and combination of 
facts (reasoning). The JSON-LD query structure is inspired by SQL using SELECT 
FROM [JOIN] WHERE constructs. Depending on the implementation the JSON-LD 
queries may be transformed directly into valid SQL queries.</p>
 <p>==== Query for Facts of a Certain Type ====</p>


Reply via email to