Class SetField
Writes a new value to a field of an asset.
Defined in: setField.js.
Constructor Attributes | Constructor Name and Description |
---|---|
SetField(src, fieldId)
Writes a new value to a field of an asset.
|
Class Detail
SetField(src, fieldId)
Writes a new value to a field of an asset.
Locates assets by the list of AssetID's in 'src', overwrites the field given in the 'field' parameter with the value 'value' parameter, and returns the new metadata value. These AssetIDs are parsed into a text object keyed by AssetID from the JSON file in which they are contained, and by default are displayed to the user.
'MBurl'/wf/setField?src=['AssetID']&schema='Schema'&field='Field'&value='Value'
http://127.0.0.1:55555/wf/setField?src=["12345"]&fieldId="http://purl.org/dc/elements/1.1/ title"&value="a new value for Dublin Core title"
- Parameters:
- src
- AssetID/list of AssetIDs of asset/assets containing field to be overwritten.
- fieldId
- ex http://purl.org/dc/elements/1.1/ subject
- Returns:
- ( {'AssetID': "New Field Value",...} )