User Tools

Site Tools


api4kb_persistent_storage

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api4kb_persistent_storage [2013/03/17 15:47]
rmbell
api4kb_persistent_storage [2013/03/17 16:12] (current)
rmbell
Line 35: Line 35:
  
 CreateKB( CreateKB(
-    in URI/URL knowledgeBase,​ +    in URI/URL knowledgeBase, ​                   : the desired URI to associate to the (new) KB 
-    out URL/URI effectiveKnowledgeBaseURI ); +    ​out URL/​URI ​effectiveKnowledgeBaseURI ​       : ​the URI assigned to the (new) KB 
- +    );
-Params ​: +
-    knowledgeBase (in)                - the desired URI to associate to the (new) KB +
-    effectiveKnowledgeBaseURI ​(out)   ​- ​the URI assigned to the (new) KB+
  
 Post-condition : Ensures that a knowledgeBase exists for the given URI (at the given URL??) Post-condition : Ensures that a knowledgeBase exists for the given URI (at the given URL??)
 +
 REST mapping : POST REST mapping : POST
  
 Creates a new knowledge base and associates it to the given URI. If the knowledge base already exists, its URI is returned. Creates a new knowledge base and associates it to the given URI. If the knowledge base already exists, its URI is returned.
 +
 TODO: discuss the use of URIs vs URLs TODO: discuss the use of URIs vs URLs
  
Line 53: Line 52:
  
 EnsureResourceIsInKB( EnsureResourceIsInKB(
-    in URL knowledgeBase,​ +    in URL knowledgeBase, ​                       : the target KB 
-    in URI resourceId,​ +    in URI resourceId, ​                          : the URI of the new resource 
-    in URL resourceLocation,​ +    in URL resourceLocation, ​                    : pointer to the actual resource 
-    in Descr resourceDescriptor+    in Descr resourceDescriptor ​                 : metadata describing the resource
     out TODO );     out TODO );
-Params : 
-    knowledgeBase (in)                        : the target KB 
-    resourceID (in)                           : the URI of the new resource 
-    resourceLocation (in)                     : pointer to the actual resource 
-    resourceDescriptor (in)                   : metadata describing the resource 
  
 Post-condition : Ensures that the target resource (at resourceLocation) is present in a KB and therein identified by resourceId Post-condition : Ensures that the target resource (at resourceLocation) is present in a KB and therein identified by resourceId
Line 73: Line 67:
 ---- ----
  
-UpdateResourceInKB( in URL knowledgeBase,​+UpdateResourceInKB( 
 +    ​in URL knowledgeBase,​
     in URI resourceId,     in URI resourceId,
     in URL resourceLocation,​     in URL resourceLocation,​
Line 81: Line 76:
 REST mapping : POST REST mapping : POST
  
-TODOThis method should be defined. What is the exact semantics of updating a resource in a KB, as opposed to setting it? It could be interpreted in terms of versioning? Or the "​old"​ and "​new"​ resources should be "​merged"​ (whatever that means)?+TODOThis method should be defined. What is the exact semantics of updating a resource in a KB, as opposed to setting it? It could be interpreted in terms of versioning? Or the "​old"​ and "​new"​ resources should be "​merged"​ (whatever that means)?
  
  
Line 89: Line 84:
  
 GetResourceFromKB( GetResourceFromKB(
-    in URL knowledgeBase,​ +    in URL knowledgeBase, ​                       : the target KB 
-    in URI resourceId,+    in URI resourceId, ​                          : the URI of the resource to be accessed
     out TODO );     out TODO );
  
-Params ​: +Post-condition ​The KB is not altered
-    knowledgeBase (in)                        : the target ​KB +
-    resourceID (in)                           : the URI of the resource to be accessed+
  
-Post-condition : The KB is not altered 
 REST mapping : GET REST mapping : GET
  
Line 108: Line 100:
  
 ExportResourceFromKB( ExportResourceFromKB(
-    in URL knowledgeBase,​ +    in URL knowledgeBase, ​                       : the target KB 
-    in URI resourceId,​ +    in URI resourceId, ​                          : the URI of the resource to be accessed 
-    in URL exportLocation,​ +    in URL exportLocation, ​                      : the location where the resource should be exported 
-    in Descr resourceDescriptor,​+    in Descr resourceDescriptor, ​                : metadata to guide the export process
     out TODO );     out TODO );
  
-Params : +Pre-condition ​: the KB contains the resource mapped by resourceID. The client must have the appropriate rights ​to write at exportLocation.
-    knowledgeBase (in)                        ​: the target ​KB +
-    ​resourceID ​(in)                           : ​the URI of the resource ​to be accessed +
-    ​exportLocation ​(in)                       : the location where the resource should be exported +
-    resourceDescriptor (in)                   : metadata to guide the export process+
  
-Pre-condition : the KB contains the resource mapped by resourceID. The client must have the appropriate 
-rights to write at exportLocation. 
 Integrity : the format specified by resourceDescriptor is compatible with the nature of the resource Integrity : the format specified by resourceDescriptor is compatible with the nature of the resource
 +
 Post-condition : the exportLocation will contain a serialized copy of the resource mapped by resourceId, as defined by resourceDescriptor. The KB is not altered. Post-condition : the exportLocation will contain a serialized copy of the resource mapped by resourceId, as defined by resourceDescriptor. The KB is not altered.
 +
 REST mapping : POST REST mapping : POST
  
Line 133: Line 121:
  
 DeleteResourceFromKB( DeleteResourceFromKB(
-    in URL knowledgeBase,​ +    in URL knowledgeBase, ​                       : the target KB 
-    in URI resourceId,+    in URI resourceId, ​                          : the URI of the resource to be deleted
     out TODO );     out TODO );
  
-Params : 
-    knowledgeBase (in)                        : the target KB 
-    resourceID (in)                           : the URI of the resource to be deleted 
  
 Pre-condition : the KB contains a resource mapping for resourceID ??? Pre-condition : the KB contains a resource mapping for resourceID ???
 +
 Post-condition : the KB no longer contains a resource mapping for resourceID Post-condition : the KB no longer contains a resource mapping for resourceID
 +
 REST mapping : DELETE REST mapping : DELETE
  
api4kb_persistent_storage.1363549641.txt.gz · Last modified: 2013/03/17 15:47 by rmbell