/** * */ public function __construct($ps_source = null, $pa_options = null) { parent::__construct($ps_source, $pa_options); $this->ops_title = _t('Omeka XML Reader'); $this->ops_display_name = _t('Omeka XML'); $this->ops_description = _t('Reads Omeka XML files'); $this->opa_formats = array('omeka'); // must be all lowercase to allow for case-insensitive matching }
/** * */ public function __construct($ps_source = null, $pa_options = null) { parent::__construct($ps_source, $pa_options); $this->ops_title = _t('FMPro DSOResult XML Reader'); $this->ops_display_name = _t('FMPro DSOResult'); $this->ops_description = _t('Reads Filemaker Pro DSOResult-format XML files'); $this->opa_formats = array('fmpdso'); // must be all lowercase to allow for case-insensitive matching }
/** * */ public function __construct($ps_source = null, $pa_options = null) { parent::__construct($ps_source, $pa_options); $this->ops_title = _t('PBCore Instantiation Reader'); $this->ops_display_name = _t('PBCore Instantiation'); $this->ops_description = _t('Imports PBCore XML instantiations'); $this->opa_formats = array('pbcoreinst'); // must be all lowercase to allow for case-insensitive matching }
/** * */ public function __construct($ps_source = null, $pa_options = null) { parent::__construct($ps_source, $pa_options); $this->ops_title = _t('RDF (Resource Description Framework / DublinCore) XML Reader'); $this->ops_display_name = _t('RDF XML'); $this->ops_description = _t('Reads RDF XML files'); $this->opa_formats = array('rdf'); // must be all lowercase to allow for case-insensitive matching }
/** * */ public function __construct($ps_source = null, $pa_options = null) { parent::__construct($ps_source, $pa_options); $this->ops_title = _t('WorldCat data reader'); $this->ops_display_name = _t('WorldCat'); $this->ops_description = _t('Reads data from WorldCat via web services'); $this->opa_formats = array('worldcat'); // must be all lowercase to allow for case-insensitive matching if ($vs_api_key = caGetOption('APIKey', $pa_options, null)) { $this->ops_api_key = $vs_api_key; } else { $o_config = Configuration::load(); $this->ops_api_key = $o_config->get('worldcat_api_key'); } }
/** * * * @param string $ps_source A comma or semicolon separated list of WorldCat ids * @param array $pa_options * @return bool */ public function read($ps_source, $pa_options = null) { parent::read($ps_source, $pa_options); // source is a comma or semicolon separated list of WorldCat ids $va_ids = preg_split("![,;]+!", $ps_source); if (!is_array($va_ids) || !sizeof($va_ids)) { return false; } if ($vs_api_key = caGetOption('APIKey', $pa_options, null)) { $this->ops_api_key = $vs_api_key; } $this->opa_row_ids = $va_ids; $this->opn_current_row = 0; return true; }
/** * * * @param string $ps_spec * @param array $pa_options * @return mixed */ public function get($ps_spec, $pa_options = null) { if ($vm_ret = parent::get($ps_spec, $pa_options)) { return $vm_ret; } $vb_return_as_array = caGetOption('returnAsArray', $pa_options, false); $vs_delimiter = caGetOption('delimiter', $pa_options, ';'); //$ps_spec = str_replace("/", "", $ps_spec); if ($this->opb_tag_names_as_case_insensitive) { $ps_spec = strtolower($ps_spec); } if (is_array($this->opa_row_buf) && $ps_spec && isset($this->opa_row_buf[$ps_spec])) { if ($vb_return_as_array) { return $this->opa_row_buf[$ps_spec]; } else { return join($vs_delimiter, $this->opa_row_buf[$ps_spec]); } } return null; }
public function get($ps_spec, $pa_options = null) { $vm_ret = parent::get($ps_spec, $pa_options); if (is_array($vm_ret)) { foreach ($vm_ret as &$vs_val) { $vs_val = html_entity_decode($vs_val); } return $vm_ret; } elseif (is_string($vm_ret)) { return html_entity_decode($vm_ret); } return $vm_ret; }