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

remove-delta #1047

Merged
merged 3 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.bund.digitalservice.ris.norms.application.service;

import de.bund.digitalservice.ris.norms.domain.entity.EIdPart;
import de.bund.digitalservice.ris.norms.domain.entity.Mod;
import de.bund.digitalservice.ris.norms.domain.entity.Norm;
import de.bund.digitalservice.ris.norms.domain.entity.Regelungstext;
import de.bund.digitalservice.ris.norms.utils.NodeCreator;
Expand Down Expand Up @@ -33,16 +32,7 @@ public void findAndCreateReferences(final Norm norm) {
* @param regelungstext - the regelungstext to be analyzed
*/
public void findAndCreateReferences(final Regelungstext regelungstext) {
if (regelungstext.getMods().stream().anyMatch(Mod::containsRef)) {
return;
}

regelungstext
.getMods()
.forEach(mod -> {
mod.getSecondQuotedText().ifPresent(this::findAndCreateReferencesInNode);
mod.getQuotedStructure().ifPresent(this::findAndCreateReferencesInNode);
});
findAndCreateReferencesInNode(regelungstext.getDocument());
}

private void findAndCreateReferencesInNode(final Node node) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import de.bund.digitalservice.ris.norms.domain.entity.eli.DokumentExpressionEli;
import de.bund.digitalservice.ris.norms.utils.NodeParser;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import lombok.AllArgsConstructor;
Expand Down Expand Up @@ -105,19 +104,6 @@ public Optional<String> getRefersTo() {
return NodeParser.getValueFromExpression("./@refersTo", this.element);
}

/**
* Extracts the {@link Mod} for this article.
*
* @return the {@link Mod}
*/
public List<Mod> getMods() {
return NodeParser
.getElementsFromExpression("./*//mod", this.element)
.stream()
.map(Mod::new)
.toList();
}

/**
* Checks weather the {@link Article} refers to a Geltungszeitregel (which would define when a law e.g. enters
* into force)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,35 +105,6 @@ public Lifecycle getOrCreateLifecycle() {
}
}

/**
* Returns a {@link Analysis} instance from the {@link Meta}.
*
* @return the Analysis node as {@link Analysis}
*/
public Optional<Analysis> getAnalysis() {
return NodeParser.getElementFromExpression("./analysis", element).map(Analysis::new);
}

/**
* Gets the akn:analysis element of the norm, or creates it if it does not yet exist.
*
* @return the akn:analysis element of the norm
*/
public Analysis getOrCreateAnalysis() {
return getAnalysis()
.orElseGet(() -> {
final var newElement = NodeCreator.createElementWithEidAndGuid("akn:analysis", element);
newElement.setAttribute(SOURCE_ATTIBUTE, ATTRIBUTSEMANTIK_NOCH_UNDEFINIERT);

// Metadata needs to be in the correct order, so we're inserting it before temporal data, which is the
// element that has to follow the analysis in a valid document.
final var insertInOrderSiblibg = getOrCreateTemporalData().getElement();
element.insertBefore(newElement, insertInOrderSiblibg);

return new Analysis(newElement);
});
}

/**
* Gets the akn:proprietary element of the norm, or creates it if it does not yet exist.
*
Expand Down
Loading