diff --git a/examples/querying_entity_traits.ipynb b/examples/querying_entity_traits.ipynb index ba4a3ec..5123d56 100644 --- a/examples/querying_entity_traits.ipynb +++ b/examples/querying_entity_traits.ipynb @@ -346,6 +346,46 @@ }, "id": "dbb66de3947d7b24" }, + { + "cell_type": "markdown", + "source": [ + "### An empty trait set is a valid response\n", + "\n", + "BAL has no restrictions on publishing to new entity references. So what happens if we just make up an entity reference, and try to get the trait set for it?" + ], + "metadata": { + "collapsed": false + }, + "id": "1bfdacf358dad9fa" + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "new_entity_ref = manager.createEntityReference(\"bal:///some/new/ref\")\n", + "\n", + "entity_trait_set = manager.entityTraits(new_entity_ref, EntityTraitAccess.kWrite, context)\n", + "\n", + "helpers.display_result(entity_trait_set)" + ], + "metadata": { + "collapsed": false + }, + "id": "c771cf01dc76f671" + }, + { + "cell_type": "markdown", + "source": [ + "...an empty trait set is returned.\n", + "\n", + "If the manager does not know the trait set, or it's not applicable, the returned trait set may be empty. For example, as illustrated here, the entity reference may point to a new entity with no type constraints. " + ], + "metadata": { + "collapsed": false + }, + "id": "2985087ccc829642" + }, { "cell_type": "markdown", "source": [