Skip to content
Snippets Groups Projects

Fix: Make Inherited AP's metadata work

Merged Hanna Führ requested to merge Hotfix/2504-formGen into master
@@ -338,15 +338,11 @@ namespace Coscine.Api.Tree.Controllers
}
else
{
var tempGraph = new Graph();
StringParser.Parse(tempGraph, metadataObject.Value<string>("metadata"), MimeTypesHelper.GetParser(mimeType));
var triplesList = tempGraph.Triples.ToArray();
var subjectNode = tempGraph.CreateUriNode(graphNameUri);
foreach (var triple in triplesList)
var tempGraph = new Graph
{
tempGraph.Retract(triple);
tempGraph.Assert(new Triple(subjectNode, triple.Predicate, triple.Object));
}
BaseUri = graphNameUri
};
StringParser.Parse(tempGraph, metadataObject.Value<string>("metadata"), MimeTypesHelper.GetParser(mimeType));
json = JObject.Parse(VDS.RDF.Writing.StringWriter.Write(tempGraph, MimeTypesHelper.GetWriter("application/rdf+json")));
}
Loading