Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GraphDeployer
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
scripts
GraphDeployer
Merge requests
!26
New: MigrateSQL2Linked to GD
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Closed
New: MigrateSQL2Linked to GD
Issue/2915-migrateSql2Linked
into
dev
Overview
3
Commits
12
Pipelines
15
Changes
8
All threads resolved!
Hide all comments
Closed
Sirieam Marie Hunke
requested to merge
Issue/2915-migrateSql2Linked
into
dev
9 months ago
Overview
3
Commits
12
Pipelines
15
Changes
8
All threads resolved!
Hide all comments
Expand
coscine/issues#2915
0
0
Merge request reports
Compare
dev
version 10
d7881ff6
8 months ago
version 9
94b8fdae
8 months ago
version 8
29dc2bcc
8 months ago
version 7
c230d042
8 months ago
version 6
49df2e25
8 months ago
version 5
42cd7fd4
8 months ago
version 4
3cb0ff4a
8 months ago
version 3
c10492a1
9 months ago
version 2
883ab7b6
9 months ago
version 1
7603e60b
9 months ago
dev (base)
and
latest version
latest version
552006c4
12 commits,
8 months ago
version 10
d7881ff6
11 commits,
8 months ago
version 9
94b8fdae
10 commits,
8 months ago
version 8
29dc2bcc
9 commits,
8 months ago
version 7
c230d042
8 commits,
8 months ago
version 6
49df2e25
7 commits,
8 months ago
version 5
42cd7fd4
6 commits,
8 months ago
version 4
3cb0ff4a
5 commits,
8 months ago
version 3
c10492a1
3 commits,
9 months ago
version 2
883ab7b6
2 commits,
9 months ago
version 1
7603e60b
1 commit,
9 months ago
8 files
+
783
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
src/GraphDeployer/Implementations/PatchGraph.cs
0 → 100644
+
77
−
0
Options
using
VDS.RDF
;
namespace
Coscine.GraphDeployer
;
/// <summary>
/// Represents a specialized RDF graph for small-scale updates.
/// This class extends the standard Graph class with additional
/// functionalities for tracking changes (assertions and retractions).
/// </summary>
/// <remarks><i>TODO: Consider extending <see cref="ITransactionalGraph"/> to allow for rollback and commit operations.</i></remarks>
public
class
PatchGraph
:
Graph
{
public
List
<
Triple
>
AssertList
{
get
;
set
;
}
=
new
();
public
List
<
Triple
>
RetractList
{
get
;
set
;
}
=
new
();
/// <summary>
/// Initializes a new instance of the <see cref="PatchGraph"/> class.
/// </summary>
public
PatchGraph
()
:
base
()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="PatchGraph"/> class.
/// </summary>
public
PatchGraph
(
Uri
graphUri
)
:
base
(
graphUri
)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="IPatchGraph"/> class with the specified graph URI.
/// </summary>
/// <param name="graphUri">The base URI for the graph.</param>
/// <returns>A new empty instance of <see cref="IPatchGraph"/> with the provided base URI.</returns>
public
static
PatchGraph
Empty
(
Uri
graphUri
)
{
return
new
PatchGraph
(
graphUri
)
{
BaseUri
=
graphUri
};
}
/// <summary>
/// Initializes a new instance of the <see cref="IPatchGraph"/> class with the specified graph URI.
/// </summary>
/// <param name="graphUri">The base URI for the graph as a string.</param>
/// <returns>A new empty instance of <see cref="IPatchGraph"/> with the provided base URI.</returns>
public
static
PatchGraph
Empty
(
string
graphUri
)
{
return
Empty
(
new
Uri
(
graphUri
));
}
public
override
bool
Assert
(
Triple
t
)
{
AssertList
.
Add
(
t
);
return
base
.
Assert
(
t
);
}
public
override
bool
Assert
(
IEnumerable
<
Triple
>
triples
)
{
AssertList
.
AddRange
(
triples
);
return
base
.
Assert
(
triples
);
}
public
override
bool
Retract
(
Triple
t
)
{
RetractList
.
Add
(
t
);
return
base
.
Retract
(
t
);
}
public
override
bool
Retract
(
IEnumerable
<
Triple
>
triples
)
{
RetractList
.
AddRange
(
triples
);
return
base
.
Retract
(
triples
);
}
}
Loading