Search in sources :

Example 1 with StringMapper

use of net.sourceforge.processdash.util.StringMapper in project processdash by dtuma.

the class RolledUpTimeLog method filter.

public EnumerIterator filter(String path, Date from, Date to) throws IOException {
    List entries = new ArrayList();
    String[] prefixes = getPrefixes();
    StringMapper pathRemapper = getPathRemapper(prefixes);
    for (int i = 0; i < prefixes.length; i++) {
        String onePrefix = prefixes[i];
        // find any imported entries for the given prefix
        Iterator importedEntries = ImportedTimeLogManager.getInstance().getImportedTimeLogEntries(onePrefix);
        maybeAddEntries(entries, importedEntries, pathRemapper);
        // find any regular entries for the given prefix
        Iterator regularEntries = context.getTimeLog().filter(onePrefix, from, to);
        maybeAddEntries(entries, regularEntries, pathRemapper);
    }
    EnumerIterator result = new IteratorConcatenator(entries);
    result = new TimeLogIteratorFilter(result, path, from, to);
    return result;
}
Also used : StringMapper(net.sourceforge.processdash.util.StringMapper) EnumerIterator(net.sourceforge.processdash.util.EnumerIterator) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) EnumerIterator(net.sourceforge.processdash.util.EnumerIterator) IteratorConcatenator(net.sourceforge.processdash.util.IteratorConcatenator) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1 EnumerIterator (net.sourceforge.processdash.util.EnumerIterator)1 IteratorConcatenator (net.sourceforge.processdash.util.IteratorConcatenator)1 StringMapper (net.sourceforge.processdash.util.StringMapper)1