mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
25 lines
881 B
TypeScript
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> {}
|