* with FusionForge; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-
+
+// Dumps an HTML preview or a full RDF document for public projects, with full details
+
+// The script will paginate the contents (with the same page size than in the softwaremap/trove)
+// redirecting if necessary to ?page=1
+// This can be overriden with ?allatonce
+
+// This script is the counterpart, with full details, of other lists of projects
+// which contain only an index of projects, like /projects/ (for RDF harvested by machines)
+// or its HTML Turtle preview in /plugins/admssw/projectsturtle.php
+
require_once('../../env.inc.php');
require_once $gfcommon.'include/pre.php';
$plugin = plugin_get_object($pluginname);
-// if not HTML
-if($content_type != $default_content_type) {
-
- // process as in content_negociated_projects_list but with full details
- $graph = $plugin->getProjectListResourcesGraph(util_make_url('/plugins/'.$pluginname.'/full.php'), true);
-
- // We can support only RDF as RDF+XML or Turtle
- if ($content_type == 'text/turtle' || $content_type == 'application/rdf+xml') {
- header('Content-type: '. $content_type);
- if ($content_type == 'text/turtle') {
- print $graph->serialize($serializer="Turtle")."\n";
- }
- if ($content_type == 'application/rdf+xml') {
- print $graph->serialize()."\n";
- }
- }
- else {
- header('HTTP/1.1 406 Not Acceptable',true,406);
- print $graph->dumpText();
- exit(0);
- }
-} else {
+$documenturi = util_make_url('/plugins/'.$pluginname.'/full.php');
+
+// page length
+$pl = $plugin->getPagingLimit();
+
+$projectsnum = $plugin->getProjectListSize();
+
+$p = $plugin->process_paging_params_or_redirect($projectsnum, $pl);
+
+if ($content_type != 'text/html') {
+ header('Content-type: '. $content_type);
+}
+else {
$HTML->header(array('title'=>_('Full ADMS.SW export'),'pagename'=>'admssw_full'));
$HTML->printSoftwareMapLinks();
-
- echo '<p>'. _('This script is meant to produce machine-readable RDF meta-data, in Turtle or RDF/XML formats, which can be obtained with, for instance:').'<br />';
-
- $graph = $plugin->getProjectListResourcesGraph(util_make_url('/plugins/'.$pluginname.'/full.php'), true);
-
- print $graph->dump();
-
- echo _('To access this RDF document, you may use, for instance :<br />');
- echo '<tt>$ curl -H "Accept: text/turtle" '. util_make_url('/plugins/'.$pluginname.'/full.php') .'</tt>';
-
+}
+
+// We want full details of the projects
+$detailed = true;
+print $plugin->getProjectsListDisplay($documenturi, $content_type, $p, $pl, $detailed);
+
+if ($content_type == 'text/html') {
$HTML->footer(array());
}