コード例 #1
0
ファイル: KeywordGroup.java プロジェクト: supartha/jabref
 @Override
 public boolean equals(Object o) {
   if (!(o instanceof KeywordGroup)) {
     return false;
   }
   KeywordGroup other = (KeywordGroup) o;
   return name.equals(other.name)
       && searchField.equals(other.searchField)
       && searchExpression.equals(other.searchExpression)
       && caseSensitive == other.caseSensitive
       && regExp == other.regExp
       && getHierarchicalContext() == other.getHierarchicalContext();
 }
コード例 #2
0
ファイル: KeywordGroup.java プロジェクト: supartha/jabref
 @Override
 public boolean contains(BibtexEntry entry) {
   String content = entry.getField(searchField);
   if (content == null) {
     return false;
   }
   if (regExp) {
     return pattern.matcher(content).find();
   }
   if (caseSensitive) {
     return KeywordGroup.containsWord(searchExpression, content);
   }
   return KeywordGroup.containsWord(searchExpression.toLowerCase(), content.toLowerCase());
 }
コード例 #3
0
ファイル: KeywordGroup.java プロジェクト: supartha/jabref
 @Override
 public String getDescription() {
   return KeywordGroup.getDescriptionForPreview(
       searchField, searchExpression, caseSensitive, regExp);
 }