ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: ACE client
Date Wed, 26 Jun 2013 07:41:00 GMT

Thx to you and Bram for the explanations. Now I would say, that I understand cardinality.
Cardinality in general was already clear, but in conjunction with the ACE implementation,
it wasn't.

Now I got it.


-----Urspr√ľngliche Nachricht-----
Von: Marcel Offermans [] 
Gesendet: Dienstag, 25. Juni 2013 23:33
Betreff: Re: ACE client

On Jun 25, 2013, at 17:30 , wrote:

> This was a good recommendation. I was able to implement a set of gogo commands to work
on the ACE repo.

You're welcome!

> One short question:
> Are the left- and rigthCardinality mandatory or optional attributes?

It is mandatory, because we need to know what you want.

> I added some associations without any cardinality and they are all displayed correctly
within the UI.

If you don't specify them, 1:1 is assumed.

> Currently I don't really understand the principle of these attributes.
> Having 1:1 cardinality is clear. But is this evaluated somewhere in the code?
> Mostly I see the value 2147483647. This is the MAX_INT. But I think that this value is
platform dependent and seems not to be a good choice. Or do I misunderstand this issue?

Let me start by stating that in Java, data types and their limits are defined in a platform
independent way. So Integer.MAX_VALUE is the same everywhere.

Now, to explain cardinality and how it cooperates with filter conditions. Let's start with
filters. You can specify a filter that might match more than one instance. Whenever that happens,
you end up with a collection of instances. Now, the first thing that happens is that this
collection gets sorted. How? With a comparator that you can specify per instance (or, for
example for artifacts, which can have many types, per type). After the collection is sorted,
the cardinality is used to determine how many instances to keep in the collection (in most
cases either 1 or everything).

Let's use a bundle as an example:

1) You have a filter that states: ( and this matches for
example two entities: version 1.0 and version 1.1.
2) Then the list gets sorted: the highest version ends up on top.
3) Then, if cardinality is 1, only the highest one will end up being selected.

As you can see, this is a way to say: give me the highest version of bundle

You could also, in the spirit of semantic versioning, say that you want the highest version
in the range from [1.0, 2.0) by having a filter that states: (&(>=1.0)(Bundle-Version<2.0))

Greetings, Marcel

View raw message