3 * admssw plugin script which displays an HTML preview of a project metadata as Turtle
5 * This file is (c) Copyright 2012 by Olivier BERGER, Institut Mines-Telecom
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 require_once '../../env.inc.php';
24 require_once $gfcommon.'include/pre.php';
28 * $gwords = target words to search
29 * $gexact = 1 for search ing all words (AND), 0 - for any word (OR)
30 * $otherfreeknowledge = 1 for search in Free/Libre Knowledge Gforge Initiatives
31 * $order = "project_title" or "title" - criteria for ordering results: if empty or not allowed results are ordered by rank
35 $pluginname = 'admssw';
37 $group_id = getIntFromRequest ('group_id') ;
39 session_require_perm ('project_read', $group_id) ;
41 $group = group_get_object($group_id);
42 $projectname = $group->getUnixName();
44 site_project_header(array('title'=>_('ADMS.SW project meta-data preview'), 'h1' => '', 'group'=>$group_id, 'toptab' => 'home', 'pagename'=>'projectturtle'));
46 $plugin = plugin_get_object($pluginname);
48 echo '<p>'. sprintf( _('The following is a preview of the (machine-readable) RDF meta-data which can be obtained at <tt>%1$s</tt> as Turtle'), util_make_url_g($projectname, $group_id)) .'</p>';
50 echo $plugin->htmlPreviewProjectAsTurtle($group_id);
52 echo _('To access this RDF document, you may use, for instance :<br />');
53 echo '<tt>$ curl -H "Accept: text/turtle" '. util_make_url_g($projectname, $group_id) .'</tt><br />';
55 $HTML->footer(array());
59 // c-file-style: "bsd"