Skip to content

ndi.database.fun.openMINDSobj2ndi_document

  OPENMINDSOBJ2NDI_DOCUMENT - openMinds objects to set of ndi.document objects

  D = ndi.database.fun.openMINDSobj2ndi_document(OPENMINDS_OBJ, SESSION_ID, [DEPENDENCY_TYPE], [DEPENDENCY_VALUE])

  Convert a cell array of openMINDS objects to a set of ndi.document objects.
  D is a cell array of ndi.document objects. If the document is requested to be of a particular
  DEPENDENCY_TYPE ('subject', 'element'), then the corresponding dependency is set to
  DEPENDENCY_VALUE.

  Example 1:
    p = personWithTwoAffiliations(); % openMINDS library function
    session_id = S.id(); % get the id of an ndi.session S
    d = ndi.database.fun.openMINDSobj2ndi_document(p, session_id);

  Example 2:
    s = openminds.controlledterms.Species('name','Mustela putorius furo','preferredOntologyIdentifier','NCBI:txid9669');
    session_id = S.id(); % get the id of an ndi.session S
    subject_docs = S.database_search(ndi.query('','isa','subject'));
    d = ndi.database.fun.openMINDSobj2ndi_document(s, session_id, 'subject', subject_docs{1}.id());