Skip to content

Commit 8b6c5e3

Browse files
authored
fix bug, update docs
1 parent 0e8f13b commit 8b6c5e3

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/DataBlobs/services/BlobEntry.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ getTimestamp(entry::BlobEntry) = entry.timestamp
3636

3737

3838

39-
function assertHash(de::AbstractDataEntry, db; hashfunction::Function = sha256)
39+
function assertHash(de::BlobEntry, db; hashfunction::Function = sha256)
4040
getHash(de) === nothing && @warn "Missing hash?" && return true
4141
if hashfunction(db) == getHash(de)
4242
return true #or nothing?
@@ -88,7 +88,7 @@ function getBlobEntry(var::AbstractDFGVariable, blobId::UUID)
8888
end
8989
end
9090
throw(
91-
KeyError("No dataEntry with blobId $(blobId) found in variable $(getLabel(var))")
91+
KeyError("No blobEntry with blobId $(blobId) found in variable $(getLabel(var))")
9292
)
9393
end
9494

@@ -101,7 +101,7 @@ function getBlobEntry(var::AbstractDFGVariable, key::Regex)
101101
end
102102
end
103103
throw(
104-
KeyError("No dataEntry with label matching regex $(key) found in variable $(getLabel(var))")
104+
KeyError("No blobEntry with label matching regex $(key) found in variable $(getLabel(var))")
105105
)
106106
end
107107

@@ -120,7 +120,7 @@ Should be extended if DFG variable is not returned by reference.
120120
Also see: [`getBlobEntry`](@ref), [`addBlob`](@ref), [`mergeBlobEntries!`](@ref)
121121
"""
122122
function addBlobEntry!(var::AbstractDFGVariable, bde::BlobEntry)
123-
haskey(var.dataDict, bde.label) && error("Data entry $(bde.label) already exists in variable $(getLabel(var))")
123+
haskey(var.dataDict, bde.label) && error("blobEntry $(bde.label) already exists on variable $(getLabel(var))")
124124
var.dataDict[bde.label] = bde
125125
return bde
126126
end
@@ -179,9 +179,9 @@ end
179179
"""
180180
$SIGNATURES
181181
182-
Does a data entry (element) exist at `key`.
182+
Does a blob entry (element) exist with `blobLabel`.
183183
"""
184-
hasBlobEntry(var::AbstractDFGVariable, key::Symbol) = haskey(var.dataDict, key)
184+
hasBlobEntry(var::AbstractDFGVariable, blobLabel::Symbol) = haskey(var.dataDict, blobLabel)
185185

186186

187187
"""
@@ -213,7 +213,7 @@ end
213213

214214
"""
215215
$SIGNATURES
216-
List a collection of data entries per variable that match a particular `pattern::Regex`.
216+
List a collection of blob entries per variable that match a particular `pattern::Regex`.
217217
218218
Notes
219219
- Optional sort function argument, default is unsorted.
@@ -244,7 +244,7 @@ end
244244
"""
245245
$SIGNATURES
246246
247-
Add a data entry into the destination variable which already exists
247+
Add a blob entry into the destination variable which already exists
248248
in a source variable.
249249
250250
See also: [`addBlobEntry!`](@ref), [`getBlobEntry`](@ref), [`listBlobEntries`](@ref), [`getBlob`](@ref)

src/DataBlobs/services/HelpersDataWrapEntryBlob.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $(METHODLIST)
1515
function getData end
1616

1717
"""
18-
Add a data Entry and Blob to a distributed factor graph or BlobStore.
18+
Add both a BlobEntry and Blob to a distributed factor graph or BlobStore.
1919
Related
2020
[`addBlobEntry!`](@ref)
2121
@@ -24,7 +24,7 @@ $(METHODLIST)
2424
function addData! end
2525

2626
"""
27-
Update a data entry or blob to the blob store or dfg.
27+
Update a blob entry or blob to the blob store or dfg.
2828
Related
2929
[`updateBlobEntry!`](@ref)
3030
@@ -33,7 +33,7 @@ $(METHODLIST)
3333
function updateData! end
3434

3535
"""
36-
Delete a data entry and blob from the blob store or dfg.
36+
Delete a blob entry and blob from the blob store or dfg.
3737
Related
3838
[`deleteBlobEntry!`](@ref)
3939
@@ -138,7 +138,8 @@ function addData!(
138138
key::Symbol,
139139
blob::Vector{UInt8},
140140
timestamp=now(localzone());
141-
description="", mimeType = "application/octet-stream",
141+
description="",
142+
mimeType = "application/octet-stream",
142143
id::UUID = uuid4(),
143144
hashfunction = sha256
144145
)

0 commit comments

Comments
 (0)