Enumeration AttributeType

The AttributeType enum tells the type of the attributes of the elements of the DMU.

The DMU contains a collection of pieces (3D or not). All these pieces have information located inside them. The AttributeType enum tells about the type of the attributes.

Any attribute may have the given type, an array of the given type or null. Any part instance may have also other metadata, in this case, such metadata cannot be filtered, since it cannot be indexed. Such data that cannot be indexed can be found in the DocumentContentInterface.getNonIndexedContent fields.

Assume we have the following attributes dictionary :

[{
"attributeName": "Name",
"nestedPath": "",
"attributeType": "string",
"numericType": "invalid",
"min": null,
"max": null
}, {
"attributeName": "PartNumber",
"nestedPath": "",
"attributeType": "string",
"numericType": "invalid",
"min": null,
"max": null
}, {
"attributeName": "test_display_idcard.arrays.bool",
"nestedPath": "",
"attributeType": "boolean",
"numericType": "invalid",
"min": null,
"max": null
}, {
"attributeName": "test_display_idcard.arrays.date",
"nestedPath": "",
"attributeType": "date",
"numericType": "invalid",
"min": 1525435633000,
"max": 1528114033000
}, {
"attributeName": "test_display_idcard.arrays.date_range",
"nestedPath": "",
"attributeType": "date range",
"numericType": "invalid",
"min": null,
"max": null
}, {
"attributeName": "test_display_idcard.nested.int",
"nestedPath": "test_display_idcard.nested",
"attributeType": "number",
"numericType": "int32",
"min": 1,
"max": 2
}, {
"attributeName": "test_display_idcard.scalars.double",
"nestedPath": "",
"attributeType": "number",
"numericType": "float64",
"min": 1,
"max": 2
}, {
"attributeName": "test_display_idcard.scalars.double_range",
"nestedPath": "",
"attributeType": "number range",
"numericType": "float64",
"min": null,
"max": null
}
]

When requesting the metadata of a part instance, we get the following result : (IdCardGetterInterface, InstanceMetadataInterface) :
{
// metadata from component part metadata, this metadata will be shared by all instances of this component
"partmd": [{
// the actual metadata
"metadata": {
// "attributeName": "Name" is a string or a string array or null (see dictionary)
"Name": "Sample",
// "attributeName": "PartNumber" is a string or a string array or null (see dictionary)
"PartNumber": "DMU_sample",
// no attribute "test_display_idcard" since it only contains sub-objects
"test_display_idcard": {
// no attribute "test_display_idcard.arrays" since it only contains sub-objects
"arrays": {
// "attributeName": "test_display_idcard.arrays.bool" is a bool or an array of bool or null (see dictionary)
"bool": [true, false],
// "attributeName": "test_display_idcard.arrays.date" is a date or an array of date or null (see dictionary), dates are expressed as number of milliseconds since January 1, 1970, 00:00:00 UTC.
"date": [1528114033000, 1525435633000],
// "attributeName": "test_display_idcard.arrays.date" is a date range or an array of date range or null (see dictionary), dates are expressed as number of milliseconds since January 1, 1970, 00:00:00 UTC.
// here gte stands for greater than or equal
// gt stands for strictly greater than
// lte stands for lower than or equal
// lt stands for strictly lower than
// when retrieving range metadata types, they should always contain at least gt, gte, lte and/or lt.
// any range without any of these values is considered invalid.
// if the data in "gte" for example is not a number, then the field is not indexed and
// "test_display_idcard.arrays.date_range.gte would be be included in ObjectMetadataInterface.nonindexedpartmd or ObjectMetadataInterface.nonindexedlinkmd
// or ObjectMetadataInterface.nonindexedinstancemd.
"date_range": [{
"gte": 1530706033000,
"lte": 1530792433000
}, {
"gte": 1533384433000,
"lte": 1533470833000
}
]
},
// no attribute "test_display_idcard.nested" since it is an array of object
"nested": [{
// "attributeName": "test_display_idcard.nested.int" is a 32 bit integer or an array of integers or null
// it is a nested metadata (inside an array of object, whose top node is "test_display_idcard.nested"
// its nested path is therefore "test_display_idcard.nested" (see dictionary)
"int": 1
}, {
// "attributeName": "test_display_idcard.nested.int" is a 32 bit integer or an array of integers or null
// it is a nested metadata (inside an array of object, whose top node is "test_display_idcard.nested"
// its nested path is therefore "test_display_idcard.nested" (see dictionary)
"int": 2
}
],
// no attribute "test_display_idcard.scalars" since it only contains sub-objects
"scalars": {
// "attributeName": "test_display_idcard.scalars.double" is a 64 bit float or an array of double or null (see dictionary)
"double": 1.234,
// "attributeName": "test_display_idcard.scalars.double_range" is a double range or an array of double range or null (see dictionary).
// here gte stands for greater than or equal
// gt stands for strictly greater than
// lte stands for lower than or equal
// lt stands for strictly lower than
// when retrieving range metadata types, they always contain at least gt, gte, lte and/or lt.
"double_range": {
"gte": 10,
"lt": 12
},
// "attributeName": "test_display_idcard.scalars.hugetext" should be included in the dictionary
// but when looking for it, no value can be found for "test_display_idcard.scalars.hugetext"
// in this example, for readability, hugetext has been stripped but it actually contains
// the full lorem ipsum, exceeding the indexing capability of the 3djuump architecture
// as no other hugetext values are set, only one value could have been indexed, but failed to do so
// the "test_display_idcard.scalars.hugetext" has therefore no indexed value, and then is not available in the dictionary
// "test_display_idcard.scalars.hugetext will be included in ObjectMetadataInterface.nonindexedpartmd or ObjectMetadataInterface.nonindexedlinkmd
// or ObjectMetadataInterface.nonindexedinstancemd.
//
"hugetext": "Lorem ipsum ...",
// "attributeName": "test_display_idcard.scalars.null" should be included in the dictionary
// but when looking for it, no value can be found for "test_display_idcard.scalars.null"
// "test_display_idcard.scalars.null" always contain null, the "test_display_idcard.scalars.null" has
// therefore no indexed value, and then is not available in the dictionary
// "test_display_idcard.scalars.null will be included in ObjectMetadataInterface.nonindexedpartmd or ObjectMetadataInterface.nonindexedlinkmd
// or ObjectMetadataInterface.nonindexedinstancemd.
"null": null
}
}
},
// internal id of the document, as declared by your DMU provider
"id": "partmd_sample"
}
],
// link metadata documents from parents to children, here we display the root node, we have am empty link
// metadata document for the root
"linkmd": [{}],
// no instance metadata document (specific for this instance, not shared among instances)
"instancemd": [{}],
// do we have annotations
"hasannotations": [false],
// do we have attached documents ?
"hasattacheddocuments": [false]
}

AttributeTypes are contained inside an AttributeInfoInterface.
Metadata

Enumeration Members

ATTR_BOOLEAN: 3

Attribute is a boolean.

Any metadata of this type may be a boolean, an array of boolean, or null. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_DATE: 2

Attribute is a date.

Any metadata of this type may be a date, an array of date or null. Dates are expressed as the number of milliseconds since January 1, 1970, 00:00:00 UTC. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_DATE_RANGE: 4

Attribute is a range of date.

Any metadata of this type may be a date, an array of range of date, or null. Dates are expressed as the number of milliseconds since January 1, 1970, 00:00:00 UTC. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_NUMBER: 1

Attribute is a number.

Any metadata of this type may be a number, an array of number, or null. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_NUMBER_RANGE: 5

Attribute is a range of number.

Any metadata of this type may be a number, an array of range of number, or null. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_STRING: 0

Attribute is a string.

Any metadata of this type may be a string, an array of string, or null. There may be cases when metadata of this type are not of the expected type (DMU provider error).

ATTR_UNKNOWN: 6

Attribute is unknown, an object or invalid.