Exemplo n.º 1
0
  private List<LogEntry> getUnorderedAuthorLogEntries(String author) {
    List<LogEntry> entries = new LinkedList<LogEntry>();

    for (LogEntry logEntry : logEntries) {
      if (logEntry.getAuthor().equals(author)) {
        entries.add(logEntry);
      }
    }

    return entries;
  }
Exemplo n.º 2
0
  public List<String> getAuthors() {
    List<String> authors = new LinkedList<String>();

    for (LogEntry logEntry : logEntries) {
      if (!authors.contains(logEntry.getAuthor())) {
        authors.add(logEntry.getAuthor());
      }
    }

    Collections.sort(authors);

    return authors;
  }
Exemplo n.º 3
0
  public List<String> getUniquePaths() {
    List<String> uniquePathEntries = new LinkedList<String>();

    for (LogEntry logEntry : logEntries) {
      List<PathEntry> pathEntries = logEntry.getPathEntries();
      for (PathEntry pathEntry : pathEntries) {
        if (!uniquePathEntries.contains(pathEntry.getPath())) {
          uniquePathEntries.add(pathEntry.getPath());
        }
      }
    }

    return uniquePathEntries;
  }
Exemplo n.º 4
0
  public List<PathEntry> getOrderedByRevisionAuthorPathEntries(String author) {
    List<PathEntry> orderedPathEntries = new LinkedList<PathEntry>();

    List<LogEntry> logEntries = getUnorderedAuthorLogEntries(author);
    for (LogEntry logEntry : logEntries) {
      List<PathEntry> pathEntries = logEntry.getPathEntries();
      for (PathEntry pathEntry : pathEntries) {
        orderedPathEntries.add(pathEntry);
      }
    }

    Collections.sort(orderedPathEntries);

    return orderedPathEntries;
  }
Exemplo n.º 5
0
  public List<String> getAuthorUniquePaths(String author) {
    List<LogEntry> logEntries = getUnorderedAuthorLogEntries(author);
    List<String> uniquePathEntries = new LinkedList<String>();

    for (LogEntry logEntry : logEntries) {
      List<PathEntry> pathEntries = logEntry.getPathEntries();
      for (PathEntry pathEntry : pathEntries) {
        if (!uniquePathEntries.contains(pathEntry.getPath())) {
          uniquePathEntries.add(pathEntry.getPath());
        }
      }
    }

    return uniquePathEntries;
  }
Exemplo n.º 6
0
 public void addLogEntry(LogEntry logEntry) {
   logEntries.add(logEntry);
   isOrdered = false;
 }