resqpy.strata.StratigraphicColumn
- class resqpy.strata.StratigraphicColumn(parent_model, uuid=None, rank_uuid_list=None, title=None, extra_metadata=None)
Bases:
BaseResqpyClass for RESQML stratigraphic column objects.
RESQML documentation:
A global interpretation of the stratigraphy, which can be made up of several ranks of stratigraphic unit interpretations.
All stratigraphic column rank interpretations that make up a stratigraphic column must be ordered by age.
Public Data Attributes:
resqml_typeInherited from
BaseResqpyDefinition of which RESQML object the class represents.
Standard part name corresponding to self.uuid.
XML node corresponding to self.uuid.
Citation block title equivalent to self.title.
Methods:
__init__(parent_model[, uuid, ...])Initialises a Stratigraphic Column object.
Yields the stratigraphic column ranks which constitute this stratigraphic colunn.
add_rank(rank)Adds another stratigraphic column rank to this stratigraphic column.
is_equivalent(other[, check_extra_metadata])Returns True if this interpretation is essentially the same as the other; otherwise False.
create_xml([add_as_part, add_relationships, ...])Creates xml tree for a stratigraphic column object.
Inherited from
BaseResqpy__init__(model[, uuid, title, originator, ...])Load an existing resqml object, or create new.
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
create_xml([title, originator, ...])Write citation block to XML.
append_extra_metadata(meta_dict)Append a given dictionary of metadata to the existing metadata.
__eq__(other)Implements equals operator; uses is_equivalent() otherwise compares class type and uuid.
__ne__(other)Implements not equal operator.
__repr__()String representation.
- __init__(parent_model, uuid=None, rank_uuid_list=None, title=None, extra_metadata=None)[source]
Initialises a Stratigraphic Column object.
- Parameters:
parent_model (
model.Model) – the model with which the new stratigraphic column will be associateduuid (
uuid.UUID, optional) – the uuid of an existing RESQML stratigraphic column from which this object will be initialisedrank_uuid_list (
listofuuid, optional) – if not initialising for an existing stratigraphic column, the ranks can be established from this list of uuids for existing stratigraphic column ranks; ranks should be ordered from geologically oldest to youngest with increasing index valuestitle (
str, optional) – the citation title of the new stratigraphic column; ignored if uuid is not Noneextra_metadata (
dict, optional) – extra metadata items for the new feature
- add_rank(rank)[source]
Adds another stratigraphic column rank to this stratigraphic column.
- Parameters:
rank (
StratigraphicColumnRank) – an established rank to be added to this stratigraphic column
Note
ranks should be ordered from geologically oldest to youngest, with increasing index values
- append_extra_metadata(meta_dict)
Append a given dictionary of metadata to the existing metadata.
- property citation_title
Citation block title equivalent to self.title.
- create_xml(add_as_part=True, add_relationships=True, originator=None, reuse=True)[source]
Creates xml tree for a stratigraphic column object.
- Parameters:
add_as_part (
bool, defaultTrue) – if True, the stratigraphic column is added to the parent model as a high level partadd_relationships (
bool, defaultTrue) – if True and add_as_part is True, a relationship is created with each of the referenced stratigraphic column rank interpretationsoriginator (
str, optional) – if present, is used as the originator field of the citation blockreuse (
bool, defaultTrue) – if True, the parent model is inspected for any equivalent stratigraphic column and, if found, the uuid of this stratigraphic column is set to that of the equivalent part
- Returns:
lxml.etree._Element – the root node of the newly created xml tree for the stratigraphic column
- is_equivalent(other, check_extra_metadata=True)[source]
Returns True if this interpretation is essentially the same as the other; otherwise False.
- Parameters:
other (
StratigraphicColumn) – the other stratigraphic column to compare this one againstcheck_extra_metadata (
bool, defaultTrue) – if True, then extra metadata items must match for the two columns to be deemed equivalent; if False, extra metadata is ignored in the comparison
- Returns:
bool – True if this stratigraphic column is essentially the same as the other; False otherwise
- iter_ranks()[source]
Yields the stratigraphic column ranks which constitute this stratigraphic colunn.
- property part
Standard part name corresponding to self.uuid.
- property root
XML node corresponding to self.uuid.
- try_reuse()
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
- Returns:
boolean – True if an equivalent object was found, False if not
Note
by design this method may change this object’s uuid as a side effect
- title
Citation title
- originator
Creator of object. By default, user id.
- uuid
Unique identifier