Revision 6370
Added by ben leinfelder over 13 years ago
test/edu/ucsb/nceas/metacat/dataone/D1NodeServiceTest.java | ||
---|---|---|
35 | 35 |
import java.security.NoSuchAlgorithmException; |
36 | 36 |
import java.util.Date; |
37 | 37 |
|
38 |
import org.apache.commons.io.IOUtils; |
|
39 | 38 |
import org.dataone.client.ObjectFormatCache; |
40 |
import org.dataone.service.Constants; |
|
39 |
import org.dataone.service.util.Constants; |
|
40 |
import org.dataone.service.util.TypeMarshaller; |
|
41 | 41 |
import org.dataone.service.types.v1.util.ObjectFormatServiceImpl; |
42 | 42 |
import org.dataone.service.types.v1.AccessPolicy; |
43 | 43 |
import org.dataone.service.types.v1.AccessRule; |
... | ... | |
50 | 50 |
import org.dataone.service.types.v1.Session; |
51 | 51 |
import org.dataone.service.types.v1.Subject; |
52 | 52 |
import org.dataone.service.types.v1.SystemMetadata; |
53 |
import org.dataone.service.types.util.ServiceTypeUtil; |
|
54 | 53 |
|
55 | 54 |
import edu.ucsb.nceas.MCTestCase; |
56 | 55 |
import edu.ucsb.nceas.metacat.client.Metacat; |
... | ... | |
200 | 199 |
if (is == null) { |
201 | 200 |
ObjectFormatList formats = ObjectFormatServiceImpl.getInstance().listFormats(); |
202 | 201 |
ByteArrayOutputStream out = new ByteArrayOutputStream(); |
203 |
ServiceTypeUtil.serializeServiceType(ObjectFormatList.class, formats, out);
|
|
202 |
TypeMarshaller.marshalTypeToOutputStream(formats, out);
|
|
204 | 203 |
Reader xmlDocument = new InputStreamReader(new ByteArrayInputStream(out.toByteArray())); |
205 | 204 |
m.insert(ObjectFormatService.OBJECT_FORMAT_DOCID + ".1", xmlDocument, null); |
206 | 205 |
} |
Also available in: Unified diff
refactor Constants and ServiceTypeUtil