dasch-swiss / beol

Bernoulli-Euler OnLine
https://beol.dasch.swiss
GNU Affero General Public License v3.0
0 stars 1 forks source link

handle attached images #29

Closed tobiasschweizer closed 6 years ago

tobiasschweizer commented 6 years ago
tobiasschweizer commented 6 years ago

@kilchenmann @flavens @andreas-aeschlimann I want to move some logic to an abstract class that can be extended by resource class specific templates/components.

The idea is that the abstract class has a method getResource(iri: string, props?: () => void): void that gets a resource from Knora and handles the JSONLD conversion and the ontology infos. It takes a method as an argument (function pointer) which is defined in the resource class specific template and passed to the method. The resource class specific logic is handled there. The arrow notation has to be used when defining it (because of the context of this).

Edit It has just occurred to me that the initialization of the props can be done using a method which is defined as abstract on the abstract base class.

Please let me know what you think of that approach.