/** * Creates a {@link SiteLink}. * * @param title * the title string of the linked page, including namespace * prefixes if any * @param siteKey * the string key of the site of the linked article * @param badges * the list of badges of the linked article * @return a {@link SiteLink} corresponding to the input */ public static SiteLink makeSiteLink(String title, String siteKey, List<ItemIdValue> badges) { return factory.getSiteLink(title, siteKey, badges); }
/** * Creates a {@link SiteLink}. * * @param title * the title string of the linked page, including namespace * prefixes if any * @param siteKey * the string key of the site of the linked article * @param badges * the list of badges of the linked article * @return a {@link SiteLink} corresponding to the input */ public static SiteLink makeSiteLink(String title, String siteKey, List<ItemIdValue> badges) { return factory.getSiteLink(title, siteKey, badges); }
/** * Creates a {@link SiteLink} without badges. * * @param title * the title string of the linked page, including namespace * prefixes if any * @param siteKey * the string key of the site of the linked article * @return a {@link SiteLink} corresponding to the input */ public static SiteLink makeSiteLink(String title, String siteKey) { return factory.getSiteLink(title, siteKey, Collections.emptyList()); }
/** * Creates a {@link SiteLink} without badges. * * @param title * the title string of the linked page, including namespace * prefixes if any * @param siteKey * the string key of the site of the linked article * @return a {@link SiteLink} corresponding to the input */ public static SiteLink makeSiteLink(String title, String siteKey) { return factory.getSiteLink(title, siteKey, Collections.emptyList()); }
/** * Adds an additional site link to the constructed document. * * @param title * the title of the linked page * @param siteKey * identifier of the site, e.g., "enwiki" * @param badges * one or more badges */ public ItemDocumentBuilder withSiteLink(String title, String siteKey, ItemIdValue... badges) { withSiteLink(factory.getSiteLink(title, siteKey, Arrays.asList(badges))); return this; }
/** * Adds an additional site link to the constructed document. * * @param title * the title of the linked page * @param siteKey * identifier of the site, e.g., "enwiki" * @param badges * one or more badges */ public ItemDocumentBuilder withSiteLink(String title, String siteKey, ItemIdValue... badges) { withSiteLink(factory.getSiteLink(title, siteKey, Arrays.asList(badges))); return this; }
/** * Copies a {@link SiteLink}. * <p> * This method is not affected by the setting made via * {@link #setOptionSiteLinkFilter(Set)}. * * @param object * object to copy * @return copied object */ public SiteLink copy(SiteLink object) { return dataObjectFactory.getSiteLink(object.getPageTitle(), object.getSiteKey(), object.getBadges()); }
/** * Copies a {@link SiteLink}. * <p> * This method is not affected by the setting made via * {@link #setOptionSiteLinkFilter(Set)}. * * @param object * object to copy * @return copied object */ public SiteLink copy(SiteLink object) { return dataObjectFactory.getSiteLink(object.getPageTitle(), object.getSiteKey(), object.getBadges()); }