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

Move domain specific code from service to Norm object #886

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SebastianRossa
Copy link
Contributor

No description provided.

Copy link

sonarqubecloud bot commented Jan 7, 2025

Copy link
Member

@malte-laukoetter malte-laukoetter left a comment

Choose a reason for hiding this comment

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

I really like moving this kind of logic into the domain layer :) Just added some comments so I don't forget my thoughts on how we could improve this even more ^^

*
* @return The list of target norm elis
*/
public List<ExpressionEli> targetLawElis() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public List<ExpressionEli> targetLawElis() {
public List<ExpressionEli> getTargetLawElis() {

Comment on lines +146 to +148
return getNodesFromExpression("//body//article[not(ancestor-or-self::mod)]", document)
.stream()
.map(Article::new)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return getNodesFromExpression("//body//article[not(ancestor-or-self::mod)]", document)
.stream()
.map(Article::new)
return getArticles()

Comment on lines +150 to +151
article.getRefersTo().isPresent() &&
!article.getRefersTo().get().equals("geltungszeitregel")
Copy link
Member

Choose a reason for hiding this comment

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

we could also have this logic in the Article class eg. Article::isAmendingArticle or not(Article::isGeltungszeitregel) or something similar

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.

2 participants