TMAN ingest
Initial ingest
Call stored procedure tman.insert_asset
(https://git.yale.edu/cultural-heritage-dam/tman-database/blob/main/procedures/insert_asset.sql) to upload metadata of the asset to be ingested.
example:
call tman.insert_asset(
'login',
'YPM',
'filename.jpg',
'YPM/TEST',
'obj',
1,
0::smallint,
44,
'YPM_OPEN',
'bba8073f-6b9c-4f26-82c4-d13370b15544',
'99e901910347465d481994622de236df',
1::smallint,
'image/jpeg',
'017bfa8f-536b-4598-91b3-2ea2f858536b',
655811,
1,
'imagecredit',
'imagecaption',
'imagecopyright',
'copyrightinfourl',
'copyrightstatatus',
'usageterm',
'imagesource',
'headline',
'imagekeywords',
'jobidentifier',
'creator',
'creatorrole',
'imagetitle',
'instruction',
'bitdepth',
'colorprofile',
'imagesupplier',
'lens',
'lensmaker',
'lesmodel',
'seralnumber',
393,
383,
NULL::date,
NULL::date,
'tombstone',
0::smallint,
'N',
'P',
'N',
4096,
0,
0
)
Using stub files in NetX
Recycling an asset ID
For department to reuse a TMAN DB record for new asset, this record have to meet the following conditions: assetstatus.preservica_status=0, assetstatus.deleted=1 and assetstatus.deleteRequested=0
To ingest a new asset use such exist DB record, assign a new UUID to asset.uuid field, set assetstatus.netx_folderid to target netx folder, set assetstatus.preservica_colref to target preservice collection, set assetstatus.ingestrequested to 9.
CDS
Prerequisite
CDS only take and process the assets which get ingested into NetX successfully and current CDS and CDS2 status is not in error and not processing other requests. This requires assetstatus.netx_status
field has to be greater than 500 and smaller than 600. assetstatus.cds_status
has to be either null, 0, or 507.
Note: TMAN currently scans database every hour (roughly 6 or 7 minutes past each hour?) to pick up tasks for CDS2. So changes to database records may not trigger action for as long as an hour.
Create
Create will start if assetstatus.cdslevel_last_syn
is null or 0 and assets.cdslevel
> 0.
Update access level
CDS level change will start if assetstatus.cdslevel_last_syn
> 0 and assets.cdslevel
> 0 and assetstatus.cdslevel_last_syn
not equate to assets.cdslevel
.
Update metadata
Metadate update will start if assets.cds_meta_change
= 1. Please also set assetstatus.metadatasyncrequested = 1
when you implement CDS metadata update.
Delete
Delete will start if assetstatus.cdslevel_last_syn
> 0 and assets.cdslevel
= 0.
CDS2
Prerequisite
CDS2 only take and process the assets which get ingested into NetX successfully and current CDS and CDS2 status is not in error and not processing other requests. This requires assetstatus.netx_status
field has to be greater than 500 and smaller than 600. assetstatus.cds2_status
has to be either null, 0 or 807.
Note: TMAN currently scans database every hour (roughly 6 or 7 minutes past each hour?) to pick up tasks for CDS2. So changes to database records may not trigger action for as long as an hour.
Create
Create will start if, in assets table, ALL of cds_access_tiff_prev
, cds_access_master_prev
, cds_access_jpeg_prev
are equal to 'N' and ANY of cds_access_master
, cds_access_tiff
, cds_access_jpeg
is not equal to 'N'.
Update access level
Update will start if, in assets table,
cds_access_master <> cds_access_master_prev OR cds_access_tiff <> cds_access_tiff_prev OR cds_access_jpeg <> cds_access_jpeg_prev OR cds_maxsize_tiff <> cds_maxsize_tiff_prev OR cds_maxside_jpeg <> cds_maxside_jpeg_prev
Update metadata
Metadata update will start if, in assets table, cds_meta_change
= 1. Please also set assetstatus.metadatasyncrequested
= 1 when you implement CDS2 metadata update.
Delete
Delete will start if, in assets table, ANY of cds_access_tiff_prev
, cds_access_master_prev
, cds_access_jpeg_prev
is not equal to 'N' and ALL of cds_access_master
, cds_access_tiff
, cds_access_jpeg
are equal to 'N'.
0 Comments