Exemplo n.º 1
0
  @Override
  public void enumerateKnownFiles(ICollection collection, List<String> dsDefinitions)
      throws IOException {
    if (collection.exists()) {
      List<IResource> resources = collection.getResources();
      for (Iterator<IResource> iterator = resources.iterator(); iterator.hasNext(); ) {
        IResource resource = iterator.next();
        if (resource != null && resource.getName() != null) {
          if (resource.getName().endsWith(EXTENSION_TABLE)
              || resource.getName().endsWith(EXTENSION_VIEW)) {
            //						# 177
            //						String fullPath = collection.getPath().substring(
            //								this.location.length())
            //								+ IRepository.SEPARATOR + resource.getName();
            String fullPath = resource.getPath();
            dsDefinitions.add(fullPath);
          }
        }
      }

      List<ICollection> collections = collection.getCollections();
      for (Iterator<ICollection> iterator = collections.iterator(); iterator.hasNext(); ) {
        ICollection subCollection = iterator.next();
        enumerateKnownFiles(subCollection, dsDefinitions);
      }
    }
  }