Exemple #1
0
 /**
  * @param string $columnName
  * @param string $fileDelimiter
  */
 public function __construct($columnName, $fileDelimiter = null, $isSingle = false)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_FILE;
     $this->_fileDelimiter = is_null($fileDelimiter) ? self::getDefaultFileDelimiter() : $fileDelimiter;
     $this->_isSingle = (bool) $isSingle;
 }
Exemple #2
0
 /**
  * @param string $columnName
  * @param boolean $isPublic
  */
 public function __construct($columnName, $isPublic = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_PUBLIC;
     $filter = new Omeka_Filter_Boolean();
     $this->_isPublic = is_null($isPublic) ? self::DEFAULT_PUBLIC : $filter->filter($isPublic);
 }
Exemple #3
0
 /**
  * @param string $columnName
  * @param $isFeatured
  */
 public function __construct($columnName, $isFeatured = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_FEATURED;
     $filter = new Omeka_Filter_Boolean();
     $this->_isFeatured = is_null($isFeatured) ? self::DEFAULT_FEATURED : $filter->filter($isFeatured);
 }
 /**
  * @param string $columnName
  * @param integer $collectionId
  * @param boolean $createCollection
  * @param boolean $advanced
  */
 public function __construct($columnName, $collectionId = null, $createCollection = false, $advanced = false)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_COLLECTION;
     $this->_collectionId = (int) $collectionId;
     $this->_createCollection = (bool) $createCollection;
     $this->_advanced = $advanced;
 }
 /**
  * @param string $columnName
  * @param string $elementDelimiter
  */
 public function __construct($columnName, $elementDelimiter = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_EXTRA_DATA;
     $this->_columnNameDelimiter = self::DEFAULT_COLUMN_NAME_DELIMITER;
     $this->_elementDelimiter = $elementDelimiter === null ? self::getDefaultElementDelimiter() : $elementDelimiter;
     $this->_postKey = $this->_getPostKeyFromColumnName();
     $this->_isDataMultivalued = $this->_isColumnMultivalued();
 }
 /**
  * @param string $columnName
  * @param string $elementDelimiter
  */
 public function __construct($columnName, $elementDelimiter = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_ELEMENT;
     if ($elementDelimiter !== null) {
         $this->_elementDelimiter = $elementDelimiter;
     } else {
         $this->_elementDelimiter = self::getDefaultElementDelimiter();
     }
 }
Exemple #7
0
 /**
  * @param string $columnName
  * @param string $tagDelimiter
  */
 public function __construct($columnName, $tagDelimiter = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_TAG;
     if ($tagDelimiter !== null) {
         $this->_tagDelimiter = $tagDelimiter;
     } else {
         $this->_tagDelimiter = self::getDefaultTagDelimiter();
     }
 }
 /**
  * @param string $columnName
  * @param string $elementDelimiter
  */
 public function __construct($columnName, $elementDelimiter = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_ELEMENT;
     $this->_columnNameDelimiter = self::DEFAULT_COLUMN_NAME_DELIMITER;
     $this->_elementDelimiter = $elementDelimiter !== null ? $elementDelimiter : self::getDefaultElementDelimiter();
     $element = $this->_getElementFromColumnName();
     $this->_elementId = !empty($element) ? $element->id : null;
     $this->_isHtml = true;
 }
 /**
  * @param string $columnName
  * @param string $fileDelimiter
  */
 public function __construct($columnName, $fileDelimiter = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_FILE;
     if ($fileDelimiter !== null) {
         $this->_fileDelimiter = $fileDelimiter;
     } else {
         $this->_fileDelimiter = self::getDefaultFileDelimiter();
     }
 }
 /**
  * @param string $columnName
  */
 public function __construct($columnName)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_ELEMENT;
     $this->_columnNameDelimiter = self::DEFAULT_COLUMN_NAME_DELIMITER;
     $this->_elementDelimiter = self::DEFAULT_ELEMENT_DELIMITER;
     $this->_isHtml = true;
     $element = $this->_getElementFromColumnName();
     if ($element) {
         $this->_elementId = $element->id;
     } else {
         $this->_elementId = null;
     }
 }
 /**
  * @param string $columnName
  */
 public function __construct($columnName)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_PUBLIC;
 }
 /**
  * @param string $columnName
  */
 public function __construct($columnName)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_RECORD_IDENTIFIER;
 }
 /**
  * @param string $columnName
  * @param integer $collectionId
  */
 public function __construct($columnName, $collectionId = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_COLLECTION;
     $this->_collectionId = (int) $collectionId;
 }
Exemple #14
0
 /**
  * @param string $columnName
  * @param string $action Default action
  */
 public function __construct($columnName, $action = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_ACTION;
     $this->_action = $this->_checkAction($action) ? $action : self::DEFAULT_ACTION;
 }
Exemple #15
0
 /**
  * @param string $columnName
  * @param string $itemType
  */
 public function __construct($columnName, $itemTypeId = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_ITEM_TYPE;
     $this->_itemTypeId = empty($itemTypeId) ? self::DEFAULT_ITEM_TYPE : $itemTypeId;
 }
 /**
  * @param string $columnName
  */
 public function __construct($columnName)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_SOURCE_ITEM_ID;
 }
 /**
  * @param string $columnName
  */
 public function __construct($columnName, $identiferField = null)
 {
     parent::__construct($columnName);
     $this->_type = CsvImport_ColumnMap::TYPE_IDENTIFIER_FIELD;
     $this->_identifierField = empty($identiferField) ? $this->getDefaultIdentifierField() : $identiferField;
 }