Skip to content
Snippets Groups Projects
Commit a6cee370 authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Fix: dates

parent 58ee6cf3
No related branches found
No related tags found
1 merge request!16New: "Date Created" translation added to the SQL2Linked
Pipeline #807363 skipped
......@@ -60,10 +60,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))
......
......@@ -116,8 +116,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}'. ");
......@@ -170,7 +173,7 @@ namespace SQL2Linked.Implementations
if (entry.DateCreated is not null && entry.DateCreated.HasValue)
{
AssertToGraphLiteralNode(graph, resourceGraphName, dcterms + "created", entry.DateCreated.Value.ToString());
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}'. ");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment