IWorkspaceAttributesService
Service for querying additional attributes and attribute display forms data, and their elements.
export interface IWorkspaceAttributesService
Remarks
If you want to query attributes themselves, use catalog IWorkspaceCatalogFactory
Methods
Method | Description |
|---|---|
Returns service that can be used to query attribute elements for attributes defined in this workspace. | |
Gets metadata of the attribute. | |
Gets metadata of the attribute for particular display form reference. | |
Get information about the given attribute’s dataset | |
Gets the attribute display form with the provided identifier. | |
Gets the list of metadata of attribute display form with the provided list of uris or identifiers. (list of object refs). | |
Gets the list of metadata of attribute with the provided list of uris. (list of object refs) | |
Attributes query factory. | |
Get attributes with their related objects, by their respective display forms. | |
Request list of attributes that are “center of star” for the input attributes in the data model. | |
Request the “center of star” for multiple series of attributes. | |
Request list of attributes that have a connection with specified display form in the data model. | |
Updates metadata of an attribute display form (label). | |
Updates metadata of the attribute. |
Method details
IWorkspaceAttributesService.elements()method
Returns service that can be used to query attribute elements for attributes defined in this workspace.
elements(): IElementsQueryFactory;
Returns
Remarks
For instance if workspace has data set Employee with attribute Name, then this service can be used to retrieve names of all employees.
IWorkspaceAttributesService.getAttribute()method
Gets metadata of the attribute.
getAttribute(ref: ObjRef, opts?: {
include?: ["dataset"];
}): Promise<IAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the attribute to retrieve | |
opts | { include?: [“dataset”]; } | (Optional) options to include additional data |
Returns
Promise<IAttributeMetadataObject>
promise of attribute metadata object
IWorkspaceAttributesService.getAttributeByDisplayForm()method
Gets metadata of the attribute for particular display form reference.
getAttributeByDisplayForm(ref: ObjRef): Promise<IAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the display form to retrieve attribute for |
Returns
Promise<IAttributeMetadataObject>
promise of attribute metadata object
IWorkspaceAttributesService.getAttributeDatasetMeta()method
Get information about the given attribute’s dataset
getAttributeDatasetMeta(ref: ObjRef): Promise<IMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the attribute |
Returns
Promise<IMetadataObject>
promise of metadata object
IWorkspaceAttributesService.getAttributeDisplayForm()method
Gets the attribute display form with the provided identifier.
getAttributeDisplayForm(ref: ObjRef): Promise<IAttributeDisplayFormMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the attribute display form to retrieve |
Returns
Promise<IAttributeDisplayFormMetadataObject>
promise of attribute display form metadata object
IWorkspaceAttributesService.getAttributeDisplayForms()method
Gets the list of metadata of attribute display form with the provided list of uris or identifiers. (list of object refs).
getAttributeDisplayForms(refs: ObjRef[]): Promise<IAttributeDisplayFormMetadataObject[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
refs | ObjRef[] | list of refs of the attribute display form to retrieve. |
Returns
Promise<IAttributeDisplayFormMetadataObject[]>
promise of list of attribute display form metadata object.
Remarks
If a display form referenced by any of the refs does not exist, then the call must not fail and instead return only those display forms that exist.
IWorkspaceAttributesService.getAttributes()method
Gets the list of metadata of attribute with the provided list of uris. (list of object refs)
getAttributes(refs: ObjRef[]): Promise<IAttributeMetadataObject[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
refs | ObjRef[] | list of refs of the attribute to retrieve. |
Returns
Promise<IAttributeMetadataObject[]>
promise of list of attribute metadata object.
Remarks
If a display form referenced by any of the refs does not exist, then the call must not fail and instead return only those display forms that exist.
IWorkspaceAttributesService.getAttributesQuery()method
Attributes query factory.
getAttributesQuery(): IAttributesQuery;
Returns
attributes query
IWorkspaceAttributesService.getAttributesWithReferences()method
Get attributes with their related objects, by their respective display forms.
getAttributesWithReferences(displayFormRefs: ObjRef[]): Promise<IAttributeWithReferences[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
displayFormRefs | ObjRef[] |
Returns
Promise<IAttributeWithReferences[]>
promise of attributes with their related objects
IWorkspaceAttributesService.getCommonAttributes()method
Request list of attributes that are “center of star” for the input attributes in the data model.
getCommonAttributes(attributeRefs: ObjRef[]): Promise<ObjRef[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
attributeRefs | ObjRef[] | input list of attribute references |
Returns
Promise<ObjRef[]>
promise returning list of attribute references. It can be one of the input attributes or another attribute(s) that connects the input attributes in the data model.
IWorkspaceAttributesService.getCommonAttributesBatch()method
Request the “center of star” for multiple series of attributes.
getCommonAttributesBatch(attributesRefsBatch: ObjRef[][]): Promise<ObjRef[][]>;
Parameters
Parameter | Type | Description |
|---|---|---|
attributesRefsBatch | ObjRef[][] | input batch of list of attribute references |
Returns
Promise<ObjRef[][]>
promise returning batch of attribute references.
IWorkspaceAttributesService.getConnectedAttributesByDisplayForm()method
Request list of attributes that have a connection with specified display form in the data model.
getConnectedAttributesByDisplayForm(ref: ObjRef, options?: IConnectedAttributesOptions): Promise<ObjRef[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | attribute display form reference whose connections we need to find | |
options | (Optional) options influencing which objects count as connected |
Returns
Promise<ObjRef[]>
promise of array of connected attribute references
IWorkspaceAttributesService.updateAttributeDisplayFormMeta()method
Updates metadata of an attribute display form (label).
updateAttributeDisplayFormMeta(updatedDisplayForm: IUpdateMetadataObjectMetaPayload): Promise<IAttributeDisplayFormMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
updatedDisplayForm | update to apply |
Returns
Promise<IAttributeDisplayFormMetadataObject>
IWorkspaceAttributesService.updateAttributeMeta()method
Updates metadata of the attribute.
updateAttributeMeta(updatedAttribute: Partial<IMetadataObjectBase> & IMetadataObjectIdentity): Promise<IAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
updatedAttribute | Partial<IMetadataObjectBase> & IMetadataObjectIdentity | update to apply |
Returns
Promise<IAttributeMetadataObject>