[Fusionforge-commits] r15868 - branches/Branch_5_2/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm

Olivier Berger olberger at fusionforge.org
Thu Jun 28 16:41:06 CEST 2012


Author: olberger
Date: 2012-06-28 16:41:05 +0200 (Thu, 28 Jun 2012)
New Revision: 15868

Modified:
   branches/Branch_5_2/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-catalog_xml.php
Log:
Fix ServiceCatalog and ServiceProvider resources

Modified: branches/Branch_5_2/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-catalog_xml.php
===================================================================
--- branches/Branch_5_2/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-catalog_xml.php	2012-06-28 14:27:13 UTC (rev 15867)
+++ branches/Branch_5_2/src/plugins/oslc/include/oslc-zend/application/views/scripts/fusionforgecm/_service-catalog_xml.php	2012-06-28 14:41:05 UTC (rev 15868)
@@ -69,7 +69,6 @@
 	$spdetails = $doc->createElement("oslc:details");
 	$spdetails->setAttribute("rdf:resource", htmlentities($project_trackers_url));
 	$provider->appendChild($spdetails);
-	$root->appendChild($provider);
 
 	// We list trackers as Services or ServiceProvider (s) ???????????
 	foreach ($trackers as $tracker) {
@@ -105,12 +104,15 @@
 		$root->appendChild($provider);
 
 	}
-	// A service provider should mention at least one (empty?) service.
-	if(count($trackers) == 0){
-		$service = $doc->createElement("oslc:service");
-		$provider->appendChild($service);
-		$root->appendChild($provider);
-	}
+
+	$root->appendChild($provider);
+
+	/* // A service provider should mention at least one (empty?) service. */
+	/* if(count($trackers) == 0){ */
+	/* 	$service = $doc->createElement("oslc:service"); */
+	/* 	$provider->appendChild($service); */
+	/* 	$root->appendChild($provider); */
+	/* } */
 	return $doc->saveXML();
 }
 
@@ -159,6 +161,9 @@
 	$root->appendChild($catalog);
 
 	foreach ($projects as $proj) {
+
+	        $spnode = $doc->createElement("oslc:serviceProvider");
+
 		$sp = $doc->createElement("oslc:ServiceProvider");
 		$sp->setAttribute("rdf:about", $base_url.'/cm/oslc-cm-services/'.$proj['id']);
 
@@ -192,7 +197,10 @@
 		$service->appendChild($servicedomain);
 		$sp->appendChild($service);
 
-		$catalog->appendChild($sp);
+		$spnode->appendChild($sp);
+
+		$catalog->appendChild($spnode);
+
 		$root->appendChild($catalog);
 	}
 	return $doc->saveXML();




More information about the Fusionforge-commits mailing list