@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof MetadataLinkInfo)) { return false; } final MetadataLinkInfo other = (MetadataLinkInfo) obj; if (about == null) { if (other.getAbout() != null) return false; } else if (!about.equals(other.getAbout())) return false; if (content == null) { if (other.getContent() != null) return false; } else if (!content.equals(other.getContent())) return false; if (metadataType == null) { if (other.getMetadataType() != null) return false; } else if (!metadataType.equals(other.getMetadataType())) return false; if (type == null) { if (other.getType() != null) return false; } else if (!type.equals(other.getType())) return false; return true; }
/** * Turns the metadata URL list to XML * * @param keywords */ private void handleMetadataList(Collection<MetadataLinkInfo> metadataURLs) { if (metadataURLs == null) { return; } for (MetadataLinkInfo link : metadataURLs) { AttributesImpl lnkAtts = new AttributesImpl(); lnkAtts.addAttribute("", "type", "type", "", link.getMetadataType()); start("MetadataURL", lnkAtts); element("Format", link.getType()); AttributesImpl orAtts = new AttributesImpl(); orAtts.addAttribute("", "xmlns:xlink", "xmlns:xlink", "", XLINK_NS); orAtts.addAttribute(XLINK_NS, "xlink:type", "xlink:type", "", "simple"); orAtts.addAttribute("", "xlink:href", "xlink:href", "", link.getContent()); element("OnlineResource", null, orAtts); end("MetadataURL"); } }