@Test public void convertSpecific_Court() { String COURT_ID = "15050505"; String DIVISION_CODE = "0000521"; createCourtDivision(COURT_ID, DIVISION_CODE); sJudgment.setCourtId(COURT_ID); sJudgment.setDepartmentId(DIVISION_CODE); CommonCourtJudgment ccJudgment = new CommonCourtJudgment(); sourceCcJudgmentExtractor.convertSpecific(ccJudgment, sJudgment, correctionList); assertEquals(sJudgment.getDepartmentId(), ccJudgment.getCourtDivision().getCode()); assertEquals(sJudgment.getCourtId(), ccJudgment.getCourtDivision().getCourt().getCode()); }
@Override public void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList) { List<JudgmentKeyword> keywords = extractKeywords(sourceJudgment, correctionList); for (JudgmentKeyword keyword : keywords) { if (!ccJudgment.containsKeyword(keyword)) { ccJudgment.addKeyword(keyword); } } ccJudgment.setCourtDivision(extractCommonCourtDivision(sourceJudgment, correctionList)); }
SourceCcJudgmentExtractor implements JudgmentDataExtractor<CommonCourtJudgment, SourceCcJudgment> { @Override public void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList) { List<JudgmentKeyword> keywords = extractKeywords(sourceJudgment, correctionList); for (JudgmentKeyword keyword : keywords) { if (!ccJudgment.containsKeyword(keyword)) { ccJudgment.addKeyword(keyword); } } ccJudgment.setCourtDivision(extractCommonCourtDivision(sourceJudgment, correctionList)); } }
SourceCcJudgmentExtractor implements JudgmentDataExtractor<CommonCourtJudgment, SourceCcJudgment> { @Override public void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList) { List<JudgmentKeyword> keywords = extractKeywords(sourceJudgment, correctionList); for (JudgmentKeyword keyword : keywords) { if (!ccJudgment.containsKeyword(keyword)) { ccJudgment.addKeyword(keyword); } } ccJudgment.setCourtDivision(extractCommonCourtDivision(sourceJudgment, correctionList)); }  }
SourceCcJudgmentExtractor implements JudgmentDataExtractor<CommonCourtJudgment, SourceCcJudgment> { @Override public void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList) { List<JudgmentKeyword> keywords = extractKeywords(sourceJudgment, correctionList); for (JudgmentKeyword keyword : keywords) { if (!ccJudgment.containsKeyword(keyword)) { ccJudgment.addKeyword(keyword); } } ccJudgment.setCourtDivision(extractCommonCourtDivision(sourceJudgment, correctionList)); }  @Override void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override CommonCourtJudgment createNewJudgment(); @Override ArrayList<String> extractLegalBases(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override ArrayList<String> extractCourtReporters(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<CourtCase> extractCourtCases(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override String extractSourceJudgmentId(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setCommonCourtRepository(CommonCourtRepository commonCourtRepository); @Autowired void setCcDivisionRepository(CcDivisionRepository ccDivisionRepository); @Autowired void setCcJudgmentKeywordCreator(JudgmentKeywordCreator ccJudgmentKeywordCreator); @Autowired void setLawJournalEntryCreator(LawJournalEntryCreator lawJournalEntryCreator); @Autowired void setLawJournalEntryExtractor(LawJournalEntryExtractor lawJournalEntryExtractor); @Autowired void setJudgeConverter(JudgeConverter judgeConverter); }
SourceCcJudgmentExtractor implements JudgmentDataExtractor<CommonCourtJudgment, SourceCcJudgment> { @Override public void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList) { List<JudgmentKeyword> keywords = extractKeywords(sourceJudgment, correctionList); for (JudgmentKeyword keyword : keywords) { if (!ccJudgment.containsKeyword(keyword)) { ccJudgment.addKeyword(keyword); } } ccJudgment.setCourtDivision(extractCommonCourtDivision(sourceJudgment, correctionList)); }  @Override void convertSpecific(CommonCourtJudgment ccJudgment, SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override CommonCourtJudgment createNewJudgment(); @Override ArrayList<String> extractLegalBases(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override ArrayList<String> extractCourtReporters(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<CourtCase> extractCourtCases(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override String extractSourceJudgmentId(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceCcJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setCommonCourtRepository(CommonCourtRepository commonCourtRepository); @Autowired void setCcDivisionRepository(CcDivisionRepository ccDivisionRepository); @Autowired void setCcJudgmentKeywordCreator(JudgmentKeywordCreator ccJudgmentKeywordCreator); @Autowired void setLawJournalEntryCreator(LawJournalEntryCreator lawJournalEntryCreator); @Autowired void setLawJournalEntryExtractor(LawJournalEntryExtractor lawJournalEntryExtractor); @Autowired void setJudgeConverter(JudgeConverter judgeConverter);  }