/**
  * Get Distincts units (accuracy + normal) of properties
  * filter by type if one given
  * @param string $type a type
  * @return array an Array of Qualifier in keys/values
  */
 public function getDistinctUnit($type = null)
 {
     if (is_null($type)) {
         $q = $this->createFlatDistinct('properties', 'property_unit', 'unit');
     } else {
         $q = $this->createFlatDistinctDepend('properties', 'property_unit', $type, 'unit');
     }
     $res_unit = DarwinTable::CollectionToArray($q->execute(), 'unit');
     return array_merge(array('' => ''), $res_unit);
 }
 public function getDistinctSubGroups($group)
 {
     if (is_null($group)) {
         $q = $this->createFlatDistinct('tag_groups', 'sub_group_name', 'sgn');
     } else {
         $q = $this->createFlatDistinctDepend('tag_groups', 'sub_group_name', $group, 'sgn');
     }
     $a = DarwinTable::CollectionToArray($q->execute(), 'sgn');
     return array_merge(array('' => ''), $a);
 }
 /**
  * Get Distincts Container Storages of Part
  * filter by type if one given
  * @param string $type a type
  * @return array an Array of types in keys
  */
 public function getDistinctContainerStorages($type)
 {
     $q = $this->createFlatDistinctDepend('specimens', 'container_storage', $type, 'storage');
     $a = DarwinTable::CollectionToArray($q->execute(), 'storage');
     return array_merge(array('dry' => 'dry'), $a);
 }