Skip to content
Snippets Groups Projects
Commit 284f7d33 authored by Petar Hristov's avatar Petar Hristov :speech_balloon: Committed by Hanna Führ
Browse files

New: "Date Created" translation added to the SQL2Linked

parent 088c6c6b
No related branches found
No related tags found
2 merge requests!19Release: Sprint/2022 18 :robot:,!16New: "Date Created" translation added to the SQL2Linked
......@@ -63,10 +63,10 @@ namespace SQL2Linked.Implementations
AssertToGraphLiteralNode(graph, projectGraphName, dcterms + "description", entry.Description);
Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{projectGraphName} {dcterms}description {entry.Description}'. ");
AssertToGraphLiteralNode(graph, projectGraphName, dcat + "startDate", entry.StartDate.ToString());
AssertToGraphLiteralNode(graph, projectGraphName, dcat + "startDate", entry.StartDate.ToString(), new Uri("http://www.w3.org/2001/XMLSchema#dateTime"));
Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{projectGraphName} {dcat}startDate {entry.StartDate}'. ");
AssertToGraphLiteralNode(graph, projectGraphName, dcat + "endDate", entry.EndDate.ToString());
AssertToGraphLiteralNode(graph, projectGraphName, dcat + "endDate", entry.EndDate.ToString(), new Uri("http://www.w3.org/2001/XMLSchema#dateTime"));
Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{projectGraphName} {dcat}endDate {entry.EndDate}'. ");
if (!string.IsNullOrWhiteSpace(entry.Keywords))
......
......@@ -119,8 +119,11 @@ namespace SQL2Linked.Implementations
AssertToGraphLiteralNode(graph, resourceGraphName, cosc + "terms/resource#fixedValues", entry.FixedValues);
Console.WriteLine($"For resource '{entry.DisplayName}' will migrate triple '{resourceGraphName} {cosc}terms/resource#fixedValues {entry.FixedValues}'. ");
if (entry.Creator is not null)
{
AssertToGraphUriNode(graph, resourceGraphName, dcterms + "creator", cosc + $"users/{entry.Creator}");
Console.WriteLine($"For resource '{entry.DisplayName}' will migrate triple '{resourceGraphName} {dcterms}creator {cosc}users/{entry.Creator}'. ");
}
AssertToGraphLiteralNode(graph, resourceGraphName, cosc + "terms/resource#archived", entry.Archived.ToString().ToLower(), new Uri("http://www.w3.org/2001/XMLSchema#boolean"));
Console.WriteLine($"For resource '{entry.DisplayName}' will migrate triple '{resourceGraphName} {cosc}terms/resource#archived {entry.Archived}'. ");
......@@ -174,6 +177,12 @@ namespace SQL2Linked.Implementations
}
}
if (entry.DateCreated is not null && entry.DateCreated.HasValue)
{
AssertToGraphLiteralNode(graph, resourceGraphName, dcterms + "created", entry.DateCreated.Value.ToString(), new Uri("http://www.w3.org/2001/XMLSchema#dateTime"));
Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{resourceGraphName} {dcterms}created {entry.DateCreated}'. ");
}
graphs.Add(graph);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment