Commit 9fcae790 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Ajout d'une méthode getIRIParameters sur les Metadata et les Repositories.

parent 4c34d1f6
......@@ -224,6 +224,13 @@ export class ResourceMetadata<R extends Resource, T extends string, P extends IR
public generateIRI(parameters: P): IRI<R> {
return this.iri.generate(parameters);
}
/**
* Extrait les paramètres d'une IRI.
*/
public getIRIParameters(iri: IRI<R>): P {
return this.iri.parse(iri as any);
}
}
/**
......@@ -242,6 +249,13 @@ export abstract class AbstractRepository<R extends Resource, T extends string, P
public generateIRI(parameters: P): IRI<R> {
return this.metadata.generateIRI(parameters);
}
/**
* Extrait les paramètres d'une IRI.
*/
public getIRIParameters(iri: IRI<R>): P {
return this.metadata.getIRIParameters(parameters);
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment