added more default keywords for testing

This commit is contained in:
adam-m 2012-01-09 10:38:38 -05:00
parent a8bfc14c13
commit 64bad95659

View File

@ -102,18 +102,25 @@ public final class KeywordSearchListTopComponent extends TopComponent implements
}
keywordTable.setCellSelectionEnabled(false);
//some hardcoded test keywords
loadDefaultKeywords();
}
private void loadDefaultKeywords() {
//some hardcoded keywords for testing
//phone number
tableModel.addKeyword("\\d\\d\\d[\\.-]\\d\\d\\d[\\.-]\\d\\d\\d\\d");
tableModel.addKeyword("\\d{8,10}");
tableModel.addKeyword("phone|fax");
//IP address
tableModel.addKeyword("(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])");
//email
tableModel.addKeyword("[e\\-]{0,2}mail");
tableModel.addKeyword("[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}");
//URL
//some literal query to test
tableModel.addKeyword("ftp|sftp|ssh|http|https|www");
//escaped literal word \d\d\d
tableModel.addKeyword("\\Q\\d\\d\\d\\E");
tableModel.addKeyword("ftp|sftp|ssh|http|https");
}
/** This method is called from within the constructor to
@ -311,11 +318,11 @@ public final class KeywordSearchListTopComponent extends TopComponent implements
}//GEN-LAST:event_addWordButtonActionPerformed
private void saveListButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveListButtonActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_saveListButtonActionPerformed
private void chLiteralWordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chLiteralWordActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chLiteralWordActionPerformed
private void deleteWordButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteWordButtonActionPerformed