Skip to content

Conversation

@syphax-bouazzouni
Copy link

@syphax-bouazzouni syphax-bouazzouni commented Dec 21, 2022

Context

Fix #18

Changes

  • Remove sourceOntolology.getOntologies() loops (e0ad8c7)
  • Extract a method addAnnoations(masterOntology) (e0ad8c7)
  • Add a test to ensure that sourceOntology.annotations.count equal genertaedOntoogy.annotations.count ( 5a17c74)

Example

CNO (source)

    <owl:Ontology rdf:about="http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl">
        <dc:date rdf:datatype="&xsd;string">13/03/2012</dc:date>
        <dc:subject rdf:datatype="&xsd;string">An ontology to describe the field of Computational Neurosciences</dc:subject>
        <dc:contributor rdf:datatype="&xsd;string">Birgit Kriener</dc:contributor>
        <dc:title rdf:datatype="&xsd;string">Computational Neuroscience Ontology</dc:title>
        <dc:contributor rdf:datatype="&xsd;string">Erik De Schutter</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Fahim T. Imam</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">INCF MultiScale Modeling Task Force</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Lars Schwabe</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Padraig Gleeson</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Sean Hill</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Stephen D. Larson</dc:contributor>
        <dc:contributor rdf:datatype="&xsd;string">Subhasis Ray</dc:contributor>
        <rdfs:comment rdf:datatype="&xsd;string">This ontology is used to add the Definition class of annotation as in NIF.
The source of the definition can be defined with class from OBO-annotation</rdfs:comment>
        <rdfs:comment rdf:datatype="&xsd;string">This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.</rdfs:comment>
        <dc:creator rdf:datatype="&xsd;string">Yann Le Franc</dc:creator>
        <owl:versionInfo rdf:datatype="&xsd;string">version 0.5</owl:versionInfo>
        <owl:imports rdf:resource="http://ontology.neuinfo.org/NIF/Backend/OBO_annotation_properties.owl"/>
        <owl:imports rdf:resource="http://ontology.neuinfo.org/NIF/Backend/ro_bfo1-1_bridge.owl"/>
        <owl:imports rdf:resource="http://protege.stanford.edu/plugins/owl/dc/protege-dc.owl"/>
        <owl:imports rdf:resource="http://purl.org/incf/ontology/Computational_Neurosciences/external_import/external.owl"/>
        <owl:imports rdf:resource="http://purl.org/obo/owl/ro"/>
        <owl:imports rdf:resource="http://www.ifomis.org/bfo/1.1"/>
        <owl:imports rdf:resource="http://www.w3.org/2004/02/skos/core"/>
    </owl:Ontology>

Generated xrdf CNO

        <owl:Ontology rdf:about="http://purl.org/incf/ontology/Computational_Neurosciences/cno_alpha.owl">
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Birgit Kriener</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Erik De Schutter</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Fahim T. Imam</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">INCF MultiScale Modeling Task Force</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Lars Schwabe</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Padraig Gleeson</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Sean Hill</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Stephen D. Larson</dc:contributor>
        <dc:contributor rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Subhasis Ray</dc:contributor>
        <dc:creator rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Yann Le Franc</dc:creator>
        <dc:date rdf:datatype="http://www.w3.org/2001/XMLSchema#string">13/03/2012</dc:date>
        <dc:subject rdf:datatype="http://www.w3.org/2001/XMLSchema#string">An ontology to describe the field of Computational Neurosciences</dc:subject>
        <dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Computational Neuroscience Ontology</dc:title>
        <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">This ontology is used to add the Definition class of annotation as in NIF.
The source of the definition can be defined with class from OBO-annotation</rdfs:comment>
        <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string">This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.</rdfs:comment>
        <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string">version 0.5</owl:versionInfo>
    </owl:Ontology>

vemonet and others added 30 commits October 6, 2015 18:29
… graph (like the versionInfo is added) using the omv:URI property
… and extracting ontologyIRI + all ontology metadata + imports directly from the main ontology in addOntologyIRIAndMetadata (formerly addOntologyIRI)
=> « stop using addGroundMetadata (was getting metadata for imports also), and extracting ontologyIRI + all ontology metadata + imports directly from the main ontology in addOntologyIRIAndMetadata (formerly addOntologyIRI) »
=> « fix how we get versionInfo for OBO ontologies »
=> « now adding all ontologies metadata to the output file (even imported ontologies) »
…ive (Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/adapters/HexBinaryAdapter)
@syphax-bouazzouni
Copy link
Author

Some notes:

  • You can observe that in the generated ontology we lost the <owl:imports> statements, but the it was already the case before

@syphax-bouazzouni syphax-bouazzouni force-pushed the pr/fix/add-only-master-ontology-annotations branch from e0ad8c7 to 168cb9b Compare December 24, 2022 02:48
syphax-bouazzouni and others added 9 commits December 24, 2022 03:49
add guard to avoid .get() of absent value
* Add IRIMapper for SKOS Core Vocabulary

Resolves #22

* Update developer details

* Fix insecure link warning

* Remove defunct support list archive

* Bump commons-csv from 1.9.0 to 1.10.0

* Bump logback-classic from 1.2.11 to 1.4.11

* Update developer and contributor details

* [maven-release-plugin] prepare release owlapi-wrapper-1.4.2

* [maven-release-plugin] prepare for next development iteration

* [maven-release-plugin] rollback the release of owlapi-wrapper-1.4.2

* [maven-release-plugin] prepare release v1.4.2

* [maven-release-plugin] prepare for next development iteration
…ontology

Fix: move sub.get() after the check to prevent expection
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 63.41463% with 15 lines in your changes missing coverage. Please review.

Project coverage is 73.05%. Comparing base (419489d) to head (9156d1c).

Files with missing lines Patch % Lines
...g/stanford/ncbo/owlapi/wrapper/OntologyParser.java 63.41% 10 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #20      +/-   ##
============================================
+ Coverage     72.98%   73.05%   +0.06%     
- Complexity      165      167       +2     
============================================
  Files            15       15              
  Lines           733      746      +13     
  Branches        116      117       +1     
============================================
+ Hits            535      545      +10     
- Misses          152      153       +1     
- Partials         46       48       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mdorf mdorf changed the base branch from master to ontoportal-lirmm/bugfix/ontology-level-annotations June 19, 2025 19:05
@mdorf mdorf merged commit 72117fa into ncbo:ontoportal-lirmm/bugfix/ontology-level-annotations Jun 19, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

Ontology-level annotation axioms and version info

8 participants