Skip to content

Commit 710cbc5

Browse files
author
Hans-Chrstian
committed
Review comments
1 parent 3602365 commit 710cbc5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ckanext/fairdatapoint/harvesters/domain/fair_data_point_record_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(self, fdp_end_point: str, harvest_catalogs: bool = False):
3232
def get_record_ids(self) -> Dict.keys:
3333
log.debug("FAIR Data Point get_records from {}".format(self.fair_data_point.fdp_end_point))
3434
result = dict()
35-
for fdp_record in self._bfs_traverse_records(self.fair_data_point.fdp_end_point):
35+
for fdp_record in self._breath_first_search_records(self.fair_data_point.fdp_end_point):
3636
if self.harvest_catalogs and fdp_record.is_catalog():
3737
identifier = Identifier("")
3838
identifier.add("catalog", str(fdp_record.url))
@@ -132,7 +132,7 @@ def _map_record(self, url: str):
132132
graph = self.fair_data_point.get_graph(url)
133133
return mapper.map(graph)
134134

135-
def _bfs_traverse_records(self, start_url: str):
135+
def _breath_first_search_records(self, start_url: str):
136136
queue = deque([start_url])
137137
visited = set()
138138
while queue:

ckanext/fairdatapoint/harvesters/domain/fdp_record.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class FdpRecord:
1010
def __init__(self, url, graph):
11-
self.graph = graph
1211
self.url = url
1312
self._children = set()
13+
self._graph = graph
1414

1515
def children(self):
1616
return self._children
@@ -19,7 +19,7 @@ def add_children(self, child_url):
1919
self._children.add(child_url)
2020

2121
def is_catalog(self):
22-
return (URIRef(self.url), RDF.type, DCAT.Catalog) in self.graph
22+
return (URIRef(self.url), RDF.type, DCAT.Catalog) in self._graph
2323

2424
def is_dataset(self):
25-
return (URIRef(self.url), RDF.type, DCAT.Dataset) in self.graph
25+
return (URIRef(self.url), RDF.type, DCAT.Dataset) in self._graph

0 commit comments

Comments
 (0)