Lucie created this task.
Lucie added subscribers: Aklapper, Lucie.
Lucie added projects: WikibaseQueryEngine, Wikidata.
Lucie changed Security from none to none.
TASK DESCRIPTION
"The store cannot depend on the Entity class as-is, as this will disappear.
Furthermore it needs to be able to support virtual claims for different
"Entity" types, including ones added by extensions.
Change the core public interface to
insert( EntityId $id, array $claims )
With a wrapper in the form of
class Wrapper {
private $handlers;
public function __construct( array $handlers ){}
public function insert( EntityIdAggregate $object ) {
foreach ( $this->handlers as $handler ) {
if ( $handler->supports( $object ) ) $this->inserter->insert(
$object->getId, $handler->getClaims( $object ) );
}
}
}
abstract class Handler {
abstract public function supports( $object );
abstract public function getClaims( $object );
}
ItemHandler extends Handler {}
QueryEngine would contain the handlers for the main "Entity" types. And the
wrapper would be part of the public interface, that can then be the thing used
by users that don't need further control and are happy with the default handler
behavior.
EntityIdAggregate is an interface provided by DataModel with method getId,
which returns EntityId. It is implemented by Item and Property, as well as any
other "Entity"."
https://github.com/wmde/WikibaseQueryEngine/issues/40
TASK DETAIL
https://phabricator.wikimedia.org/T78662
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign
<username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucie
Cc: Aklapper, Lucie, Wikidata-bugs, aude
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs