| 286 | } |
| 287 | |
| 288 | std::optional<std::vector<tomoto::Float>> DocumentObject::getNumericMetadata() const |
| 289 | { |
| 290 | if (corpus->isIndependent()) throw py::AttributeError{ "doc has no `numericMetadata` field!" }; |
| 291 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 292 | if (auto ret = docVisit<tomoto::DocumentGDMR>(getBoundDoc(), [](auto* doc) -> std::optional<std::vector<tomoto::Float>> |
| 293 | { |
| 294 | return doc->metadataOrg; |
| 295 | })) return ret; |
| 296 | throw py::AttributeError{ "doc has no `numericMetadata` field!" }; |
| 297 | } |
nothing calls this directly
no test coverage detected