pygplates.EnumerationType

class pygplates.EnumerationType

Bases: Boost.Python.instance

The namespace-qualified type of an enumeration.

All comparison operators (==, !=, <, <=, >, >=) are supported. EnumerationType is hashable (can be used as a key in a dict).

__init__()

Raises an exception This class cannot be instantiated from Python

Methods

__init__ Raises an exception
create_from_qualified_string(name) [staticmethod] Creates a EnumerationType instance from a fully qualified name string.
create_gpml(name) [staticmethod] Create an enumeration type qualified with the gpml: prefix (gpml: + name).
get_name() Returns the unqualified name.
get_namespace() Returns the namespace URI.
get_namespace_alias() Returns the namespace alias.
to_qualified_string() Returns the fully qualified name.
create_from_qualified_string(name)

[staticmethod] Creates a EnumerationType instance from a fully qualified name string.

Parameters:name (string) – qualified name
Return type:EnumerationType or None

The name string should have a : character separating the namespace alias from the unqualified name, for example gpml:SubductionPolarityEnumeration. If the namespace alias is not recognised (as gpml, gml or xsi) then gpml is assumed.

An over-qualified name string (eg, containing two or more : characters) will result in None being returned.

enumeration_type = pygplates.EnumerationType.create_from_qualified_string('gpml:SubductionPolarityEnumeration')
create_gpml(name)

[staticmethod] Create an enumeration type qualified with the gpml: prefix (gpml: + name).

Parameters:name (string) – unqualified name
Return type:EnumerationType
gpml_subduction_polarity_enumeration_type = pygplates.EnumerationType.create_gpml('SubductionPolarityEnumeration')
get_name()

Returns the unqualified name.

Return type:string

This is the fully qualified name minus the gpml: prefix (if created with create_gpml()).

For example, SubductionPolarityEnumeration.

get_namespace()

Returns the namespace URI.

Return type:string

For example, the gpml namespace alias has the namespace http://www.gplates.org/gplates.

get_namespace_alias()

Returns the namespace alias.

Return type:string

For example, gpml (if created with create_gpml()).

to_qualified_string()

Returns the fully qualified name.

Return type:string

For example, gpml:SubductionPolarityEnumeration.

Previous topic

pygplates.Vector3D

Next topic

pygplates.FeatureId

This Page