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

Should annotations be able to have `id` attributes? #335

Closed
amoeba opened this issue May 1, 2019 · 7 comments
Closed

Should annotations be able to have `id` attributes? #335

amoeba opened this issue May 1, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@amoeba
Copy link
Contributor

@amoeba amoeba commented May 1, 2019

@mpsaloha brought up an interesting point last week on our DataONE semprov call: Should <annotation> elements be able to have ids? This'd allow at least two cool things:

  1. Annotations can be turned into quads and referenced in other contexts. Coolness level: Gentle ocean breeze.
  2. Annotations can annotate other annotations. Coolness level: Gale force winds.

For example, (2) allows us to insert provenance about annotations. Take this annotation:

<!-- snip -->
<attribute id="my_attribute">
  <!-- snip -->
  <annotation>
    <propertyURI label="contains measurements about">
      http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl#ofEntity
    </propertyURI>
    <valueURI label="air">
      http://purl.obolibrary.org/obo/ENVO_00002005
    </valueURI>
  </annotation>
  <!-- snip -->
</attribute>
<!-- snip -->

Add in the option of an id attribute:

<!-- snip -->
<attribute id="my_attribute">
  <!-- snip -->
  <annotation id="my_annotation">
    <propertyURI label="contains measurements about">
      http://ecoinformatics.org/oboe/oboe.1.2/oboe-core.owl#ofEntity
    </propertyURI>
    <valueURI label="air">
      http://purl.obolibrary.org/obo/ENVO_00002005
    </valueURI>
  </annotation>
  <!-- snip -->
</attribute>
<!-- snip -->
<annotations>
  <annotation references="my_annotation">
    <propertyURI label="was created by">
      https://schema.org/creator
    </propertyURI>
    <valueURI label="Bryce Mecum">
      https://dataone.org/person/BryceMecum
    </valueURI>
  </annotation>
</annotations>

I think this is potentially useful, and I also think it's not a problem to add to the schema and it's probably better to add now, before 2.2 is released. @mobb mentioned our usual pattern with id attributes is that they also come with system and scope attributes, like:

<xs:attribute name="id" type="res:IDType" use="optional"/>
<xs:attribute name="system" type="res:SystemType" use="optional"/>
<xs:attribute name="scope" type="res:ScopeType" use="optional" default="document"/>

Is this interesting to others and does this fit within the spirit of the semantics module?

@amoeba amoeba self-assigned this May 1, 2019
@csjx

This comment has been minimized.

Copy link
Member

@csjx csjx commented May 2, 2019

Aside from what you've outlined here, when it comes to building a UI around adding, updating, and removing annotations, having an id attribute will be super useful so we can target the XML node easily, so I'm in favor of it. (My $0.02)

@amoeba amoeba added this to the EML2.2.0 milestone May 2, 2019
@twhiteaker

This comment has been minimized.

Copy link
Contributor

@twhiteaker twhiteaker commented May 3, 2019

Would the id go on the <attribute> or the <annotation> element?

<annotation id="my_annotation">

@mobb

This comment has been minimized.

Copy link
Contributor

@mobb mobb commented May 3, 2019

@twhiteaker - this suggestion means that there would be an id attribute on both elements.
<attribute id="attr1">: an id is required so that an unambiguous triple can be created (this is already required in EML 2.2, for any element that is annotated)

<annotation id="annot1">: means that the annotation node can itself be targeted, e.g., for adding more info an annotation ("annotating the annotation... " -- the example adds an author to the annotation), or as Chris says, it makes building user interfaces easier.

@amoeba

This comment has been minimized.

Copy link
Contributor Author

@amoeba amoeba commented May 3, 2019

Hey @twhiteaker, my fault: I had the left those details out of the XML snippets. I think I fixed them and they match what @mobb said. Sorry about that!

@twhiteaker

This comment has been minimized.

Copy link
Contributor

@twhiteaker twhiteaker commented May 3, 2019

Makes sense to me

@stevenchong

This comment has been minimized.

Copy link
Contributor

@stevenchong stevenchong commented Jul 10, 2019

The folks working on ADC semantics (@amoeba , @mobb, @mpsaloha and me) are in general agreement that adding an optional id attribute to <annotation> elements are a good idea. So, this is going to require an edit to the schema and supporting documentation (e.g. the semantic annotation primer).

amoeba added a commit that referenced this issue Jul 12, 2019
@amoeba

This comment has been minimized.

Copy link
Contributor Author

@amoeba amoeba commented Jul 12, 2019

Okay I pushed this up to the 2.2.0 branch. You can now put id, system, and scope on your annotation elements, like:

    <annotation id="myanno" system="earth" scope="document">
        <propertyURI label="Subject">http://purl.org/dc/elements/1.1/subject</propertyURI>
        <valueURI label="grassland biome">http://purl.obolibrary.org/obo/ENVO_01000177</valueURI>
    </annotation>

Will leave open until we merge with master or someone else closes for their own issue-managing workflow.

@amoeba amoeba removed the help wanted label Jul 12, 2019
@mbjones mbjones closed this Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
EML 2.2.0 Release
Awaiting triage
6 participants
You can’t perform that action at this time.