cleaned up to use for populating a DataONE MN using the D1 api. Retrieves packages from a Metacat and generates system metadata for them before calling MN.create() for both data and metadata.NOTE: you need a client certificate that the target server accepts (either DataONE-generated for testing or a CILogon one for more official use). I was only able to get the former certificate type to work with our existing MN servers
IdentifierManager.getSystemMetadata() was missing the number_replicas and replication_allowed fields when building a ReplicationPolicy section of a SystemMetadata document being returned. Add in these two attributes.
update D1 jars to include recent SubjectList -> SubjectInfo refactoring and the SUBJECT_PUBLIC constant
include SystemMetadata when replicating data and metadata documents -- this allows us to establish the guid-to-docid mapping that is crucial for being able to read the replicated document by guid (d1 api)
throw InvalidToken when the Session parameter is null for create()https://redmine.dataone.org/issues/1850
Once a CN calls replicate() on an MN, the MN needs to call getReplica() on the source MN (not get()). Once the bytes are retrieved, the MN must then call back to the CN with setReplicationStatus() to indicate that the replication status is complete. Modify MNodeService to do so.
Bug fix for access control rules coming in from the dataone system metadata. Previously, the code used getLocalId() to get the docid to insert into the XML access table, but that docid included the revision number (e.g., foo.1.1), which it shouldn't. Now use the AccessionNumber class to strip off the rev to get a real docid for insertion into the table.
allow the XML namespace to be given in both double and single quotes. The regex pattern was only looking for xmlns values that were in double quotes. This was brought to light by LTER:http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5497
set date uploaded and date system metadata updated date to current time when calling MN.create() and MN.update()
do not allow system metadata to have obsoletes or obsoletedBy fields when calling the create() method -- these are only allowed for updates so that we do not subvert object versioning by [un]knowingly submitting system metadata that directs one id to another.
View revisions
Also available in: Atom