GXMETA class

class geosoft.gx.GXMETA
A META object contains hierarchical organized metadata
of any type, including other objects.  META information
is organized in an XML-like structure based on a data
schema that describes the data hierarchy.   META 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((GXMETA)arg1) → None:
Copy a META to another
Parameters:arg1 (geosoft.gx.GXMETA) – Source META object.
Returns:Nothing
Return type:None

New in version 5.1.8.

static create((GXContext)ctx) → GXMETA:
Create
Parameters:ctx (geosoft.gx.GXContext) – The GX execution context
Returns:META Object
Return type:geosoft.gx.GXMETA

New in version 5.0.8.

create_attrib((str)arg1, (int)arg2, (int)arg3) → int:
Create an attribute
Parameters:
Returns:

x - Attribute Token

Return type:

int

New in version 6.1.0.

create_class((str)arg1, (int)arg2) → int:
Create a class
Parameters:
Returns:

x - Class Token

Return type:

int

New in version 6.1.0.

static create_s((GXContext)ctx, (GXBF)arg1) → GXMETA:
Create a META Object from a BF
Parameters:
Returns:

META Object

Return type:

geosoft.gx.GXMETA

New in version 5.1.8.

create_type((str)arg1, (int)arg2, (int)arg3) → int:
Create an attribute
Parameters:
Returns:

x - Type Token

Return type:

int

New in version 6.1.0.

delete_all_items((int)arg1) → None:
Delete all items in this class.
Parameters:arg1 (int) – Class of items to delete
Returns:Nothing
Return type:None

New in version 5.1.5.

delete_attrib((int)arg1) → None:
Delete Attrib from META.
Parameters:arg1 (int) – Attrib to delete
Returns:Nothing
Return type:None

New in version 5.1.6.

delete_class((int)arg1) → None:
Delete Class from META.
Parameters:arg1 (int) – Class to delete
Returns:Nothing
Return type:None

New in version 5.1.6.

delete_data((int)arg1) → None:
Delete Data from META.
Parameters:arg1 (int) – Data to delete
Returns:Nothing
Return type:None

New in version 5.1.6.

delete_item((int)arg1) → None:
Delete item from META.
Parameters:arg1 (int) – Item to delete
Returns:Nothing
Return type:None

New in version 5.1.6.

delete_type((int)arg1) → None:
Delete Type from META.
Parameters:arg1 (int) – Type to delete
Returns:Nothing
Return type:None

New in version 5.1.6.

export_table_csv((int)arg1, (str)arg2) → None:
Export all items in a class as a CSV
Parameters:
  • arg1 (int) – Class of items to export
  • arg2 (str) – Name of CSV file to produce
Returns:

Nothing

Return type:

None

New in version 5.1.5.

find_data((int)arg1, (int)arg2) → int:
Does this meta/attribute have a value ?
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
Returns:

x - Data Value H_META_INVALID_TOKEN constant - No

Return type:

int

New in version 5.1.6.

get_attrib_bool((int)arg1, (int)arg2, (int_ref)arg3) → None:
Get a boolean value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (geosoft.gx.int_ref) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.6.

get_attrib_double((int)arg1, (int)arg2, (float_ref)arg3) → None:
Get an integer value to an attribute
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.0.

get_attrib_enum((int)arg1, (int)arg2, (int_ref)arg3) → None:
Get an enum value to an attribute (as an integer)
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (geosoft.gx.int_ref) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.6.

get_attrib_int((int)arg1, (int)arg2, (int_ref)arg3) → None:
Get an integer value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (geosoft.gx.int_ref) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.0.

get_attrib_obj((int)arg1, (int)arg2, (int)arg3) → None:
Get an object from an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (int) – Object to get info into
Returns:

Nothing

Return type:

None

New in version 5.1.0.

get_attrib_string((int)arg1, (int)arg2, (str_ref)arg3) → None:
Get a string value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (geosoft.gx.str_ref) – String value to get
Returns:

Nothing

Return type:

None

New in version 5.1.0.

get_obj_name((int)arg1, (str_ref)arg2) → None:
Get the name of this item.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

h_copy_across_attribute((GXMETA)arg1, (int)arg2) → int:
Copy an Attribute from one META to another
Parameters:
Returns:

x - Handle of Attribute META_INVALID_TOKEN - No visible data

Return type:

int

New in version 5.1.6.

h_copy_across_class((GXMETA)arg1, (int)arg2) → int:
Copy a Class from one META to another
Parameters:
Returns:

x - Handle of Class META_INVALID_TOKEN - No visible data anywhere

Return type:

int

New in version 5.1.6.

Note:

This will copy all parent classes as well.
h_copy_across_data((GXMETA)arg1, (int)arg2) → int:
Copy a Data value from one META to another
Parameters:
Returns:

x - Handle of Data value META_INVALID_TOKEN - No visible data

Return type:

int

New in version 5.1.6.

h_copy_across_item((GXMETA)arg1, (int)arg2) → int:
Copy an Item from one META to another
Parameters:
Returns:

x - Handle of Item META_INVALID_TOKEN - No visible data

Return type:

int

New in version 5.1.6.

h_copy_across_type((GXMETA)arg1, (int)arg2) → int:
Copy a Type from one META to another
Parameters:
Returns:

x - Handle of type META_INVALID_TOKEN - No visible data anywhere

Return type:

int

New in version 5.1.6.

Note:

Classes and parent types will also be copied.
h_creat_item((str)arg1, (int)arg2) → int:
Creates item in Class.
Parameters:
  • arg1 (str) – Unique item Name
  • arg2 (int) – Class (can be root)
Returns:

x - Next Item H_META_INVALID_TOKEN constant - Error

Return type:

int

New in version 5.1.6.

h_get_next_item((int)arg1, (int)arg2) → int:
Count the number of items in a class
Parameters:
Returns:

x - Next Item H_META_INVALID_TOKEN constant - No more items

Return type:

int

New in version 5.1.3.

has_value((int)arg1, (int)arg2) → bool:
Does this meta/attribute have a value set?
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
Returns:

bool

Return type:

bool

New in version 6.0.1.

import_table_csv((int)arg1, (str)arg2) → None:
Import a CSV into a class as items.
Parameters:
  • arg1 (int) – Class to import into
  • arg2 (str) – Name of CSV file to load
Returns:

Nothing

Return type:

None

New in version 5.1.5.

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() → bool

Check if the instance of geosoft.gx.GXMETA is null (undefined)

Returns:True if this is a null instance of geosoft.gx.GXMETA, False otherwise.
Return type:bool`
move_datas_across((GXMETA)arg1, (int)arg2, (int)arg3) → None:
Moves data items from one META to another
Parameters:
  • arg1 (geosoft.gx.GXMETA) – Source META Object
  • arg2 (int) – Object to copy data from
  • arg3 (int) – Object to copy data to
Returns:

Nothing

Return type:

None

New in version 5.1.8.

static null() → GXMETA

A null (undefined) instance of geosoft.gx.GXMETA

Returns:A null geosoft.gx.GXMETA
Return type:geosoft.gx.GXMETA
resolve_umn((str)arg1) → int:
Resolve a Unique Meta Name (UMN) and find the token
Parameters:arg1 (str) – Unique Meta Name (UMN)
Returns:x - Token H_META_INVALID_TOKEN constant - Not found
Return type:int

New in version 5.1.0.

serial((GXBF)arg1) → None:
Serialize an META to a BF
Parameters:arg1 (geosoft.gx.GXBF) – BF to serialize to
Returns:Nothing
Return type:None

New in version 5.1.8.

set_attrib_bool((int)arg1, (int)arg2, (int)arg3) → None:
Set a boolean value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (int) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.6.

set_attrib_double((int)arg1, (int)arg2, (float)arg3) → None:
Set an integer value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (float) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.0.

set_attrib_enum((int)arg1, (int)arg2, (int)arg3) → None:
Set an enum value to an attribute (as an integer)
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (int) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.6.

set_attrib_int((int)arg1, (int)arg2, (int)arg3) → None:
Set an integer value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (int) – Value to set
Returns:

Nothing

Return type:

None

New in version 5.1.0.

set_attrib_obj((int)arg1, (int)arg2, (int)arg3) → None:
Set an object to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (int) – Object to set
Returns:

Nothing

Return type:

None

New in version 5.1.0.

set_attrib_string((int)arg1, (int)arg2, (str)arg3) → None:
Set a string value to an attribute
Parameters:
  • arg1 (int) – Object
  • arg2 (int) – Attribute
  • arg3 (str) – String value to set
Returns:

Nothing

Return type:

None

New in version 5.1.0.

set_attribute_editable((int)arg1, (int)arg2) → None:
Allow/disallow an attribute to be editable in the browser
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

set_attribute_visible((int)arg1, (int)arg2) → None:
Allow/disallow an attribute to be visible in the browser
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

set_empty_attrib((int)arg1, (int)arg2) → None:
Set an empty attribute data holder
Parameters:
  • arg1 (int) – MetaObject to set
  • arg2 (int) – Attribute MetaObject to set
Returns:

Nothing

Return type:

None

New in version 6.3.0.

write_text((GXWA)arg1) → None:
Write the entire meta as a text file
Parameters:arg1 (geosoft.gx.GXWA) – WA to write to
Returns:Nothing
Return type:None

New in version 5.1.6.

H_META_INVALID_TOKEN constant

gx.H_META_INVALID_TOKEN = -1
META Invalid Token

META_CORE_ATTRIB constants

META Core Attributes
gx.META_CORE_ATTRIB_Class_Description = -300
Description of this class
gx.META_CORE_ATTRIB_Class_Application = -301
Application that created this class
gx.META_CORE_ATTRIB_Class_ReferenceURL = -302
URL that defines this class
gx.META_CORE_ATTRIB_Class_Type = -303
Type of Class
gx.META_CORE_ATTRIB_Type_Description = -304
Description of this type
gx.META_CORE_ATTRIB_Type_ReferenceURL = -305
URL that defines this type
gx.META_CORE_ATTRIB_Type_FixedSize = -306
Fixed size of this type (in bytes)
gx.META_CORE_ATTRIB_Type_ByteOrder = -307
Byte order for this type
gx.META_CORE_ATTRIB_Type_MinValue = -308
Minimum Value for this type
gx.META_CORE_ATTRIB_Type_MaxValue = -309
Maximum Value for this type
gx.META_CORE_ATTRIB_Type_MaxSize = -310
Maximum Size in bytes for this type
gx.META_CORE_ATTRIB_Type_ObjectClass = -311
Object class that manages this type
gx.META_CORE_ATTRIB_Type_hCreatS_Func = -312
Object creating function
gx.META_CORE_ATTRIB_Type_sSerial_Func = -313
Object serializationg function
gx.META_CORE_ATTRIB_Type_Enum_Value = -314
Enumeration Value
gx.META_CORE_ATTRIB_Attrib_Visible = -315
Is this attribute visible to the user
gx.META_CORE_ATTRIB_Attrib_Editable = -316
Is this atttribute editable by the user
gx.META_CORE_ATTRIB_Attrib_FlatName = -317
The flat name of this attribute

META_CORE_CLASS constants

Meta Core Class Objects
gx.META_CORE_CLASS_Base = -100
All Classes are subordinate to this class
gx.META_CORE_CLASS_Predefined = -101
All Predefined symbols are in this class
gx.META_CORE_CLASS_Attributes = -102
gx.META_CORE_CLASS_ClassAttributes = -103
gx.META_CORE_CLASS_TypeAttributes = -104
gx.META_CORE_CLASS_ObjectAttributes = -105
gx.META_CORE_CLASS_EnumAttributes = -106
gx.META_CORE_CLASS_AttributeAttributes = -107
gx.META_CORE_CLASS_ItemAttributes = -108
gx.META_CORE_CLASS_Types = -109
gx.META_CORE_CLASS_Enums = -110
gx.META_CORE_CLASS_Enum_Bool = -111
gx.META_CORE_CLASS_Enum_ClassType = -112

META_CORE_TYPE constants

META Core Data Types
gx.META_CORE_TYPE_Bytes = -200
Data Bytes (Base type)
gx.META_CORE_TYPE_Bool = -201
Boolean
gx.META_CORE_TYPE_I1 = -202
Signed character
gx.META_CORE_TYPE_U1 = -203
Unsigned character
gx.META_CORE_TYPE_I2 = -204
Signed short
gx.META_CORE_TYPE_U2 = -205
Unsigned short
gx.META_CORE_TYPE_I4 = -206
Signed long
gx.META_CORE_TYPE_U4 = -207
Unsigned long
gx.META_CORE_TYPE_I8 = -208
Singed long long (64 bit int)
gx.META_CORE_TYPE_U8 = -209
Unsigned long long
gx.META_CORE_TYPE_R4 = -210
Float (32bit)
gx.META_CORE_TYPE_R8 = -211
Double (64bit)
gx.META_CORE_TYPE_String = -212
String
gx.META_CORE_TYPE_Object = -213
Predefined Object (ITR,IPJ)
gx.META_CORE_TYPE_Enum = -214
Enumeration
gx.META_CORE_TYPE_ClassType = -215