/**
  * 
  * @author Patrick Plichart, <*****@*****.**>
  * @param array $propertiesValues
  * @return core_kernel_classes_Resource
  */
 public function createFromArray(array $propertiesValues)
 {
     if (!isset($propertiesValues[RDFS_LABEL])) {
         $propertiesValues[RDFS_LABEL] = "";
     }
     $type = isset($propertiesValues[RDF_TYPE]) ? $propertiesValues[RDF_TYPE] : $this->getRootClass();
     $label = $propertiesValues[RDFS_LABEL];
     // hmmm
     unset($propertiesValues[RDFS_LABEL]);
     unset($propertiesValues[RDF_TYPE]);
     $resource = parent::create($label, $type, $propertiesValues);
     return $resource;
 }
 /**
  * @param array parameters an array of property uri and values
  */
 public function createFromArray(array $propertiesValues)
 {
     if (!isset($propertiesValues[RDFS_LABEL])) {
         $propertiesValues[RDFS_LABEL] = "";
     }
     $type = isset($propertiesValues[RDF_TYPE]) ? $propertiesValues[RDF_TYPE] : $this->getRootClass();
     $label = $propertiesValues[RDFS_LABEL];
     unset($propertiesValues[RDFS_LABEL]);
     unset($propertiesValues[RDF_TYPE]);
     $itemContent = null;
     if (isset($propertiesValues[taoItems_models_classes_ItemsService::PROPERTY_ITEM_CONTENT])) {
         $itemContent = $propertiesValues[taoItems_models_classes_ItemsService::PROPERTY_ITEM_CONTENT];
         unset($propertiesValues[taoItems_models_classes_ItemsService::PROPERTY_ITEM_CONTENT]);
     }
     $resource = parent::create($label, $type, $propertiesValues);
     if (isset($itemContent)) {
         $this->itemsServices->setItemContent($resource, $itemContent);
     }
     return $resource;
 }
 public function __construct()
 {
     parent::__construct();
     $this->resultClass = new \core_kernel_classes_Class(TAO_DELIVERY_RESULT);
     $this->resultService = ResultsService::singleton();
 }
 /**
  * (non-PHPdoc)
  * @see tao_models_classes_CrudService::update()
  */
 public function update($uri = null, $propertiesValues = array())
 {
     if (is_null($uri)) {
         throw new \common_exception_MissingParameter("uri");
     }
     if (isset($propertiesValues[PROPERTY_USER_LOGIN])) {
         throw new \common_exception_PreConditionFailure("login update not allowed");
     }
     if (isset($propertiesValues[PROPERTY_USER_PASSWORD])) {
         $propertiesValues[PROPERTY_USER_PASSWORD] = \core_kernel_users_Service::getPasswordHash()->encrypt($propertiesValues[PROPERTY_USER_PASSWORD]);
     }
     parent::update($uri, $propertiesValues);
     // throw new common_exception_NotImplemented();
 }
 public function __construct()
 {
     parent::__construct();
     $this->resultClass = new \core_kernel_classes_Class(TAO_DELIVERY_RESULT);
 }