Catalog

New in version 4.0.4.

class caris.bathy.db.Catalog

New in version 4.0.4.

The Catalog contains definitions for the different types of objects that can exist in a Database. For example the default catalog would contain definitions for both surfac and survey objects.

get_object((str)name) → CatalogObject

Get the specified CatalogObjects from this Catalog.

Parameters:name (str) – The name of the CatalogObjects to get.
Return type:The specified CatalogObjects.

For example:

theCatalog = database.get_catalog()
objectInfo = theCatalog.get_object('surfac')
print('The object', objectInfo.name, 'has', str(objectInfo.get_attributes().len()), 'attributes.')
get_objects() → object

Get all of the CatalogObjects from this Catalog.

Return type:A list of CatalogObjects.

For example:

theCatalog = database.get_catalog()
print('The catalog has', str(theCatalog.get_objects().len()), 'objects.')
class caris.bathy.db.CatalogObject

New in version 4.0.4.

A CatalogObject is the definition of an object in a Database. It consists of a name and a list of available attributes.

get_attribute((str)name) → CatalogAttribute

Get the specified CatalogAttribute from this CatalogObject.

Parameters:name (str) – The name of the CatalogAttributes to get.
Return type:The specified CatalogAttributes.

For example:

theCatalog = database.get_catalog()
objectInfo = theCatalog.get_object('surfac')
attributeInfo = objectInfo.get_attribute('OBJNAM')
print('The attribute', attributeInfo.name, 'is of type', str(attributeInfo.type))
get_attributes() → object

Get all of the CatalogAttributes from this CatalogObject.

Return type:A list of CatalogAttributes.

For example:

theCatalog = database.get_catalog()
objectInfo = theCatalog.get_object('surfac')
print('The object', objectInfo.name, 'has', str(objectInfo.get_attributes().len()), 'attributes.')
name

The name of the CatalogObject.

Type:str
class caris.bathy.db.CatalogAttribute

New in version 4.0.4.

A CatalogAttribute is the definition of an attribute on a CatalogObject. It consists of a name, type, and mandatory/read-only flags.

get_expected_values() → object

Retrieve all CatalogExpectedValues that the CatalogAttribute can have.

Return type:List of any CatalogExpectedValues that the CatalogAttribute can have.

For example:

theCatalog = database.get_catalog()
objectInfo = theCatalog.get_object('surfac')
attributeInfo = objectInfo.get_attribute('OBJNAM')
print('The attribute', attributeInfo.name, 'has', str(attributeInfo.get_expected_values().len()), 'expected values.')
mandatory

True if the attribute is mandatory, else false.

Type:boolean
name

The name of this attribute.

Type:str
read_only

True if the attribute is read-only, else false.

Type:boolean
type

The type of this attribute.

Type:AttributeType
class caris.bathy.db.CatalogExpectedValue

New in version 4.0.4.

The CatalogExpectedValue applies to ENUMERATION and LIST type attributes. It contains a list of appropriate values for the attribute.

description

The description of the CatalogExpectedValue.

Type:str
identifier

The identifier of the CatalogExpectedValue.

Type:int
class caris.bathy.db.AttributeType

New in version 4.0.4.

The AttributeType describes the type of data that an attribute can store.

  • ALPHANUMERIC
  • DATE
  • ENUMERATION
  • FLOAT
  • INTEGER
  • LIST
  • MULTIMEDIA
  • RASTER
  • STRING
  • TEXT
  • UNKNOWN