Sets the git repository uri

@antdoc.notrequired
@param uri The repository uri
976136
public void setUri(String uri) {
                if (GitTaskUtils.isNullOrBlankString(uri)) {
                        throw new BuildException("Can't set null URI attribute.");
                }

                if (this.uri == null) {
                        try {
                                new URIish(uri);
                                this.uri = uri;
                        } catch (URISyntaxException e) {
                                throw new BuildException(String.format("Invalid URI '%s'.", uri), e);
                        }
                }
        }
184304
@SuppressWarnings({"PMD.NPathComplexity"})
	/*package*/ URI buildUri(final String rawUrl, final String branch, final String lastKnownCommit) throws URISyntaxException {
		URIBuilder builder = new URIBuilder();
		
		/*
		 * Examples:
		 * 
		 * ssh://git@company.com/project/repository.git
		 * https://username@company.com/scm/project/repository.git
		 * ssh://git@company.com/~username/repository.git
		 * https://username@company.com/scm/~username/repository.git
		 * 
		 */
		
		String repoUrlRaw = rawUrl;
		String repoUrlProcessed = repoUrlRaw;
		
		if (repoUrlProcessed.endsWith(".git")) {
			repoUrlProcessed = repoUrlProcessed.substring(0, repoUrlProcessed.lastIndexOf(".git"));
		}
		
		URI uri = URI.create(repoUrlProcessed.replaceAll(" ", "%20"));
		
		String host = uri.getHost();
		String scheme = "ssh".equalsIgnoreCase(uri.getScheme())? "https" : uri.getScheme();
		int port = uri.getPort();
		String path = uri.getPath();
		if ((path.startsWith("scm/") || path.startsWith("/scm")) && path.length() > 4) {
			path = path.substring(4);
		}
		if (path.length() > 0 && path.charAt(0) == '/') {
			path = path.substring(1, path.length());
		}
		
		String[] splitPath = path.split("/");
		String projectKey = "";
		String repositorySlug = "";
		
		if (splitPath.length > 1) {
			projectKey = splitPath[0];
			repositorySlug = path.substring(path.indexOf('/') + 1, path.length());
		} else {
			// Shouldn't get to this case
			projectKey = "";
			repositorySlug = path;
		}
		
		String apiPath = settings.getApi() != null? settings.getApi() : "";
		
		if (apiPath.endsWith("/")) {
			apiPath = settings.getApi().substring(0, settings.getApi().length() - 1);
		}
		
		builder.setScheme(scheme);
		builder.setHost(host);
		if (port != -1) {
			builder.setPort(port);
		}
		
		builder.setPath(apiPath + "/projects/" + projectKey + "/repos/" + repositorySlug + "/commits");
		if (branch == null || branch.length() == 0) {
			builder.addParameter("until", "master");
		} else {
			builder.addParameter("until", branch.replaceAll(" ", "%20"));
		}
		
		if (lastKnownCommit != null && lastKnownCommit.length() > 0) {
			builder.addParameter("since", lastKnownCommit);
		}
		
		if (settings.getPageSize() > 0) {
			builder.addParameter("limit", String.valueOf(settings.getPageSize()));
		}
		
		return builder.build();
	}
972444
public void setImageURI(Uri uri, @Nullable Object callerContext) {
    DraweeController controller =
        mControllerBuilder
            .setCallerContext(callerContext)
            .setUri(uri)
            .setOldController(getController())
            .build();
    setController(controller);
  }
446492
public void setRepositories(java.util.Collection<RepositoryMetadata> repositories) {
        if (repositories == null) {
            this.repositories = null;
            return;
        }

        this.repositories = new java.util.ArrayList<RepositoryMetadata>(repositories);
    }
370164
public void parse(String uri) {
        if (uri.startsWith("/")) {
            uri = uri.substring(1);
        }
        
        int pos = uri.indexOf("/");
        if (pos == -1) {
            context = uri;
            repository = "";
            workspace = "";
            path="/";
            return;
        }
        
        if (pos > 0) {
            context = uri.substring(0, pos);
            uri = uri.substring(pos + 1);
        }
        
        //expecting tree here
         uri = uri.substring(5);
        
         pos = uri.indexOf("/ws-");
         repository = uri.substring(0, pos);
         
         uri = uri.substring(repository.length() + 1);
         pos = uri.indexOf("/");
         
         workspace = uri.substring(3, pos);
         path = uri.substring(workspace.length() + 3);
    }
83393
public static Response put(URI uri) throws URISyntaxException, HttpException {
        return putBody(new HttpPut(uri), null, null, null, null);
    }
413599
private URI checkURI(String uri)
  {
    try
    {
      return new URI(Preconditions.checkNotNull(uri).trim());
    } catch (URISyntaxException e)
    {
      parser.getReport().message(MessageId.RSC_020, parser.getLocation(), uri);
      return null;
    }
  }
1100772
public URI addAPIKey(String uri) {
        try {
            final URIBuilder builder = new URIBuilder(uri);
            if (apiAccessKey != null) {
                builder.setParameter("key", apiAccessKey);
            }
            return builder.build();
        } catch (URISyntaxException e) {
            throw new RedmineInternalError(e);
        }
    }
643888
public void setRepositories(java.util.Collection<Repository> repositories) {
        if (repositories == null) {
            this.repositories = null;
            return;
        }

        this.repositories = new java.util.ArrayList<Repository>(repositories);
    }
266359
public XPointerEngine setBaseURI(final String baseURI)
    {
        if (baseURI == null)
        {
            this.baseURIValue = XdmEmptySequence.getInstance();
        }
        else
        {
            this.baseURIValue = new XdmAtomicValue(baseURI);
        }
        return this;
    }
536857
@Deprecated
    public static void rewriteURI(Node node, String uri) {
        node.getProperties().add(new Property(APM_ORIGINAL_URI, node.getUri()));
        node.setUri(uri);
    }
1180535
public void setBaseURI(org.eclipse.emf.common.util.URI basePath) {
		this.baseUri = basePath;
	}
953666
def set(self, uri, content):
        
        key, value = self._prepare_node(uri, content)
        self._set(key, value)
9673
@Override
	protected void setInitURI(String uriString) throws CadiException {
		try {
			initURI = new URI(uriString);
		} catch (URISyntaxException e) {
			throw new CadiException(e);
		}
	}
415835
public void add(final String prefix, final String uri) {
    if (prefix == null) {
      defaultNS = uri;
    }

    addToMap(prefix, uri);
  }
150356
private void addURIToAuthorize(final HttpServletRequest httpRequest, final URI uri) {
        @SuppressWarnings("unchecked")
        Set<URI> targetURIs = (Set<URI>) httpRequest.getAttribute(URIS_TO_AUTHORIZE);
        if (targetURIs == null) {
            targetURIs = new HashSet<>();
            httpRequest.setAttribute(URIS_TO_AUTHORIZE, targetURIs);
        }
        targetURIs.add(uri);
    }
1362779
public void setImageURI(@Nullable String uriString, @Nullable Object callerContext) {
    Uri uri = (uriString != null) ? Uri.parse(uriString) : null;
    setImageURI(uri, callerContext);
  }