Getting properties (metadata) for a document using Java content automation.
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.
0 votes
2 answers
4775 views
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();