mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
More English translation
This commit is contained in:
parent
3201735eec
commit
57e6ffc607
1 changed files with 8 additions and 11 deletions
19
docs/api.md
19
docs/api.md
|
|
@ -7,6 +7,7 @@ The Validator offers an API which allows you to integrate Validator in your own
|
||||||
Currently, we *do not* deploy to Maven Central or similar. Hence you need to build and optionally deploy the Validator artifacts to your own shared repository (see for example [Maven Documentation](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html)).
|
Currently, we *do not* deploy to Maven Central or similar. Hence you need to build and optionally deploy the Validator artifacts to your own shared repository (see for example [Maven Documentation](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html)).
|
||||||
|
|
||||||
### Maven
|
### Maven
|
||||||
|
|
||||||
Then you can declare the dependency as follows:
|
Then you can declare the dependency as follows:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
|
@ -16,6 +17,7 @@ Then you can declare the dependency as follows:
|
||||||
<version>${validator.version}</version>
|
<version>${validator.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Gradle
|
### Gradle
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -26,10 +28,9 @@ dependencies {
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Prerequisite for use is a valid [scenario definition](configurations.md) and the a folder with all necessary artifacts for validation (repository).
|
||||||
|
|
||||||
|
The following example demonstrates Der folgende Quellcode zeigt die Erzeugung einer neuen
|
||||||
Voraussetzung für die Verwendung ist eine valide Prüfszenarien-Definition (xml-Datei) und das dazugehörige Repository
|
|
||||||
mit den von den definierten Szenarien benötigten Artefakten. Der folgende Quellcode zeigt die Erzeugung einer neuen
|
|
||||||
Prüf-Instanz:
|
Prüf-Instanz:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
|
|
@ -65,13 +66,9 @@ List<Document> reports = pruefer.implemenation(toCheck);
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Eine einmal initialisierte Prüfinstanz ist *threadsafe* und kann beliebig oft wieder verwendet
|
Initializing all XML artifacts and XSLT-executables is expensive. The `Check` instance is *threadsafe* and keeps all artifacts. Therefore, we recommend the re-use of an `Check` instance.
|
||||||
werden. XML-Artefakte wie Schema oder XSLT-Executables werden bei Instantiierung des `DefaultCheck` initialisiert und
|
|
||||||
wiederverwendet. Da diese Objekte relativ aufwändig zu Erzeugen sind, empfielt sich die Wiederverwendung der `Check`-Instanz.
|
|
||||||
|
|
||||||
Die Batch-Verarbeitung erfolgt grundsätzlich seriell. Der `DefaultCheck` implementiert *keine Parallelverarbeitung*.
|
* Batch use is serial and *not parallel*
|
||||||
|
|
||||||
Einziges Eingabeobjekt ist `Input`, welches sich mit den verschiedenen Methoden der `InputFactory` aus div. Eingabe-Resourcen
|
The only input `de.kosit.validationtool.api.Input` which can be created by various methods of `de.kosit.validationtool.api.InputFactory`.
|
||||||
erzeugen lässt. Die InputFactory erzeugt für jedes Eingabe-Objekt eine Prüfsumme, die im Report mitgeführt wird. Der
|
The `InputFactory` calculates a hash sum for each Input which is also written to the Report. _SHA-256_ from the JDK is the default algorithm. It can be changed using the `read`-methods of `InputFactory`.
|
||||||
verwendete Algorithmus ist über die `read`-Methoden der `InputFactory` definierbar. Standardmäßig wird _SHA-256_ des JDK
|
|
||||||
verwendet
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue