/** * Immutable constructor. * * @param href URI of the website. * @param label user defined website label. * @param primary denotes primary website. * @param rel known website type. */ public Website(String href, String label, Boolean primary, Rel rel) { super(); setHref(href); setLabel(label); setPrimary(primary); setRel(rel); setImmutable(true); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Website other = (Website) obj; return eq(href, other.href) && eq(label, other.label) && eq(primary, other.primary) && eq(rel, other.rel); }
/** * Returns whether it has the URI of the website. * * @return whether it has the URI of the website */ public boolean hasHref() { return getHref() != null; }
/** * Returns a list containing Website GData extension objects. This method takes a formatted OM Element and * converts it to a list of website objects. * * @param urlElement The parent element containing the individual elements * @return a list containing GData extension Website objects. */ protected final List<Website> getWebSiteList(final OMElement urlElement) { Map<String, Rel> websiteRelMap = buildWebsiteRelMap(); List<Website> webSiteList = new ArrayList<Website>(); Iterator< ? > urlIterator = urlElement.getChildElements(); while (urlIterator.hasNext()) { OMElement singleUrlElement = (OMElement) urlIterator.next(); String element = singleUrlElement.getText(); if (element != null && !element.isEmpty()) { Website website = new Website(); website.setHref(element); website.setRel(websiteRelMap.get(singleUrlElement.getLocalName())); if (singleUrlElement.getAttributeValue(new QName(Constants.PRIMARY)) != null) { website.setPrimary(Boolean.valueOf(singleUrlElement.getAttributeValue( new QName(Constants.PRIMARY)))); } webSiteList.add(website); } } return webSiteList; }
/** * Returns whether it has the user defined website label. * * @return whether it has the user defined website label */ public boolean hasLabel() { return getLabel() != null; }
/** * Returns whether it has the known website type. * * @return whether it has the known website type */ public boolean hasRel() { return getRel() != null; }
/** * Returns whether it has the denotes primary website. * * @return whether it has the denotes primary website */ public boolean hasPrimary() { return getPrimary() != null; }
extProfile.declare(BasePersonEntry.class, Subject.class); extProfile.declare(BasePersonEntry.class, UserDefinedField.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, Website.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, new ExtensionDescription(Where.class, new XmlNamespace("gd",
/** * Returns whether it has the user defined website label. * * @return whether it has the user defined website label */ public boolean hasLabel() { return getLabel() != null; }
/** * Returns whether it has the known website type. * * @return whether it has the known website type */ public boolean hasRel() { return getRel() != null; }
/** * Returns whether it has the denotes primary website. * * @return whether it has the denotes primary website */ public boolean hasPrimary() { return getPrimary() != null; }
extProfile.declare(BasePersonEntry.class, Subject.class); extProfile.declare(BasePersonEntry.class, UserDefinedField.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, Website.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, new ExtensionDescription(Where.class, new XmlNamespace("gd",
/** * Immutable constructor. * * @param href URI of the website. * @param label user defined website label. * @param primary denotes primary website. * @param rel known website type. */ public Website(String href, String label, Boolean primary, Rel rel) { super(); setHref(href); setLabel(label); setPrimary(primary); setRel(rel); setImmutable(true); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!sameClassAs(obj)) { return false; } Website other = (Website) obj; return eq(href, other.href) && eq(label, other.label) && eq(primary, other.primary) && eq(rel, other.rel); }
/** * Returns whether it has the URI of the website. * * @return whether it has the URI of the website */ public boolean hasHref() { return getHref() != null; }
/** * Returns whether it has the user defined website label. * * @return whether it has the user defined website label */ public boolean hasLabel() { return getLabel() != null; }
/** * Returns whether it has the known website type. * * @return whether it has the known website type */ public boolean hasRel() { return getRel() != null; }
/** * Returns whether it has the denotes primary website. * * @return whether it has the denotes primary website */ public boolean hasPrimary() { return getPrimary() != null; }
extProfile.declare(BasePersonEntry.class, Subject.class); extProfile.declare(BasePersonEntry.class, UserDefinedField.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, Website.getDefaultDescription(false, true)); extProfile.declare(BasePersonEntry.class, new ExtensionDescription(Where.class, new XmlNamespace("gd",
/** * Immutable constructor. * * @param href URI of the website. * @param label user defined website label. * @param primary denotes primary website. * @param rel known website type. */ public Website(String href, String label, Boolean primary, Rel rel) { super(); setHref(href); setLabel(label); setPrimary(primary); setRel(rel); setImmutable(true); }