My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require_once "paget_widget.class.php";

class PAGET_DataWidget extends PAGET_Widget {
var $image_properties = array( 'http://xmlns.com/foaf/0.1/depiction', 'http://xmlns.com/foaf/0.1/img');
var $property_order = array('http://www.w3.org/2004/02/skos/core#prefLabel', RDFS_LABEL, 'http://purl.org/dc/terms/title', DC_TITLE, FOAF_NAME, 'http://www.w3.org/2004/02/skos/core#definition', RDFS_COMMENT, 'http://purl.org/dc/terms/description', DC_DESCRIPTION, 'http://purl.org/vocab/bio/0.1/olb', RDF_TYPE);
var $ignore_properties = array();

function ignore_properties($properties) {
$this->ignore_properties = array_merge($this->ignore_properties, $properties);
}

function render($resource_uri) {
$index = $this->desc->get_index();
//$inverse_index = $this->desc->get_inverse_index();

if (array_key_exists($resource_uri, $index)) {
$used_properties = array_keys($index[$resource_uri]);
$properties = array_diff(array_diff(array_merge($this->property_order, array_diff($used_properties, $this->property_order)), $this->ignore_properties), $this->image_properties);

$this->emit_image_properties($resource_uri, $this->image_properties);
$this->emit_property_value_list($resource_uri, $properties);
}

// $this->emit_group(array(RDFS_LABEL, DC_TITLE, FOAF_NAME, RDFS_COMMENT, DC_DESCRIPTION, 'http://purl.org/vocab/bio/0.1/olb', RDF_TYPE), $resource_uri, $desc);
// $this->emit_group('links', $resource_uri, $desc);
// $this->emit_group('naming', $resource_uri, $desc);

}



}

Change log

r63 by m...@iandavis.com on Apr 20, 2009   Diff
Updated for new dc namespace
Go to: 
Project members, sign in to write a code review

Older revisions

r53 by m...@iandavis.com on Mar 25, 2009   Diff
[No log message]
r26 by m...@iandavis.com on Jan 25, 2009   Diff
Refactored request/response mechanism
Added simpler templating of HTML
responses
Started forms support for editing
descriptions
r23 by m...@iandavis.com on Dec 16, 2008   Diff
Added support for outputting images
All revisions of this file

File info

Size: 1566 bytes, 33 lines
Powered by Google Project Hosting