Project

General

Profile

« Previous | Next » 

Revision 6808

process the current revision, not the latest!
use direct object/system metadata insertion for ORE maps.

View differences:

src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java
122 122
		// create system metadata for the document
123 123
		SystemMetadata sysMeta = new SystemMetadata();
124 124
		sysMeta.setSerialVersion(BigInteger.valueOf(1));
125
		int rev = IdentifierManager.getInstance().getLatestRevForLocalId(localId);
126 125
		AccessionNumber accNum = new AccessionNumber(localId, "NONE");
126
		int rev = Integer.valueOf(accNum.getRev());
127

  
127 128
		String guid = null;
128 129
		try {
129 130
			// get the guid if it exists
......
502 503
							Session session = new Session();
503 504
							session.setSubject(submitter);
504 505
							MockHttpServletRequest request = new MockHttpServletRequest(null, null, null);
505
							MNodeService.getInstance(request).create(
506
									session, 
507
									resourceMapId, 
508
									IOUtils.toInputStream(resourceMapXML, MetaCatServlet.DEFAULT_ENCODING), 
509
									resourceMapSysMeta);
506
							MNodeService.getInstance(request).insertDataObject(IOUtils.toInputStream(resourceMapXML, MetaCatServlet.DEFAULT_ENCODING), resourceMapId, session);
507
							MNodeService.getInstance(request).insertSystemMetadata(resourceMapSysMeta);
510 508
			        	}
511 509
			        }
512 510
				}

Also available in: Unified diff