AtlasRelationshipDef interface
AtlasRelationshipDef is a TypeDef that defines a relationship. As with other typeDefs the AtlasRelationshipDef has a name. Once created the RelationshipDef has a guid. The name and the guid are the 2 ways that the RelationshipDef is identified. RelationshipDefs have 2 ends, each of which specify cardinality, an EntityDef type name and name and optionally whether the end is a container. RelationshipDefs can have AttributeDefs - though only primitive types are allowed. RelationshipDefs have a relationshipCategory specifying the UML type of relationship required The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs will not specify an EntityDef type name as their types. RelationshipDefs introduce new attributes to the entity instances. For example EntityDef A might have attributes attr1,attr2,attr3
EntityDef B might have attributes attr4,attr5,attr6 RelationshipDef AtoB might define 2 ends
end1: type A, name attr7 end2: type B, name attr8
When an instance of EntityDef A is created, it will have attributes attr1,attr2,attr3,attr7 When an instance of EntityDef B is created, it will have attributes attr4,attr5,attr6,attr8
In this way relationshipDefs can be authored separately from entityDefs and can inject relationship attributes into the entity instances
Properties
| attribute |
An array of attribute definitions. |
| category | The enum of type category. Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE" |
| created |
The user who created the record. |
| create |
The created time of the record. |
| date |
The date format. |
| description | The description of the type definition. |
| end |
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship. |
| end |
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship. |
| guid | The GUID of the type definition. |
| last |
ETag for concurrency control. |
| name | The name of the type definition. |
| options | The options for the type definition. |
| relationship |
The Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent. Possible values: "ASSOCIATION", "AGGREGATION", "COMPOSITION" |
| relationship |
The label of the relationship. |
| service |
The service type. |
| type |
The version of the type. |
| updated |
The user who updated the record. |
| update |
The update time of the record. |
| version | The version of the record. |
Property Details
attributeDefs
An array of attribute definitions.
attributeDefs?: AtlasAttributeDef[]
Property Value
category
The enum of type category.
Possible values: "PRIMITIVE", "OBJECT_ID_TYPE", "ENUM", "STRUCT", "CLASSIFICATION", "ENTITY", "ARRAY", "MAP", "RELATIONSHIP", "TERM_TEMPLATE"
category?: string
Property Value
string
createdBy
The user who created the record.
createdBy?: string
Property Value
string
createTime
The created time of the record.
createTime?: number
Property Value
number
dateFormatter
description
The description of the type definition.
description?: string
Property Value
string
endDef1
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
endDef1?: AtlasRelationshipEndDef
Property Value
endDef2
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
endDef2?: AtlasRelationshipEndDef
Property Value
guid
The GUID of the type definition.
guid?: string
Property Value
string
lastModifiedTS
ETag for concurrency control.
lastModifiedTS?: string
Property Value
string
name
The name of the type definition.
name?: string
Property Value
string
options
The options for the type definition.
options?: Record<string, string>
Property Value
Record<string, string>
relationshipCategory
The Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent.
Possible values: "ASSOCIATION", "AGGREGATION", "COMPOSITION"
relationshipCategory?: string
Property Value
string
relationshipLabel
The label of the relationship.
relationshipLabel?: string
Property Value
string
serviceType
The service type.
serviceType?: string
Property Value
string
typeVersion
The version of the type.
typeVersion?: string
Property Value
string
updatedBy
The user who updated the record.
updatedBy?: string
Property Value
string
updateTime
The update time of the record.
updateTime?: number
Property Value
number
version
The version of the record.
version?: number
Property Value
number