示例#1
0
 public FranceCourtDocument(
     String countryName, String courtName, String processedUserName, String sourceFileName) {
   this.setCountryId(CaseDetailsModel.retrieveCountryID(countryName));
   this.setCourtId(CaseDetailsModel.retrieveCourtID(this.getCountryId(), courtName));
   this.setCountryName(countryName);
   this.setCourtName(courtName);
   this.setProcessedDate(new Date(System.currentTimeMillis()));
   this.setProcessedUser(processedUserName);
   this.setStatus("N");
   this.setSourceFileName(sourceFileName);
   this.setDuplicateCaseof(-1);
   this.citationObjs = new ArrayList<Citations>();
   this.documentPages = new ArrayList<PageContent>();
 }
示例#2
0
  public void writeToDb() {
    try {
      CaseDetailsModel.insertCaseDetails(this);
      for (Citations c : this.getCitationObjs()) {
        for (CitationCases cs : c.getRefCases()) {
          cs.setCaseRefId(this.getCaseRefId());
          CitationReferenceModel.insertNewCitation(cs);
        }
      }
      for (PageContent p : this.getDocumentPages()) {
        Set<String> insertedSet = new HashSet<String>();
        for (CitationCases cs : p.getRefCases()) {
          cs.setCaseRefId(this.caseRefId);
          // if(CitationReferenceModel.checkCitationExistance(cs.getCaseRefId(), cs.getCitationid(),
          // cs.getPageNumber(), cs.getCountryId(), cs.getCourtId()) > 0)
          // continue;
          String currentString =
              cs.getCaseRefId()
                  + "\t"
                  + cs.getCitationid()
                  + "\t"
                  + cs.getPageNumber()
                  + "\t"
                  + cs.getCountryId()
                  + "\t"
                  + cs.getCourtId();
          if (insertedSet.contains(currentString)) continue;
          insertedSet.add(currentString);
          CitationReferenceModel.insertNewCitation(cs);
        }
      }
    } catch (Exception ex) {

    }
  }
示例#3
0
 public void extractParticipants(String CourtName, String pdfFileContent) {
   if (CourtName.equals("High Court")) {
     this.setParticipantsName(
         CaseDetailsModel.retrieveParticipantsName(extractCNSTCRTParticipants(pdfFileContent)));
   } else {
     this.setParticipantsName(null);
   }
 }