Metadata functions

The ArcSDE software maintains some limited metadata for objects like tables, layers, and versions. A method to store new or different metadata with a table can help greatly when developing a new application or new functionality. You can now store application-specific metadata, or properties, with a table.

The metadata support provides a generic mechanism for storing metadata about an object.  The metadata is stored as property/value pairs with associated description and modification date. 

Information about a metadata object is contained in an SE_METADATAINFO opaque pointer. A set of functions of the format SE_metadatainfo_* allows you to retrieve and set the various metadata parameters. You must call SE_metadatainfo_create before using any other function that uses an SE_METADATAINFO object.

You can use an SE_METADATAINFO pointer as a specification to create or alter meta-data or to describe an existing meta-data object.

Some of the information you can retrieve or set with SE_METADATAINFO includes:

record ID

Record number set and maintained by the ArcSDE software.

object ID 

For tables, the registration ID with which the meta-data is associated. 

object type  

Object type with which the meta-data is associated.

class name 

Class name of the meta-data.

property

Meta-data property name.

value 

Property value stored as a string.

date 

Creation  or update date and time.

owner

Owner name.

Description 

A description of the meta-data.

You can set or retrieve the meta-data parameters with the SE_metadatainfo_get_* and SE_metadatainfo_set_* functions. See  “Meta-data info functions”  for more information. To add, edit, or delete a meta-data record, use the SE_table_metadata_* functions.

The SE_metadatainfo_set_* functions do not actually modify a meta-data object. Once the SE_METADATAINFO pointer is modified, you must pass it to SE_metadata_create or SE_table_metadata_alter to affect a table.

Metadatainfo functions

Function Name

Function Description

SE_metadatainfo_create

Creates a metadata object.

SE_ metadatainfo_duplicate               

Makes a copy of a metadata object.

SE_ metadatainfo_free       

Frees an allocated metadata object.

SE_metadatainfo_get_classname               

Returns the class name for the supplied metadata object.

SE_ metadatainfo_get_date               

Returns the data for the supplied metadata object.

SE_metadatainfo_get_description

Returns the description of the metadata object.

SE_ metadatainfo_get_id  

Returns the ID for the supplied metadata object.

SE_ metadatainfo_get_object_name

Returns the object name for the supplied metadata object.

SE_ metadatainfo_get_object_owner

Returns the description for the supplied metadata object.

SE_ metadatainfo_get_object_type

Returns the object type for a metadata object.

SE_ metadatainfo_get_property

Returns the property of the supplied metadata object.

SE_ metadatainfo_get_value

Returns the value for a metadata object.

SE_ metadatainfo_set_classname

Sets the class name for a meta data object.

SE_ metadatainfo_set_description

Sets the description of the meta data object.

SE_ metadatainfo_set_object_name

Sets the object name for the supplied meta data object.

SE_ metadatainfo_set_object_type

Sets the object type for a meta data object.

SE_ metadatainfo_set_property

Sets the property of the supplied meta data object.

SE_ metadatainfo_set_value

Sets the value for a meta data object.

 

Meta-data functions

Function Name

Function Description

SE_metadata_free_info_list

Frees a pointer to a list of metadata objects.

SE_metadata_get_info       

Returns a meta data entry.

SE_metadata_get_info_list               

Returns a pointer to a list of meta data objects.

SE_table_metadata_add

Adds meta-data to a table.

SE_table_metadata_alter

Changes the meta-data associated with a table.

SE_table_metadata_delete

Removes meta-data from a table.

SE_table_metadata_delete_where

Removes meta-data from a table using a where clause.

SE_table_metadata_free_info_list

Frees a list of meta-data.

SE_table_metadata_get_info_list

Returns a list of meta-data from a table.