Project

General

Profile

« Previous | Next » 

Revision 9290

Added by Jing Tao over 8 years ago

Only support the application/bagit format in the getPackage method.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
1985 1985
	public InputStream getPackage(Session session, ObjectFormatIdentifier formatId,
1986 1986
			Identifier pid) throws InvalidToken, ServiceFailure,
1987 1987
			NotAuthorized, InvalidRequest, NotImplemented, NotFound {
1988
	    
1988
	    if(formatId == null) {
1989
	        throw new InvalidRequest("2873", "The format type can't be null in the getpackage method.");
1990
	    } else if(!formatId.getValue().equals("application/bagit")) {
1991
	        throw new NotImplemented("", "The format "+formatId.getValue()+" is not supported in the getpackage method");
1992
	    }
1989 1993
	    String serviceFailureCode = "2871";
1990 1994
	    Identifier sid = getPIDForSID(pid, serviceFailureCode);
1991 1995
	    if(sid != null) {

Also available in: Unified diff