All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.appcrossings.config.util.URITraverse Maven / Gradle / Ivy

Go to download

A property placeholder configurer compatible with Spring and allowing hierarchical configurations to be externalized from the application and loaded by URL

The newest version!
package com.appcrossings.config.util;

import java.net.URI;

public class URITraverse extends DirectoryTraverse {

  private final URI uri;
  private final URIBuilder builder;

  public URITraverse(URI uri) {

    super(UriUtil.getPath(uri), UriUtil.getFileName(uri).orElse(""));
    this.uri = uri;
    this.builder = URIBuilder.create(uri);

  }

  public URITraverse(URI uri, String fileName) {
    super(UriUtil.getPath(uri), fileName);
    this.uri = uri;
    this.builder = URIBuilder.create(uri);
  }

  @Override
  public String at(int index) {

    String dir = super.at(index);
    return URIBuilder.create(uri).setPath(dir).build().toString();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy