public function build($class)
{
if (!isset($this->_properties)) {
throw new Exception("A schema must have properties");
}
return new Schema($class, array('properties' => $this->_properties, 'relationships' => $this->_relationships, 'getters' => $this->_getters, 'setters' => $this->_setters, 'events' => $this->_events));
}