IRISLIB database
MetadataAPI Class Reference
Inheritance diagram for MetadataAPI:
Collaboration diagram for MetadataAPI:

Static Public Member Functions

_.Library.Integer AddField (_.Library.Integer domainId, _.Library.String fieldName, _.Library.List supportedOperators, _.Library.String dataType, _.Library.Integer storage, _.Library.Boolean caseSensitive, _.Library.Integer lovId, _.Library.Boolean validateLov, _.Library.Boolean hidden)
 
_.iKnow.Filters.Filter CreateFilter (_.Library.Integer pDomainId, _.Library.String pFieldName, _.Library.String pOperator, _.Library.String pValue, _.Library.Status pSC)
 Creates a <class>iKnow.Filters.Filter</class> object for filtering sources according to. More...
 
_.Library.Status EndBatch (_.Library.Integer domainId)
 
_.Library.Integer GetFieldId (_.Library.Integer pDomainId, _.Library.String pFieldName, _.Library.Status pSC)
 Returns the full MDX spec for the given pFieldName, which can be used as an. More...
 
_.Library.Status GetFields (_.Library.Integer pFields, _.Library.Integer pDomainId, _.Library.Boolean pIncludeHidden)
 
_.Library.String GetValue (_.Library.Integer pDomainId, _.Library.String pFieldName, _.Library.String pExternalId, _.Library.Status pSC)
 Returns the actual value for a given metadata field (by name) and source (by External ID).
 
_.Library.String GetValueById (_.Library.Integer pDomainId, _.Library.Integer pFieldId, _.Library.Integer pSrcId, _.Library.Status pSC)
 Use <method>GetValue</method> instead.
 
_.Library.Status SetValue (_.Library.Integer domainId, _.Library.String fieldName, _.Library.String externalId, _.Library.String value)
 
_.Library.Status SetValueById (_.Library.Integer domainId, _.Library.Integer fieldId, _.Library.Integer srcId, _.Library.String value)
 
_.Library.Status StartBatch (_.Library.Integer domainId)
 
- Static Public Member Functions inherited from MetadataI
_.Library.Integer GetFieldId (_.Library.Integer domainId, _.Library.String fieldName)
 Returns the metadata field ID corresponding to the supplied name, or "" if none exists in this domain.
 

Additional Inherited Members

- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Static Public Attributes inherited from MetadataI
 GetFieldsRT = None
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

This class offers a read-only implementation for most of the <class>iKnow.Queries.MetadataI</class> interface in DeepSee-managed domains. It exposes all available dimension levels and measures for the cube managing the domain. This enables iKnow-style query filtering using the result of <method>CreateFilter</method> as a convenient alternative to manually instantiating MDX or SQL-based filter objects.

The "virtual" metadata fields exposed this way can be referenced by name or MDX spec and will be resolved as follows:

  1. [dimName].[hierName].[levelName]
  2. dimName.hierName.levelName
  3. [dimName].[levelName]
  4. dimName.levelName
  5. [measures].[msrName]
  6. levelName
  7. msrName
  8. factName

If the spec is not complete (missing hierarchy and/or dimension, the "field name" is resolved as the first level, measure or fact found with a corresponding name. Therefore, it is recommended to use full specifications as soon as there is a potential name conflict. When working with fact names, the values in the cube's Fact table are considered to be the desired results and no star tables will be queried.

For iKnow-managed domains, use <class>iKnow.Queries.MetadataAPI</class>.

NOTE: this does not support cube relationships or calculated members

Member Function Documentation

◆ AddField()

_.Library.Integer AddField ( _.Library.Integer  domainId,
_.Library.String  fieldName,
_.Library.List  supportedOperators,
_.Library.String  dataType,
_.Library.Integer  storage,
_.Library.Boolean  caseSensitive,
_.Library.Integer  lovId,
_.Library.Boolean  validateLov,
_.Library.Boolean  hidden 
)
static

Adds a field definition with the given name and properties.

  • The supportedOperators parameter specifies which operations (such as $$$MDOPEQUAL) will be available for filtering criteria
  • For dataType, choose either $$$MDDTSTRING, $$$MDDTNUMBER or $$$MDDTDATE ($horolog format)
  • Use storage to control the way how values are stored: $$$MDSTNORMAL for cases where you would use a normal index, $$$MDSTBITMAP where you would use a bitmap index (few different metadata values compared to total # of records)
  • If dataType is $$$MDDTSTRING, caseSensitive controls whether or not string values should be treated as case-sensitive.
  • The lovId and validateLov parameters define wheter a List Of Values is available for this metadata field and whether input values should be verified against this list. See also <method>AddListOfValues</method>.
  • If hidden is set to true, the field will by default not appear in metadata field and value lists.

Reimplemented from MetadataI.

◆ CreateFilter()

_.iKnow.Filters.Filter CreateFilter ( _.Library.Integer  pDomainId,
_.Library.String  pFieldName,
_.Library.String  pOperator,
_.Library.String  pValue,
_.Library.Status  pSC 
)
static

Creates a <class>iKnow.Filters.Filter</class> object for filtering sources according to.

the provided criteria.

Reimplemented from MetadataI.

◆ EndBatch()

_.Library.Status EndBatch ( _.Library.Integer  domainId)
static

Ends a metadata batch. See <method>StartBatch</method> for more details.

Reimplemented from MetadataI.

◆ GetFieldId()

_.Library.Integer GetFieldId ( _.Library.Integer  pDomainId,
_.Library.String  pFieldName,
_.Library.Status  pSC 
)
static

Returns the full MDX spec for the given pFieldName, which can be used as an.

identifier for this field.

◆ GetFields()

_.Library.Status GetFields ( _.Library.Integer  pFields,
_.Library.Integer  pDomainId,
_.Library.Boolean  pIncludeHidden 
)
static

Returns a list of all the "virtualized" metadata fields exposed for a DeepSee-managed domain

in an array: pFields(n) = $lb(fieldName, fullSpec, [dimension|measure]). Please note the returned field names are not necessarily unique across the whole cube, so using the full specificiation (returned as the first column) is safer.

Because of the "virtual" nature of these fields, only the fieldName (2nd) and supportedOperators (3rd) output columns are to be taken into account. The pIncludeHidden parameter is ignored.

Reimplemented from MetadataI.

◆ SetValue()

_.Library.Status SetValue ( _.Library.Integer  domainId,
_.Library.String  fieldName,
_.Library.String  externalId,
_.Library.String  value 
)
static

Sets (or replaces if it exists) the value for a given metadata field (by name) for a given source

(by External ID).

Values for fields of type $$$MDDTSTRING are normalized and stripped of whitespace and control characters at the beginning and end of the string.

Reimplemented from MetadataI.

◆ SetValueById()

_.Library.Status SetValueById ( _.Library.Integer  domainId,
_.Library.Integer  fieldId,
_.Library.Integer  srcId,
_.Library.String  value 
)
static

Sets (or replaces if it exists) the value for a given metadata field (by ID) for a given source

(by Source ID).

Values for fields of type $$$MDDTSTRING are normalized and stripped of whitespace and control characters at the beginning and end of the string.

Reimplemented from MetadataI.

◆ StartBatch()

_.Library.Status StartBatch ( _.Library.Integer  domainId)
static

Starts a 'batch' during which metadata values can be set. Some setting operations and index

recalculations are optimized for batch processing.

NOTE: It is currently up to the user to make sure no metadata values are read during the batch and no values exist already (as replacing a value involves reading it). Reading metadata field values during a batch is not guaranteed to return correct results.

Reimplemented from MetadataI.