HttpUtils.Response resp = post(url, Constants.MEDIATYPE_QUERY, new HttpUtils.Output() {
public void write(OutputStream out) throws Exception {
JaxBHelper.marshal(JaxBHelper.CMIS_OBJECT_FACTORY.createQuery(query), out, false);
}
});
AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
// handle top level
for (AtomElement element : feed.getElements()) {
if (element.getObject() instanceof AtomLink) {
if (isNextLink(element)) {
result.setHasMoreItems(Boolean.TRUE);
}
} else if (isInt(NAME_NUM_ITEMS, element)) {
result.setNumItems((BigInteger) element.getObject());
}
}
// get the result set
if (!feed.getEntries().isEmpty()) {
result.setObjects(new ArrayList<ObjectData>(feed.getEntries().size()));
for (AtomEntry entry : feed.getEntries()) {
ObjectData hit = null;
// walk through the entry
for (AtomElement element : entry.getElements()) {
if (element.getObject() instanceof CmisObjectType) {