NCEAS / morpho

Morpho metadata editor
GNU General Public License v2.0
3 stars 1 forks source link

Failed to open the data package - https://mn-demo-5.test.dataone.org/knb/d1/mn/v1/object/doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5 #994

Closed mbjones closed 6 years ago

mbjones commented 6 years ago

Author Name: Jing Tao (Jing Tao) Original Redmine Issue: 5843, https://projects.ecoinformatics.org/ecoinfo/issues/5843 Original Date: 2013-02-01 Original Assignee: Jing Tao


When I search "PISCO" and get the data package: https://mn-demo-5.test.dataone.org/knb/d1/mn/v1/object/doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5

However, when i clicked it, i can't open it.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T00:13:34Z


the error message is: [java] Could not read package: No system metadata could be found for given PID: YBHX00_XXXITBDXMMR01_20040720.40.2 [java] Exception in thread "Thread-11" java.lang.NullPointerException [java] at edu.ucsb.nceas.morpho.datapackage.DataPackagePlugin.openDataPackage(DataPackagePlugin.java:987) [java] at edu.ucsb.nceas.morpho.query.OpenPackageCommand$1.construct(OpenPackageCommand.java:170) [java] at edu.ucsb.nceas.morpho.framework.SwingWorker$2.run(SwingWorker.java:140) [java] at java.lang.Thread.run(Thread.java:680)

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T00:15:31Z


It seems that the failure of one entity downloading causes the failure of the open. We should still open a package even though some or all entities fail to be downloaded.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T01:08:38Z


I added code to handle the failure of one entity downloading gracefully and can save it locally.

However, the id was changed to YBHX00_XXXITBDXMMR01_20040720.40.2, the last part of the DOI.

I dug it a little bit. This is an eml 2.0 document, if we don't transform it, the package shows the whole DOI. If we transform it to eml 2.1, it shows the last part of DOI. By the way, the pacakageId in the eml is the last part of the doi.

mbjones commented 6 years ago

Original Redmine Comment Author Name: ben leinfelder (ben leinfelder) Original Date: 2013-02-02T01:22:05Z


The ID was not changed -- that is the data entity ID originally used in PISCO and encoded in the ecogrid url:

ecogrid://knb/YBHX00_XXXITBDXMMR01_20040720.40.2

I don't know how we can handle this case at the moment. In theory, the ORE package would tell us what the data file is, but we also expect that the data ID in the EML matches the ID used in the ORE package (and what is saved on the server). In this case the EML has the data ID without the DOI "shoulder" (as expected) but Morpho has no way to "know" that there is more to it than that ID.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T01:42:46Z


Sorry, it is my fault. After transform to the new verion (eml 2.1) document, the main morpho frame shows: DataPackage: YBHX00_XXXITBDXMMR01_20040720.50.5 Accession Number: YBHX00_XXXITBDXMMR01_20040720.50.5 And the data package location is blank (this is correct).

(it is not the YBHX00_XXXITBDXMMR01_20040720.40.2, the data file id. It is the last part of DOI package). Note the eml has the packageId=YBHX00_XXXITBDXMMR01_20040720.40.2.

Now i saved the package into local, it changes to a UUID. This is great.

We only need to figure out why it shows the last part of DOI after the eml version transform.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T02:12:23Z


A good news: i can use the open id menu item to open a package with a DOI id.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-02T05:33:16Z


As I suspected: during the version transformation, the original identifier (doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5) was replaced by the attribute value of the eml (YBHX00_XXXITBDXMMR01_20040720.50.5). After the transformation, the identifier changed to YBHX00_XXXITBDXMMR01_20040720.50.5.

I added code to preserve the id. After the transformation, the id still be doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5 and the location is "". Then i saved it and it created a local copy of doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5.

This cause an issue: both local and network has a copy of doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5. But they are different! The newwork copy is eml 2.0.1 and the local copy is eml 2.1.0!

So I think so after eml version transformation, we should assign a new id for this data package. Because The transformation is a update.

mbjones commented 6 years ago

Original Redmine Comment Author Name: ben leinfelder (ben leinfelder) Original Date: 2013-02-02T07:08:50Z


I agree that transforming the EML from one version to another is an "update" and therefore requires a new identifier be generated for it.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2013-02-04T20:00:59Z


After update the eml to the newest version, morpho assigns a new uuid for the package. Now you can update and save the package correctly.

mbjones commented 6 years ago

Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2013-03-27T21:31:51Z


Original Bugzilla ID was 5843