class MavenArtifact implements ArtifactTransferResource {

    private String repositoryUrl;

    private Resource resource;

    private long transferStartTime;

    MavenArtifact(String repositoryUrl, Resource resource) {
        if (repositoryUrl == null) {
            this.repositoryUrl = "";
        } else if (!repositoryUrl.endsWith("/") && !repositoryUrl.isEmpty()) {
            this.repositoryUrl = repositoryUrl + '/';
        } else {
            this.repositoryUrl = repositoryUrl;
        }
        this.resource = resource;

        this.transferStartTime = System.currentTimeMillis();
    }

    public String getRepositoryUrl() {
        return repositoryUrl;
    }

    public String getName() {<FILL_FUNCTION_BODY>}

    public String getUrl() {
        return getRepositoryUrl() + getName();
    }

    public long getContentLength() {
        return resource.getContentLength();
    }

    public long getTransferStartTime() {
        return transferStartTime;
    }

    @Override
    public String toString() {
        return getUrl();
    }
}

        String name = resource.getName();

        if (name == null) {
            name = "";
        } else if (name.startsWith("/")) {
            name = name.substring(1);
        }

        return name;
    
<no_super_class>