Class NiemValidationService
java.lang.Object
gov.niem.tools.api.validation.niem.NiemValidationService
Validates artifacts against NIEM rules.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontestMessageCatalogValidation
(List<Test> tests, File xmlFile) Creates a new test to record the outcome of a message catalog validation for the given file and adds it to the given list of tests.validateCmf
(File cmfFile) Validates the given file against the CMF schemas.validateCmf
(org.springframework.web.multipart.MultipartFile multipartFile) Validates the given file against the CMF schemas.validateMessageCatalog
(File xmlFile) Validate the given file against NIEM message catalog rules.validateMessageCatalog
(org.springframework.web.multipart.MultipartFile multipartFile) Validate the given file against NIEM message catalog rules.validateMessageSpecification
(org.springframework.web.multipart.MultipartFile multipartFile) Validate the given zip file against NIEM message specification rules and guidance.validateXsdWithNdr
(org.springframework.web.multipart.MultipartFile multipartFile) Validates the given XML Schema or zip file against NDR rules.
-
Constructor Details
-
NiemValidationService
public NiemValidationService()
-
-
Method Details
-
validateMessageSpecification
public List<Test> validateMessageSpecification(org.springframework.web.multipart.MultipartFile multipartFile) throws Exception Validate the given zip file against NIEM message specification rules and guidance.- Throws:
Exception
-
validateMessageCatalog
public Test validateMessageCatalog(org.springframework.web.multipart.MultipartFile multipartFile) throws Exception Validate the given file against NIEM message catalog rules.- Throws:
Exception
-
validateMessageCatalog
public Test validateMessageCatalog(File xmlFile) throws SAXException, IOException, URISyntaxException Validate the given file against NIEM message catalog rules. -
testMessageCatalogValidation
public Test testMessageCatalogValidation(List<Test> tests, File xmlFile) throws SAXException, IOException, URISyntaxException Creates a new test to record the outcome of a message catalog validation for the given file and adds it to the given list of tests. -
validateCmf
public Test validateCmf(org.springframework.web.multipart.MultipartFile multipartFile) throws Exception Validates the given file against the CMF schemas.- Throws:
Exception
-
validateCmf
Validates the given file against the CMF schemas. -
validateXsdWithNdr
public List<Test> validateXsdWithNdr(org.springframework.web.multipart.MultipartFile multipartFile) throws Exception Validates the given XML Schema or zip file against NDR rules. Returns separate tests for each failed rule, with each occurrence as its own result under that test.- Throws:
Exception
-