Closed tobiasschweizer closed 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.