Author: fchrist
Date: Fri Jan 13 14:01:27 2012
New Revision: 1231071

URL: http://svn.apache.org/viewvc?rev=1231071&view=rev
Log:
STANBOL-456 Incrementally moving FactStore specification from IKS Wiki

Modified:
    
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/factstore/specification.mdtext

Modified: 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/factstore/specification.mdtext
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/factstore/specification.mdtext?rev=1231071&r1=1231070&r2=1231071&view=diff
==============================================================================
--- 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/factstore/specification.mdtext
 (original)
+++ 
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/factstore/specification.mdtext
 Fri Jan 13 14:01:27 2012
@@ -10,7 +10,7 @@ In the following, we will refer to seman
 
 In the following, we will define the required interfaces for the FactStore 
plus the required query language.
 
-''Note'': Interfaces will be defined as RESTful service APIs. The payload of 
service calls is specified using [Specification version 
20110507](http://www.json-ld.org/spec/ED/20110507/ JSON-LD).
+''Note'': Interfaces will be defined as RESTful service APIs. The payload of 
service calls is specified using [Specification version 
20110507](http://www.json-ld.org/spec/ED/20110507/JSON-LD).
 
 ''Note'': The FactStore does not provide any SPARQL endpoint so far. This 
could be part of an extended version.
 
@@ -51,7 +51,7 @@ Instead one can use the cURL tool for th
 Example 2: PUT /factstore/facts/http%3A%2F%2Fwww.schema.org%2FEvent.attendees 
with the following data
 
     {
-    "@context" :
+      "@context" :
       {
         "sorg"       : "http://www.schema.org/";,
         "#types"     :
@@ -93,76 +93,72 @@ Status: **Implemented**
 
 ### Publish New Facts ###
 
-{|
- |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.
+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.
+
+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
 
- {
-  "@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"}
- }
+Example 1: POST /factstore/facts with the following data
 
-<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
+    {
+      "@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"}
+    }
 
- {
-  "@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"; }
+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.
+
+Example 2: POST /factstore/facts with the following data to create several 
facts of the same type at once
+
+    {
+      "@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"; }
+        }
+      ]
     }
-  ]
- }
 
-<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
+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.
 
- {
-  "@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" }
+Example 3: POST /factstore/facts with the following data to create several 
facts of different type
+
+    {
+      "@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" }
+        }
+      ]
     }
-  ]
- }
 
-<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]
- |}
+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.
+
+Status: **Implemented**
 
 === Query Interface ===
 


Reply via email to