Link link = new Link();
link.setHref(new Reference(attrs.getValue("", "href")));
link.setRel(Relation.valueOf(attrs.getValue("", "rel")));
String type = attrs.getValue("", "type");
if (type != null && type.length() > 0) {
link.setType(new MediaType(type));
}
link.setHrefLang(new Language(attrs
.getValue("", "hreflang")));
link.setTitle(attrs.getValue("", "title"));
String attr = attrs.getValue("", "length");
link.setLength((attr == null) ? -1L : Long.parseLong(attr));
inlineLink = link;
if (association.isToMany()) {
inlineFeedHandler.startLink(link);
} else {
inlineEntryHandler.startLink(link);
}
} else if (localName.equalsIgnoreCase("entry")) {
Entry entry = new Entry();
if (association.isToMany()) {
inlineFeedHandler.startEntry(entry);
} else {
inlineEntryHandler.startEntry(entry);
}
inlineEntry = entry;
} else if (localName.equalsIgnoreCase("content")) {
Content content = new Content();
MediaType type = getMediaType(attrs.getValue("", "type"));
String srcAttr = attrs.getValue("", "src");
if (srcAttr != null)
// Content available externally
content.setExternalRef(new Reference(srcAttr));
content.setExternalType(type);