"concept" CTO Statement Syntax

Q

What is the syntax of the "concept" CTO Statement

✍: FYIcenter.com

A

The "concept" statement declares a generic data type to represent secondary data entities to support primary data entities. Here is the syntax of an "concept" statement:

concept type_name [extends super_type] {
  o|--> property_type property_name [optional] [default value] [validator]
  ...
  o|--> property_type[] property_name [optional]
  ...
}

Syntax elements used in a "transaction" CTO Statement:

  • "type_name" - A required field to specify the name for this data type.
  • "extends super_type" - An optional field to specify the super "concept" type, if this data type is an extension data type.
  • "o" - A required flag to specify a value property for this data type.
  • "-->" - A required flag to specify a reference property for this data type.
  • "property_type" - A required field to specify the data type of this property.
  • "[]" An optional flag to indicate that this property is an array.
  • "property_name" - A required field to specify the name of this property.
  • "optional" - An optional flag to indicate that this property is not required.
  • "default value" - An optional field to specify a default value for this property.
  • "validator" An optional field to specify a specify a validation rule like "range=[...]" or "[regex=/.../]".

 

"enum" CTO Statement Syntax

"event" CTO Statement Syntax

Business Network CTO Modeling Language

⇑⇑ Hyperledger Composer Tutorials

2019-04-24, 243👍, 0💬