Skip to main content

Option Objects

Base class for shared Option fields

NestableOption Objects

add_nested_option

This method is deprecated, please use add_nested_attribute() instead. There is no functional difference between these methods.

add_nested_attribute

Adds a nested attribute to a RadioAttribute option. Arguments:
  • cls - attribute type, one of RadioAttribute, ChecklistAttribute, TextAttribute
  • name - the user-visible name of the attribute
  • local_uid - integer identifier of the attribute. Normally auto-generated; omit this unless the aim is to create an exact clone of existing ontology
  • feature_node_hash - global identifier of the object. Normally auto-generated; omit this unless the aim is to create an exact clone of existing ontology
  • required - whether the label editor would mark this attribute as ‘required’
Returns: the created attribute that can be further specified with Options, where appropriate Raises:
  • ValueError - if specified local_uid or feature_node_hash violate uniqueness constraints