[evolvis-commits] r17023: Add OSLC Core V2 service description document in JSON.

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:57:17 CET 2011


Author: mirabilos
Date: 2011-03-01 01:57:17 +0100 (Tue, 01 Mar 2011)
New Revision: 17023

Added:
   trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.json.phtml
Modified:
   trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php
   trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
Log:
Add OSLC Core V2 service description document in JSON.

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php	2011-03-01 00:57:13 UTC (rev 17022)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-document_xml.php	2011-03-01 00:57:17 UTC (rev 17023)
@@ -42,7 +42,7 @@
 
 	$child = $doc->createElementNS("http://purl.org/dc/terms/", "dc:title");
 	$title = $root->appendChild($child);
-	$child = $doc->createTextNode("Demo OSLC CM services");
+	$child = $doc->createTextNode("OSLC CM service description document describing a FusionForge tracker services");
 	$child = $title->appendChild($child);
 
 	// changeRequests

Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.json.phtml
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.json.phtml	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.json.phtml	2011-03-01 00:57:17 UTC (rev 17023)
@@ -0,0 +1,77 @@
+<?php 
+// Declare used namespaces.
+$json["prefixes"]["oslc"] = "http://open-services.net/ns/core#";
+$json["prefixes"]["rdf"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+$json["prefixes"]["foaf"] = "http://http://xmlns.com/foaf/0.1/";
+$json["prefixes"]["dcterms"] = "http://purl.org/dc/terms/";
+
+// 
+$json["rdf:type"]["rdf:ressource"] = "http://open-services.net/ns/core#Service";
+$json["rdf:about"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/oslc-cm-services/'.$this->project.'/tracker/'.$this->tracker);
+
+$json["dcterms:title"] = "OSLC CM service description document";
+$json["dcterms:description"] = "FusionForge Tracker service";
+
+$json["dcterms:publisher"]["dcterms:title"] = "OSLC CM plugin for FusionForge";
+$json["dcterms:publisher"]["dcterms:identifier"] = $this->serverUrl().$this->baseUrl();
+//$json["oslc:icon"]["rdf:ressource"] = "Url of FusionForge icon if any"
+
+// prefix definitions 
+$prefix_def["oslc:prefix"] = "dc";
+$prefix_def["oslc:prefixBase"] = "http://purl.org/dc/elements/1.1/";
+$json["oslc:prefixDefinition"][] = $prefix_def;
+
+$prefix_def["oslc:prefix"] = "foaf";
+$prefix_def["oslc:prefixBase"] = "http://http://xmlns.com/foaf/0.1/";
+$json["oslc:prefixDefinition"][] = $prefix_def;
+
+$prefix_def["oslc:prefix"] = "rdf";
+$prefix_def["oslc:prefixBase"] = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+$json["oslc:prefixDefinition"][] = $prefix_def;
+
+$prefix_def["oslc:prefix"] = "oslc";
+$prefix_def["oslc:prefixBase"] = "http://open-services.net/ns/core#";
+$json["oslc:prefixDefinition"][] = $prefix_def;
+
+// Services description
+
+// Domain.
+$json["service"]["domain"]["rdf:ressource"] = "http://open-services.net/ns/core#";
+
+// Creation Factory.
+$json["service"]["creationFactory"]["dcterms:title"] = "Location for creation of change Requests with a POST HTTP request";
+$json["service"]["creationFactory"]["oslc:label"] = "New Tracker items Creation";
+$json["service"]["creationFactory"]["oslc:creation"]["rdf:ressource"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/project/'.$this->project.'/tracker/'.$this->tracker);
+//$json["service"]["creationFactory"]["oslc:resourceShape"] = A ressource shape (not yet implemented);
+
+// There may be other creation Factories in the same tracker. For example 
+// a creation factory to create comment to a tracker item, to attach a file
+// to a tracker item. But, these additional creation factories would better
+// have different endpoints.  
+
+// Query capabilities.
+$json["service"]["queryCapability"]["dcterms:title"] = "GET-Based Tracker items query";
+$json["service"]["queryCapability"]["oslc:label"] = "Tracker items query";
+$json["service"]["queryCapability"]["oslc:queryBase"]["rdf:ressource"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/project/'.$this->project.'/tracker/'.$this->tracker);
+
+
+// Delegated Selection UI.
+$selection_dialog["dcterms:title"] = "Change Requests Selection Dialog";
+$selection_dialog["oslc:label"] = "Tracker items selection UI";
+$selection_dialog["oslc:dialog"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/project/'.$this->project.'/tracker/'.$this->tracker.'/ui/selection');
+$selection_dialog["oslc:hintWidth"] = "800px";
+$selection_dialog["oslc:hintHeight"] = "600px";
+// What about oslc:usage and default UI ??!!!
+$json["service"]["selctionDialog"]["Dialog"] = $selection_dialog;
+
+// Delegated Creation UI.
+$creation_dialog["dcterms:title"] = "Change Requests Creation Dialog";
+$creation_dialog["oslc:label"] = "New Tracker items Celection UI";
+$creation_dialog["oslc:dialog"] = $this->serverUrl().util_make_uri($this->baseUrl().'/cm/project/'.$this->project.'/tracker/'.$this->tracker.'/ui/creation');
+$creation_dialog["oslc:hintWidth"] = "800px";
+$creation_dialog["oslc:hintHeight"] = "600px";
+// What about oslc:usage and default UI ??!!!
+$json["service"]["creationDialog"]["Dialog"] = $creation_dialog;
+
+print str_replace("\/", "/", Zend_Json::prettyPrint(Zend_Json::encode($json)));
+?>
\ No newline at end of file

Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2011-03-01 00:57:13 UTC (rev 17022)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/oslc-cm-service-document.xml.phtml	2011-03-01 00:57:17 UTC (rev 17023)
@@ -25,6 +25,6 @@
 
   /* $Id$ */
 
-require('_service-document_xml.php');
+require_once'_service-document_xml.php';
 
 print project_to_service_description($this->serverUrl().$this->baseUrl(), $this->project, $this->tracker);
\ No newline at end of file



More information about the evolvis-commits mailing list