Defining Custom UploadTags - DAM v4.8.0
1 Process overview
ProcessUpload or ProcessReIdentify WebService methods identify the Upload as usual.
All defined UploadTags are parsed against the asset_information.infoxml document
A batchUpdate call is prepared from AssetType, Upload ItemID and UploadTag/value Dictionary
BatchUpdate WebService is called.
2 UploadTag definition
Uploadtagname_defintion table
Column | DataType | Description |
|---|---|---|
uploadtagname_definitionid | int | Primary key |
uploadtagname | string | uploadTagname |
xpath | string | Xpath used to extract the tag value |
xmlnamespaces | string | Xmlnamespaces needed by Xpath. Space seperated list of xml namespace definitions: xmlns:rdf="rdf namespace url" xmlns:iptc="iptc namespace url" |
functionname | string | (Optional) function name |
functionrequireduploadtagnames | string | Tags that should have already been parsed before this tag is processed |
enabled | bit | Is this uploadTag enabled |
systemDefined | bit | Is this uploadTag defined by Digizuite |
3 Defining custom uploadtags
Important: Custom tags that clash with future updates of DAM Center will be renamed to <tagname>RENAMED<GUID>.
To avoid this, always start custom tags with custom: and set systemDefined to 0.
4 Defined functions DigiZuiteLogic\UploadInformation\Bll\TagFunctions.bll.cs
If requiredTags contains uploadtags, the first tag is used as the argument source for the function, otherwise the Xpath is used as the argument source.
ShortestString - Selects shortest string
LongestString - Selects longest string
SelectInt - Selects values which contain only numbers that match the regular expression:
"^\s*\d+\s*$"SelectNonInt - Selects values that do not match SelectInt
"^\s*\d+\s*$"SelectIntFromStart - Selects values which begin with numbers that match the regular expression:
"^\s*\d+.*$"Only the number part is returned.
Example: 1234kb would be returned as 1234
SelectDecimal - Selects values which can be parsed as decimal
SelectAspect - Selects all values that match the regular expression:
"^\s*\d+[\:/]\d+\s*$"Example: 16/9 or 4:3
SelectDuration - Selects all values that match the regular expression:
@"(?n:^(?=\d)(?<time>(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d):(?<seconds>[0-5]\d)\.(?<milliseconds>\d{3}))$)"Example: 23:59:59.120
SelectChannelPositions - Selects all values that match the regular expression:
@"^\s*\d+(?:\.\d+)?/\d+(?:\.\d+)?/\d+(?:\.\d+)?\s*$"Example: 2/0/0 or 5/2/1.1
ValueCount - Returns count of values
JoinBySemicolon - Returns values joined by semicolons as a single string
JoinBySpace - Returns values joined by spaces as a single string
JoinByComma - Returns values joined by commas as a single string
JoinByForwardSlash - Returns values joined by forward slashes as a single string
JoinByBackSlash - Returns values joined by back slashes as a single string
JoinByCrLf - Returns values joined by forward carrier linefeeds as a single string
JoinByVerticalbar - Returns values joined by vertical bar | as a single string
SplitBySemicolon - Returns a list of values Split by semicolon
SplitBySpace - Returns a list of values Split by space
SplitByComma - Returns a list of values Split by Comma
SplitByCrLf - Returns a list of values Split by carrier linefeeds
SplitByForwardSlash - Returns a list of values Split by Forward slash
SplitByBackSlash - Returns a list of values Split by Back slash
SplitByVerticalbar - Returns a list of values Split by Vertical Bar |
WidthFromGeometry - Return the width from the Imagemagick geometry value
HeightFromGeometry - Returns the height from the Imagemagick geometry value
XOffsetFromGeometry - Returns the X-Offset from the Imagemagick geometry value
YOffsetFromGeometry - Returns the Y-Offset from the Imagemagick geometry value
DpiXFromResolution - Returns the x part of the resolution (96x96)
DpiYFromResolution - Returns the y part of the resolution (96x96)
RoundVideoRotation - Returns the rotation rounded to nearest 90°