mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
#9 Formatierungsregeln
This commit is contained in:
parent
b369107267
commit
6030d484cc
18 changed files with 746 additions and 27 deletions
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
* Zentrale Konfigration einer Prüf-Instanz.
|
||||
*
|
||||
|
|
@ -54,15 +54,15 @@ public class CheckConfiguration {
|
|||
* @return uri die durch entsprechende resolver aufgelöst werden kann
|
||||
*/
|
||||
public URI getScenarioRepository() {
|
||||
if (scenarioRepository == null) {
|
||||
scenarioRepository = createDefaultRepository();
|
||||
if (this.scenarioRepository == null) {
|
||||
this.scenarioRepository = createDefaultRepository();
|
||||
}
|
||||
return scenarioRepository;
|
||||
return this.scenarioRepository;
|
||||
}
|
||||
|
||||
private URI createDefaultRepository() {
|
||||
log.info("Creating default scenario repository (alongside scenario definition)");
|
||||
return scenarioDefinition.resolve(".");
|
||||
return this.scenarioDefinition.resolve(".");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
|
||||
package de.kosit.validationtool.api;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
|
@ -28,13 +26,11 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.DigestInputStream;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -42,6 +38,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
|
||||
/**
|
||||
* Service zum Einlesen des Test-Objekts in den Speicher. Beim Einlesen wird gleichzeitig eine Prüfsumme ermittelt und
|
||||
* mit dem Ergebnis mitgeführt.
|
||||
|
|
@ -227,8 +225,6 @@ public class InputFactory {
|
|||
byte[] hash = digest.digest();
|
||||
log.debug("Generated hashcode for {} is {}", name, DatatypeConverter.printHexBinary(hash));
|
||||
out.flush();
|
||||
log.info(new String(out.toByteArray(), Charset.forName("utf8")).substring(0,
|
||||
out.toByteArray().length < 100 ? out.toByteArray().length : 100));
|
||||
return new Input(out.toByteArray(), name, hash, digest.getAlgorithm());
|
||||
} catch (IOException e) {
|
||||
throw new IllegalArgumentException(MESSAGE_OPEN_STREAM_ERROR + name, e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue