Project

General

Profile

« Previous | Next » 

Revision 6229

Added by Chris Jones over 13 years ago

Implement MNRead.describe() in MNodeService.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
241 241
	public DescribeResponse describe(Session session, Identifier pid)
242 242
	  throws InvalidToken, ServiceFailure, NotAuthorized, NotFound,
243 243
	  NotImplemented, InvalidRequest {
244
    
245
  	if(session == null) {
246
      throw new InvalidToken("1370", "The session object is null");
247
      
248
    }
249
    
250
    if(pid == null || pid.getValue().trim().equals(""))
251
    {
252
      throw new InvalidRequest("1362", "The object identifier is null. " +
253
        "A valid identifier is required.");
254
        
255
    }
256
    
257
    SystemMetadata sysmeta = getSystemMetadata(session, pid);
258
    DescribeResponse describeResponse = 
259
    	new DescribeResponse(sysmeta.getObjectFormat(), 
260
      sysmeta.getSize(), sysmeta.getDateSysMetadataModified(), sysmeta.getChecksum());
261
    
262
    return describeResponse;
244 263

  
245
		return null;
246 264
	}
247 265

  
248 266
	/**

Also available in: Unified diff