| 205 | } |
| 206 | |
| 207 | std::optional<std::string_view> DocumentObject::getMetadataFromDMR() const |
| 208 | { |
| 209 | if (corpus->isIndependent()) return nullptr; |
| 210 | if (!doc) throw py::RuntimeError{ "doc is null!" }; |
| 211 | auto inst = corpus->tm->getInst<tomoto::IDMRModel>(); |
| 212 | |
| 213 | return docVisit<tomoto::DocumentDMR>(getBoundDoc(), [&](auto* doc) |
| 214 | { |
| 215 | return inst->getMetadataDict().toWord(doc->metadata); |
| 216 | }); |
| 217 | } |
| 218 | |
| 219 | py::UniqueObj DocumentObject::getMultiMetadata() const |
| 220 | { |
nothing calls this directly
no test coverage detected