mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
Resolve "Force formatting"
This commit is contained in:
parent
bc9acc3a0a
commit
69d6e55f14
45 changed files with 535 additions and 538 deletions
|
|
@ -81,6 +81,7 @@ public class ConversionService {
|
|||
}
|
||||
|
||||
private static final int MAX_LOG_CONTENT = 50;
|
||||
|
||||
// context setup
|
||||
private JAXBContext jaxbContext;
|
||||
|
||||
|
|
@ -233,9 +234,6 @@ public class ConversionService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public <T> T readDocument(final Source source, final Class<T> type) {
|
||||
try {
|
||||
final Unmarshaller u = getJaxbContext().createUnmarshaller();
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ public class DateFactory {
|
|||
|
||||
@SneakyThrows
|
||||
public static XMLGregorianCalendar createTimestamp() {
|
||||
final GregorianCalendar cal = new GregorianCalendar();
|
||||
cal.setTime(new Date());
|
||||
return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
|
||||
final GregorianCalendar cal = new GregorianCalendar();
|
||||
cal.setTime(new Date());
|
||||
return DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package de.kosit.validationtool.impl;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ public class ScenarioRepository {
|
|||
*/
|
||||
public Result<Scenario, String> selectScenario(final XdmNode document) {
|
||||
final Result<Scenario, String> result;
|
||||
final List<Scenario> collect = getScenarios().stream().filter(s -> match(document, s))
|
||||
.collect(Collectors.toList());
|
||||
final List<Scenario> collect = getScenarios().stream().filter(s -> match(document, s)).collect(Collectors.toList());
|
||||
if (collect.size() == 1) {
|
||||
result = new Result<>(collect.get(0));
|
||||
} else if (collect.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -125,9 +125,9 @@ public interface CheckAction {
|
|||
void check(Bag results);
|
||||
|
||||
/**
|
||||
* Ermittlung, ob ein Schritt u.U. ausgelassen werden kann. Die Funktion wird vor der eigentlichen Prüfaktion aufgerufen
|
||||
* und kann somit eine Ausführung des Prüfschrittes verhindern. Entwickler können diese Funktion überschreiben, um den
|
||||
* Prüfschritt bedingt auszuführen.
|
||||
* Ermittlung, ob ein Schritt u.U. ausgelassen werden kann. Die Funktion wird vor der eigentlichen Prüfaktion
|
||||
* aufgerufen und kann somit eine Ausführung des Prüfschrittes verhindern. Entwickler können diese Funktion
|
||||
* überschreiben, um den Prüfschritt bedingt auszuführen.
|
||||
*
|
||||
* @param results die bisher gesammelten Information
|
||||
* @return <code>true</code> wenn der Schritt ausgelassen werden soll
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ import net.sf.saxon.s9api.XsltTransformer;
|
|||
public class CreateReportAction implements CheckAction {
|
||||
|
||||
/**
|
||||
* Wrapper to fix some inconsistencies between sax and saxon. Saxon tries to set some properties which has no effect on
|
||||
* {@link JAXBSource}'s XMLReader, but it throws exceptions on unknown properties. This just drops this exceptions.
|
||||
* Wrapper to fix some inconsistencies between sax and saxon. Saxon tries to set some properties which has no effect
|
||||
* on {@link JAXBSource}'s XMLReader, but it throws exceptions on unknown properties. This just drops this
|
||||
* exceptions.
|
||||
*/
|
||||
private static class ReaderWrapper implements XMLReader {
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ public class SchemaValidationAction implements CheckAction {
|
|||
|
||||
private static class FileSerializedDocument implements SerializedDocument {
|
||||
|
||||
|
||||
private final Path file;
|
||||
|
||||
private final Processor processor;
|
||||
|
|
|
|||
|
|
@ -105,5 +105,4 @@ public class RelativeUriResolver implements URIResolver, UnparsedTextURIResolver
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue