Exemplo n.º 1
0
 public int compareTo(final Object o) {
   if (o == null) {
     return 1;
   } else if (o instanceof RepositoryFile) {
     RepositoryFile that = (RepositoryFile) o;
     if ((this.getFullPath() == null) && (that.getFullPath() == null)) {
       return 0;
     } else if ((this.getFullPath() == null) && (that.getFullPath() != null)) {
       return -1;
     } else if ((this.getFullPath() != null) && (that.getFullPath() == null)) {
       return 1;
     } else {
       return this.getFullPath().compareTo(((RepositoryFile) o).getFullPath());
     }
   } else {
     return this.getFullPath().compareTo(o.toString());
   }
 }
Exemplo n.º 2
0
  protected void resolvePath() {
    StringBuffer buffer = new StringBuffer(RepositoryFile.EMPTY_STRING);

    if (parent != null) {
      buffer.append(parent.getFullPath());
    }
    buffer.append(org.pentaho.platform.api.repository2.unified.RepositoryFile.SEPARATOR);
    buffer.append(fileName);

    setFullPath(buffer.toString());
  }