public static URI getURI(StackModule module, String uriString) {

    URI uri = null;
    if (uriString.startsWith("http")) {
      try {
        uri = new URI(uriString);
      } catch (URISyntaxException e) {
        // should be logged later
      }
    } else if ('.' == uriString.charAt(0)) {
      uri = new File(module.getStackDirectory().getRepoDir(), uriString).toURI();
    } else {
      uri = new File(uriString).toURI();
    }

    return uri;
  }
@param module
         the stack module
@param uriString
         the uri string
@return  a repo URI, even if it is relative-file based
ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java