在Alfresco中查询定制模型
我在 Alfresco 中有一些自定义模型,我需要从存储库中提取方面信息和内容。
我需要传递关键字和模型名称(它是一个方面)来提取与模型关联的内容或方面。
search/{keywords}?model={model?}
这是我用来提取传递模型的内容的 javascript
var docs = search.luceneSearch("@kd\\:commonname_content_type_tag:\"" + model + "\"");
如何连接两个方面属性?
我在 Java 中完成了它,但 Javascript 中的语法似乎完全不同:
queryString = "+TYPE:\"" + Constants.createQNameString(CommonAspects.NAMESPACE_KD_CONTENT_MODEL, DrugModel.TYPE_SUPPLIER) + "\" ";
queryString += "+@kd\\:SupplierID:" + drugBrandNameBean.getSupplierID();
String supplier = contentQuery.getUUID(queryString);
另一个问题,如何处理 Javascript 文档?我可以访问我的方面吗?
我尝试了类似的方法,但它不起作用:
var docs = search.luceneSearch("@kd\\:commonname_content_type_tag:\"" + model + "\"");
for (var i=0; i<docs.length; i++) {
log += "Searching " + commonName + " - Name: " + docs[i].name + "\tPath: " + docs[i].displayPath;
log += "\tType: " + docs[i].commonname_content_type_tag + "\r\n";
}
提取的行是正确的,但 commonname_content_type_tag 属性始终未定义:
Searching acarbose - Name: exenatide - Contraindication Path: /Company Home/CommonName Type: undefined
感谢您的帮助!
安德里亚
I've some customized models into Alfresco and I need to extract the aspect information and the content from Repository.
I need, passing the keywords and the model name (it's an aspect), to extract content or the aspects associated to the model.
search/{keywords}?model={model?}
this is the javascript I'm using to extract the content passing the model
var docs = search.luceneSearch("@kd\\:commonname_content_type_tag:\"" + model + "\"");
How can I concatenate two aspects properties?
I did it into Java but the syntax in Javascript seems quite different:
queryString = "+TYPE:\"" + Constants.createQNameString(CommonAspects.NAMESPACE_KD_CONTENT_MODEL, DrugModel.TYPE_SUPPLIER) + "\" ";
queryString += "+@kd\\:SupplierID:" + drugBrandNameBean.getSupplierID();
String supplier = contentQuery.getUUID(queryString);
Another question, how can I process the Javascript docs? Can I access to my aspects?
I tried something like that but it didn't works:
var docs = search.luceneSearch("@kd\\:commonname_content_type_tag:\"" + model + "\"");
for (var i=0; i<docs.length; i++) {
log += "Searching " + commonName + " - Name: " + docs[i].name + "\tPath: " + docs[i].displayPath;
log += "\tType: " + docs[i].commonname_content_type_tag + "\r\n";
}
The rows extracted are correct but the commonname_content_type_tag properties is always not defined:
Searching acarbose - Name: exenatide - Contraindication Path: /Company Home/CommonName Type: undefined
Thanks for the help!
Andrea
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这样的事情:
Try something like that: