Hey,
There is some disagreement regarding the interface to access statements in various entities.
== Current implementation ==
This is not fully implemented yet, but it's what the interface implies will be done.
Entities contain a list of statements. In other words, all items, properties and queries can have statements.
Obvious objection: "statements" for properties and queries should not have associated rank and references. They could just have a list of claims.
Original reason to go with this approach anyway: the alternative is to put statement handling in Item and add claim handling in either both Property and Query or in a common base. This would result in duplication and loss of common interface for the Entities.
== New proposal ==
I think we can accommodate all the concerns listed above as follows:
* All Entities provide access to a list of claims. * Properties and Queries contain a list of claims. * Items contain a list of statements to which they provide access both as list of statements and list of claims. The apparent list of claims would correspond to a filter on rank=primary followed by a map from statement to it's claim on the list of statements.
Any objections to implementing it like that?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
That sounds very good to me. +1 (or am I allowed to say "+2" ? ;)
2012/9/16 Jeroen De Dauw jeroendedauw@gmail.com:
Hey,
There is some disagreement regarding the interface to access statements in various entities.
== Current implementation ==
This is not fully implemented yet, but it's what the interface implies will be done.
Entities contain a list of statements. In other words, all items, properties and queries can have statements.
Obvious objection: "statements" for properties and queries should not have associated rank and references. They could just have a list of claims.
Original reason to go with this approach anyway: the alternative is to put statement handling in Item and add claim handling in either both Property and Query or in a common base. This would result in duplication and loss of common interface for the Entities.
== New proposal ==
I think we can accommodate all the concerns listed above as follows:
- All Entities provide access to a list of claims.
- Properties and Queries contain a list of claims.
- Items contain a list of statements to which they provide access both as
list of statements and list of claims. The apparent list of claims would correspond to a filter on rank=primary followed by a map from statement to it's claim on the list of statements.
Any objections to implementing it like that?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l