Project

General

Profile

« Previous | Next » 

Revision 9037

Added by Jing Tao almost 10 years ago

Implement the series id in the getSystemMetadata method.

View differences:

src/edu/ucsb/nceas/metacat/dataone/v1/MNodeService.java
344 344
	public SystemMetadata getSystemMetadata(Session session, Identifier pid)
345 345
			throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure,
346 346
			NotFound {
347
	    String serviceFailure = "1090";
348
        String notFound = "1060";
349
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
350
                "No system metadata could be found for given PID: "+pid.getValue());
347 351
		org.dataone.service.types.v2.SystemMetadata sysMeta = impl.getSystemMetadata(session, pid);
348 352
		SystemMetadata retSysMeta = null;
349 353
		try {
src/edu/ucsb/nceas/metacat/dataone/v1/CNodeService.java
259 259
	public SystemMetadata getSystemMetadata(Identifier pid)
260 260
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
261 261
			NotImplemented {
262
	    String serviceFailure = "1090";
263
        String notFound = "1060";
264
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
265
                "No system metadata could be found for given PID: "+pid.getValue());
262 266
		return impl.getSystemMetadata(null, pid);
263 267
	}
264 268

  
......
267 271
	public SystemMetadata getSystemMetadata(Session session, Identifier pid)
268 272
			throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
269 273
			NotImplemented {
274
	    String serviceFailure = "1090";
275
        String notFound = "1060";
276
        impl.checkV1SystemMetaPidExist(pid, serviceFailure, "The system metadata for given PID "+pid.getValue()+" couldn't be identified if it exists",  notFound, 
277
                "No system metadata could be found for given PID: "+pid.getValue());
270 278
		return impl.getSystemMetadata(session, pid);
271 279
	}
272 280

  
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
658 658
        throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
659 659
        NotImplemented {
660 660

  
661
        String serviceFailureCode = "1090";
662
        Identifier sid = getPIDForSID(pid, serviceFailureCode);
663
        if(sid != null) {
664
            pid = sid;
665
        }
661 666
        boolean isAuthorized = false;
662 667
        SystemMetadata systemMetadata = null;
663 668
        List<Replica> replicaList = null;

Also available in: Unified diff