diff --git a/projects/aas-server/src/app/aas-provider/aas-provider.ts b/projects/aas-server/src/app/aas-provider/aas-provider.ts index 8f5c273..ee92d14 100644 --- a/projects/aas-server/src/app/aas-provider/aas-provider.ts +++ b/projects/aas-server/src/app/aas-provider/aas-provider.ts @@ -8,7 +8,6 @@ import { inject, singleton } from 'tsyringe'; import { extname } from 'path/posix'; -import { Jimp } from 'jimp'; import { Readable } from 'stream'; import { AASDocument, @@ -120,15 +119,21 @@ export class AASProvider { /** * Gets the AAS environment for the specified AAS document. - * @param endpointName - * @param id - * @returns + * @param endpointName The endpoint name. + * @param id The AAS identifier. + * @returns The AAS environment. */ public async getContentAsync(endpointName: string, id: string): Promise { const document = await this.index.get(endpointName, id); return this.getDocumentContentAsync(document); } + /** + * Gets the thumbnail of the specified AAS. + * @param endpointName The endpoint name. + * @param id The AAS identifier. + * @returns A readable stream. + */ public async getThumbnailAsync(endpointName: string, id: string): Promise { const endpoint = await this.index.getEndpoint(endpointName); const document = await this.index.get(endpointName, id); @@ -141,6 +146,15 @@ export class AASProvider { } } + /** + * Gets the value of the specified DataElement. + * @param endpointName The endpoint name. + * @param id The AAS identifier. + * @param smId The Submodel identifier. + * @param path The idShort path. + * @param options Additional options. + * @returns A readable stream. + */ public async getDataElementValueAsync( endpointName: string, id: string, diff --git a/projects/aas-server/src/app/aas-provider/aas-server-scan.ts b/projects/aas-server/src/app/aas-provider/aas-server-scan.ts index 763ba2d..b34f2ac 100644 --- a/projects/aas-server/src/app/aas-provider/aas-server-scan.ts +++ b/projects/aas-server/src/app/aas-provider/aas-server-scan.ts @@ -27,7 +27,7 @@ export class AASServerScan extends AASResourceScan { try { await this.server.openAsync(); const documents: AASDocument[] = []; - const ids = await this.server.getShellsAsync(); + const ids = new Set(await this.server.getShellsAsync()); for (const id of ids) { try { const aasPackage = new AASServerPackage(this.logger, this.server, id);