Work out the class to instantiate a resource as @ignore
protected function classForResource($uri) {
$resClass = 'EasyRdf_Resource';
$rdfType = EasyRdf_Namespace::expand('rdf:type');
if (isset($this->index[$uri][$rdfType])) {
foreach ($this->index[$uri][$rdfType] as $type) {
if ($type['type'] == 'uri' or $type['type'] == 'bnode') {
$class = EasyRdf_TypeMapper::get($type['value']);
if ($class != null) {
$resClass = $class;
break;
}
}
}
}
return $resClass;
}