Change the rdf:type property for a resource
Note that if the resource object has already previously been created, then the PHP class of the resource will not change.
string $resource The resource to change the type of:
string $type The new type (e.g. foaf:Person):
integer The number of types added
public function setType($resource, $type) {
$this
->checkResourceParam($resource, true);
$this
->delete($resource, 'rdf:type');
return $this
->addType($resource, $type);
}