/** * Adds the data into the reverse mappings. Caters for 1-2-1 and 1-2-Many mappings * * @param leftHand the reference of the left hand reference * @param kjvHand the kjv reference/key, qualified with the part */ private void addReverse1ToManyMappings(final Verse leftHand, final QualifiedKey kjvHand) { //add the reverse mapping, for 1-1 mappings if (kjvHand.getAbsentType() == QualifiedKey.Qualifier.ABSENT_IN_KJV || kjvHand.getKey().getCardinality() == 1) { // TODO(CJB): deal with parts addKJVToMapping(kjvHand, leftHand); } else { //add the 1-many mappings //expand the key and add them all //Parts are not supported on ranges... Iterator<Key> kjvKeys = kjvHand.getKey().iterator(); while (kjvKeys.hasNext()) { addKJVToMapping(new QualifiedKey(KeyUtil.getVerse(kjvKeys.next())), leftHand); } } }