Revision 8362
Added by ben leinfelder about 11 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
26 | 26 |
import java.io.ByteArrayInputStream; |
27 | 27 |
import java.io.ByteArrayOutputStream; |
28 | 28 |
import java.io.File; |
29 |
import java.io.FileInputStream; |
|
30 | 29 |
import java.io.FileOutputStream; |
31 | 30 |
import java.io.IOException; |
32 | 31 |
import java.io.InputStream; |
... | ... | |
55 | 54 |
import org.apache.commons.beanutils.BeanUtils; |
56 | 55 |
import org.apache.commons.io.IOUtils; |
57 | 56 |
import org.apache.log4j.Logger; |
58 |
import org.apache.wicket.protocol.http.mock.MockHttpServletRequest; |
|
59 | 57 |
import org.dataone.client.CNode; |
60 | 58 |
import org.dataone.client.D1Client; |
61 | 59 |
import org.dataone.client.MNode; |
... | ... | |
1686 | 1684 |
newOreIdentifier, |
1687 | 1685 |
oreSysMeta); |
1688 | 1686 |
|
1687 |
} else { |
|
1688 |
// create a new ORE for them |
|
1689 |
// https://projects.ecoinformatics.org/ecoinfo/issues/6194 |
|
1690 |
try { |
|
1691 |
// find the local id for the NEW package. |
|
1692 |
String newLocalId = IdentifierManager.getInstance().getLocalId(newIdentifier.getValue()); |
|
1693 |
|
|
1694 |
@SuppressWarnings("unused") |
|
1695 |
SystemMetadata extraSysMeta = SystemMetadataFactory.createSystemMetadata(newLocalId, true, false); |
|
1696 |
// should be done generating the ORE here |
|
1697 |
|
|
1698 |
} catch (Exception e) { |
|
1699 |
// oops, guess there was a problem - no package for you |
|
1700 |
logMetacat.error("Could not generate new ORE for published object: " + newIdentifier.getValue(), e); |
|
1701 |
} |
|
1689 | 1702 |
} |
1690 | 1703 |
} catch (McdbDocNotFoundException e) { |
1691 | 1704 |
// report as service failure |
Also available in: Unified diff
generate ORE object when publishing even if there was not an ORE for the original package. https://projects.ecoinformatics.org/ecoinfo/issues/6194