1313function getBlobentries(
1414 node;
1515 labelFilter:: Union{Nothing, Function} = nothing ,
16- blobIdFilter :: Union{Nothing, Function} = nothing ,
16+ blobidFilter :: Union{Nothing, Function} = nothing ,
1717)
1818 entries = collect(values(refBlobentries(node)))
1919 filterDFG!(entries, labelFilter, getLabel)
20- filterDFG!(entries, blobIdFilter , x -> string(x. blobid))
20+ filterDFG!(entries, blobidFilter , x -> string(x. blobid))
2121 return entries
2222end
2323
@@ -195,6 +195,52 @@ function listModelBlobentries end
195195function hasGraphBlobentry end
196196function hasAgentBlobentry end
197197function hasModelBlobentry end
198+
199+ # #==============================================================================
200+ # # Default Variable/Factor implementations
201+ # #==============================================================================
202+
203+ function getVariableBlobentry(dfg:: AbstractDFG , variableLabel:: Symbol , label:: Symbol )
204+ return getBlobentry(getVariable(dfg, variableLabel), label)
205+ end
206+
207+ function getVariableBlobentries(
208+ dfg:: AbstractDFG ,
209+ variableLabel:: Symbol ;
210+ labelFilter:: Union{Nothing, Function} = nothing ,
211+ blobidFilter:: Union{Nothing, Function} = nothing ,
212+ )
213+ return getBlobentries(getVariable(dfg, variableLabel); labelFilter, blobidFilter)
214+ end
215+
216+ function listVariableBlobentries(dfg:: AbstractDFG , variableLabel:: Symbol )
217+ return listBlobentries(getVariable(dfg, variableLabel))
218+ end
219+
220+ function hasVariableBlobentry(dfg:: AbstractDFG , variableLabel:: Symbol , label:: Symbol )
221+ return hasBlobentry(getVariable(dfg, variableLabel), label)
222+ end
223+
224+ function getFactorBlobentry(dfg:: AbstractDFG , factorLabel:: Symbol , label:: Symbol )
225+ return getBlobentry(getFactor(dfg, factorLabel), label)
226+ end
227+
228+ function getFactorBlobentries(
229+ dfg:: AbstractDFG ,
230+ factorLabel:: Symbol ;
231+ labelFilter:: Union{Nothing, Function} = nothing ,
232+ blobidFilter:: Union{Nothing, Function} = nothing ,
233+ )
234+ return getBlobentries(getFactor(dfg, factorLabel); labelFilter, blobidFilter)
235+ end
236+
237+ function listFactorBlobentries(dfg:: AbstractDFG , factorLabel:: Symbol )
238+ return listBlobentries(getFactor(dfg, factorLabel))
239+ end
240+
241+ function hasFactorBlobentry(dfg:: AbstractDFG , factorLabel:: Symbol , label:: Symbol )
242+ return hasBlobentry(getFactor(dfg, factorLabel), label)
243+ end
198244# #==============================================================================
199245# # Blobentry [default] bulk operations
200246# #==============================================================================
@@ -280,19 +326,10 @@ end
280326# # Blobentry - Helper functions, Lists, etc
281327# #==============================================================================
282328
283- function getVariableBlobentries(
284- dfg:: AbstractDFG ,
285- variableLabel:: Symbol ;
286- labelFilter:: Union{Nothing, Function} = nothing ,
287- blobIdFilter:: Union{Nothing, Function} = nothing ,
288- )
289- return getBlobentries(getVariable(dfg, variableLabel); labelFilter, blobIdFilter)
290- end
291-
292329function gatherBlobentries(
293330 dfg:: AbstractDFG ;
294331 labelFilter:: Union{Nothing, Function} = nothing ,
295- blobIdFilter :: Union{Nothing, Function} = nothing ,
332+ blobidFilter :: Union{Nothing, Function} = nothing ,
296333 solvableFilter:: Union{Nothing, Function} = nothing ,
297334 tagsFilter:: Union{Nothing, Function} = nothing ,
298335 typeFilter:: Union{Nothing, Function} = nothing ,
@@ -306,15 +343,11 @@ function gatherBlobentries(
306343 labelFilter = variableLabelFilter,
307344 )
308345 return map(vls) do vl
309- return vl => getVariableBlobentries(dfg, vl; labelFilter, blobIdFilter )
346+ return vl => getVariableBlobentries(dfg, vl; labelFilter, blobidFilter )
310347 end
311348end
312349const collectBlobentries = gatherBlobentries
313350
314- function listVariableBlobentries(dfg:: AbstractDFG , label:: Symbol )
315- return listBlobentries(getVariable(dfg, label))
316- end
317-
318351"""
319352 $(SIGNATURES)
320353Finds and returns the first blob entry that matches the filter.
@@ -324,11 +357,11 @@ Also see: [`getBlobentry`](@ref)
324357function getfirstBlobentry(
325358 node;
326359 labelFilter:: Union{Nothing, Function} = nothing ,
327- blobIdFilter :: Union{Nothing, Function} = nothing ,
360+ blobidFilter :: Union{Nothing, Function} = nothing ,
328361 sortby:: Function = getLabel,
329362 sortlt:: Function = natural_lt,
330363)
331- entries = getBlobentries(node; labelFilter, blobIdFilter )
364+ entries = getBlobentries(node; labelFilter, blobidFilter )
332365 if isempty(entries)
333366 return nothing
334367 else
@@ -340,9 +373,9 @@ function getfirstVariableBlobentry(
340373 dfg:: AbstractDFG ,
341374 label:: Symbol ;
342375 labelFilter:: Union{Nothing, Function} = nothing ,
343- blobIdFilter :: Union{Nothing, Function} = nothing ,
376+ blobidFilter :: Union{Nothing, Function} = nothing ,
344377)
345- return getfirstBlobentry(getVariable(dfg, label); labelFilter, blobIdFilter )
378+ return getfirstBlobentry(getVariable(dfg, label); labelFilter, blobidFilter )
346379end
347380
348381# # =============================================================================
0 commit comments