public class SystemMetadataFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESOURCE_MAP_PREFIX |
Constructor and Description |
---|
SystemMetadataFactory() |
Modifier and Type | Method and Description |
---|---|
static org.dataone.service.types.v2.SystemMetadata |
createSystemMetadata(boolean indexDataFile,
java.lang.String localId,
boolean includeORE,
boolean downloadData)
Creates a system metadata object for insertion into metacat
|
static org.dataone.service.types.v2.SystemMetadata |
createSystemMetadata(java.lang.String localId,
boolean includeORE,
boolean downloadData)
Create a system metadata object for insertion into metacat
|
static void |
generateSystemMetadata(java.util.List<java.lang.String> idList,
boolean includeOre,
boolean downloadData)
Generate SystemMetadata for any object in the object store that does
not already have it.
|
protected static org.dataone.service.types.v1.ReplicationPolicy |
getDefaultReplicationPolicy()
Create a default ReplicationPolicy by reading properties from metacat's configuration
and using those defaults.
|
static boolean |
oreExistsFor(org.dataone.service.types.v1.Identifier identifier)
Checks for potential ORE object existence
|
static long |
sizeOfStream(java.io.InputStream is)
Find the size (in bytes) of a stream.
|
public static final java.lang.String RESOURCE_MAP_PREFIX
public static org.dataone.service.types.v2.SystemMetadata createSystemMetadata(java.lang.String localId, boolean includeORE, boolean downloadData) throws McdbException, McdbDocNotFoundException, java.sql.SQLException, java.io.IOException, AccessionNumberException, java.lang.ClassNotFoundException, InsufficientKarmaException, edu.ucsb.nceas.utilities.ParseLSIDException, edu.ucsb.nceas.utilities.PropertyNotFoundException, org.dataone.service.exceptions.BaseException, java.security.NoSuchAlgorithmException, org.dataone.exceptions.MarshallingException, AccessControlException, HandlerException, org.xml.sax.SAXException, AccessException
localId
- includeORE
- downloadData
- McdbException
McdbDocNotFoundException
java.sql.SQLException
java.io.IOException
AccessionNumberException
java.lang.ClassNotFoundException
InsufficientKarmaException
edu.ucsb.nceas.utilities.ParseLSIDException
edu.ucsb.nceas.utilities.PropertyNotFoundException
org.dataone.service.exceptions.BaseException
java.security.NoSuchAlgorithmException
org.dataone.exceptions.MarshallingException
AccessControlException
HandlerException
org.xml.sax.SAXException
AccessException
public static org.dataone.service.types.v2.SystemMetadata createSystemMetadata(boolean indexDataFile, java.lang.String localId, boolean includeORE, boolean downloadData) throws McdbException, McdbDocNotFoundException, java.sql.SQLException, java.io.IOException, AccessionNumberException, java.lang.ClassNotFoundException, InsufficientKarmaException, edu.ucsb.nceas.utilities.ParseLSIDException, edu.ucsb.nceas.utilities.PropertyNotFoundException, org.dataone.service.exceptions.BaseException, java.security.NoSuchAlgorithmException, org.dataone.exceptions.MarshallingException, AccessControlException, HandlerException, org.xml.sax.SAXException, AccessException
indexDataFile
- Indicate if we need to index data file.localId
- The local document identifieruser
- The user submitting the system metadata documentgroups
- The groups the user belongs toorg.xml.sax.SAXException
HandlerException
AccessControlException
AccessException
McdbException
McdbDocNotFoundException
java.sql.SQLException
java.io.IOException
AccessionNumberException
java.lang.ClassNotFoundException
InsufficientKarmaException
edu.ucsb.nceas.utilities.ParseLSIDException
edu.ucsb.nceas.utilities.PropertyNotFoundException
org.dataone.service.exceptions.BaseException
java.security.NoSuchAlgorithmException
org.dataone.exceptions.MarshallingException
public static boolean oreExistsFor(org.dataone.service.types.v1.Identifier identifier)
identifier
- public static void generateSystemMetadata(java.util.List<java.lang.String> idList, boolean includeOre, boolean downloadData) throws edu.ucsb.nceas.utilities.PropertyNotFoundException, java.security.NoSuchAlgorithmException, AccessionNumberException, java.sql.SQLException, AccessControlException, AccessException, McdbException, java.io.IOException, java.lang.ClassNotFoundException, InsufficientKarmaException, edu.ucsb.nceas.utilities.ParseLSIDException, org.dataone.service.exceptions.BaseException, org.dataone.exceptions.MarshallingException, HandlerException, org.xml.sax.SAXException
idList
- includeOre
- downloadData
- edu.ucsb.nceas.utilities.PropertyNotFoundException
java.security.NoSuchAlgorithmException
AccessionNumberException
java.sql.SQLException
org.xml.sax.SAXException
HandlerException
org.dataone.exceptions.MarshallingException
org.dataone.service.exceptions.BaseException
edu.ucsb.nceas.utilities.ParseLSIDException
InsufficientKarmaException
java.lang.ClassNotFoundException
java.io.IOException
McdbException
AccessException
AccessControlException
public static long sizeOfStream(java.io.InputStream is) throws java.io.IOException
is
- The InputStream of bytesjava.io.IOException
protected static org.dataone.service.types.v1.ReplicationPolicy getDefaultReplicationPolicy()
Copyright © 2020 Regents of the University of California. All Rights Reserved.