-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pogues mapping): unique and multiple choice questions (#1195)
* feat(pogues mapping): unique choice questions * feat(pogues mapping): insert code lists in questions * feat(pogues mapping): detail response (wip) * feat(pogues mapping): boolean multiple choice question * fix: code list references * feat(pogues mapping): mcq with code list response * chore: bump version
- Loading branch information
Showing
22 changed files
with
378 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
eno-core/src/main/java/fr/insee/eno/core/converter/PoguesTableCellConversion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package fr.insee.eno.core.converter; | ||
|
||
import fr.insee.eno.core.exceptions.technical.ConversionException; | ||
import fr.insee.eno.core.model.EnoObject; | ||
import fr.insee.eno.core.model.question.table.TextCell; | ||
import fr.insee.eno.core.model.question.table.UniqueChoiceCell; | ||
import fr.insee.pogues.model.DatatypeTypeEnum; | ||
import fr.insee.pogues.model.ResponseType; | ||
|
||
class PoguesTableCellConversion { | ||
|
||
private PoguesTableCellConversion() {} | ||
|
||
static EnoObject instantiateFrom(ResponseType poguesResponse) { | ||
DatatypeTypeEnum typeName = poguesResponse.getDatatype().getTypeName(); | ||
if (DatatypeTypeEnum.TEXT.equals(typeName)) { | ||
if (poguesResponse.getCodeListReference() != null) | ||
return new UniqueChoiceCell(); | ||
return new TextCell(); | ||
} | ||
throw new ConversionException("Conversion of Pogues table cell of type " + typeName + " not implemented."); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.