Asset model

The asset model is the technical structure of assets. You can use the asset model to refer to specific asset fields, such as attributes and properties. This is required for optimal use of validation rules.

Note This information does not apply to worfklows and APIs.

Graphical representation

The asset model can be represented graphically. Further below you can find explanations on each individual field.

A class diagram showing the inheritance hierarchy and associations of the asset model classes in the com.collibra.dgc.core.dto.validation package, including AbstractModel, BasicAssetModel, AssetModel, VocabularyModel, CommunityModel, and AssetTypeModel.

General

Field Explanation
articulationScore The articulation score of the asset.
id The ID of the resource. Every resource that can be retrieved using the asset model has this property.
name

The full name of an asset. All resources have this property (community, vocabulary and asset).

signifier

Deprecated. Identical to name but only available for the BasicAssetModel.

displayName The name of the resource. All resources have this property (community, vocabulary and asset).
status The status of the asset.
status.id The resource id of the status.
status.name The name of the status.
status.signifier

Deprecated. Identical to status.name.

type The asset type.
type.id The resource ID of the asset type.
type.name The name of the asset type.
type.signifier Identical to type.name.
domain The domain of the asset.
domain.id The ID of the domain.
domain.name The name of the domain.
domain.community.id The ID of the community of the asset.
domain.community.name The name of the community of the asset.
vocabulary Deprecated. The domain of the asset. Use domain instead.
vocabulary.id Deprecated. The ID of the vocabulary.
vocabulary.name Deprecated. The name of the vocabulary.
vocabulary.community.id Deprecated. The ID of the community of the asset.
vocabulary.community.name Deprecated. The name of the community of the asset.
generalConcept

Deprecated. The general concept of the asset.

generalConcept.id

Deprecated. The ID of the general concept.

generalConcept.name

Deprecated. The name of the general concept.

generalConcept.signifier

Deprecated. Identical to generalConcept.name.

Attributes

Attributes is a dictionary that contains all attribute values. You can retrieve the list for a given attribute type name or attribute type ID.

There are several possibilities to navigate the attributes of an asset.

Field Explanation
attributes.'Definition' The list of all Definition attribute values.
attributes['Definition'] Identical to attributes.'Definition'.
attributes['00000000-0000-0000-0000-000000000202'] Identical to attributes.'Definition', but using the resource ID of the Definition attribute type.
attributes.'00000000-0000-0000-0000-000000000202'.first() The first attribute value within the list of all the Definition attributes.
attributes.'00000000-0000-0000-0000-000000000202'?.first()

Identical to attributes.'00000000-0000-0000-0000-000000000202'.first(), but null-safe.

Tip ?. is the null-safe getter of Groovy. You cannot combine the ?. with the [ ... ] notation. This means that if the referenced attribute is not present, the result is null, whereas the expression without the question mark fails to execute.

attributes['Definition'][1]

The second Definition attribute value of the asset.

Note This uses index-based navigation of the list, and the first element has index 0.

Relations

Relations allow you to retrieve the list of target assets through a given relation, and each target is an asset model in itself. Navigation is done in a similar way as for attributes.

Note Relations and complex relations are only available one level deep. This means that when your script refers to a target asset through a relation or complex relation, that referred asset will contain all the aspects of the asset that are mentioned above, such as name, attributes, and so on, but without the relations or complex relations of the referred asset.

Field Explanation
relations['Related To'] The list of target assets of all Related To relations.
relations['Related To']?.first().name

The name of the first target asset using the Related To relation in a null-safe way.

Tip ?. is the null-safe getter of Groovy. You cannot combine the ?. with the [ ... ] notation. This means that if the referenced attribute is not present, the result is null, whereas the expression without the question mark fails to execute.

Complex relations

Complex relations are a type of relation. However, because they are less predictable, not all possible relations can be listed here.

Field Explanation
complexRelations.<complexRelationType(Name/Id)>.<firstrelationname>.<secondrelationname>

Similar to the relations, the end result will be an asset model.

Example

This example takes into account a complex relation type with all the following properties:

  • The name is CRT and the ID is 1.
  • Contains four relation types: up, down, left and right.
  • All sides reference a business term.

These are the complex relations:

Field Explanation
complexRelations.CRT.up.right The list of the complex relations from up to right.
complexRelations['CRT']['up']['right'] Identical to complexRelations.CRT.up.right.
complexRelations.'CRT'?.'up'?.'right'

Identical to complexRelations.CRT.up.right, but does not fail in case the list of CRT is empty, nor if the up side is empty.

Tip ?. is the null-safe getter of Groovy. You cannot combine the ?. with the [ ... ] notation. This means that if the referenced attribute is not present, the result is null, whereas the expression without the question mark fails to execute.

complexRelations['1'].down.up The list of the complex relations from down to up.

Asset type model

Field Description
name

The full name of the asset type.

displayEnabled Parameter that determines whether the Identical asset names per domain feature is enabled for the asset type.
ratingEnabled Parameter that determines whether ratings are enabled for the asset type.
id The ID of the resource.
signifier

Deprecated. Identical to name but only available for the BasicAssetModel.