|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.history.HistoryReaderImpl
public class HistoryReaderImpl
| Constructor Summary | |
|---|---|
protected |
HistoryReaderImpl(HistoryImpl historyImpl)
Creates an instance of HistoryReaderImpl. |
| Method Summary | |
|---|---|
void |
addSearchProgressListener(HistorySearchProgressListener listener)
Adding progress listener for monitoring progress of search process |
int |
countRecords()
Count the number of messages that a search will return Actually only the last file is parsed and its nodes are counted. |
(package private) static HistoryRecord |
filterByKeyword(NodeList propertyNodes,
long timestamp,
String[] keywords,
String field,
boolean caseSensitive)
If there is keyword restriction and doesn't match the conditions return null. |
(package private) static Vector<String> |
filterFilesByDate(Iterator<String> filelist,
Date startDate,
Date endDate)
Used to limit the files if any starting or ending date exist So only few files to be searched. |
(package private) static Vector<String> |
filterFilesByDate(Iterator<String> filelist,
Date startDate,
Date endDate,
boolean reverseOrder)
Used to limit the files if any starting or ending date exist So only few files to be searched. |
QueryResultSet<HistoryRecord> |
findByEndDate(Date endDate)
Searches the history for all records with timestamp before endDate. |
QueryResultSet<HistoryRecord> |
findByKeyword(String keyword,
String field)
Searches the history for all records containing the keyword. |
QueryResultSet<HistoryRecord> |
findByKeyword(String keyword,
String field,
boolean caseSensitive)
Searches the history for all records containing the keyword. |
QueryResultSet<HistoryRecord> |
findByKeywords(String[] keywords,
String field)
Searches the history for all records containing all keywords. |
QueryResultSet<HistoryRecord> |
findByKeywords(String[] keywords,
String field,
boolean caseSensitive)
Searches the history for all records containing all keywords. |
QueryResultSet<HistoryRecord> |
findByPeriod(Date startDate,
Date endDate)
Searches the history for all records with timestamp between startDate and endDate. |
QueryResultSet<HistoryRecord> |
findByPeriod(Date startDate,
Date endDate,
String[] keywords,
String field)
Searches for all history records containing all keywords, with timestamp between startDate and endDate. |
QueryResultSet<HistoryRecord> |
findByPeriod(Date startDate,
Date endDate,
String[] keywords,
String field,
boolean caseSensitive)
Searches for all history records containing all keywords, with timestamp between startDate and endDate. |
QueryResultSet<HistoryRecord> |
findByStartDate(Date startDate)
Searches the history for all records with timestamp after startDate. |
QueryResultSet<HistoryRecord> |
findFirstRecordsAfter(Date date,
int count)
Returns the supplied number of recent messages after the given date |
QueryResultSet<HistoryRecord> |
findLast(int count)
Returns the last count messages. |
QueryResultSet<HistoryRecord> |
findLastRecordsBefore(Date date,
int count)
Returns the supplied number of recent messages before the given date |
(package private) static boolean |
isInPeriod(long timestamp,
Date startDate,
Date endDate)
Evaluetes does timestamp is in the given time period. |
(package private) static boolean |
matchKeyword(String value,
String[] keywords,
boolean caseSensitive)
Check if a value is in the given keyword(s) If no keyword(s) given must return true |
void |
removeSearchProgressListener(HistorySearchProgressListener listener)
Removing progress listener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected HistoryReaderImpl(HistoryImpl historyImpl)
historyImpl - the parent History implementation| Method Detail |
|---|
public QueryResultSet<HistoryRecord> findByStartDate(Date startDate)
throws RuntimeException
findByStartDate in interface HistoryReaderstartDate - the date after all records will be returned
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByEndDate(Date endDate)
throws RuntimeException
findByEndDate in interface HistoryReaderendDate - the date before which all records will be returned
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByPeriod(Date startDate,
Date endDate)
throws RuntimeException
findByPeriod in interface HistoryReaderstartDate - start of the interval in which we searchendDate - end of the interval in which we search
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByKeyword(String keyword,
String field)
throws RuntimeException
findByKeyword in interface HistoryReaderkeyword - the keyword to search forfield - the field where to look for the keyword
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByKeywords(String[] keywords,
String field)
throws RuntimeException
findByKeywords in interface HistoryReaderkeywords - array of keywords we search forfield - the field where to look for the keyword
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByPeriod(Date startDate,
Date endDate,
String[] keywords,
String field)
throws UnsupportedOperationException
findByPeriod in interface HistoryReaderstartDate - start of the interval in which we searchendDate - end of the interval in which we searchkeywords - array of keywords we search forfield - the field where to look for the keyword
UnsupportedOperationException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findLast(int count)
throws RuntimeException
findLast in interface HistoryReadercount - int
RuntimeException
public QueryResultSet<HistoryRecord> findByKeyword(String keyword,
String field,
boolean caseSensitive)
throws RuntimeException
findByKeyword in interface HistoryReaderkeyword - the keyword to search forfield - the field where to look for the keywordcaseSensitive - is keywords search case sensitive
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByKeywords(String[] keywords,
String field,
boolean caseSensitive)
throws RuntimeException
findByKeywords in interface HistoryReaderkeywords - array of keywords we search forfield - the field where to look for the keywordcaseSensitive - is keywords search case sensitive
RuntimeException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findByPeriod(Date startDate,
Date endDate,
String[] keywords,
String field,
boolean caseSensitive)
throws UnsupportedOperationException
findByPeriod in interface HistoryReaderstartDate - start of the interval in which we searchendDate - end of the interval in which we searchkeywords - array of keywords we search forfield - the field where to look for the keywordcaseSensitive - is keywords search case sensitive
UnsupportedOperationException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public QueryResultSet<HistoryRecord> findFirstRecordsAfter(Date date,
int count)
throws RuntimeException
findFirstRecordsAfter in interface HistoryReaderdate - messages after datecount - messages count
RuntimeException
public QueryResultSet<HistoryRecord> findLastRecordsBefore(Date date,
int count)
throws RuntimeException
findLastRecordsBefore in interface HistoryReaderdate - messages before datecount - messages count
RuntimeException
static boolean isInPeriod(long timestamp,
Date startDate,
Date endDate)
timestamp - DatestartDate - Date the start of the periodendDate - Date the end of the period
static HistoryRecord filterByKeyword(NodeList propertyNodes,
long timestamp,
String[] keywords,
String field,
boolean caseSensitive)
propertyNodes - NodeListtimestamp - Datekeywords - String[]field - StringcaseSensitive - boolean
static boolean matchKeyword(String value,
String[] keywords,
boolean caseSensitive)
value - Stringkeywords - String[]caseSensitive - boolean
static Vector<String> filterFilesByDate(Iterator<String> filelist,
Date startDate,
Date endDate)
filelist - IteratorstartDate - DateendDate - Date
static Vector<String> filterFilesByDate(Iterator<String> filelist,
Date startDate,
Date endDate,
boolean reverseOrder)
filelist - IteratorstartDate - DateendDate - DatereverseOrder - reverse order of files
public void addSearchProgressListener(HistorySearchProgressListener listener)
addSearchProgressListener in interface HistoryReaderlistener - HistorySearchProgressListenerpublic void removeSearchProgressListener(HistorySearchProgressListener listener)
removeSearchProgressListener in interface HistoryReaderlistener - HistorySearchProgressListener
public int countRecords()
throws UnsupportedOperationException
countRecords in interface HistoryReaderUnsupportedOperationException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||