Skip to content
Snippets Groups Projects
Commit 54d7a9f3 authored by Hanna Führ's avatar Hanna Führ
Browse files

Update: Fixes (coscine/issues#2082)

parent 22061366
No related branches found
No related tags found
1 merge request!6Fix: Migrate role structured data to linked data
Pipeline #751378 skipped
...@@ -27,7 +27,7 @@ namespace SQL2Linked.Implementations ...@@ -27,7 +27,7 @@ namespace SQL2Linked.Implementations
{ {
graph.Assert( graph.Assert(
new Triple( new Triple(
graph.CreateLiteralNode(roleGraphName), graph.CreateUriNode(new Uri(roleGraphName)),
graph.CreateUriNode(RdfType), graph.CreateUriNode(RdfType),
graph.CreateUriNode(orgRole) graph.CreateUriNode(orgRole)
) )
...@@ -41,13 +41,13 @@ namespace SQL2Linked.Implementations ...@@ -41,13 +41,13 @@ namespace SQL2Linked.Implementations
} }
// check if a triple with dcterms:title '{entry.DisplayName}' already exists in the role graph // check if a triple with dcterms:title '{entry.DisplayName}' already exists in the role graph
var getTriplesDisplayname = graph.GetTriplesWithObject(graph.CreateLiteralNode(entry.DisplayName)); var getTriplesDctermsTitle = graph.GetTriplesWithPredicate(dctermsTitle);
if (!getTriplesDisplayname.Any()) if (!getTriplesDctermsTitle.Any())
{ {
graph.Assert( graph.Assert(
new Triple( new Triple(
graph.CreateLiteralNode(roleGraphName), graph.CreateUriNode(new Uri(roleGraphName)),
graph.CreateUriNode(dctermsTitle), graph.CreateUriNode(dctermsTitle),
graph.CreateLiteralNode(entry.DisplayName) graph.CreateLiteralNode(entry.DisplayName)
) )
...@@ -59,7 +59,7 @@ namespace SQL2Linked.Implementations ...@@ -59,7 +59,7 @@ namespace SQL2Linked.Implementations
{ {
Console.WriteLine($"For role '{entry.DisplayName}' will NOT migrate triple '{graph.BaseUri}' dcterms:title '{entry.DisplayName}'. "); Console.WriteLine($"For role '{entry.DisplayName}' will NOT migrate triple '{graph.BaseUri}' dcterms:title '{entry.DisplayName}'. ");
} }
if (!getTriplesOrgRole.Any() || !getTriplesDisplayname.Any()) if (!getTriplesOrgRole.Any() || !getTriplesDctermsTitle.Any())
{ {
graphs.Add(graph); graphs.Add(graph);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment