File tree 2 files changed +25
-5
lines changed
2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1
- class Checkr {
2
-
1
+ import { ValidationResult } from "@lib/types/validation" ;
2
+ import { Validator , ValidatorImpl } from "@lib/validator/validator" ;
3
+ import { XMLParser , XMLParserImpl } from "@lib/xml/parser" ;
4
+ import { XSDParser , XSDParserImpl } from "@lib/xsd/parser" ;
5
+
6
+ export class Checkr {
7
+
8
+ private xmlParser : XMLParser ;
9
+ private xsdParser : XSDParser ;
10
+ private validator : Validator ;
11
+
12
+ constructor ( ) {
13
+ this . xmlParser = new XMLParserImpl ( ) ;
14
+ this . xsdParser = new XSDParserImpl ( this . xmlParser ) ;
15
+ this . validator = new ValidatorImpl ( this . xmlParser , this . xsdParser ) ;
16
+ }
17
+
18
+ public validate ( xml : string , xsd : string ) : Promise < ValidationResult > {
19
+ return this . validator . validate ( xml , xsd ) ;
20
+ }
21
+
3
22
}
Original file line number Diff line number Diff line change
1
+ export { Checkr } from "@lib/core/main" ;
2
+ export { ValidationResult } from "@lib/types/validation" ;
1
3
export { Validator , ValidatorImpl } from "@lib/validator/validator" ;
2
- export { XMLParser } from "@lib/xml/parser" ;
3
- export { XSDParser } from "@lib/xsd/parser" ;
4
- export { ValidationResult } from "@lib/types/validation" ;
4
+ export { XMLParser , XMLParserImpl } from "@lib/xml/parser" ;
5
+ export { XSDParser , XSDParserImpl } from "@lib/xsd/parser" ;
You can’t perform that action at this time.
0 commit comments