represents an empty entity store for entities of type "type".


represents an entity store for entities of type "type" with properties and values defined by data.


represents an entity store for entities of multiple types.

Details and Options

  • If an EntityStore object is included in the list EntityStores[], then the entity types it contains are accessed automatically when Entity is used. Unless permissions are set otherwise, its contents can be modified by assignments of the form entity[property]=value.
  • Data in an EntityStore object can be accessed directly using store[obj,"property"], where obj is an Entity, EntityClass, EntityProperty, or EntityPropertyClass object.
  • In EntityStore[{tspec1,tspec2,}], each of the tspeci can be either "typei" or "typei"datai.
  • In EntityStore["type"data], data is an association that defines entities, properties, and values associated with the specified type.
  • The "Entities" element of data can give an association with properties of entities of the given type: "Entities"-><|"name1"->props1,|>. The propsi give values of properties for the specified entity: <|"propa"->val1a,"propb"->val1b,|>.
  • The special property "Label" can be given for any entity, specifying how it should be displayed.
  • The "Properties" element of data gives information on properties, such as how properties should be displayed, and how property values that are not explicitly specified should be computed.
  • Possible entries in the data association for a given type include:
  • "Entities"association giving values of properties for each entity
    "EntityClasses"association giving entities and properties for entity classes
    "Label"label to use in displaying this type
    "LabelPlural"plural form of label to use in displaying this type
    "Properties"association giving information on properties for this type
    "PropertyClasses"association giving property class information for this type
  • The "Properties" entry in data is of the form <|"propa"-><|k1->v1,|>,"propb"->,|>. Possible entries in the association given for each property include:
  • "DefaultFunction"default function to compute the value of this property
    "Label"label to use in displaying this property
  • With the setting "DefaultFunction"->f for a given property, f is applied to an entity to compute the value of that property if it is not specified explicitly in the "Entities" association.
  • Possible entries for each entity class in "EntityClasses" include:
  • "Entities"list of names or predicates specifying entities in the class
    "Label"label to use in displaying this entity class
  • In the association for a particular entity class, "Entities"->{"name1","name2",} gives an explicit list of entities in the entity class. "Entities"->"prop"->pred specifies that the entities in the class are those for which pred gives True when applied to the value of the property prop.
  • Possible entries for each property class in "PropertyClasses" include:
  • "Label"label to use in displaying this property class
    "Properties"names of properties in this property class


open allclose all

Basic Examples  (1)

Create an entity store for entities with type "t" named "e1" and "e2", each with properties "p1" and "p2":

Click for copyable input

Register this entity store in the global list of entity stores:

Click for copyable input

Now property values for an entity are automatically looked up in the entity store:

Click for copyable input

Get the list of entities of the specified type:

Click for copyable input

Find entities whose value of the property "p2" is greater than 100:

Click for copyable input

Unregister the entity store:

Click for copyable input

Scope  (5)

See Also

Entity  EntityRegister  EntityStores  EntityValue  EntityProperty  EntityClass  EntityPropertyClass  ResourceObject

Related Workflows

Introduced in 2016