resqpy.surface.BaseSurface¶
- class resqpy.surface.BaseSurface(model, uuid=None, title=None, originator=None, extra_metadata=None)¶
Bases:
BaseResqpy
Base class to implement shared methods for other classes in this module.
Public Data Attributes:
Inherited from
BaseResqpy
Definition 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:
create_interpretation_and_feature
([kind, ...])Creates xml and objects for a represented interpretaion and interpreted feature, if not already present.
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__(model, uuid=None, title=None, originator=None, extra_metadata=None)¶
Load an existing resqml object, or create new.
- Parameters
model (resqpy.model.Model) – Parent model
uuid (str, optional) – Load from existing uuid (if given), else create new.
title (str, optional) – Citation title
originator (str, optional) – Creator of object. By default, uses user id.
- 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_interpretation_and_feature(kind='horizon', name=None, interp_title_suffix=None, is_normal=True)[source]¶
Creates xml and objects for a represented interpretaion and interpreted feature, if not already present.
- create_xml(title=None, originator=None, extra_metadata=None, add_as_part=False)¶
Write citation block to XML.
Note
add_as_part is False by default in this base method. Derived classes should typically extend this method to complete the XML representation, and then finally ensure the node is added as a part to the model.
- Parameters
title (string) – used as the citation Title text
originator (string, optional) – the name of the human being who created the deviation survey part; default is to use the login name
extra_metadata (dict, optional) – extra metadata items to be added
add_as_part (boolean) – if True, the newly created xml node is added as a part in the model
- Returns
node – the newly created root node
- property part¶
Standard part name corresponding to self.uuid.
- abstract property resqml_type¶
Definition of which RESQML object the class represents.
Subclasses must overwrite this abstract attribute.
- 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