Skip to content

fix(ontology): cardinality of one can be added to classes as long as not used in data - #1958

Merged
irinaschubert merged 8 commits into
mainfrom
wip/dev-233-superclass-cardinality
Dec 14, 2021
Merged

irinaschubert merged 8 commits into
mainfrom
wip/dev-233-superclass-cardinality

Conversation

@irinaschubert

@irinaschubert irinaschubert commented Dec 6, 2021 •

Copy link
Copy Markdown

resolves DEV-233

It is now possible to add a cardinality to a class even if it has a subclass. This is only allowed if that class or any sub-class (recursively) is not yet used in data, i.e. has no resource instantiated from it. Therefore I added a new check isClassUsedInData.

@irinaschubert irinaschubert self-assigned this Dec 6, 2021
@irinaschubert
irinaschubert marked this pull request as ready for review December 7, 2021 16:14

@BalduinLandolt BalduinLandolt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Comment thread webapi/src/main/scala/org/knora/webapi/responders/Responder.scala
Comment thread webapi/src/main/scala/org/knora/webapi/responders/Responder.scala Outdated
Comment thread webapi/src/main/scala/org/knora/webapi/responders/Responder.scala
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.3% 1.3% Duplication

@irinaschubert
irinaschubert merged commit 2cebac7 into main Dec 14, 2021
@irinaschubert
irinaschubert deleted the wip/dev-233-superclass-cardinality branch December 14, 2021 12:59
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

Successfully merging this pull request may close these issues.

4 participants