Generate RDF of array as a collection serialised in XML.
Called as a static class. Can be used for template generation in Mozilla platform. Example of use:
include 'HV_ArrayToRDFCollection.php'; $data = array(); $level1[1]['year'] = array('field_id' => 1, 'field_name' => '1st Year'); $level1[2]['year'] = array('field_id' => 2, 'field_name' => '2nd Year'); $level2 = array(); $level2[11]['quarter'] = array('field_id' => 11, 'field_name' => 'Y1 First Quarter'); $level2[12]['quarter'] = array('field_id' => 12, 'field_name' => 'Y1 Second Quarter'); $level2[13]['quarter'] = array('field_id' => 13, 'field_name' => 'Y1 Third Quarter'); $level2[14]['quarter'] = array('field_id' => 14, 'field_name' => 'Y1 Fourth Quarter'); $level3 = array(); $level3[21]['quarter'] = array('field_id' => 21, 'field_name' => 'Y2 First Quarter'); $level3[22]['quarter'] = array('field_id' => 22, 'field_name' => 'Y2 Second Quarter'); $level3[23]['quarter'] = array('field_id' => 23, 'field_name' => 'Y2 Third Quarter'); $level3[24]['quarter'] = array('field_id' => 24, 'field_name' => 'Y2 Fourth Quarter'); $level1[1]['year']['_seq'] = $level2; $level1[2]['year']['_seq'] = $level3; $data2 = array(); $data2[101]['amount'] = array('field_name' => 'Initial', 'field_amount' => '200'); $data2[102]['amount'] = array('field_name' => 'Final', 'field_amount' => '210'); $data3 = array(); $data3[201]['amount'] = array('field_name' => 'Initial', 'field_amount' => '300'); $data3[202]['amount'] = array('field_name' => 'Final', 'field_amount' => '410'); $level2[11]['quarter']['_seq'] = $data2; $level3[22]['quarter']['_seq'] = $data3; $level1[1]['year']['_seq'] = $level2; $level1[2]['year']['_seq'] = $level3; $data['_seq'] = $level1; HV_ArrayToRDFCollection::output($data);
Located in /HV_ArrayToRDFCollection.php (line 73)
Attribute name for indicating RDF parseType.
Should be in RDF namespace but Mozilla implementation of RDF is outdated.
Key used to indicate a collection in the input array.
Array of metadata associated with incoming data array.
Extra RDF to append to RDF model.
Tag to use in RDF as collection element.
URI to use for data in RDF output.
URI of RDF model.
URI for extra RDF content attached to data with parseType of 'Resource'.
Generates the wrapper around the RDF collection and inserts the generated RDF collection.
Generates and outputs the RDF including the HTTP content type header.
Documentation generated on Wed, 16 Nov 2005 14:10:35 +1300 by phpDocumentor 1.3.0RC3