如何在Orbeon中添加MongoDB数据源 [英] How to add MongoDB data source in Orbeon

查看:50
本文介绍了如何在Orbeon中添加MongoDB数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将MongoDB数据源添加到Orbeon CE?我一直在浏览所有xml配置文件,但是没有运气,Orbeon文档并没有太大帮助.任何帮助将不胜感激.

How do I add a MongoDB data source to Orbeon CE? I have been browsing through all the xml config files without any luck and the Orbeon documentation doesn't help very much. Any help would be appreciated.

应该可以通过持久性api实现.

It is supposed to be achievable through the persistence api.

并在/fr/service/mongodb/*下添加了数据源\服务后,如何从表单应用程序对其进行过程调用,即如何使用/crud和/search添加和检索数据库中的信息?

And when having added the data source \ service under, for example, /fr/service/mongodb/* how do you make procedure calls to it from a form application, i.e. how do you use the /crud and /search to add and retreive information from the database?

推荐答案

首先请注意,目前对MongoDB的支持还处于试验阶段.它在 MongoDBPersistence.scala ,因此您需要:

First note that support for MongoDB is at this point very much experimental. It is implemented as a servlet in MongoDBPersistence.scala, so you'll want to:

  1. 编辑Orbeon的web.xml<servlet>中声明该servlet,然后使用<servlet-mapping>/fr/service/mongo/*映射到该servlet.
  2. 添加一个告诉Form Runner使用MongoDB持久层的属性: <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mongo"/>.
  3. 添加一个属性,该属性告诉Form Runner MongoDB持久层的URI是什么,例如<property as="xs:anyURI" name="oxf.fr.persistence.mongo.uri" value="/fr/service/mongo"/>.
  1. Edit Orbeon's web.xml declare that servlet in a <servlet>, and map /fr/service/mongo/* to that servlet with a <servlet-mapping>.
  2. Add a property telling Form Runner to use the MongoDB persistence layer: e.g. <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mongo"/>.
  3. Add a property telling Form Runner what the URI of the MongoDB persistence layer is, e.g. <property as="xs:anyURI" name="oxf.fr.persistence.mongo.uri" value="/fr/service/mongo"/>.

这篇关于如何在Orbeon中添加MongoDB数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆