Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SQL2Linked
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
scripts
SQL2Linked
Commits
92832932
Commit
92832932
authored
Aug 10, 2022
by
Benedikt Heinrichs
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes
parent
3e1eeb0d
Branches
Branches containing commit
No related tags found
1 merge request
!10
New: Migrate project structured data to linked data
Pipeline
#778542
skipped
Stage: commands
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/SQL2Linked/Implementations/ProjectStructuralData.cs
+3
-2
3 additions, 2 deletions
src/SQL2Linked/Implementations/ProjectStructuralData.cs
src/SQL2Linked/Program.cs
+2
-2
2 additions, 2 deletions
src/SQL2Linked/Program.cs
with
5 additions
and
4 deletions
src/SQL2Linked/Implementations/ProjectStructuralData.cs
+
3
−
2
View file @
92832932
using
Coscine.Database.DataModel
;
using
Coscine.Database.DataModel
;
using
Coscine.Database.Models
;
using
Coscine.Database.Models
;
using
VDS.RDF
;
using
VDS.RDF
;
using
VDS.RDF.Query
;
namespace
SQL2Linked.Implementations
namespace
SQL2Linked.Implementations
{
{
...
@@ -55,7 +54,7 @@ namespace SQL2Linked.Implementations
...
@@ -55,7 +54,7 @@ namespace SQL2Linked.Implementations
AssertToGraphLiteralNode
(
graph
,
projectGraphName
,
dcat
+
"endDate"
,
entry
.
EndDate
.
ToString
());
AssertToGraphLiteralNode
(
graph
,
projectGraphName
,
dcat
+
"endDate"
,
entry
.
EndDate
.
ToString
());
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
(
entry
.
Keywords
!=
null
)
if
(!
string
.
IsNullOrWhiteSpace
(
entry
.
Keywords
)
)
{
{
var
listKeywords
=
entry
.
Keywords
.
Split
(
';'
).
ToList
();
var
listKeywords
=
entry
.
Keywords
.
Split
(
';'
).
ToList
();
foreach
(
var
keyword
in
listKeywords
)
foreach
(
var
keyword
in
listKeywords
)
...
@@ -130,6 +129,8 @@ namespace SQL2Linked.Implementations
...
@@ -130,6 +129,8 @@ namespace SQL2Linked.Implementations
Console
.
WriteLine
(
$"For project '
{
entry
.
DisplayName
}
' will migrate triple '
{
projectGraphName
}
{
dcat
}
catalog
{
projectUrlPrefix
}
/
{
projectResource
.
ResourceId
}
'. "
);
Console
.
WriteLine
(
$"For project '
{
entry
.
DisplayName
}
' will migrate triple '
{
projectGraphName
}
{
dcat
}
catalog
{
projectUrlPrefix
}
/
{
projectResource
.
ResourceId
}
'. "
);
}
}
}
}
graphs
.
Add
(
graph
);
}
}
return
graphs
;
return
graphs
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/SQL2Linked/Program.cs
+
2
−
2
View file @
92832932
...
@@ -8,7 +8,7 @@ if (dummyMode)
...
@@ -8,7 +8,7 @@ if (dummyMode)
}
}
Console
.
WriteLine
(
"\nBegin SQL 2 Linked Data migration"
);
Console
.
WriteLine
(
"\nBegin SQL 2 Linked Data migration"
);
/*
var roleStructuralData = new RoleStructuralData();
var roleStructuralData = new RoleStructuralData();
roleStructuralData.Migrate(dummyMode);
roleStructuralData.Migrate(dummyMode);
...
@@ -17,7 +17,7 @@ userStructuralData.Migrate(dummyMode);
...
@@ -17,7 +17,7 @@ userStructuralData.Migrate(dummyMode);
var resourceTypeStructuralData = new ResourceTypeStructuralData();
var resourceTypeStructuralData = new ResourceTypeStructuralData();
resourceTypeStructuralData.Migrate(dummyMode);
resourceTypeStructuralData.Migrate(dummyMode);
*/
var
projectStructuralData
=
new
ProjectStructuralData
();
var
projectStructuralData
=
new
ProjectStructuralData
();
projectStructuralData
.
Migrate
(
dummyMode
);
projectStructuralData
.
Migrate
(
dummyMode
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment