02-15-2012 08:01 AM
I am using java content automation to upload and download files as blobs as shown in the link below. http://doc.nuxeo.com/display/NXDOC/Using+Nuxeo+Automation+Client
The default dublincore schema is associated with each document. I want to retireve the document metadata (properties like 'language' etc which are in the dublincore schema) related to the this document. This has to be done in java using content automation.
02-15-2012 01:47 PM
I'm not sure of your question.
Did you try to do that:
Session session = client.getSession("Administrator", "Administrator");
Documents docs = (Documents) session.newRequest("Document.Query").set(
"query", "SELECT * FROM Document").execute();
for (Document doc : docs) {
PropertyMap properties = doc.getProperties();
PropertyMap languageMap = properties.getMap("dc:language");
String languageValue = languageMap.getString("data");
// etc...
}
client.shutdown();
02-15-2012 01:47 PM
I'm not sure of your question.
Did you try to do that:
Session session = client.getSession("Administrator", "Administrator");
Documents docs = (Documents) session.newRequest("Document.Query").set(
"query", "SELECT * FROM Document").execute();
for (Document doc : docs) {
PropertyMap properties = doc.getProperties();
PropertyMap languageMap = properties.getMap("dc:language");
String languageValue = languageMap.getString("data");
// etc...
}
client.shutdown();
02-16-2012 02:15 PM
Hi Thanks I tried the following doc.getString("dc:language") . That gave me the required value. Thanks for you answer as well that should work too.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.