public class SystemMetadataDaoMetacatImpl extends Object implements SystemMetadataDao
Modifier and Type | Class and Description |
---|---|
class |
SystemMetadataDaoMetacatImpl.AccessRuleMapper
A class to map access control entry results into AccessRule objects to populate the
AccessPolicy section of SystemMetadata objects
|
class |
SystemMetadataDaoMetacatImpl.ReplicaEntryMapper
A class to map replica entry list results into ReplicayEntry data transfer objects
|
class |
SystemMetadataDaoMetacatImpl.ReplicationPolicyEntryMapper
A class to map replication policy list results into ReplicationPolicyEntry data transfer objects
|
class |
SystemMetadataDaoMetacatImpl.SystemMetadataMapper
A class used to map system metadata status results into SystemMetadata data transfer objects
|
class |
SystemMetadataDaoMetacatImpl.SystemMetadataStatusMapper
A class used to map system metadata status results into SystemMetadataStatus data transfer objects
|
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_TABLE |
protected static int |
documentIdCounter |
static String |
IDENTIFIER_TABLE |
static String |
SM_POLICY_TABLE |
static String |
SM_STATUS_TABLE |
static String |
SYSMETA_TABLE |
protected static Map<String,String> |
tableMap |
Constructor and Description |
---|
SystemMetadataDaoMetacatImpl()
Constructor.
|
SystemMetadataDaoMetacatImpl(DataSource dataSource)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
convertPermission(org.dataone.service.types.v1.Permission permission)
Convert string-based permission values to Metacat integer-based values
|
protected Map<String,Object> |
extractSystemMetadataAttrs(org.dataone.service.types.v2.SystemMetadata systemMetadata,
String tableName)
Returns a map of attribute names and values to be used in the statement
to update the given systemmetadata table
|
protected int[] |
getSysMetaAttrTypes()
Returns the attribute types for the systemmetadata table as an int array
|
protected Object[] |
getSysMetaAttrValues(Map<String,Object> sysMetaMap)
Returns the values from the given map as an Object array
|
protected String |
getSysMetaUpdateStatement(String sysMetaTable)
Builds a SQL update statement for use against the systemmetadata table
|
org.dataone.service.types.v2.SystemMetadata |
getSystemMetadata(org.dataone.service.types.v1.Identifier pid)
Get a systemMetadata object for a given Identifier, using the given JdbcTemplate and map of
system metadata table names.
|
org.dataone.service.types.v2.SystemMetadata |
getSystemMetadata(org.dataone.service.types.v1.Identifier pid,
Map<String,String> tableMap) |
int |
getSystemMetadataCount()
Get the total count of the system metadata records in the database
|
int |
getSystemMetadataCount(Map<String,String> tableMap) |
List<SystemMetadataStatus> |
listSystemMetadataStatus(int pageNumber,
int pageSize)
List object status information with SystemMetadata in the database
|
List<SystemMetadataStatus> |
listSystemMetadataStatus(int pageNumber,
int pageSize,
Map<String,String> tableMap) |
org.dataone.service.types.v1.Identifier |
saveSystemMetadata(org.dataone.service.types.v2.SystemMetadata systemMetadata,
Map<String,String> tableMap)
Saves the given system metadata to the tables indicated in the tableMap
|
protected Boolean |
updateSystemMetadata(org.dataone.service.types.v2.SystemMetadata sysMeta,
Map<String,String> tableMap)
Update the given system metadata using the provided table map.
|
protected static int documentIdCounter
public static final String IDENTIFIER_TABLE
public static final String SYSMETA_TABLE
public static final String SM_POLICY_TABLE
public static final String SM_STATUS_TABLE
public static final String ACCESS_TABLE
public SystemMetadataDaoMetacatImpl()
public SystemMetadataDaoMetacatImpl(DataSource dataSource)
public int getSystemMetadataCount() throws DataAccessException
SystemMetadataDao
getSystemMetadataCount
in interface SystemMetadataDao
DataAccessException
public List<SystemMetadataStatus> listSystemMetadataStatus(int pageNumber, int pageSize) throws DataAccessException
SystemMetadataDao
listSystemMetadataStatus
in interface SystemMetadataDao
DataAccessException
public org.dataone.service.types.v2.SystemMetadata getSystemMetadata(org.dataone.service.types.v1.Identifier pid) throws DataAccessException
SystemMetadataDao
getSystemMetadata
in interface SystemMetadataDao
DataAccessException
public int getSystemMetadataCount(Map<String,String> tableMap) throws DataAccessException
DataAccessException
public List<SystemMetadataStatus> listSystemMetadataStatus(int pageNumber, int pageSize, Map<String,String> tableMap) throws DataAccessException
DataAccessException
public org.dataone.service.types.v2.SystemMetadata getSystemMetadata(org.dataone.service.types.v1.Identifier pid, Map<String,String> tableMap) throws DataAccessException
public org.dataone.service.types.v1.Identifier saveSystemMetadata(org.dataone.service.types.v2.SystemMetadata systemMetadata, Map<String,String> tableMap) throws DataAccessException
DataAccessException
org.dataone.cn.dao.SystemMetadataDao#saveSystemMetadata(org.dataone.service.types.v1.SystemMetadata)
protected Boolean updateSystemMetadata(org.dataone.service.types.v2.SystemMetadata sysMeta, Map<String,String> tableMap) throws DataAccessException
sysMeta
- tableMap
- DataAccessException
protected Map<String,Object> extractSystemMetadataAttrs(org.dataone.service.types.v2.SystemMetadata systemMetadata, String tableName)
systemMetadata
- tableName
- DataAccessException
protected String getSysMetaUpdateStatement(String sysMetaTable)
sysMetaTable
- protected Object[] getSysMetaAttrValues(Map<String,Object> sysMetaMap)
sysMetaMap
- protected int[] getSysMetaAttrTypes()
public int convertPermission(org.dataone.service.types.v1.Permission permission)
permission
- Copyright © 2020. All rights reserved.