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
<?php
class PAGET_FileGenerator {
var $_filename;
var $_type;

function __construct($filename, $type) {
$this->_filename = $filename;
$this->_type = $type;
}

function add_triples($resource_uri, &$desc) {
$data = file_get_contents($this->_filename);
if ( $this->_type === 'rdfxml' ) {
$desc->add_rdfxml($data);
}
else if ( $this->_type === 'turtle' ) {
$desc->add_turtle($data);
}
else if ( $this->_type === 'json' ) {
$desc->add_json($data);
}
}

}

Change log

r13 by m...@iandavis.com on Oct 27, 2008   Diff
Completely revised design
Go to: 
Project members, sign in to write a code review

Older revisions

r12 by m...@iandavis.com on Oct 5, 2008   Diff
Improved html output
Added SimplePropertyLabeller augmentor
Started work on StoreAugmentor - needs
moriarty changes to complete
r11 by m...@iandavis.com on Oct 2, 2008   Diff
FileGenerator can now read turtle and
json files as well as rdf/xml
r10 by m...@iandavis.com on Sep 29, 2008   Diff
Added capability to use a local file
as an RDF source
Added prefixes option
All revisions of this file

File info

Size: 520 bytes, 24 lines
Powered by Google Project Hosting