/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(ItemDocument o) { StringBuilder sb = new StringBuilder(); sb.append("==ItemDocument ").append(o.getEntityId().getIri()); sb.append(" (r").append(o.getRevisionId()).append(") "); sb.append("==").append(toStringForTermedDocument(o)); sb.append(toStringForStatementDocument(o)); sb.append("* Site links: "); boolean first = true; SortedSet<String> siteKeys = new TreeSet<>(o.getSiteLinks() .keySet()); for (String key : siteKeys) { if (first) { first = false; } else { sb.append("; "); } sb.append(toString(o.getSiteLinks().get(key))); } return sb.toString(); }
/** * Returns a human-readable string representation of the given object. * * @see java.lang.Object#toString() * @param o * the object to represent as string * @return a string representation of the object */ public static String toString(ItemDocument o) { StringBuilder sb = new StringBuilder(); sb.append("==ItemDocument ").append(o.getEntityId().getIri()); sb.append(" (r").append(o.getRevisionId()).append(") "); sb.append("==").append(toStringForTermedDocument(o)); sb.append(toStringForStatementDocument(o)); sb.append("* Site links: "); boolean first = true; SortedSet<String> siteKeys = new TreeSet<>(o.getSiteLinks() .keySet()); for (String key : siteKeys) { if (first) { first = false; } else { sb.append("; "); } sb.append(toString(o.getSiteLinks().get(key))); } return sb.toString(); }
public ItemDocument filter(ItemDocument item) { return dataObjectFactory.getItemDocument( item.getEntityId(), filterMonoLingualTextValues(item.getLabels().values()), filterMonoLingualTextValues(item.getDescriptions().values()), filterMonoLingualTextValues(flatten(item.getAliases().values())), filterStatementGroups(item.getStatementGroups()), filterSiteLinks(item.getSiteLinks()), item.getRevisionId() ); }
public ItemDocument filter(ItemDocument item) { return dataObjectFactory.getItemDocument( item.getEntityId(), filterMonoLingualTextValues(item.getLabels().values()), filterMonoLingualTextValues(item.getDescriptions().values()), filterMonoLingualTextValues(flatten(item.getAliases().values())), filterStatementGroups(item.getStatementGroups()), filterSiteLinks(item.getSiteLinks()), item.getRevisionId() ); }
currentItemDocument.getRevisionId()); ArrayList<String> languages = new ArrayList<>( arabicNumeralLanguages.length);
currentItemDocument.getRevisionId()); ArrayList<String> languages = new ArrayList<>( arabicNumeralLanguages.length);
return (ItemDocument) this.wbEditingAction.wbEditEntity(itemDocument .getEntityId().getId(), null, null, null, data, clear, this.editAsBot, itemDocument.getRevisionId(), summary);
return (ItemDocument) this.wbEditingAction.wbEditEntity(itemDocument .getEntityId().getId(), null, null, null, data, clear, this.editAsBot, itemDocument.getRevisionId(), summary);
/** * Copies an {@link ItemDocument}. * * @param object * object to copy * @return copied object */ public ItemDocument copy(ItemDocument object) { return dataObjectFactory.getItemDocument( copy(object.getEntityId()), copyMonoLingualTextValues(object.getLabels().values()), copyMonoLingualTextValues(object.getDescriptions().values()), copyAliasMap(object.getAliases()), copyStatementGroups(object.getStatementGroups()), copySiteLinks(object.getSiteLinks()), object.getRevisionId()); }
/** * Copies an {@link ItemDocument}. * * @param object * object to copy * @return copied object */ public ItemDocument copy(ItemDocument object) { return dataObjectFactory.getItemDocument( copy(object.getEntityId()), copyMonoLingualTextValues(object.getLabels().values()), copyMonoLingualTextValues(object.getDescriptions().values()), copyAliasMap(object.getAliases()), copyStatementGroups(object.getStatementGroups()), copySiteLinks(object.getSiteLinks()), object.getRevisionId()); }
+ " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); + " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); + " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); System.out .println("*** The complete history of our edits can be seen at: "
+ " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); + " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); + " (see https://test.wikidata.org/w/index.php?title=" + newItemId.getId() + "&oldid=" + newItemDocument.getRevisionId() + " for this version)"); System.out .println("*** The complete history of our edits can be seen at: "