pygplates.Enumeration

class pygplates.Enumeration

Bases: pygplates.PropertyValue

A property value that represents a finite set of accepted (string) values per enumeration type.

__init__(type, content[, verify_information_model=VerifyInformationModel.yes])

Create an enumeration property value from an enumeration type and content (value).

Parameters
  • type (EnumerationType) – the type of the enumeration

  • content (string) – the content (value) of the enumeration

  • verify_information_model (VerifyInformationModel.yes or VerifyInformationModel.no) – whether to check the information model for valid enumeration type and content

Raises

InformationModelError if verify_information_model is VerifyInformationModel.yes and either type is not a recognised enumeration type or content is not a valid value for type

dip_slip_enum = pygplates.Enumeration(
    pygplates.EnumerationType.create_gpml('DipSlipEnumeration'),
    'Extension')

Methods

__init__(type, content, ...)

Create an enumeration property value from an enumeration type and content (value).

accept_visitor(visitor)

Accept a property value visitor so that it can visit this property value.

clone()

Create a duplicate of this property value (derived) instance, including a recursive copy of any nested property values that this instance might contain.

get_content()

Returns the content (value) of this enumeration.

get_geometry()

Extracts the geometry if this property value contains a geometry.

get_type()

Returns the type of this enumeration.

get_value([time=0])

Extracts the value, of this possibly time-dependent property value, at the reconstruction time.

set_content(content, ...)

Sets the content (value) of this enumeration.

get_content()

Returns the content (value) of this enumeration.

Return type

string

get_type()

Returns the type of this enumeration.

Return type

EnumerationType

set_content(content[, verify_information_model=VerifyInformationModel.yes])

Sets the content (value) of this enumeration.

Parameters
  • content (string) – the content (value)

  • verify_information_model (VerifyInformationModel.yes or VerifyInformationModel.no) – whether to check the information model for valid enumeration value

Raises

InformationModelError if verify_information_model is VerifyInformationModel.yes and content is not a valid value for this enumeration type

dip_slip_enum.set_content('Extension')