cancel
Showing results for 
Search instead for 
Did you mean: 

Need help regarding path and reading content

santosh
Champ in-the-making
Champ in-the-making
Hi,

I have a couple of queries
1.
What is the significance of Reference.getPath() method?
I am storing my documents in folder structure like
/rootFolder/folderA/documentA
Is there any way I can get the absolute path of a document from its node?

2. The {http://www.alfresco.org/model/content/1.0}content property of a node has the value
store://2006/5/29/16/07c8017c-eeff-11da-abb5-fb6cb121848f.bin|mimetype=application/octet-stream|size=23|encoding=UTF-8

ContentService.read() method returns the URL
http://127.0.0.1:8080/alfresco/download/direct/workspace/hello/06ffa868-eeff-11da-abb5-fb6cb121848f/...

Is there any way so that I can use the first url to read the content of the node as it would reduce a server call?

3. I didn't find seperate classes representing directory and documents?
This is found in other document servers like Documentum and JLibrary.
Alfresco doesn't have such classes or I am missing out something?

Thanks in advance

Santosh Prabhu
1 REPLY 1

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

1.

The getPath() method on the reference object is the generated getter to match the setter for the path attribute of the reference object.  You will set the path of a reference when you want to reference a node in a service call by path rather than by guid.  Guid and path on reference are mutually exclusive.

When a reference is created and returned to you from a service call the path will generally be null as the Guid of the node being referenced will be known.

2.
The URL in the content property is used by the content store to identify the content.  Outside of the content store the URL has little meaning.  At the moment the only way to get at the content from the web service API is to ask for the content object and use the generated download URL.

3.
We do have two standard types defined that represent both dictionaries and documents.  The standard web service API's can work with these types, but provide no helpers.  In the repository there is a file folder service API that provides an API specific to the directories and documents, since this is such a common use case.  The web service equivalent was scheduled for release in 1.3, but has now had to be moved into 1.4.

Hope this helps,
Roy