Skip to content

Commit

Permalink
Make use of new RDFQuadruple ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesalvo committed Nov 6, 2024
1 parent 14b1c27 commit e21bac7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions RDFSharp/Store/Engines/RDFMemoryStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,8 @@ public override RDFStore MergeGraph(RDFGraph graph)
if (graph != null)
{
RDFContext graphCtx = new RDFContext(graph.Context);
foreach (RDFTriple t in graph)
{
if (t.TripleFlavor == RDFModelEnums.RDFTripleFlavors.SPO)
AddQuadruple(new RDFQuadruple(graphCtx, (RDFResource)t.Subject, (RDFResource)t.Predicate, (RDFResource)t.Object));
else
AddQuadruple(new RDFQuadruple(graphCtx, (RDFResource)t.Subject, (RDFResource)t.Predicate, (RDFLiteral)t.Object));
}
foreach (RDFTriple triple in graph)
AddQuadruple(new RDFQuadruple(graphCtx, triple));
}
return this;
}
Expand Down

0 comments on commit e21bac7

Please sign in to comment.