Skip to content

Attributes

Overview

Attributes are how spec data is represented within Spec Check.

There are two parts to attributes; Set Definitions and Sets. The Set Definitions define the structure of the attributes; groups, tags, attribute names, descriptions, etc. The Sets then provide just the values that fill in these definitions.

Every machine range has it's own Set Definition, all the revisions for machines under that range have attribute sets that hold values for this definition.

Models

Attribute Definition

Schema

{
    "id": 0,
    "name": "string",
    "description": "string",
    "order": 0,
    "measure": "string",
    "units": [ "string" ],
    "tags": [ "string" ],
    "type": "string",
    "isArchived": false,
    "isMaster": false,
    "isSortable": false
}

Properties

  • name - The name of the attribute.
  • description - A brief description of the attribute (where available).
  • order - The order in which this attribute come within its group.
  • type - The attribute type either Alphanumeric, Numeric, or Measure
  • tags - The tags for a given attribute, notably summary, highlight, sort.
  • isArchived - Is the attribute archived? Archived attributes are still available but will not be filled in for new equipment.
  • isMaster - Is this the master attribute? The default sorting attribute.
  • isSortable - Is this attribute suitable for sorting results on.
  • measure - The key for the measure for the attribute data.
  • units - The units for the attribute data.

Examples

Alphanumeric Attribute Definition
{
    "id": 44,
    "name": "Rating Standard - Net",
    "description": "",
    "order": 54,
    "tags": [],
    "type": "Alphanumeric"
}
Numeric Attribute Definition
{
    "id": 58,
    "name": "Speeds - Reverse",
    "description": "",
    "order": 72,
    "tags": [],
    "type": "Numeric"
}
Measure Attribute Definition
{
    "id": 45,
    "name": "Engine Output - Net",
    "description": "",
    "order": 55,
    "measure": "power",
    "units": [
        "kW",
        "hp"
    ],
    "tags": [
        "summary",
        "sort"
    ],
    "type": "Measure",
    "isSortable": true
}

Attribute Group Definition

Schema

{
    "id": 0,
    "name": "string",
    "order": 0,
    "attributes": [{
        ... attribute definition
    }],
    "groups": [{
        ... attribute group definition
    }]
}

Properties

Attribute Set Definition

Schema

{
    "id": 0,
    "attributes": [ {
        ... attribute definition
    }],
    "groups": [{
        ... attribute group definition
    }]
}

Properties

Attribute Set Value

Schema

{
    "attributeId": 0,
    "alphanumericValue": "string",
    "numericValue": 0.0,
    "formattedNumericValue": "string",
    "values": [{
        "unit": "string",
        "value": 0.0,
        "formattedValue": "string"
    }]
}

Properties

  • attributeId - The id of the attribute these values are for.
  • alphanumericValue - Where the attribute type is alphanumeric this will be a string containing the attribute data.
  • numericValue - Where the attribute type is numeric this will be a number containing the attribute data.
  • formattedNumericValue - Where the attribute type is numeric and includeFormattedValues is true this will be a string of the formatted number - trailing zeros will be trimmed.
  • values - Where the attribute type is measure this will be an array of unit values.

Examples

Alphanumeric Attribute Value
{
    "attributeId": 44,
    "alphanumericValue": "ISO 9249"
}
Numeric Attribute Value
{
    "attributeId": 58,
    "numericValue": 1.000
}
Measure Attribute Value
{
    "attributeId": 45,
    "values": [
        {
            "unit": "mm",
            "value": 10296.000,
            "formattedValue": "10269"
        },
        {
            "unit": "ft-in",
            "value": 405.000,
            "formattedValue": "33ft 9in"
        }
    ]
}

Attribute Set

Schema

{
    "id": 0,
    "definitionId": 0,
    "values": [{
        ... attribute value
    }]
}

Properties

  • definitionId - The id of the attribute set definition that this set matches too.
  • values - An array of attribute set values.

Examples

Set Containing 3 Attributes
{
    "id": 131,
    "definitionId": 1,
    "values": [
        {
            "attributeId": 44,
            "alphanumericValue": "ISO 9249"
        },
        {
            "attributeId": 58,
            "numericValue": 1.000
        },
        {
            "attributeId": 45,
            "values": [
                {
                    "unit": "kW",
                    "value": 405.000
                },
                {
                    "unit": "hp",
                    "value": 543.000
                }
            ]
        }
    ]
}