Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change type of core:relatedTo to gml:ReferenceType #20

Open
clausnagel opened this issue Aug 15, 2019 · 1 comment
Open

Change type of core:relatedTo to gml:ReferenceType #20

clausnagel opened this issue Aug 15, 2019 · 1 comment

Comments

@clausnagel
Copy link
Member

In AbstractCityObjectType, the generalizesTo property has the type gml:ReferenceType. This means it can only be used to reference a city object but it cannot contain a city object inline. This is the way it should be.

Then AbstractCityObjectType can also have a relatedTo property that is modelled inside the type CityObjectRelationType (which maps the corresponding UML association class). Now, in contrast to generalizesTo, the relatedTo property has the type AbstractCityObjectPropertyType. Consequently, it can also contain a city object inline.

The type of relatedTo should be changed to gml:ReferenceType so that it cannot contain a city object inline and thus is consistent with generalizesTo.

@TatjanaKutzner
Copy link
Contributor

This issue relates to issue #18 which says that core:CityObjectRelationPropertyType should be changed into an inline property.

In the UML model, CityObjectRelation is defined in this way:
grafik

What we want to have in the instance document is:
grafik

This can only be achieved by setting the tagged value of the relatedTo association in the UML model to inlineOrByReference.
This, however, also means that we cannot guarantee that the <CityObjectRelation> element is always provided inline and the inner <relatedTo> element always references the related object.

When setting the tagged value to inline, instance documents will have to provide both, the <CityObjectRelation> element and the inner <relatedTo> element inline, which will not validate, as we have duplicate WallSurface ids:
grafik

When setting the tagged value to byReference, instance documents will not be able to provide the <CityObjectRelation> element, only the <relatedTo> element can be used to directly reference the related object:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants