PropertyDocumentImpl extends TermedStatementDocumentImpl implements PropertyDocument { @Override public PropertyDocument withAliases(String language, List<MonolingualTextValue> aliases) { return new PropertyDocumentImpl(getEntityId(), labels, descriptions, withAliases(this.aliases, language, aliases), claims, datatype, revisionId); } PropertyDocumentImpl(
			PropertyIdValue id,
			List<MonolingualTextValue> labels,
			List<MonolingualTextValue> descriptions,
			List<MonolingualTextValue> aliases,
			List<StatementGroup> statements,
			DatatypeIdValue datatype,
			long revisionId); @JsonCreator  PropertyDocumentImpl(
			@JsonProperty("id") String jsonId,
			@JsonProperty("labels") @JsonDeserialize(contentAs=TermImpl.class) Map<String, MonolingualTextValue> labels,
			@JsonProperty("descriptions") @JsonDeserialize(contentAs=TermImpl.class) Map<String, MonolingualTextValue> descriptions,
			@JsonProperty("aliases") @JsonDeserialize(using = AliasesDeserializer.class) Map<String, List<MonolingualTextValue>> aliases,
			@JsonProperty("claims") Map<String, List<StatementImpl.PreStatement>> claims,
			@JsonProperty("datatype") String datatype,
			@JsonProperty("lastrevid") long revisionId,
			@JacksonInject("siteIri") String siteIri); private  PropertyDocumentImpl(
			PropertyIdValue id,
			Map<String, MonolingualTextValue> labels,
			Map<String, MonolingualTextValue> descriptions,
			Map<String, List<MonolingualTextValue>> aliases,
			Map<String, List<Statement>> claims,
			DatatypeIdValue datatypeId, 
			long revisionId); @JsonProperty("datatype") String getJsonDatatype(); @JsonIgnore @Override PropertyIdValue getPropertyId(); @JsonIgnore @Override PropertyIdValue getEntityId(); @JsonIgnore @Override DatatypeIdValue getDatatype(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); @Override PropertyDocument withRevisionId(long newRevisionId); @Override PropertyDocument withLabel(MonolingualTextValue newLabel); @Override PropertyDocument withDescription(MonolingualTextValue newDescription); @Override PropertyDocument withAliases(String language, List<MonolingualTextValue> aliases); @Override PropertyDocument withStatement(Statement statement); @Override PropertyDocument withoutStatementIds(Set<String> statementIds);  }
@Test public void testWithAliasInNewLanguage() { MonolingualTextValue newAlias = new MonolingualTextValueImpl( "Prop42", "fr"); PropertyDocument withAliases = pd1.withAliases("fr", Collections.singletonList(newAlias)); assertEquals(Collections.singletonList(newAlias), withAliases.getAliases().get("fr")); }
@Test public void testWithOverridenAliases() { MonolingualTextValue newAlias = new MonolingualTextValueImpl( "A new alias of P42", "en"); PropertyDocument withAlias = pd1.withAliases("en", Collections.singletonList(newAlias)); assertEquals(Collections.singletonList(newAlias), withAlias.getAliases().get("en")); }