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>();
 }
  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) {

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