@Test public void testGenerationFromOtherItemDocument() { ItemDocument item = Datamodel.makeItemDocument( Datamodel.makeWikidataItemIdValue("Q42"), Collections.singletonList(Datamodel.makeMonolingualTextValue("en", "label")), Collections.singletonList(Datamodel.makeMonolingualTextValue("en", "desc")), Collections.singletonList(Datamodel.makeMonolingualTextValue("en", "alias")), Collections.emptyList(), Collections.singletonMap("enwiki", Datamodel.makeSiteLink("foo", "enwiki", Collections.emptyList())) ); DatamodelConverter converter = new DatamodelConverter(new DataObjectFactoryImpl()); assertEquals(item, converter.copy(item)); }
public ItemIdValue copy(ItemIdValue object) { return dataObjectFactory.getItemIdValue(object.getId(), object.getSiteIri()); }
DatamodelConverter implements SnakVisitor<Snak>,
		ValueVisitor<Value> { public ItemIdValue copy(ItemIdValue object) { return dataObjectFactory.getItemIdValue(object.getId(), object.getSiteIri()); } }
DatamodelConverter implements SnakVisitor<Snak>,
		ValueVisitor<Value> { public ItemIdValue copy(ItemIdValue object) { return dataObjectFactory.getItemIdValue(object.getId(), object.getSiteIri()); } DatamodelConverter(DataObjectFactory dataObjectFactory); }
DatamodelConverter implements SnakVisitor<Snak>,
		ValueVisitor<Value> { public ItemIdValue copy(ItemIdValue object) { return dataObjectFactory.getItemIdValue(object.getId(), object.getSiteIri()); } DatamodelConverter(DataObjectFactory dataObjectFactory); @Deprecated boolean hasOptionDeepCopy(); @Deprecated void setOptionDeepCopy(boolean value); @Deprecated boolean hasOptionDeepCopyReferences(); @Deprecated void setOptionDeepCopyReferences(boolean value); @Deprecated void setOptionFilter(DocumentDataFilter filter); @Deprecated Set<String> getOptionLanguageFilter(); @Deprecated void setOptionLanguageFilter(Set<String> languageFilter); @Deprecated Set<PropertyIdValue> getOptionPropertyFilter(); @Deprecated void setOptionPropertyFilter(Set<PropertyIdValue> propertyFilter); @Deprecated Set<String> getOptionSiteLinkFilter(); @Deprecated void setOptionSiteLinkFilter(Set<String> siteLinkFilter); ItemIdValue copy(ItemIdValue object); PropertyIdValue copy(PropertyIdValue object); LexemeIdValue copy(LexemeIdValue object); DatatypeIdValue copy(DatatypeIdValue object); TimeValue copy(TimeValue object); GlobeCoordinatesValue copy(GlobeCoordinatesValue object); StringValue copy(StringValue object); MonolingualTextValue copy(MonolingualTextValue object); QuantityValue copy(QuantityValue object); UnsupportedValue copy(UnsupportedValue object); ValueSnak copy(ValueSnak object); SomeValueSnak copy(SomeValueSnak object); NoValueSnak copy(NoValueSnak object); SnakGroup copy(SnakGroup object); Claim copy(Claim object); Reference copy(Reference object); Statement copy(Statement object); StatementGroup copy(StatementGroup object); SiteLink copy(SiteLink object); PropertyDocument copy(PropertyDocument object); ItemDocument copy(ItemDocument object); Snak copySnak(Snak snak); @Override Snak visit(ValueSnak snak); @Override Snak visit(SomeValueSnak snak); @Override Snak visit(NoValueSnak snak); Value copyValue(Value value); @Override Value visit(EntityIdValue value); @Override Value visit(GlobeCoordinatesValue value); @Override Value visit(MonolingualTextValue value); @Override Value visit(QuantityValue value); @Override Value visit(StringValue value); @Override Value visit(TimeValue value); @Override Value visit(UnsupportedValue value); }
DatamodelConverter implements SnakVisitor<Snak>,
		ValueVisitor<Value> { public ItemIdValue copy(ItemIdValue object) { return dataObjectFactory.getItemIdValue(object.getId(), object.getSiteIri()); } DatamodelConverter(DataObjectFactory dataObjectFactory); @Deprecated boolean hasOptionDeepCopy(); @Deprecated void setOptionDeepCopy(boolean value); @Deprecated boolean hasOptionDeepCopyReferences(); @Deprecated void setOptionDeepCopyReferences(boolean value); @Deprecated void setOptionFilter(DocumentDataFilter filter); @Deprecated Set<String> getOptionLanguageFilter(); @Deprecated void setOptionLanguageFilter(Set<String> languageFilter); @Deprecated Set<PropertyIdValue> getOptionPropertyFilter(); @Deprecated void setOptionPropertyFilter(Set<PropertyIdValue> propertyFilter); @Deprecated Set<String> getOptionSiteLinkFilter(); @Deprecated void setOptionSiteLinkFilter(Set<String> siteLinkFilter); ItemIdValue copy(ItemIdValue object); PropertyIdValue copy(PropertyIdValue object); LexemeIdValue copy(LexemeIdValue object); DatatypeIdValue copy(DatatypeIdValue object); TimeValue copy(TimeValue object); GlobeCoordinatesValue copy(GlobeCoordinatesValue object); StringValue copy(StringValue object); MonolingualTextValue copy(MonolingualTextValue object); QuantityValue copy(QuantityValue object); UnsupportedValue copy(UnsupportedValue object); ValueSnak copy(ValueSnak object); SomeValueSnak copy(SomeValueSnak object); NoValueSnak copy(NoValueSnak object); SnakGroup copy(SnakGroup object); Claim copy(Claim object); Reference copy(Reference object); Statement copy(Statement object); StatementGroup copy(StatementGroup object); SiteLink copy(SiteLink object); PropertyDocument copy(PropertyDocument object); ItemDocument copy(ItemDocument object); Snak copySnak(Snak snak); @Override Snak visit(ValueSnak snak); @Override Snak visit(SomeValueSnak snak); @Override Snak visit(NoValueSnak snak); Value copyValue(Value value); @Override Value visit(EntityIdValue value); @Override Value visit(GlobeCoordinatesValue value); @Override Value visit(MonolingualTextValue value); @Override Value visit(QuantityValue value); @Override Value visit(StringValue value); @Override Value visit(TimeValue value); @Override Value visit(UnsupportedValue value);  }