GXMETA class¶
- class GXMETA(handle=0)[source]¶
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)[source]¶
Copy a
GXMETA
to anotherNew in version 5.1.8.
License: Geosoft Open License
- classmethod create()[source]¶
Create
New in version 5.0.8.
License: Geosoft Open License
- create_attrib(name, ph_class, ph_type)[source]¶
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)[source]¶
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)[source]¶
Create a
GXMETA
Object from aGXBF
New in version 5.1.8.
License: Geosoft Open License
- create_type(name, ph_class, ph_type)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
Does this meta/attribute have a value ?
- Parameters:
ph_object (int) – Object
ph_attrib (int) – Attribute
- Returns:
x - Data Value
H_META_INVALID_TOKEN
- No- Return type:
int
New in version 5.1.6.
License: Geosoft Open License
- get_attrib_bool(ph_object, ph_attrib, value)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
Copy an Attribute from one
GXMETA
to another- Parameters:
- 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)[source]¶
Copy a Class from one
GXMETA
to another- Parameters:
- 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)[source]¶
Copy a Data value from one
GXMETA
to another- Parameters:
- 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)[source]¶
Copy an Item from one
GXMETA
to another- Parameters:
- 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)[source]¶
Copy a Type from one
GXMETA
to another- Parameters:
- 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)[source]¶
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
- Error- Return type:
int
New in version 5.1.6.
License: Geosoft Open License
- h_get_next_item(ph_class, ph_token)[source]¶
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 items- Return type:
int
New in version 5.1.3.
License: Geosoft Open License
- has_value(ph_object, ph_attrib)[source]¶
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)[source]¶
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()[source]¶
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)[source]¶
Moves data items from one
GXMETA
to another- Parameters:
New in version 5.1.8.
License: Geosoft Open License
- resolve_umn(umn)[source]¶
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 found- Return type:
int
New in version 5.1.
License: Geosoft Open License
- serial(bf)[source]¶
-
New in version 5.1.8.
License: Geosoft Open License
- set_attrib_bool(ph_object, ph_attrib, value)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
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)[source]¶
Write the entire meta as a text file
New in version 5.1.6.
License: Geosoft Open License
H_META_INVALID_TOKEN constants¶
GXMETA
Invalid Token
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_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_Attrib_Visible¶
Is this attribute visible to the user
- gxapi.META_CORE_ATTRIB_Attrib_Visible = -315¶
META_CORE_CLASS constants¶
Meta Core Class Objects
- META_CORE_CLASS_Predefined¶
All Predefined symbols are in this class
- gxapi.META_CORE_CLASS_Predefined = -101¶
META_CORE_TYPE constants¶
GXMETA
Core Data Types