Project

General

Profile

Bug #3278

DataPackage.serializePackage() method doesn't work very well.

Added by Jing Tao over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_libclient_java
Start date:
2012-09-27
Due date:
% Done:

100%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

Here is the what i did:
DataPackage dataPackage = new DataPackage(packageId);
dataPackage.insertRelationship(metadataId, dataIds);
String resourceMap = dataPackage.serializePackage();
System.out.println("the resource map is"+resourceMap);

My science meadata id is:doi:10.5063/AA/tao.1.1
data id is: doi:10.5063/AA/tao.1.1

But in the output of string, i can't find the relationship between the metadata id and the data id:
the resource map is


2012-09-27T11:43:38.165-07:00/dcterms:modified



resource-map:eea3f44d-bd9c-4c50-88ed-dd51407b0d40/dcterms:identifier
/rdf:Description

Java libclient/foaf:name

/rdf:Description



dc:titleDataONE Aggregation/dc:title
/rdf:Description
/rdf:RDF

History

#2 Updated by Ben Leinfelder over 11 years ago

I think you need to have called DataPacakge.add(D1Object) before you serialize the ORE.
Your data and metadata ids are the same?

Your second RDF file looks good -- how did you end up with that?

#3 Updated by Jing Tao over 11 years ago

Good catch. Yeah, i made a mistake to put the same id for both metadata and data. I corrected it and the result didn't change.
The second RDF was got from the KNB metacat. It is a example and i didn't make it.

I don't think it is necessary to call DataPacakge.add(D1Object) before you serialize the ORE. I went over the code a little bit. The serializePackage method uses the class field metadataMap, but the add method mainly involves the class field objectStore. I have a feeling that insertRelationship(metadataId, dataIds) has a bug. This method modifies the field metadataMap.

#4 Updated by Rob Nahf over 11 years ago

  • Target version set to Sprint-2012.39-Block.5.4
  • Tracker changed from Task to Bug
  • Status changed from New to Closed

found a bug in the insertRelationship method, where the new relationship wasn't added for new metadataIds.

#5 Updated by Rob Nahf over 11 years ago

  • % Done changed from 0 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)