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

Merge branch 'Issue/2222-resourceDateCreated' into 'dev'

New: "Date Created" translation added to the SQL2Linked

See merge request !16
parents 088c6c6b 284f7d33
No related branches found
No related tags found
2 merge requests!19Release: Sprint/2022 18 :robot:,!16New: "Date Created" translation added to the SQL2Linked
Pipeline #809917 skipped
...@@ -63,10 +63,10 @@ namespace SQL2Linked.Implementations ...@@ -63,10 +63,10 @@ namespace SQL2Linked.Implementations
AssertToGraphLiteralNode(graph, projectGraphName, dcterms + "description", entry.Description); AssertToGraphLiteralNode(graph, projectGraphName, dcterms + "description", entry.Description);
Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{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}'. "); 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}'. "); Console.WriteLine($"For project '{entry.DisplayName}' will migrate triple '{projectGraphName} {dcat}endDate {entry.EndDate}'. ");
if (!string.IsNullOrWhiteSpace(entry.Keywords)) if (!string.IsNullOrWhiteSpace(entry.Keywords))
......
...@@ -119,8 +119,11 @@ namespace SQL2Linked.Implementations ...@@ -119,8 +119,11 @@ namespace SQL2Linked.Implementations
AssertToGraphLiteralNode(graph, resourceGraphName, cosc + "terms/resource#fixedValues", entry.FixedValues); 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}'. "); 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}"); 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}'. "); 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")); 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}'. "); Console.WriteLine($"For resource '{entry.DisplayName}' will migrate triple '{resourceGraphName} {cosc}terms/resource#archived {entry.Archived}'. ");
...@@ -174,6 +177,12 @@ namespace SQL2Linked.Implementations ...@@ -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); graphs.Add(graph);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment