DM-602: Do not skip annotation after chenge type for documine #211
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.ManualRedactions;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.entitymapped.BaseAnnotation;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.entitymapped.IdRemoval;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.entitymapped.ManualForceRedaction;
|
||||
@ -89,6 +90,11 @@ public class ManualChangeOverwrite {
|
||||
}
|
||||
}
|
||||
|
||||
if(manualChange instanceof ManualRedactionEntry){
|
||||
removed = false;
|
||||
ignored = false;
|
||||
}
|
||||
|
||||
if (manualChange instanceof ManualForceRedaction manualForceRedaction) {
|
||||
removed = false;
|
||||
ignored = false;
|
||||
|
||||
@ -35,6 +35,10 @@ public class UnprocessedChangesService {
|
||||
|
||||
public List<UnprocessedManualEntity> addInformationToUnprocessedManualEntities(String fileId, String dossierId, String dossierTemplateId, ManualRedactions manualRedactions) {
|
||||
|
||||
// FIXME, because of the color if you start redaction-service a no processing is performed, a nullpointer will be throw when getting color.
|
||||
// The entire concept needs to be rethought, because it is bullshit.
|
||||
dictionaryService.updateDictionary(dossierTemplateId, dossierId);
|
||||
|
||||
Document document = DocumentGraphMapper.toDocumentGraph(redactionStorageService.getDocumentData(dossierId, fileId));
|
||||
List<UnprocessedManualEntity> unprocessedManualEntities = new ArrayList<>();
|
||||
Set<String> annotationIds = manualRedactions.getEntriesToAdd().stream().map(ManualRedactionEntry::getAnnotationId).collect(Collectors.toSet());
|
||||
|
||||
@ -1273,6 +1273,13 @@ rule "MAN.3.2: Apply image recategorization"
|
||||
retract($recategorization);
|
||||
end
|
||||
|
||||
rule "MAN.3.3: Apply recategorization entities by default"
|
||||
salience 128
|
||||
when
|
||||
$entity: IEntity(getManualOverwrite().getRecategorized().orElse(false))
|
||||
then
|
||||
$entity.apply("MAN.3.3", "Recategorized entities are applied by default.");
|
||||
end
|
||||
|
||||
// Rule unit: MAN.4
|
||||
rule "MAN.4.0: Apply legal basis change"
|
||||
|
||||
@ -1420,6 +1420,13 @@ rule "MAN.3.2: Apply image recategorization"
|
||||
retract($recategorization);
|
||||
end
|
||||
|
||||
rule "MAN.3.3: Apply recategorization entities by default"
|
||||
salience 128
|
||||
when
|
||||
$entity: IEntity(getManualOverwrite().getRecategorized().orElse(false))
|
||||
then
|
||||
$entity.apply("MAN.3.3", "Recategorized entities are applied by default.");
|
||||
end
|
||||
|
||||
// Rule unit: MAN.4
|
||||
rule "MAN.4.0: Apply legal basis change"
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
MAN.*.*
|
||||
MAN.0.*
|
||||
MAN.1.*
|
||||
MAN.2.*
|
||||
MAN.3.0
|
||||
MAN.3.1
|
||||
MAN.3.2
|
||||
MAN.4.*
|
||||
X.0.0
|
||||
X.1.0
|
||||
X.2.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user