-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
There was a problem hiding this 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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public List<ExpressionEli> targetLawElis() { | |
public List<ExpressionEli> getTargetLawElis() { |
return getNodesFromExpression("//body//article[not(ancestor-or-self::mod)]", document) | ||
.stream() | ||
.map(Article::new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return getNodesFromExpression("//body//article[not(ancestor-or-self::mod)]", document) | |
.stream() | |
.map(Article::new) | |
return getArticles() |
article.getRefersTo().isPresent() && | ||
!article.getRefersTo().get().equals("geltungszeitregel") |
There was a problem hiding this comment.
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
No description provided.