package fr.emse.gitlab.saref.entities.git;

import java.util.Date;

import org.eclipse.jgit.lib.Ref;

public class BranchVersion extends Version {

	final String branchName;

	BranchVersion(Repository repository, Ref ref, Date issued, String branchName) {
		super(repository, ref, issued);
		this.branchName = branchName;
	}

	@Override
	public String getPrefix() {
		return String.format("%s-%s:", super.getSuperPrefix(), branchName);
	}

	@Override
	public String getUri() {
		return String.format("%s%s/", super.getSuperUri(), branchName);
	}

	@Override
	public String getVersionName() {
		return branchName;
	}
}
