Properties define a has-a relationship between concepts. For example, a business has an address. Properties must be semantically meaningful, so they can be useful as input to other concepts or actions. Because of this, every property must have a named type and can't use a primitive type directly.
For example, you can't define a property as latitude: type(Decimal)
. Instead, you must refer to another concept. You could use viv.geo.Latitude
, which is already defined (in a Core capsule). If it's not defined, then you could create it as Decimal. Either way, wrapping the primitive type in a concept makes the property meaningful.
For more information, see the Properties section in the Modeling Concepts Developers' Guide.
structure (Population) {
property (%name%) {
type (%concept%)
}
}
structure (Population) {
property (size) {
type (PopulationSize)
}
property (ad) {
type (AdministrativeDivision)
}
}
bind optional | Binds a specific value to a property |
default-value optional | Defines a default value for a primitive-type property |
description optional | Description |
lazy-source optional | Specify a Fetch action that loads data for the property asynchronously |
max optional | Defines the maximum supported cardinality of the property |
min optional | Defines the minimum supported cardinality of the property |
override optional | Allows overriding cardinality, type, and value binding for the property when extending the structure |
type optional | Specifies the property type, which must be a primitive or structure concept type |
visibility optional | Controls the visibility of the property to the planner |