MCPcopy Create free account
hub / github.com/bab2min/tomotopy / getMetadataFromDMR

Method getMetadataFromDMR

src/python/handler/py_DMR.cpp:207–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207std::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
219py::UniqueObj DocumentObject::getMultiMetadata() const
220{

Callers

nothing calls this directly

Calls 2

isIndependentMethod · 0.80
getMetadataDictMethod · 0.80

Tested by

no test coverage detected