/**
  * override getObject to order author.
  * 
  * @see XooNIpsXmlRpcTransformCompo::getObject
  *
  * @param array associative array of XML-RPC argument
  * @return XNPConferenceOrmAuthor
  */
 function getObject($in_array)
 {
     $obj = parent::getObject($in_array);
     $authors =& $obj->getVar('author');
     for ($i = 0; $i < count($authors); $i++) {
         $authors[$i]->set('author_order', $i);
     }
     return $obj;
 }
 /**
  * override getObject to order experimenter.
  * 
  * @see XooNIpsXmlRpcTransformCompo::getObject
  *
  * @param array associative array of XML-RPC argument
  * @return XNPDataOrmExperimenter
  */
 function getObject($in_array)
 {
     $obj = parent::getObject($in_array);
     $experimenters =& $obj->getVar('experimenter');
     for ($i = 0; $i < count($experimenters); $i++) {
         $experimenters[$i]->set('experimenter_order', $i);
     }
     return $obj;
 }
 /**
  * @brief check that each field has valid value.
  * 
  * @param[in] $in_array associative array of item
  * @param[out] $error XooNIpsError to add error
  * @retval ture valid
  * @retval false some invalid fields
  */
 function checkFields($in_array, &$error)
 {
     parent::checkFields($in_array, $fields);
     $result = true;
     //set false if error
     $basic_handler =& xoonips_getormhandler('xoonips', 'item_basic');
     $item_ids = array();
     foreach ($in_array['detail_field'] as $field) {
         if (trim($field['name']) != 'item_id') {
             continue;
         }
         $basic =& $basic_handler->get($field['value']);
         if (!$basic) {
             $error->add(XNPERR_INVALID_PARAM, 'item(' . $field['value'] . ') is not exists');
             $result = false;
             continue;
         }
         if (ITID_INDEX == $basic->get('item_type_id')) {
             $error->add(XNPERR_INVALID_PARAM, 'binder can not have index');
             $result = false;
             continue;
         }
         $item_ids[] = $field['value'];
     }
     $index_ids = $in_array['indexes'];
     // use following functions defined in view.php
     if (xnpbinder_no_binder_item($item_ids)) {
         $error->add(XNPERR_INVALID_PARAM, 'binder needs at least one item');
         $result = false;
     }
     if (xnpbinder_public_binder_has_not_public_item($item_ids, $index_ids)) {
         $error->add(XNPERR_INVALID_PARAM, 'public binder cannot have private and group items');
         $result = false;
     }
     if (xnpbinder_group_binder_has_private_item($item_ids, $index_ids)) {
         $error->add(XNPERR_INVALID_PARAM, 'group binder cannot have private item ');
         $result = false;
     }
     return $result;
 }
 function XNPMemoXmlRpcTransformCompo()
 {
     parent::XooNIpsXmlRpcTransformCompo('xnpmemo');
 }
 function XNPFilesXmlRpcTransformCompo()
 {
     parent::XooNIpsXmlRpcTransformCompo('xnpfiles');
 }
 function XNPUrlXmlRpcTransformCompo()
 {
     parent::XooNIpsXmlRpcTransformCompo('xnpurl');
 }