url.addParameter(Constants.PARAM_MAX_ITEMS, maxItems);
url.addParameter(Constants.PARAM_SKIP_COUNT, skipCount);
// read and parse
HttpUtils.Response resp = read(url);
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());
}
}
result.setList(new ArrayList<TypeDefinition>(feed.getEntries().size()));
// get the children
if (!feed.getEntries().isEmpty()) {
for (AtomEntry entry : feed.getEntries()) {
TypeDefinition child = null;
lockTypeLinks();
try {
// walk through the entry