Esempio n. 1
0
 public void searchForeignCourtReferences(ForeignCourt fObj) {
   String citationPatternString = fObj.getSearchRegex();
   Pattern citationPattern = Pattern.compile(citationPatternString);
   Matcher citationMatcher = citationPattern.matcher(this.getCitationString());
   while (citationMatcher.find()) {
     int startIndex = citationMatcher.start();
     int endIndex = citationMatcher.end();
     int refid = CitationCases.getRefid();
     int CountryId = fObj.getCountryId();
     int CitationType = 1; // skannan-comment: changed citation type for Professor's ease
     CitationCases.setRefid(refid + 1);
     String refString = formRefString(this.getCitationString(), startIndex, endIndex);
     String caseDetails = this.getCitationString().substring(startIndex, endIndex);
     CitationCases currentCitation =
         new CitationCases(
             refid,
             CountryId,
             CitationType,
             fObj.getCourtId(),
             fObj.getCountryName(),
             fObj.getCourtName(),
             caseDetails,
             this.getCitationid(),
             String.valueOf(this.getPageNo()),
             refString);
     this.getRefCases().add(currentCitation);
   }
   return;
 }
Esempio n. 2
0
 public void searchForeignReferences() {
   // TODO Auto-generated method stub
   for (ForeignCourt fObj : LoadSearchObjects.getSearchObjs()) {
     if (fObj.getSearchRegex() != null) {
       this.searchForeignCourtReferences(fObj);
     }
   }
   // System.out.println("Searching international laws");
   for (InternationalCourt iCObj : LoadSearchObjects.getiCSearchObjs()) {
     if (iCObj.getiFormatPattern() != null || iCObj.getiTitlePattern() != null)
       this.searchInternationalCourtReferences(iCObj);
   }
   for (SoftLaw sLawObj : LoadSearchObjects.getsLawSearchObjs()) {
     if (sLawObj.getsTitlePattern() != null || sLawObj.getsTitlePattern() != null)
       this.searchSoftLaws(sLawObj);
   }
   for (Treaty tObj : LoadSearchObjects.getTreatySearchObjs()) {
     if (tObj.gettTitlePattern() != null || tObj.gettFormatPattern() != null)
       this.searchTreaties(tObj);
   }
   return;
 }