protected void fillData(JsonObject data) { if (data.get("snaks") != null) { foreach (JsonObject.Member member in data.get("snaks").asObject()) { Dictionary <string, Snak> list = new Dictionary <string, Snak>(); foreach (JsonValue value in member.value.asArray()) { Snak snak = Snak.newFromArray(value.asObject()); list.Add(snak.dataValue.getHash(), snak); } this.snaks.Add(member.name, list); } } if (data.get("hash") != null) { this.hash = data.get("hash").asString(); } if (this.internalId == null) { if (this.hash != null) { this.internalId = this.hash; } else { this.internalId = "" + Environment.TickCount + this.statement.internalId; } } }
protected virtual void fillData(JsonObject data) { if (data.get("mainsnak") != null) { this.mMainSnak = Snak.newFromArray(data.get("mainsnak").asObject()); } if (data.get("id") != null) { this.id = data.get("id").asString(); } if (this.internalId == null) { if (this.id != null) { this.internalId = this.id; } else { this.internalId = "" + Environment.TickCount + this.mMainSnak.propertyId + this.mMainSnak.dataValue; } } }