Commit fdd03b73 authored by Petar Hristov's avatar Petar Hristov 💬
Browse files

Merge branch 'dev' into 'master'

Release: Sprint/2022-02

See merge request !60
parents c9aab9da 589d80c3
using Coscine.Api.Tree.Util;
using Coscine.ApiCommons;
using Coscine.ApiCommons.Factories;
using Coscine.Configuration;
......@@ -74,7 +75,7 @@ namespace Coscine.Api.Tree.Controllers
/// <returns> Uri </returns>
public Uri GenerateId(string resourceId, string path)
{
return new Uri($"https://hdl.handle.net/{_prefix}/{resourceId}@path={Uri.EscapeDataString(path)}");
return new CustomUri($"https://hdl.handle.net/{_prefix}/{resourceId}@path={Uri.EscapeDataString(path)}");
}
/// <summary>
......
using System;
namespace Coscine.Api.Tree.Util
{
/// <summary>
/// Adapts the returned ToString of a Uri
/// </summary>
public class CustomUri : Uri
{
/// <summary>
/// Constructs a Custom Uri
/// </summary>
/// <param name="uri"></param>
public CustomUri(string uri) : base(uri)
{
}
/// <summary>
/// Overwrites the ToString for returning the AbsoluteUri (for dotNetRDF)
/// </summary>
/// <returns></returns>
public override string ToString()
{
return AbsoluteUri;
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment