diff --git a/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/Constants.java b/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/Constants.java index e50b2233..78ea0e2b 100644 --- a/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/Constants.java +++ b/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/Constants.java @@ -122,6 +122,7 @@ private Constants() {} public static final String BOUCLE_PRENOMS = "BOUCLE_PRENOMS"; public static final String LIEN = "LIEN_"; public static final String LIENS = "LIENS"; + public static final String PAIRWISE_GROUP_NAME = "LIENS"; public static final String SAME_AXIS_VALUE = "0"; public static final String NO_PAIRWISE_VALUE = "99"; diff --git a/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/metadata/DDIReader.java b/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/metadata/DDIReader.java index 9173d767..83c84fdb 100644 --- a/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/metadata/DDIReader.java +++ b/kraftwerk-core/src/main/java/fr/insee/kraftwerk/core/metadata/DDIReader.java @@ -114,6 +114,13 @@ private static MetadataModel readVariables(Path variablesFilePath) String groupName = groupElement.getAttribute("name"); String parentGroupName = groupElement.getAttribute("parent"); + // To be normalized later : we don't want to create a group of variables for pairwise links. + // Pairwise links scope are the individuals + if (groupName.equals(Constants.PAIRWISE_GROUP_NAME)){ + // Instead we assign temporarily the variables inside pairwise links group to the root group + getVariablesInGroup(metadataModel.getVariables(), groupNode, metadataModel.getRootGroup(), metadataModel.getSequences()); + continue; + } // Store the group Group group;