CommunitySolidServer/src/storage/conversion/RepresentationConverter.ts
2020-09-17 11:55:49 +02:00

25 lines
881 B
TypeScript

import type { Representation } from '../../ldp/representation/Representation';
import type { RepresentationPreferences } from '../../ldp/representation/RepresentationPreferences';
import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
import { AsyncHandler } from '../../util/AsyncHandler';
export interface RepresentationConverterArgs {
/**
* Identifier of the resource. Can be used as base IRI.
*/
identifier: ResourceIdentifier;
/**
* Representation to convert.
*/
representation: Representation;
/**
* Preferences indicating what is requested.
*/
preferences: RepresentationPreferences;
}
/**
* Converts a {@link Representation} from one media type to another, based on the given preferences.
*/
export abstract class RepresentationConverter extends AsyncHandler<RepresentationConverterArgs, Representation> {}