开发者

property qualified-name in method getContentReader

I first apologize for my poor english level and maybe for the stupidity of my question ;)

I am on an alfresco project to learn how it works.

I have to browse programatically my content repository and gather datas all along. In order to do th开发者_如何学Pythonat I guessed I had to use a ContentReader (I get from my ContentService) but the method getReader wants a nodeRef and a propertyQualifiedName.

I am ok with the nodeRef, I get what it's needed for.

But the propertyQualifiedName puzzles me, I barely get what it is but I frankly don't get how it is used.

Reading some alfresco forum threads I get more and more scared that I dont even get how a reader works, I somewhere saw that a reader can read only one node and only one time per instance.

If anyone knows a bit about the Java API for Alfresco Content Repository use I am all hears !

Cheers all !


ContentReader is a wrapper class for the content of a given property of a node. So, in order to get an instance of ContentReader you'll have to give the node from which you the property from and the property qualified name.

As for the qualified name, every node property is identified by the conjunction of two string values:

  • The property namespace. Usually an uri like "http://www.alfresco.org/model/content/1.0"
  • The property local name. Usually a simple string like "created".

These two values put together constitute the property qualified name. There are constants defined for most standard properties of the alfresco model in the org.alfresco.model.ContentModel interface. For example, to get the creator of a node you would do something like:

contentService.getReader(myNode, ContentModel.PROP_CREATOR).getContentString();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜