fcsxml.FCSXMLField

class fcsxml.FCSXMLField(name='', value='', dataType='', dbname='', dbDataType='')[source]

This object is representative of a field in Final Cut Server. It is used to store field name, the underlying FCS database field name, and the field value. This object provides basic data sanity checking and data formatting.

Parameters:
  • name (str) – The field display name.
  • value (id) – The field value
  • dataType (str) – The field datatype
  • dbname (str) – The underlying Final Cut Server database field
  • dbDataType (str) – The underlying Final Cut Server field datatype
Raises :

fcsxml.FCSValidationError

Note

If both are specified provided, The value dbDataType will take presidence over the provided dataType.

printInfo()[source]

Output basic field info, including name, stored value, datatype, dbDataType, and dbname.

Returns:(str) – Basic field information
setDBDataType(dbDataType)[source]

This method will set this field to the represent specified dbDataType (The underlying Final Cut Server database field name). This method will also populate the value for dataType based upon the provided value. Please refer to table shown in fcsxml.FCSXMLField.setDataType() for acceptable dbDataType values.

Parameters:dbDataType (str) – The datatype to set for this field.
Raises :fcsxml.FCSValidationError

Note

KtAtom and KtAtomList datatypes are not supported.

setDataType(dataType)[source]

This method will set this field to the specified dataType. It will also populate the value for dbDataType based upon the provided value.

Parameters:dataType (str) – The datatype to set for this field.
Raises :RuntimeError

The following table shows acceptable datatypes and their corresponding Final Cut Server data types.

DataType Final Cut Server Data Type (dbDataType)
string KtString32
varchar KtString
int KtInt
integer KtInt
int64 KtInt64
bigint KtInt64
dateTime KtDateTime
timestamp KtDateTime
timecode PxTimecode
float KtReal
coords KtIntXY
fraction KtFraction
bool KtBool
list KtMdValueMap
setValue(newValue)[source]

Method which will set our field’s internal value. This method will perform validation checking and enforce conformity when appropriate.

Parameters:newValue (id) – The new value to assign to the field.
Raises :fcsxml.FCSValidationError

Previous topic

fcsxml.FCSBaseObject

Next topic

fcsxml.FCSXMLObject

This Page