Attributes

Attributes are properties that specify the information that is associated with an element of your business model. Entities types, concepts, and events types can have attributes. An attribute must have a type that represents the attributes values. If an object is an instance of a type, then it has a single value or a collection of values for each attribute of this type.

To define attributes, you can use the with, has, and can be keywords. with and has have the same purpose. You cannot use the has or with keywords to specify that an attribute has an entity type as type. Use the related to construct to create a relationship instead.

with

To add a list of attributes, use the with keyword. The attributes must be separated by commas, except for the last attribute in the list, which is preceded by the and connector. Each attribute is introduced by an indefinite article: a, an, some, or several different.

an address is a concept with a street, a town, a zip code and a country.
a ticket is a business entity identified by a ticket number with a price (numeric).
a bag scan is a business event time-stamped by a scan time (date & time) with a scan ID, an airport tag and a scan location.
has
You can create a separate statement for each attribute by using the has keyword:
a ticket is a business entity identified by a ticket number.
a ticket has a price (numeric).
To define an attribute with multiple values, you can use the some keyword, or several different keyword.
a city has some stores.
a city has several different stores.

The stores attribute in these two cases is slightly different. The values in the attribute defined with some are unrestricted with respect to values that are the same, whereas the values in the attribute defined with several different must be unique.

A city entity type that has an attribute defined with the some keyword can contain two or more values that are the same. For example, the stores attribute of an entity named Paris might contain the following values: GalerieLafayette, H&M, GalerieLafayette, Printemps. A city entity type that has an attribute defined with the several different keyword cannot contain two or more values that are the same. For example, the stores attribute of the previous entity named Paris can contain only a single value of GalerieLafayette. In this case, the attribute contain the following values: GalerieLafayette, H&M, Printemps.

To specify an attribute and its type, you can also use constructions with that is, that are, or named the:
a ticket has a price that is a number.
a ticket has a number, named the price.
a shopping cart has some items that are articles.
You cannot use named the with a plural term.

You can specify several attributes in a has statement:

an airport has a name, a location (a geometry) and a baggage handling system (text).
can be
To define a boolean attribute, use the can be keyword:
an airport can be closed.

In a rule condition, this boolean expression can be used as follows:

if 'the airport' is closed

In a rule action, this boolean expression can be used as follows:

then make it false that 'the aiport' is closed;

Types

When no type is specified for an attribute, the default type is text (String).

a person has a name.
a person has some addresses.

You can specify another type by adding the type between parentheses after the attribute.

Predefined types

To set a predefined primitive type to an attribute, you add the type after the name of the attribute.

  • (numeric)
    a location has a latitude (numeric)
  • (integer)
    an aircraft has a capacity first class (integer)
  • (text)
    a person has a name (text)
  • (time)
    a rental has a rental start time (time)
  • (date & time)
    a flight has a scheduled departure date (date & time)
  • (duration)
    a flight has a flight remaining time (duration)

If you define a multiple attribute, the type is also in the plural form:

a flight has some seats (numerics)

Geospatial types

You can also select other types that are defined in the BOM such as geospatial types:

an airport has a location (a point)

The following types represent static spatial geometries:

  • (a geometry)
  • (a point)
  • (a polygon)
  • (a line string)
  • (a linear ring)
  • (a multi point)
  • (a multi polygon)
  • (a multi line string)
  • (a multi linear ring)

The following type represents moving spatial geometries:

  • (a moving geometry)

For more information on geospatial concepts and for examples of business model definitions with geospatial types, see Geographic locations and data and Example of a car sharing business model.