Skip to content

Commit

Permalink
clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
lukavdplas authored and jgonggrijp committed Dec 12, 2024
1 parent 860349c commit 55a2079
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/collect/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def list_to_graph_collection(items: List[Node], items_node: IdentifiedNode) -> G

g = Graph()
collection = g.collection(items_node)
collection += items
collection += items # indirectly modifies g
return g


Expand All @@ -32,7 +32,9 @@ def collection_triples(graph: Graph, list_node: IdentifiedNode) -> Triples:
Select all triples that make up an RDF collection in a graph.
This collects the chain of `rdf:first` / `rdf:rest` relations that make up the
collection.
collection. It collects what is actually stored in the graph, rather than a
normalised version, so this method should be used to select the current triples in
a delete or update operation.
'''

triples = list(graph.triples((list_node, RDF.first, None)))
Expand Down

0 comments on commit 55a2079

Please sign in to comment.