FakeDatasetRef¶
-
class
lsst.daf.butler.registry.interfaces.
FakeDatasetRef
¶ Bases:
object
A fake
DatasetRef
that can be used internally by butler where only the dataset ID is available.Should only be used when registry can not be used to create a full
DatasetRef
from the ID. A particular use case is during dataset deletion when solely the ID is available.Parameters: - id :
int
The dataset ID.
Attributes Summary
components
datasetType
id
Unique integer that identifies this dataset. Methods Summary
allRefs
(parents)Return all the nested component DatasetRef
and optionally the parent.flatten
(refs, *, parents)Recursively transform an iterable over FakeDatasetRef
to include nested componentFakeDatasetRef
instances.getCheckedId
()Return self.id
.Attributes Documentation
-
components
¶
-
datasetType
¶
-
id
¶ Unique integer that identifies this dataset.
Methods Documentation
-
allRefs
(parents: bool = True) → Iterator[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef]¶ Return all the nested component
DatasetRef
and optionally the parent.Parameters: - parents :
bool
, optional If
True
(default) include the given datasets in the output iterable. IfFalse
, include only their components. Since aFakeDatasetRef
never have components, setting this toFalse
will yield no results.
Yields: - ref :
FakeDatasetRef
Since there are never components, this will either return itself or no results (depending on the value of
parents
).
- parents :
-
static
flatten
(refs: Iterable[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef], *, parents: bool = True) → Iterator[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef]¶ Recursively transform an iterable over
FakeDatasetRef
to include nested componentFakeDatasetRef
instances.Parameters: - refs :
Iterable
[FakeDatasetRef
] Input iterable to process.
- parents :
bool
, optional If
True
(default) include the given datasets in the output iterable. IfFalse
, include only their components, which forFakeDatasetRef
means no results.
Yields: - ref :
DatasetRef
Either one of the given
FakeDatasetRef
instances (only ifparent
isTrue
) or one of its (recursive) children.
Notes
If
parents
isTrue
, components are guaranteed to be yielded before their parents.- refs :
- id :