Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete ref editing support #236

Closed
11 tasks
michael opened this issue Aug 10, 2017 · 2 comments
Closed
11 tasks

Complete ref editing support #236

michael opened this issue Aug 10, 2017 · 2 comments
Assignees

Comments

@michael
Copy link
Member

michael commented Aug 10, 2017

We are working on complete support for editing <element-citation> records.

Step 1: JATS4R representation: We define a strict schema for JATS4R for all available publication types. This schema must be valid JATS! Here's an example for modelling a journal article.

<ref id="r1">
  <element-citation publication-type="journal">
  <x specific-use="display">Townsend BR, Subasi E, Scherberger H (2011) Grasp movement decoding from premotor and parietal cortex. J Neurosci 31:14386 –14398</x>
    <person-group person-group-type="author">
      <name>
        <surname>Baumann</surname>
        <given-names>MA</given-names>
      </name>
      <name>
        <surname>Fluet</surname>
        <given-names>MC</given-names>
      </name>
    </person-group>
    <year>2009</year>
    <article-title>Context-specific grasp movement representation in the macaque anterior intraparietal area</article-title>
    <fpage>6436</fpage>
    <lpage>6448</lpage>
    <pub-id pub-id-type="doi">10.1523/JNEUROSCI.5479-08.2009</pub-id>
  </element-citation>
</ref>
  • figure out what publication types we want to support (currently journal and book are supported)
  • figure out requirements (required and optional fields for each supported publication type)
  • improve schema based on requirements (let's look at content from scielo, elife, pkp, erudit)
  • consider implementing other publication types once we have a complete specification for them (.e.g “book”, “letter”, “review”, “journal”, “patent”, “report”, “standard”, “data”, “working-paper”)

Step 2: We define an improved schema TextureJATS (internal schema, the model that the editor manipulates), which helps us realize our user interface in the best way. However it carries the same data, just modelled slightly differently. For instance instead of fpage,lpage,e-location-id we use a custom element content-loc wrapping these elements and providing an expclicit type attribute which states either print or electronic. This allows us to implement a switcher in the user interface, showing either fields for print publications or elocation-id for electronic publications. Also in TextureJATS all editable fields are non-optional. So there must always be at least an empty element present. This allows us to always render placeholders to be filled out or left blank.

In TextureJATS the example from above looks like so:

<ref id="r1">
  <element-citation publication-type="journal">
  <x specific-use="display">Townsend BR, Subasi E, Scherberger H (2011) Grasp movement decoding from premotor and parietal cortex. J Neurosci 31:14386 –14398</x>
    <person-group person-group-type="author">
      <name>
        <surname>Baumann</surname>
        <given-names>MA</given-names>
      </name>
      <name>
        <surname>Fluet</surname>
        <given-names>MC</given-names>
      </name>
    </person-group>
    <year>2009</year>
    <article-title>Context-specific grasp movement representation in the macaque anterior intraparietal area</article-title>
    <content-loc type="print">
      <fpage>6436</fpage>
      <lpage>6448</lpage>
      <page-range></page-range>
    </content-loc>
    <pub-id pub-id-type="doi">10.1523/JNEUROSCI.5479-08.2009</pub-id>
    <!-- empty elements (not optional anymore) -->
    <source></source>
    <volume></volume>
    <!-- lots of more empty elements, e.g. fields used with user publication types -->
    <chapter-title></chapter-title>
  </element-citation>
</ref>
  • improve schema as needed, which good decisions the editor implementations can be made simpler

Step 3: Provide transformers between JATS4R and TextureJATS

  • write transformer JAT4R -> TextureJATS -> JATS4R (importer and exporter)
  • write tests for all supported transform scenarios

Step 4: Improve Editor EditRef component.

  • Use a separate component for each publication type (e.g. EditJournalArticle)
  • Reusable components where possible (e.g. EditPersonGroup)
  • generate a display version on each change to the element-citation <x> element. (this could be acchieved with providing a simple html renderer (based on a template string)
  • Improve RefListComponent to use rendered <x> element for display
@michael
Copy link
Member Author

michael commented Aug 10, 2017

@Integral please work in element-citation-editing branch.

@michael
Copy link
Member Author

michael commented Sep 15, 2017

This is mostly in place. Closing this issue in favor of #238

@michael michael closed this as completed Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants