if (targetKoodistoName.equals(relatedKoodi.getKoodisto().getKoodistoUri())) { LOG.debug(" -- OK!"); result.add(relatedKoodi); } else { LOG.debug(" -- no since {} != {}", targetKoodistoName, relatedKoodi.getKoodisto().getKoodistoUri());
protected KoodiType getRinnasteinenKoodi(KoodiType koulutuskoodi, String targetKoodisto) { KoodiUriAndVersioType uriAndVersio = new KoodiUriAndVersioType(); uriAndVersio.setKoodiUri(koulutuskoodi.getKoodiUri()); uriAndVersio.setVersio(koulutuskoodi.getVersio()); List<KoodiType> relatedKoodis = koodiService.listKoodiByRelation(uriAndVersio, false, SuhteenTyyppiType.RINNASTEINEN); KoodiType targetKoodi = null; for (KoodiType curKoodi : relatedKoodis) { if (curKoodi.getKoodisto().getKoodistoUri().equals(targetKoodisto)) { targetKoodi = curKoodi; } } if (targetKoodi == null) { relatedKoodis = koodiService.listKoodiByRelation(uriAndVersio, true, SuhteenTyyppiType.RINNASTEINEN); for (KoodiType curKoodi : relatedKoodis) { if (curKoodi.getKoodisto().getKoodistoUri().equals(targetKoodisto)) { targetKoodi = curKoodi; } } } return targetKoodi; }
if (koodiType.getKoodisto().getKoodistoUri().equals("kieli")) { result = koodiType.getKoodiUri(); break;
protected KoodiType getSisaltyvaKoodi(KoodiType sourcekoodi, String targetKoodisto) { KoodiUriAndVersioType uriAndVersio = new KoodiUriAndVersioType(); uriAndVersio.setKoodiUri(sourcekoodi.getKoodiUri()); uriAndVersio.setVersio(sourcekoodi.getVersio()); List<KoodiType> relatedKoodis = koodiService.listKoodiByRelation(uriAndVersio, false, SuhteenTyyppiType.SISALTYY); for (KoodiType curKoodi : relatedKoodis) { if (curKoodi.getKoodisto().getKoodistoUri().equals(targetKoodisto)) { return curKoodi; } } return null; }
int j = 0; for (KoodiType ylakoodi : ylakoodit) { if (ylakoodi.getKoodisto().getKoodistoUri().equals("oppilaitosnumero") && !ylakoodi.getTila().equals(TilaType.PASSIIVINEN)) { if (j++ >= fetchLimit) {
int j = 0; for (KoodiType ylakoodi : ylakoodit) { if (ylakoodi.getKoodisto().getKoodistoUri().equals("oppilaitosnumero") && !ylakoodi.getTila().equals(TilaType.PASSIIVINEN) ) { if (j++ >= fetchLimit) {
@Override public SubjectRow apply(final KoodiType koodiType) { Map<String, String> translationsMap = TranslationsUtil.createTranslationsMap(koodiType); String koodiArvo = koodiType.getKoodiArvo(); boolean optional = false; boolean highSchool = false; boolean comprehensiveSchool = false; boolean language = false; KoodiUriAndVersioType koodi = new KoodiUriAndVersioType(); koodi.setKoodiUri(koodiType.getKoodiUri()); koodi.setVersio(koodiType.getVersio()); if (koodiService != null) { List<KoodiType> koodiTypes = koodiService.getAlakoodis(koodi.getKoodiUri()); for (KoodiType type : koodiTypes) { String koodistoUri = type.getKoodisto().getKoodistoUri(); if (CODE_OPPIAINEENVALINNAISUUS.equals(koodistoUri)) { optional = isTrue(type); } else if (CODE_ONLUKIONOPPIAINE.equals(koodistoUri)) { highSchool = isTrue(type); } else if (CODE_ONPERUSASTEENOPPIAINE.equals(koodistoUri)) { comprehensiveSchool = isTrue(type); } else if (CODE_OPPIAINEENKIELISYYS.equals(koodistoUri)) { language = isTrue(type); } } } SubjectRow subjectRow = new SubjectRow(koodiArvo, new I18nText(translationsMap), optional, highSchool, comprehensiveSchool, language); subjectRow.toString(); return subjectRow; }