Hello everyone
I am using OJS 3.1.1-2, and I would like to know if I can add metadata to OAI.
That is, I can see Title, Author, Who publishes, Type of resource, and some other fields, but I would also like to see if possible, Keywords, References, Appointments.
Hola @Oscarrgomez, realmente no he tenido mucho tiempo para solucionar esta duda, pero sé que en /ojs/classes/oai/ojs/JournalOAI.inc.php y en /ojs/classes/oai/ojs/OAIDAO.inc.php puede estar la solución. Allí están las variables que son visibles en la indexación, pero como le dije antes, no he tenido mucho tiempo para resolver bien esto. Si encuentra la solución le agradecería compartirmela, jeje, un abrazo!
Hola DAvid, gracias por la respuesta. Estuve viendo los archivos pero no sabría que cambiar o agregar. desde luego que si encuentro la solución te aviso, abrazos
Hola @david_marquez Copié el código pero me da error. De todos modos parece que usamos versiones diferentes. Yo utilizo 2.4.8.3.
En mi oai aparecen las palabras claves, lo que no aparece son las citas.
Si quieres envíame la url de tu revista así veo tu oai a ver si puedo colaborarte en algo.
La mía es http://fundacionmenteclara.org.ar/revista
en mi código esta:
// Subject
$subjects = array_merge_recursive(
(array) $article->getDiscipline(null),
(array) $article->getSubject(null),
(array) $article->getSubjectClass(null));
$this->_addLocalizedElements($dc11Description, ‘dc:subject’, $subjects);
Estimado @david_marquez no tengo idea que es un foreach jeje.
La verdad conozco muy poco de lenguaje php, lo que suelo hacer es copiar plantillas completas.
De todos modos lo voy a intentar tal como me pasaste el código. Me alegra que ya tengas tus palabras claves en el OAI.
¿Estás pudiendo depositar tus artículos en LOcks? Yo no lo estoy logrando, todo parece bien del lado de mi OJS pero no aparecen los registros en LOcks.
Gracias por tu tiempo y amabilidad.
I have managed to get Referecnes, keywords, orcid and authors email in OAI, but I still need to display authors affiliation. Do you have any idea how to do that?
Thanks
In file:
ojs install dir\plugins\metadata\dc11\filter\Dc11SchemaArticleAdapter.inc.php you have to write following:
$this->_addLocalizedElements($dc11Description, ‘dc:citations’, $article->getCitations());
somewhere into function extractMetadataFromDataObject($article)
and also check in file
ojs3 install dir\lib\pkp\plugins\metadata\dc11\schema
if there is line
this->addProperty(‘dc:citations’, METADATA_PROPERTY_TYPE_STRING, true, METADATA_PROPERTY_CARDINALITY_MANY);
if not, just copy one of existing lines and change dc:whatever to dc:citations.
As a result, you should get references in one line (string) in dc:citations xml tag in oai_dc request. Than you can use explode function to get every reference in one line or something similar.
en /plugins/metadata/dc11/filter/Dc11SchemaArticleAdapter.inc.php agregué:
// citations
$this->_addLocalizedElements($dc11Description, ‘dc:citations’, $article->getCitations(null));
y en /lib/pkp/plugins/metadata/dc11/schema/PKPDc11Schema.inc.php agregué:
$this->addProperty(‘dc:citations’, METADATA_PROPERTY_TYPE_STRING, true, METADATA_PROPERTY_CARDINALITY_MANY);
y veo las referencias del siguiente modo:
No me parece que este bien Estan fuera de los casilleros del OAI y ademas no hay separacion entre cada referencia.
What are you trying to do with aoi-pmh request? If you are harvesting in database, than you don’t have to worry about visual formatting on aoi page.
I don’t think you can get better visual formating, but if you look at the page source (right click in browser → view page source) you will see plain XML which is well-formatted. All references are inside <citations>``</citations> tag.
If you are familiar with PHP, you can use for example explode function, and than with foearch loop you can format and display references in single line, something like <ref01>XXXXXX</ref01>, <ref02>XXXXX</ref02> etc… You will maybe need some regular expression for cleaning poor formated text.
p.s I like this english-> (google translate) Spanish conversation
p.s2 sorry for bad english
Lamentablemente no tenemos mucho conocimiento de PHP como para hacer lo que nos escribís sobre foearch loop. Necesitaríamos el código completo y el archivo en el que copiarlo.
Hola @StephenMAD ¿Cómo estás? Si lo pude lograr con la ayuda de la gente de REDIB. En mi caso me modificaron el archivo Dc11SchemaArticleAdapter.inc.php pero como mi ojs está muy tocado te recomiendo mandarles a soporte@redib.org tu archivo original y ellos te lo devolverán modificado según tu propia versión de ojs. Son por demás amables y serviciales. No dudes en pedirles ayuda. Si no te encuentras incluído en REDIB, mencionales que yo te indique pedirles ayuda Saludos cordiales Oscar R. Gómez
PD: luego dime como te fue.