05-27-2011 06:46 AM
Association association = new Association(assocType, "target") ;
ResultSetRow[] imageRows = repositoryService.queryAssociated(parent, association).getResultSet().getRows();
// by using getColumns() and search for Constants.PROP_CONTENT, i can get the content in NamedValue format
05-30-2011 10:14 PM
QueryResult queryResult = MyCollection.getAssociatedChild(currentRef, ICMConstants.ASSOC_IMAGES);
ResultSetRow[] imageRows = queryResult.getResultSet().getRows();
for (ResultSetRow imageRow : imageRows) {
ResultSetRowNode imageNode = imageRow.getNode();
String imageNodeId = imageNode.getId();
Reference imageRef = new Reference(dsICM.getStore(), imageNodeId, null);
Predicate imagePredicate = new Predicate(new Reference[]{imageRef}, dsICM.getStore(), null);
Content[] readResult = dsICM.getContentService().read(imagePredicate, ICMConstants.PROP_CONTENT);
Content imageContent = readResult[0];
InputStream imageIn = ContentUtils.getContentAsInputStream(imageContent);
byte[] content = IOUtils.toByteArray(imageIn);
}
Tags
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.