Book a Demo

Author Topic: Specifying additional attribute characteristics  (Read 5697 times)

albena

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Specifying additional attribute characteristics
« on: November 03, 2011, 07:23:45 pm »
Hi there!
I am creating a domain model using logical diagram populated with class elements. Each class has one or more attributes.
For each attribute I can fill in several characteristics such as:
- Name
- Type
- Scope, etc.

These are not enough for me.
In addition I need to specify the following characteristics:
- Length
- Unique
- Not null

How do I do that?
Right now I can say that the attribute is named "Postal code" and is of type String.
But, where do I say that it has exactely 6 characters and must not be null, yet it doesn't need to be unique?

Many thanks for your time and help.
Greets,
Albena

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Specifying additional attribute characteristic
« Reply #1 on: November 03, 2011, 09:38:20 pm »
Albena,

That's what tagged values were invented for.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Specifying additional attribute characteristic
« Reply #2 on: November 04, 2011, 08:15:59 am »
Or, you could use the data modeling profile.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Specifying additional attribute characteristic
« Reply #3 on: November 04, 2011, 09:00:45 am »
Constraints!

(PS are you sure your Postal code attribute is of type String? Or should it be of type PostalCode?)
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Specifying additional attribute characteristic
« Reply #4 on: November 04, 2011, 07:53:20 pm »
For the restrictions: OCL would be the choice.

q.

albena

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Specifying additional attribute characteristic
« Reply #5 on: November 05, 2011, 02:43:35 am »
Thanx all of you for the useful answers. Here I am happy to announce my first UML Profile with all the additional tagged values I needed. It works fantastically.
Constraints are also a nice way to realise the same, yet their description is very free style. Do you use any special syntax to describe constraints?

@KP Good point! I should define my own data type PostalCode.

Have fun!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Specifying additional attribute characteristic
« Reply #6 on: November 06, 2011, 09:25:24 pm »
Quote
syntax to describe constraints
 
OCL

q.