Ticket #76 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 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:
Hardware: Operating system:
Product: URL:


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

comment:1 Changed 6 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?

comment:2 Changed 6 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.

comment:3 Changed 6 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).

comment:4 Changed 6 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

comment:5 Changed 6 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

comment:6 Changed 6 years ago by robert@…

  • Owner changed from robert@… to business@…

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

comment:7 Changed 6 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.