GXMETA class¶
-
class
GXMETA
(handle=0)¶ GXMETA class.
A
GXMETA
object contains hierarchical organized metadata of any type, including other objects.GXMETA
information is organized in an XML-like structure based on a data schema that describes the data hierarchy.GXMETA
objects are used by many entities that need to store metadata specific to the entities or to the application.Metadata can be saved in databases and maps, as well as in channels, lines, views and groups. Oasis montaj objects can be queried for their associated metadata, and if it exists, the metadata can be retrieved and utilized by other Oasis montaj processes.
-
copy
(source_meta)¶ Copy a
GXMETA
to anotherParameters: source_meta (GXMETA) – Source GXMETA
object.New in version 5.1.8.
License: Geosoft Open License
-
classmethod
create
()¶ Create
Returns: GXMETA
ObjectReturn type: GXMETA New in version 5.0.8.
License: Geosoft Open License
-
create_attrib
(name, ph_class, ph_type)¶ Create an attribute
Parameters: - name (str) – Attribute Name
- ph_class (int) – Parent class or META_CORE_CLASS constants
- ph_type (int) – Type of Attribute or META_CORE_TYPE constants
Returns: x - Attribute Token
Return type: int
New in version 6.1.
License: Geosoft Open License
-
create_class
(name, ph_class)¶ Create a class
Parameters: - name (str) – Class Name
- ph_class (int) – Parent class or
META_CORE_CLASS_Base
Returns: x - Class Token
Return type: int
New in version 6.1.
License: Geosoft Open License
-
classmethod
create_s
(bf)¶ Create a
GXMETA
Object from aGXBF
Parameters: bf (GXBF) – GXBF
to serialize fromReturns: GXMETA
ObjectReturn type: GXMETA New in version 5.1.8.
License: Geosoft Open License
-
create_type
(name, ph_class, ph_type)¶ Create an attribute
Parameters: - name (str) – Attribute Name
- ph_class (int) – Parent Class or META_CORE_CLASS constants
- ph_type (int) – Parent Type or META_CORE_TYPE constants
Returns: x - Type Token
Return type: int
New in version 6.1.
License: Geosoft Open License
-
delete_all_items
(ph_class)¶ Delete all items in this class.
Parameters: ph_class (int) – Class of items to delete New in version 5.1.5.
License: Geosoft Open License
-
delete_attrib
(ph_attribute)¶ Delete Attrib from
GXMETA
.Parameters: ph_attribute (int) – Attrib to delete New in version 5.1.6.
License: Geosoft Open License
-
delete_class
(ph_class)¶ Delete Class from
GXMETA
.Parameters: ph_class (int) – Class to delete New in version 5.1.6.
License: Geosoft Open License
-
delete_data
(ph_data)¶ Delete Data from
GXMETA
.Parameters: ph_data (int) – Data to delete New in version 5.1.6.
License: Geosoft Open License
-
delete_item
(ph_item)¶ Delete item from
GXMETA
.Parameters: ph_item (int) – Item to delete New in version 5.1.6.
License: Geosoft Open License
-
delete_type
(ph_type)¶ Delete Type from
GXMETA
.Parameters: ph_type (int) – Type to delete New in version 5.1.6.
License: Geosoft Open License
-
export_table_csv
(ph_class, file)¶ Export all items in a class as a CSV
Parameters: - ph_class (int) – Class of items to export
- file (str) – Name of CSV file to produce
New in version 5.1.5.
License: Geosoft Open License
-
find_data
(ph_object, ph_attrib)¶ Does this meta/attribute have a value ?
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
Returns: x - Data Value
H_META_INVALID_TOKEN
- NoReturn type: int
New in version 5.1.6.
License: Geosoft Open License
-
get_attrib_bool
(ph_object, ph_attrib, value)¶ Get a boolean value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int_ref) – Value to set
New in version 5.1.6.
License: Geosoft Open License
-
get_attrib_double
(ph_object, ph_attrib, value)¶ Get an integer value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (float_ref) – Value to set
New in version 5.1.
License: Geosoft Open License
-
get_attrib_enum
(ph_object, ph_attrib, value)¶ Get an enum value to an attribute (as an integer)
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int_ref) – Value to set
New in version 5.1.6.
License: Geosoft Open License
-
get_attrib_int
(ph_object, ph_attrib, value)¶ Get an integer value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int_ref) – Value to set
New in version 5.1.
License: Geosoft Open License
-
get_attrib_obj
(ph_object, ph_attrib, obj)¶ Get an object from an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- obj (int) – Object to get info into
New in version 5.1.
License: Geosoft Open License
-
get_attrib_string
(ph_object, ph_attrib, value)¶ Get a string value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (str_ref) – String value to get
New in version 5.1.
License: Geosoft Open License
-
get_obj_name
(ph_object, name)¶ Get the name of this item.
Parameters: - ph_object (int) – Object
- name (str_ref) – Name of object
New in version 5.1.3.
License: Geosoft Open License
-
h_copy_across_attribute
(source_meta, ph_attribute)¶ Copy an Attribute from one
GXMETA
to anotherParameters: Returns: x - Handle of Attribute META_INVALID_TOKEN - No visible data
Return type: int
New in version 5.1.6.
License: Geosoft Open License
-
h_copy_across_class
(source_meta, ph_class)¶ Copy a Class from one
GXMETA
to anotherParameters: Returns: x - Handle of Class META_INVALID_TOKEN - No visible data anywhere
Return type: int
New in version 5.1.6.
License: Geosoft Open License
Note: This will copy all parent classes as well.
-
h_copy_across_data
(source_meta, ph_data)¶ Copy a Data value from one
GXMETA
to anotherParameters: Returns: x - Handle of Data value META_INVALID_TOKEN - No visible data
Return type: int
New in version 5.1.6.
License: Geosoft Open License
-
h_copy_across_item
(source_meta, ph_item)¶ Copy an Item from one
GXMETA
to anotherParameters: Returns: x - Handle of Item META_INVALID_TOKEN - No visible data
Return type: int
New in version 5.1.6.
License: Geosoft Open License
-
h_copy_across_type
(source_meta, ph_type)¶ Copy a Type from one
GXMETA
to anotherParameters: Returns: x - Handle of type META_INVALID_TOKEN - No visible data anywhere
Return type: int
New in version 5.1.6.
License: Geosoft Open License
Note: Classes and parent types will also be copied.
-
h_creat_item
(name, ph_class)¶ Creates item in Class.
Parameters: - name (str) – Unique item Name
- ph_class (int) – Class (can be root)
Returns: x - Next Item
H_META_INVALID_TOKEN
- ErrorReturn type: int
New in version 5.1.6.
License: Geosoft Open License
-
h_get_next_item
(ph_class, ph_token)¶ Count the number of items in a class
Parameters: - ph_class (int) – Class
- ph_token (int) – Starting Item (must
H_META_INVALID_TOKEN
for first item)
Returns: x - Next Item
H_META_INVALID_TOKEN
- No more itemsReturn type: int
New in version 5.1.3.
License: Geosoft Open License
-
has_value
(ph_object, ph_attrib)¶ Does this meta/attribute have a value set?
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
Return type: bool
New in version 6.0.1.
License: Geosoft Open License
-
import_table_csv
(ph_class, file)¶ Import a CSV into a class as items.
Parameters: - ph_class (int) – Class to import into
- file (str) – Name of CSV file to load
New in version 5.1.5.
License: Geosoft Open License
Note: Field names in the CSV file that match attribute names in the class will be imported into table entries in the class. Usually this will be used with a class created using the hCreateTable_SCHEMA method so that the contents of class can be viewed as a table.
-
is_null
()¶ Check if this is a null (undefined) instance
Returns: True if this is a null (undefined) instance, False otherwise. Return type: bool
-
move_datas_across
(source_meta, ph_i_obj, ph_o_obj)¶ Moves data items from one
GXMETA
to anotherParameters: New in version 5.1.8.
License: Geosoft Open License
-
resolve_umn
(umn)¶ Resolve a Unique Meta Name (UMN) and find the token
Parameters: umn (str) – Unique Meta Name (UMN) Returns: x - Token H_META_INVALID_TOKEN
- Not foundReturn type: int New in version 5.1.
License: Geosoft Open License
-
serial
(bf)¶ -
Parameters: bf (GXBF) – GXBF
to serialize toNew in version 5.1.8.
License: Geosoft Open License
-
set_attrib_bool
(ph_object, ph_attrib, value)¶ Set a boolean value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int) – Value to set
New in version 5.1.6.
License: Geosoft Open License
-
set_attrib_double
(ph_object, ph_attrib, value)¶ Set an integer value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (float) – Value to set
New in version 5.1.
License: Geosoft Open License
-
set_attrib_enum
(ph_object, ph_attrib, value)¶ Set an enum value to an attribute (as an integer)
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int) – Value to set
New in version 5.1.6.
License: Geosoft Open License
-
set_attrib_int
(ph_object, ph_attrib, value)¶ Set an integer value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (int) – Value to set
New in version 5.1.
License: Geosoft Open License
-
set_attrib_obj
(ph_object, ph_attrib, obj)¶ Set an object to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- obj (int) – Object to set
New in version 5.1.
License: Geosoft Open License
-
set_attrib_string
(ph_object, ph_attrib, value)¶ Set a string value to an attribute
Parameters: - ph_object (int) – Object
- ph_attrib (int) – Attribute
- value (str) – String value to set
New in version 5.1.
License: Geosoft Open License
-
set_attribute_editable
(ph_attribute, editable)¶ Allow/disallow an attribute to be editable in the browser
Parameters: - ph_attribute (int) – Attribute or META_CORE_ATTRIB constants
- editable (int) – Editable Flag
New in version 5.1.6.
License: Geosoft Open License
-
set_attribute_visible
(ph_attribute, visible)¶ Allow/disallow an attribute to be visible in the browser
Parameters: - ph_attribute (int) – Attribute or META_CORE_ATTRIB constants
- visible (int) – Editable Flag
New in version 5.1.6.
License: Geosoft Open License
-
set_empty_attrib
(ph_object, ph_attrib)¶ Set an empty attribute data holder
Parameters: - ph_object (int) – MetaObject to set
- ph_attrib (int) – Attribute MetaObject to set
New in version 6.3.
License: Geosoft Open License
-
write_text
(wa)¶ Write the entire meta as a text file
Parameters: wa (GXWA) – GXWA
to write toNew in version 5.1.6.
License: Geosoft Open License
-
H_META_INVALID_TOKEN constants¶
GXMETA
Invalid Token
-
H_META_INVALID_TOKEN
¶ H meta invalid token
-
gxapi.
H_META_INVALID_TOKEN
= -1
-
META_CORE_ATTRIB constants¶
GXMETA
Core Attributes
-
META_CORE_ATTRIB_Class_Description
¶ Description of this class
-
gxapi.
META_CORE_ATTRIB_Class_Description
= -300
-
-
META_CORE_ATTRIB_Class_Application
¶ Application that created this class
-
gxapi.
META_CORE_ATTRIB_Class_Application
= -301
-
-
META_CORE_ATTRIB_Class_ReferenceURL
¶ URL that defines this class
-
gxapi.
META_CORE_ATTRIB_Class_ReferenceURL
= -302
-
-
META_CORE_ATTRIB_Class_Type
¶ Type of Class
-
gxapi.
META_CORE_ATTRIB_Class_Type
= -303
-
-
META_CORE_ATTRIB_Type_Description
¶ Description of this type
-
gxapi.
META_CORE_ATTRIB_Type_Description
= -304
-
-
META_CORE_ATTRIB_Type_ReferenceURL
¶ URL that defines this type
-
gxapi.
META_CORE_ATTRIB_Type_ReferenceURL
= -305
-
-
META_CORE_ATTRIB_Type_FixedSize
¶ Fixed size of this type (in bytes)
-
gxapi.
META_CORE_ATTRIB_Type_FixedSize
= -306
-
-
META_CORE_ATTRIB_Type_ByteOrder
¶ Byte order for this type
-
gxapi.
META_CORE_ATTRIB_Type_ByteOrder
= -307
-
-
META_CORE_ATTRIB_Type_MinValue
¶ Minimum Value for this type
-
gxapi.
META_CORE_ATTRIB_Type_MinValue
= -308
-
-
META_CORE_ATTRIB_Type_MaxValue
¶ Maximum Value for this type
-
gxapi.
META_CORE_ATTRIB_Type_MaxValue
= -309
-
-
META_CORE_ATTRIB_Type_MaxSize
¶ Maximum Size in bytes for this type
-
gxapi.
META_CORE_ATTRIB_Type_MaxSize
= -310
-
-
META_CORE_ATTRIB_Type_ObjectClass
¶ Object class that manages this type
-
gxapi.
META_CORE_ATTRIB_Type_ObjectClass
= -311
-
-
META_CORE_ATTRIB_Type_hCreatS_Func
¶ Object creating function
-
gxapi.
META_CORE_ATTRIB_Type_hCreatS_Func
= -312
-
-
META_CORE_ATTRIB_Type_sSerial_Func
¶ Object serializationg function
-
gxapi.
META_CORE_ATTRIB_Type_sSerial_Func
= -313
-
-
META_CORE_ATTRIB_Type_Enum_Value
¶ Enumeration Value
-
gxapi.
META_CORE_ATTRIB_Type_Enum_Value
= -314
-
-
META_CORE_ATTRIB_Attrib_Visible
¶ Is this attribute visible to the user
-
gxapi.
META_CORE_ATTRIB_Attrib_Visible
= -315
-
-
META_CORE_ATTRIB_Attrib_Editable
¶ Is this atttribute editable by the user
-
gxapi.
META_CORE_ATTRIB_Attrib_Editable
= -316
-
-
META_CORE_ATTRIB_Attrib_FlatName
¶ The flat name of this attribute
-
gxapi.
META_CORE_ATTRIB_Attrib_FlatName
= -317
-
META_CORE_CLASS constants¶
Meta Core Class Objects
-
META_CORE_CLASS_Base
¶ All Classes are subordinate to this class
-
gxapi.
META_CORE_CLASS_Base
= -100
-
-
META_CORE_CLASS_Predefined
¶ All Predefined symbols are in this class
-
gxapi.
META_CORE_CLASS_Predefined
= -101
-
-
META_CORE_CLASS_Attributes
¶ Attributes
-
gxapi.
META_CORE_CLASS_Attributes
= -102
-
-
META_CORE_CLASS_ClassAttributes
¶ Classattributes
-
gxapi.
META_CORE_CLASS_ClassAttributes
= -103
-
-
META_CORE_CLASS_TypeAttributes
¶ Typeattributes
-
gxapi.
META_CORE_CLASS_TypeAttributes
= -104
-
-
META_CORE_CLASS_ObjectAttributes
¶ Objectattributes
-
gxapi.
META_CORE_CLASS_ObjectAttributes
= -105
-
-
META_CORE_CLASS_EnumAttributes
¶ Enumattributes
-
gxapi.
META_CORE_CLASS_EnumAttributes
= -106
-
-
META_CORE_CLASS_AttributeAttributes
¶ Attributeattributes
-
gxapi.
META_CORE_CLASS_AttributeAttributes
= -107
-
-
META_CORE_CLASS_ItemAttributes
¶ Itemattributes
-
gxapi.
META_CORE_CLASS_ItemAttributes
= -108
-
-
META_CORE_CLASS_Types
¶ Types
-
gxapi.
META_CORE_CLASS_Types
= -109
-
-
META_CORE_CLASS_Enums
¶ Enums
-
gxapi.
META_CORE_CLASS_Enums
= -110
-
-
META_CORE_CLASS_Enum_Bool
¶ Enum bool
-
gxapi.
META_CORE_CLASS_Enum_Bool
= -111
-
-
META_CORE_CLASS_Enum_ClassType
¶ Enum classtype
-
gxapi.
META_CORE_CLASS_Enum_ClassType
= -112
-
META_CORE_TYPE constants¶
GXMETA
Core Data Types
-
META_CORE_TYPE_Bytes
¶ Data Bytes (Base type)
-
gxapi.
META_CORE_TYPE_Bytes
= -200
-
-
META_CORE_TYPE_Bool
¶ Boolean
-
gxapi.
META_CORE_TYPE_Bool
= -201
-
-
META_CORE_TYPE_I1
¶ Signed character
-
gxapi.
META_CORE_TYPE_I1
= -202
-
-
META_CORE_TYPE_U1
¶ Unsigned character
-
gxapi.
META_CORE_TYPE_U1
= -203
-
-
META_CORE_TYPE_I2
¶ Signed short
-
gxapi.
META_CORE_TYPE_I2
= -204
-
-
META_CORE_TYPE_U2
¶ Unsigned short
-
gxapi.
META_CORE_TYPE_U2
= -205
-
-
META_CORE_TYPE_I4
¶ Signed long
-
gxapi.
META_CORE_TYPE_I4
= -206
-
-
META_CORE_TYPE_U4
¶ Unsigned long
-
gxapi.
META_CORE_TYPE_U4
= -207
-
-
META_CORE_TYPE_I8
¶ Singed long long (64 bit int)
-
gxapi.
META_CORE_TYPE_I8
= -208
-
-
META_CORE_TYPE_U8
¶ Unsigned long long
-
gxapi.
META_CORE_TYPE_U8
= -209
-
-
META_CORE_TYPE_R4
¶ Float (32bit)
-
gxapi.
META_CORE_TYPE_R4
= -210
-
-
META_CORE_TYPE_R8
¶ Double (64bit)
-
gxapi.
META_CORE_TYPE_R8
= -211
-
-
META_CORE_TYPE_String
¶ String
-
gxapi.
META_CORE_TYPE_String
= -212
-
-
META_CORE_TYPE_Object
¶ Predefined Object (
GXITR
,`GXIPJ <geosoft.gxapi.GXIPJ>`)-
gxapi.
META_CORE_TYPE_Object
= -213
-
-
META_CORE_TYPE_Enum
¶ Enumeration
-
gxapi.
META_CORE_TYPE_Enum
= -214
-
-
META_CORE_TYPE_ClassType
¶ Classtype
-
gxapi.
META_CORE_TYPE_ClassType
= -215
-