oldman.client.mediation package¶
Submodules¶
oldman.client.mediation.default module¶
oldman.client.mediation.mediator module¶
-
class
oldman.client.mediation.mediator.
Mediator
[source]¶ Bases:
object
TODO: describe
-
declare_method
(method, name, class_iri)[source]¶ Attaches a method to the
Resource
objects that are instances of a given RDFS class.Like in Object-Oriented Programming, this method can be overwritten by attaching a homonymous method to a class that has a higher inheritance priority (such as a sub-class).
To benefit from this method (or an overwritten one),
Resource
objects must be associated to aModel
that corresponds to the RDFS class or to one of its subclasses.Parameters: - method – Python function that takes as first argument a
Resource
object. - name – Name assigned to this method.
- class_iri – Targeted RDFS class. If not overwritten, all the instances
(
Resource
objects) should inherit this method.
- method – Python function that takes as first argument a
-
oldman.client.mediation.store_proxy module¶
-
class
oldman.client.mediation.store_proxy.
DefaultStoreProxy
(store_selector, conversion_manager)[source]¶ Bases:
oldman.client.mediation.store_proxy.StoreProxy
-
filter
(resource_finder, resource_factory, types=None, hashless_iri=None, limit=None, eager=True, pre_cache_properties=None, **kwargs)[source]¶ TODO: explain
:return list of ClientResource ?
-
first
(client_tracker, resource_factory, types=None, hashless_iri=None, pre_cache_properties=None, eager_with_reversed_attributes=True, **kwargs)[source]¶
-
flush
(resource_factory, client_resources_to_update, client_resources_to_delete, is_end_user)[source]¶ TODO: explain
:return list of the new ClientResource ?
-
-
class
oldman.client.mediation.store_proxy.
StoreProxy
[source]¶ Bases:
object
TODO: find a better name
-
filter
(resource_tracker, resource_factory, types=None, hashless_iri=None, limit=None, eager=False, pre_cache_properties=None, **kwargs)[source]¶ TODO: explain
:return list of ClientResource ?
-
first
(resource_finder, resource_factory, types=None, hashless_iri=None, pre_cache_properties=None, eager_with_reversed_attributes=True, **kwargs)[source]¶
-
flush
(resource_factory, client_resources_to_update, client_resources_to_delete, is_end_user)[source]¶ TODO: explain
:return list of the updated ClientResource ?
-