Project

General

Profile

« Previous | Next » 

Revision 9046

Added by Jing Tao about 10 years ago

Add the code the check if the format of the sid is valid in the system metadata.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
389 389
            //check the sid in the system metadata. If it exists, it should be non-exist or match the old sid in the previous system metadata.
390 390
            Identifier sidInSys = sysmeta.getSeriesId();
391 391
            if(sidInSys != null) {
392
                if (!isValidIdentifier(sidInSys)) {
393
                    throw new InvalidSystemMetadata("1300", "The provided series id in the system metadata is invalid.");
394
                }
392 395
                Identifier previousSid = existingSysMeta.getSeriesId();
393 396
                if(previousSid != null) {
394 397
                    // there is a previous sid, if the new sid doesn't match it, the new sid should be non-existing.

Also available in: Unified diff