Package gov.niem.tools.api.transform
Class TransformController
java.lang.Object
gov.niem.tools.api.transform.TransformController
REST controller for model transformations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<byte[]> transformModel
(TransformFrom from, TransformTo to, org.springframework.web.multipart.MultipartFile file) Transform a model from one supported NIEM format to another.
-
Constructor Details
-
TransformController
public TransformController()
-
-
Method Details
-
transformModel
@PostMapping(value="/transforms/models", consumes="multipart/form-data") public org.springframework.http.ResponseEntity<byte[]> transformModel(@RequestParam TransformFrom from, @RequestParam TransformTo to, @RequestPart org.springframework.web.multipart.MultipartFile file) throws BadRequestException, Exception Transform a model from one supported NIEM format to another.- Parameters:
from
- [REQUEST BODY PARAMETER] The current model format of the input file.to
- [REQUEST BODY PARAMETER] The requested output format for the transformation.file
- A file with a NIEM model.- Throws:
BadRequestException
Exception
-