-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3023 from dzhw/release
Release v1.0.116
- Loading branch information
Showing
46 changed files
with
463 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
javasphinx==0.9.15 | ||
docutils==0.17.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...fdz/metadatamanagement/analysispackagemanagement/domain/validation/UniqueScriptUuids.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.validation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
import javax.validation.Constraint; | ||
import javax.validation.Payload; | ||
|
||
import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.AnalysisPackage; | ||
import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.Script; | ||
|
||
/** | ||
* Ensure that all {@link Script} uuids are unique within the {@link AnalysisPackage}. | ||
* | ||
* @author René Reitmann | ||
*/ | ||
@Documented | ||
@Constraint(validatedBy = {UniqueScriptUuidsValidator.class}) | ||
@Target({ElementType.TYPE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface UniqueScriptUuids { | ||
|
||
/** | ||
* Defines the default error message. | ||
*/ | ||
String message() default "{eu.dzhw.fdz.metadatamanagement.analyispackagemanagement" | ||
+ ".domain.validation.unqiueScriptUuid.message}"; | ||
|
||
/** | ||
* This contains groups. | ||
*/ | ||
Class<?>[] groups() default {}; | ||
|
||
/** | ||
* This method contains the payload. | ||
*/ | ||
Class<? extends Payload>[] payload() default {}; | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...atamanagement/analysispackagemanagement/domain/validation/UniqueScriptUuidsValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.validation; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
import javax.validation.ConstraintValidator; | ||
import javax.validation.ConstraintValidatorContext; | ||
|
||
import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.AnalysisPackage; | ||
import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.Script; | ||
|
||
/** | ||
* Ensure that all {@link Script} uuids are unique within the {@link AnalysisPackage}. | ||
* | ||
* @author René Reitmann | ||
*/ | ||
public class UniqueScriptUuidsValidator | ||
implements ConstraintValidator<UniqueScriptUuids, AnalysisPackage> { | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see javax.validation.ConstraintValidator#initialize(java.lang.annotation.Annotation) | ||
*/ | ||
@Override | ||
public void initialize(UniqueScriptUuids constraintAnnotation) {} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see javax.validation.ConstraintValidator#isValid(java.lang.Object, | ||
* javax.validation.ConstraintValidatorContext) | ||
*/ | ||
@Override | ||
public boolean isValid(AnalysisPackage analysisPackage, ConstraintValidatorContext context) { | ||
if (analysisPackage.getScripts() == null || analysisPackage.getScripts().isEmpty()) { | ||
return true; | ||
} | ||
List<String> uniqueUuids = analysisPackage.getScripts().stream().map(Script::getUuid).distinct() | ||
.collect(Collectors.toList()); | ||
return uniqueUuids.size() == analysisPackage.getScripts().size(); | ||
} | ||
} |
Oops, something went wrong.