Ticket #76 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

update ontology descriptors + exchange templates via XML or RDF

Reported by: kees.vanbochove@… Owned by: business@…
Priority: major Milestone: 0.6.2
Component: Export functionality Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

It would be really nice if we could exchange templates via XML/RDF.
We need to build an exporter and a parser for that.
For that, we also need to change the way we reference ontologies from ONTOLOGYERM fields: we should not store a link to an Ontology object in the database, but just the NCBO BioPortal? ID.
For the exchange of data, actual terms could be represented by their preferred name or accession number.

Change History

Changed 3 years ago by work@…

  • status changed from new to assigned
  • owner set to business@…
  • component set to Export functionality
  • milestone set to 0.6.2

opened 6 months ago... setting milestone 0.6.2 and assigning to Kees... can this be closed?

Changed 3 years ago by business@…

  • owner changed from business@… to robert@…

It would be nice if we had something like
XML namespace http://dbnp.org/gscf/template

<template name="Academic study" entity="Study">
<templatefield position="0" name="Description" type="TEXT" etc.

And that should also be importable again in another GSCF instance. Any non-present ontologies should then also be added to the database just like the template editor does.

In the template import function, obviously template fields that are already exactly the same, can be re-used. Otherwise the field has to be created.

Changed 3 years ago by business@…

Also, a question I have: would it be possible to create a unique hash string for a template that incorporates all the template fields and their properties?
That would allow us to check if a certain template is already present, but under a different name. Also, it would allow us to use this hash in the study XML (#91) to specify the study template without depending on the template name (and to track template versioning).

Changed 3 years ago by robert@…

  • owner changed from robert@… to business@…

The import and export functionality is built into the trunk in r1257. I've added a sample xml file and an xsd schema in the directory gscf/schemas, as I don't really know what the correct directory would be.

The exported XML contains ncboid, versionedid, name etc. for ontologyfields. However, only the ncboid is used for importing, the other fields are added as they might be used by others.

The hash method is not implemented, since it wouldn't make sense to use it for versioning (as discussed earlier). The template and templateField objects do contain methods called 'contentEquals'. This method checks whether the template equals another template, when looking at the fields used (so not looking at name and description). The same holds for templateField.contentEquals, which looks at all properties of a template field (including the name), except for the comment and the order of ontologies and listentries.

Please test whether the functionality is as expected

Changed 3 years ago by robert@…

  • owner changed from business@… to robert@…

Unfortunately, there are a few problems, as appeared on the ci-instance:
- templates without any fields are not properly imported
- templates with empty listentries (which are NULL in the database) are exported without a name, but not imported correctly

Changed 3 years ago by robert@…

  • owner changed from robert@… to business@…

These issues are solved in r1274. Please test again whether it works as expected.

Changed 3 years ago by business@…

  • status changed from assigned to closed
  • resolution set to fixed

Tested, works fine!

Note: See TracTickets for help on using tickets.