marklogicmarklogic-dhfmarklogic-10

How to retrieve Marklogic entity definition at Runtime


Are there any functions/API's available to extract/retrieve the entities definitions at run time?

Could someone help me with information and provide any links to documentation?


Solution

  • The entity model JSON or XML descriptors are typically loaded into the content database in the http://marklogic.com/entity-services/models collection.

    That makes it possible to use a cts.collectionQuery() with either cts.search() or JSearch to search for entity model descriptors.

    In addition, a TDE for entity model descriptors is typically loaded into the schemas database to project semantic triples from the JSON or XML documents.

    That makes it possible to execute SPARQL queries over the model using op.fromSPARQL() or sem.sparql(). For more information see:

    https://docs.marklogic.com/guide/entity-services/search#id_53854

    https://docs.marklogic.com/guide/entity-services/search#id_27381

    https://docs.marklogic.com/op.fromSPARQL

    https://docs.marklogic.com/sem.sparql

    Hoping that helps,