Citations plugin saving data to database

Hi everyone,

As some of you already know, I am developing a Citations plugin for OJS 3.3 (later also for 3.2 and 3.4). This plugin will give more accurate and detailed citations metadata. Furthermore, this plugin will also publish the metadata to external open access websites such as wikidata, croci, (crossref) etc.

My question is related to how to save the data in the database. As I can see, there are 2 tables in the database namely: citations and citation_settings.

Is it wise to use these two tables, or use a different approach?

If I use these tables, I would follow the same logic as now: use citations table for the raw citations (this is already done in the core by splitting by newline). So I would not mess with this and use the already builtin core functionality.

In citation_settings, I would save other metadata. At this moment this would be the:

  • PID (such as DOI)
  • statuses for submission to wikidata, croci, …

In a later phase, the metadata will be expanded with: author, title, date, …

Second option would be that I save this data as a extra properties with an article. This could be serialized or separate values.

Can anyone (@NateWr) advice me about this.


/* This is my first post here, so please advice if I should do things differently here. */


Hi @gaziyucel! This is a great question. @Vitaliy has explored this as well in his work with structured citations for JATS XML. He will remember better, but I think we decided to use citation_settings for this data, so that would be a good place for it.

However, I’d encourage you to beware that we may be using citation_settings for structured citations with JATS XML in the future. In such a case, it’s possible that there would be data clashes (ie - our JATS handler and your plugin might both try to control title). I would recommend using a prefix with all of your plugin’s settings, like gaziyucelTitle and gaziyucelDoi. That will prevent conflicts from arising and make it easy to migrate data if/when we better support structured citations in the main application.

1 Like

Thanks a lot Nate, that was quick. I will use prefixes.

Another related question. I couldn’t see if the DAO’s are already there for the citation_settings. Do you know if that’s already there, or do I need to extend the DAO for this?

Depending on the task, it may be tricky to save data in the citation_settings table.

In short, JATS Parser adds an option to a publication form, which allows saving structured citations from JATS XML files. It uses this hook: JATSParserPlugin/ at d6909fef01c6af7ba5ba45c6ee68fb3cd34d8ce3 · Vitaliy-1/JATSParserPlugin · GitHub to substitute citations. The problem was that new values added to the citation_settings table were immediately deleted later in the publication object update cycle.

But I see that in the current 3.3.0 stable branch there is an additional check performed before importing raw citations, thus, the trick that I’ve tried might work here. I’ll take a look.

1 Like