ARC2_IndexUtils plugin
ARC2_IndexUtils is a plugin for Arc providing a few simple functions for processing rdf/json - shaped data:
ARC2_IndexUtils::filter()takes 2 parameters: a data array, and an associative array of filters. you might use it like this:ARC2_IndexUtils::filter($data, array('property'=> create_function('$u,$p,$os','return $p=="http://xmlns.com/foaf/0.1/name";'), ))Which would return a data array with only those statements having http://xmlns.com/foaf/0.1/name in the property position.
-
ARC2_IndexUtils::mergetakes a variable length list of parameters, where each parameter is an rdf/json style data array, and merges them into one data array. ARC2_IndexUtils::difftakes a variable length list of parameters, returning a data array consisting only of statements from the first array that didn’t exist in any of the subsequent arraysARC2_IndexUtils::intersect
takes a variable length list of parameters, returning a data array consisting only of statements from the first array that also exist in all of the subsequent arraysARC2_IndexUtils::reifyreifies an rdf/php data array (you might use this for creating a changeset, or for making provenance statements about your triples)ARC2_IndexUtils::dereifydereifies an rdf/php data array (reified statements can be hard to read, you might want to dereify them to see what they say more easily)

