Table of Contents

Legacy vs new editor ontology

Alex Cota Updated by Alex Cota

The new data model supports a more persistent ontology by making it possible modify your ontology without affecting previously created labels.

When you query ontology.normalized connected to a project in the new editor (see example here), it will return values for schemaNodeId and featureSchemaId. Those values point to their respective schema node and feature schema entities.

To see a side-by-side comparison of the export formats from the legacy editor and the new editor, see Legacy vs new editor JSON exports.

Legacy vs new ontology structure

In the legacy editor, the ontology is not schematized and the data model does not enforce any ontology structure. In the new editor data model, the ontology is schematized and its structure is enforced. Two new entities exist in the new data model:

  • The schema nodes provide the "tree" structure. Each schema node contains information regarding the parents, children, and the structure of this specific ontology.
  • The feature schemas are the reusable "leaves" of the tree structure. Each feature schema contains all of the information for rendering a feature of its kind, such as class name, and color, and type.

The two examples below show how the same exact ontology customizations would appear in the legacy ontology format vs the new ontology format. The diagram below provides a visual comparison of the two ontology examples that follow.

New editor example

While the two ontology formats may look similar, the ontology of the new data model is much more robust in terms of usage and capabilities, and has more strictly enforced requirements when if comes to formatting. Notice that the new ontology is schematized (contains IDs that point to the schema node and feature schema) and that the featureSchemaIds are the same for each nested classification. This is because the new editor is built on a tree data model. Think of the schema nodes as the "structure" and the feature schemas as the "leaves". Feature schemas can be reused.

{
"tools": [
{
"schemaNodeId": "ckcc816uc009p0y3ffeb4d8d6",
"featureSchemaId": "ckcc816ud009q0y3f3ocq6hrc",
"required": false,
"name": "Dog",
"tool": "rectangle",
"color": "#FF0000",
"classifications": [
{
"schemaNodeId": "ckcc8187t009v0y3fhz1r2mif",
"featureSchemaId": "ckcc8187t009w0y3fdsmcgimk",
"required": false,
"instructions": "Is it an adult?",
"name": "is_it_an_adult?",
"type": "radio",
"options": [
{
"schemaNodeId": "ckcc8188o009x0y3f0bmihfgc",
"featureSchemaId": "ckcc8188o009y0y3f144vfozh",
"label": "Yes",
"value": "yes"
},
{
"schemaNodeId": "ckcc8188o009z0y3f9teec12b",
"featureSchemaId": "ckcc8188o00a00y3fhrxog119",
"label": "No",
"value": "no"
}
]
}
]
},
{
"schemaNodeId": "ckcc816uh009r0y3fefnx6dka",
"featureSchemaId": "ckcc816uh009s0y3f006ge2g3",
"required": false,
"name": "Cat",
"tool": "rectangle",
"color": "#FF8000",
"classifications": [
{
"schemaNodeId": "ckcc8187n009t0y3ff1vobea4",
"featureSchemaId": "ckcc8187t009w0y3fdsmcgimk",
"required": false,
"instructions": "Is it an adult?",
"name": "is_it_an_adult?",
"type": "radio",
"options": [
{
"schemaNodeId": "ckcc8188r00a10y3f0im001go",
"featureSchemaId": "ckcc8188o009y0y3f144vfozh",
"label": "Yes",
"value": "yes"
},
{
"schemaNodeId": "ckcc8188s00a30y3f7rrzde6c",
"featureSchemaId": "ckcc8188o00a00y3fhrxog119",
"label": "No",
"value": "no"
}
]
}
]
}
],
"classifications": []
}

Legacy editor example

In the legacy editor, ontology is not schematized. There are no schema nodes or feature schemas to provide structure or reusability. The ontology only contains raw input.

{
"tools": [
{
"name": "Dog",
"color": "#FF0000",
"tool": "rectangle",
"classifications": [
{
"name": "is_it_an_adult?",
"instructions": "Is it an adult?",
"type": "radio",
"options": [
{
"value": "yes",
"label": "Yes"
},
{
"value": "no",
"label": "No"
}
],
"required": false
}
]
},
{
"name": "Cat",
"color": "#FF8000",
"tool": "rectangle",
"classifications": [
{
"name": "is_it_an_adult?",
"instructions": "Is it an adult?",
"type": "radio",
"options": [
{
"value": "yes",
"label": "Yes"
},
{
"value": "no",
"label": "No"
}
],
"required": false
}
]
}
],
"classifications": []
}

Was this page helpful?

Migration guide

Legacy vs new editor JSON exports

Contact