Re: access on items in a cluster

2019-10-30 Thread Diego Boscá
Hi Georg,

Seems like you want to validate paths vs the RM. This is doable but
probably is easier to use archetypes for that (as every valid archetype
path is also a valid rm path). Is there a reason for not using the
archetypes? I assume your AQL queries are based on some OPT your system
should be aware of.

Regards

El mié., 30 oct. 2019 a las 13:26, Georg Fette (<
georg.fe...@uni-wuerzburg.de>) escribió:

> Hello,
> I would like to typecheck AQL queries and have some problems doing that:
> The items in a CLUSTER are of type ITEM. If I access
> myCluster/items[at0001]/value, is there any possibility to type-check
> the validity of this path without having the concrete archetype
> definition at hand? Just using the reference model isn't enough for this
> task, because ITEMs do not have a value-field.
> How can (from an object oriented point of view) the values of the ITEMs
> be accessed without knowing if it is an ELEMENT ?
> Why is there a distiguishment between ELEMENT, ITEM and CLUSTER at all ?
> If the fields "items" and "value" were already attached to the class
> ITEM it would be easier.
> Greetings
> Georg
>
> --
> -
> Dipl.-Inf. Georg Fette  Raum: B001
> Universität WürzburgTel.: +49-(0)931-31-85516
> Am Hubland  Fax.: +49-(0)931-31-86732
> 97074 Würzburg  mail: georg.fe...@uni-wuerzburg.de
> -
>
>
> ___
> openEHR-technical mailing list
> openEHR-technical@lists.openehr.org
>
> http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
>


-- 

[image: VeraTech for Health SL] 

[image: Twitter]   [image: LinkedIn]
 [image: Maps]


Diego Boscá Tomás / Senior developer
diebo...@veratech.es
yamp...@gmail.com

VeraTech for Health SL
+34 654604676 <+34%20654604676>
www.veratech.es

La información contenida en este mensaje y/o archivo(s) adjunto(s), enviada
desde VERATECH FOR HEALTH, SL, es confidencial/privilegiada y está
destinada a ser leída sólo por la(s) persona(s) a la(s) que va dirigida. Le
recordamos que sus datos han sido incorporados en el sistema de tratamiento
de VERATECH FOR HEALTH, SL y que siempre y cuando se cumplan los requisitos
exigidos por la normativa, usted podrá ejercer sus derechos de acceso,
rectificación, limitación de tratamiento, supresión, portabilidad y
oposición/revocación, en los términos que establece la normativa vigente en
materia de protección de datos, dirigiendo su petición a Avda Puerto 237,
1º, pta 1 - 46011 Valencia o bien a través de correo electrónico
d...@veratech.es

Si usted lee este mensaje y no es el destinatario señalado, el empleado o
el agente responsable de entregar el mensaje al destinatario, o ha recibido
esta comunicación por error, le informamos que está totalmente prohibida, y
puede ser ilegal, cualquier divulgación, distribución o reproducción de
esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos
devuelva el mensaje original a la dirección arriba mencionada. Gracias
___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


Re: access on items in a cluster

2019-10-30 Thread Thomas Beale

Hi Georg,

ITEM is an abstract type. The hierarchy pattern of ITEM / CLUSTER / 
ELEMENT 
 
is one of the most common in class modelling.


- thomas

On 30/10/2019 09:26, Georg Fette wrote:

Hello,
I would like to typecheck AQL queries and have some problems doing that:
The items in a CLUSTER are of type ITEM. If I access 
myCluster/items[at0001]/value, is there any possibility to type-check 
the validity of this path without having the concrete archetype 
definition at hand? Just using the reference model isn't enough for 
this task, because ITEMs do not have a value-field.
How can (from an object oriented point of view) the values of the 
ITEMs be accessed without knowing if it is an ELEMENT ?
Why is there a distiguishment between ELEMENT, ITEM and CLUSTER at all 
? If the fields "items" and "value" were already attached to the class 
ITEM it would be easier.

Greetings
Georg


--
Thomas Beale
Principal, Ars Semantica 
Consultant, ABD Project, Intermountain Healthcare 

Management Board, Specifications Program Lead, openEHR Foundation 

Health IT blog  | Culture blog 
 | The Objective Stance 

___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


Re: access on items in a cluster

2019-10-30 Thread Seref Arikan
Hi Georg,
See inline

On Wed, Oct 30, 2019 at 12:26 PM Georg Fette 
wrote:

> Hello,
> I would like to typecheck AQL queries and have some problems doing that:
> The items in a CLUSTER are of type ITEM. If I access
> myCluster/items[at0001]/value, is there any possibility to type-check
> the validity of this path without having the concrete archetype
> definition at hand? Just using the reference model isn't enough for this
> task, because ITEMs do not have a value-field.
> How can (from an object oriented point of view) the values of the ITEMs
> be accessed without knowing if it is an ELEMENT ?
>

They cannot be accessed. This is one corner case of two level modelling
when it is applied on an RM class that uses a field of abstract type, such
as an ITEM.
The archetypes end up setting the concrete type so from a type
checking/validation perspective, the fact that a field of type ITEM should
have  instances of type CLUSTER or ELEMENT are declared by the archetype.
So you cannot check it without using the archetype, or validate it for that
matter. You'd actually hit this way up in the RM tree before you make it to
types used at the leaves: COMPOSITION has its content field defined as
CONTENT_ITEM
There are no perfect design decisions in computer science/engineering, you
win some, you lose some. Tom did the right thing by using abstract types
when following a OO design for RM. The constraint mechanism (ADL) has to
deal with this correct decision, modelling tools then in turn have to deal
with this, then AQL validators and programmers who write code against
serialised data.


Why is there a distiguishment between ELEMENT, ITEM and CLUSTER at all ?
> If the fields "items" and "value" were already attached to the class
> ITEM it would be easier.
>
CLUSTER is a container of actual data, which allows you to represent
hierarchical structures. ELEMENT is actual data.
All the use cases and justifications for the composite design pattern apply
here, because this is a textbook use of that pattern.

All the best
S

Greetings
> Georg
>
> --
> -
> Dipl.-Inf. Georg Fette  Raum: B001
> Universität WürzburgTel.: +49-(0)931-31-85516
> Am Hubland  Fax.: +49-(0)931-31-86732
> 97074 Würzburg  mail: georg.fe...@uni-wuerzburg.de
> -
>
>
> ___
> openEHR-technical mailing list
> openEHR-technical@lists.openehr.org
>
> http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
>
___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


access on items in a cluster

2019-10-30 Thread Georg Fette

Hello,
I would like to typecheck AQL queries and have some problems doing that:
The items in a CLUSTER are of type ITEM. If I access 
myCluster/items[at0001]/value, is there any possibility to type-check 
the validity of this path without having the concrete archetype 
definition at hand? Just using the reference model isn't enough for this 
task, because ITEMs do not have a value-field.
How can (from an object oriented point of view) the values of the ITEMs 
be accessed without knowing if it is an ELEMENT ?
Why is there a distiguishment between ELEMENT, ITEM and CLUSTER at all ? 
If the fields "items" and "value" were already attached to the class 
ITEM it would be easier.

Greetings
Georg

--
-
Dipl.-Inf. Georg Fette  Raum: B001
Universität WürzburgTel.: +49-(0)931-31-85516
Am Hubland  Fax.: +49-(0)931-31-86732
97074 Würzburg  mail: georg.fe...@uni-wuerzburg.de
-


___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org