Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
A promise resolving if the input can be handled, rejecting with an Error if not.
Uses the metadata of the Representation to create a map where each key is a content-type and each value is the path of the corresponding template.
Finds the best content-type to convert to based on the provided templates and preferences.
Handles the given input. This may only be called if canHandle did not reject. When unconditionally calling both in sequence, consider handleSafe instead.
A promise resolving when handling is finished.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Converts JSON data by using it as input parameters for rendering a template. The
extension
field can be used to only support a specific type of templates, such as ".ejs" for EJS templates.To find the templates it expects the Representation metadata to contain
SOLID_META.template
triples, with the objects being the template paths. For each of those templates there also needs to be a CONTENT_TYPE triple describing the content-type of that template.The output of the result depends on the content-type matched with the template. In case JSON is the most preferred output type, the input representation will be returned unless a JSON template is defined.