diff --git a/CHANGELOG.md b/CHANGELOG.md index e977ecd..9480858 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - None. +## [1.0.0-alpha.8] - 2024-01-31 + +### Added + +- Add `DefinedProduct` support for images url. + ## [1.0.0-alpha.7] - 2024-01-13 ### Fixed @@ -114,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release. [unreleased]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.5...HEAD +[1.0.0-alpha.8]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.7...v1.0.0-alpha.8 [1.0.0-alpha.7]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.6...v1.0.0-alpha.7 [1.0.0-alpha.6]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.5...v1.0.0-alpha.6 [1.0.0-alpha.5]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.4...v1.0.0-alpha.5 diff --git a/lib/DefinedProduct.d.ts b/lib/DefinedProduct.d.ts index 349234f..43f147f 100644 --- a/lib/DefinedProduct.d.ts +++ b/lib/DefinedProduct.d.ts @@ -23,6 +23,7 @@ export default abstract class DefinedProduct extends SemanticObject implements I other?: Semanticable; name?: string; description?: string; + images?: string[]; productType?: IProductType; quantity?: IQuantity; alcoholPercentage?: number; @@ -77,5 +78,7 @@ export default abstract class DefinedProduct extends SemanticObject implements I setQuantity(quantity: IQuantity): void; addCatalogItem(catalogItem: ICatalogItem): void; getCatalogItems(options?: IGetterOptions): Promise>; + addImage(url: string): void; + getImages(): string[]; } //# sourceMappingURL=DefinedProduct.d.ts.map \ No newline at end of file diff --git a/lib/DefinedProduct.d.ts.map b/lib/DefinedProduct.d.ts.map index 2396c59..ba2fdb6 100644 --- a/lib/DefinedProduct.d.ts.map +++ b/lib/DefinedProduct.d.ts.map @@ -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iB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAYjF,gBAAgB,CAAC,aAAa,EAAE,cAAc,GAAG,IAAI;IAW/C,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAOrE,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAajF,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK1B,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAYjE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAY7B,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;IAO/C,WAAW,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI;IAKtC,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;IAYzC,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAW7E,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK3B,SAAS,IAAI,MAAM,EAAE;CAK5B"} \ No newline at end of file diff --git a/lib/DefinedProduct.js b/lib/DefinedProduct.js index 152e0e7..1b07f6f 100644 --- a/lib/DefinedProduct.js +++ b/lib/DefinedProduct.js @@ -49,6 +49,8 @@ export default class DefinedProduct extends SemanticObject { this.setName(parameters.name); if (parameters.description) this.setDescription(parameters.description); + if (parameters.images) + parameters.images.forEach(e => this.addImage(e)); if (parameters.productType) this.setProductType(parameters.productType); if (parameters.quantity) @@ -441,5 +443,12 @@ export default class DefinedProduct extends SemanticObject { return results; }); } + addImage(url) { + const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"; + this.addSemanticPropertyLiteral(property, url); + } + getImages() { + return this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"); + } } //# sourceMappingURL=DefinedProduct.js.map \ No newline at end of file diff --git a/lib/DefinedProduct.js.map b/lib/DefinedProduct.js.map index ff9dba8..37123ca 100644 --- a/lib/DefinedProduct.js.map +++ b/lib/DefinedProduct.js.map @@ -1 +1 @@ -{"version":3,"file":"DefinedProduct.js","sourceRoot":"","sources":["../src/DefinedProduct.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAcF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAgB,cAAe,SAAQ,cAAc;IAIlE,YAAsB,UAAwmB;QAC7nB,IAAI,UAAU,CAAC,KAAK;YAAE,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA;;YACvF,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,UAAU,CAAC,YAAa,EAAE,CAAC,CAAC;QAE3F,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,UAAU,CAAC,IAAI;YAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,UAAU,CAAC,WAAW;YAAE,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,CAAC,WAAW;YAAE,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxE,IAAI,UAAU,CAAC,QAAQ;YAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,UAAU,CAAC,iBAAiB,IAAI,UAAU,CAAC,iBA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O,CAAC,CAAC;wBACjG,IAAI,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAgB,cAAc,CAAC,CAAC;;;;;iBAChE;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;IAEM,QAAQ,CAAC,GAAW;QAC1B,MAAM,QAAQ,GAAW,wGAAwG,CAAC;QAClI,IAAI,CAAC,0BAA0B,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChD,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,sBAAsB,CAAC,wGAAwG,CAAC,CAAC;IAC9I,CAAC;CAGD"} \ No newline at end of file diff --git a/lib/IDefinedProduct.d.ts b/lib/IDefinedProduct.d.ts index 1cd9f0d..875fe67 100644 --- a/lib/IDefinedProduct.d.ts +++ b/lib/IDefinedProduct.d.ts @@ -15,5 +15,7 @@ export default interface IDefinedProduct extends Semanticable, Proposable, Descr getProductType(): Promise; setProductType(productType: IProductType): void; removeClaim(claim: IClaim): void; + addImage(url: string): void; + getImages(): string[]; } //# sourceMappingURL=IDefinedProduct.d.ts.map \ No newline at end of file diff --git a/lib/IDefinedProduct.d.ts.map b/lib/IDefinedProduct.d.ts.map index e6c218a..7f92e43 100644 --- a/lib/IDefinedProduct.d.ts.map +++ b/lib/IDefinedProduct.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IDefinedProduct.d.ts","sourceRoot":"","sources":["../src/IDefinedProduct.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,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,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IACvC,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAClC;IACD,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAClD;IACD,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAChD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,IAAI,MAAM,EAAE,CAAC;CAEtB"} \ No newline at end of file diff --git a/lib/SuppliedProduct.d.ts b/lib/SuppliedProduct.d.ts index 3009f00..dca0236 100644 --- a/lib/SuppliedProduct.d.ts +++ b/lib/SuppliedProduct.d.ts @@ -22,6 +22,7 @@ export default class SuppliedProduct extends DefinedProduct implements ISupplied other?: Semanticable; name?: string; description?: string; + images?: string[]; productType?: IProductType; quantity?: IQuantity; alcoholPercentage?: number; diff --git a/lib/SuppliedProduct.d.ts.map b/lib/SuppliedProduct.d.ts.map index 6b125d3..6642875 100644 --- a/lib/SuppliedProduct.d.ts.map +++ b/lib/SuppliedProduct.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SuppliedProduct.d.ts","sourceRoot":"","sources":["../src/SuppliedProduct.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,cAAc,MAAM,qBAAq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C;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAAC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QAAC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QAAC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QAAC,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;QAAC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAAC,cAAc,CAAC,EAAE,cAAc,EAAE,CAAC;QAAC,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;QAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAC;CAkB7qB"} \ No newline at end of file diff --git a/lib/SuppliedProduct.js b/lib/SuppliedProduct.js index 7167793..a322b41 100644 --- a/lib/SuppliedProduct.js +++ b/lib/SuppliedProduct.js @@ -38,7 +38,7 @@ export default class SuppliedProduct extends DefinedProduct { throw new Error("Can't create the semantic object of type " + type + " from a copy: the copy is of type " + parameters.other.getSemanticType() + "."); } else - super({ connector: parameters.connector, semanticId: parameters.semanticId, semanticType: type, name: parameters.name, description: parameters.description, productType: parameters.productType, quantity: parameters.quantity, alcoholPercentage: parameters.alcoholPercentage, lifetime: parameters.lifetime, claims: parameters.claims, usageOrStorageConditions: parameters.usageOrStorageConditions, allergenCharacteristics: parameters.allergenCharacteristics, nutrientCharacteristics: parameters.nutrientCharacteristics, physicalCharacteristics: parameters.physicalCharacteristics, geographicalOrigin: parameters.geographicalOrigin, catalogItems: parameters.catalogItems, certifications: parameters.certifications, natureOrigin: parameters.natureOrigin, partOrigin: parameters.partOrigin }); + super({ connector: parameters.connector, semanticId: parameters.semanticId, semanticType: type, name: parameters.name, description: parameters.description, images: parameters.images, productType: parameters.productType, quantity: parameters.quantity, alcoholPercentage: parameters.alcoholPercentage, lifetime: parameters.lifetime, claims: parameters.claims, usageOrStorageConditions: parameters.usageOrStorageConditions, allergenCharacteristics: parameters.allergenCharacteristics, nutrientCharacteristics: parameters.nutrientCharacteristics, physicalCharacteristics: parameters.physicalCharacteristics, geographicalOrigin: parameters.geographicalOrigin, catalogItems: parameters.catalogItems, certifications: parameters.certifications, natureOrigin: parameters.natureOrigin, partOrigin: parameters.partOrigin }); if (!parameters.doNotStore) this.connector.store(this); if (parameters.totalTheoreticalStock || parameters.totalTheoreticalStock === 0) diff --git a/lib/SuppliedProduct.js.map b/lib/SuppliedProduct.js.map index b8c5425..d50c6fa 100644 --- a/lib/SuppliedProduct.js.map +++ b/lib/SuppliedProduct.js.map @@ -1 +1 @@ -{"version":3,"file":"SuppliedProduct.js","sourceRoot":"","sources":["../src/SuppliedProduct.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAWF,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAShD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,cAAc;IAGnD,wBAAwB;QAE9B,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,wHAAwH,CAAC,CAAC,CAAC;IACnK,CAAC;IAGM,wBAAwB,CAAC,qBAA6B;QAC5D,MAAM,QAAQ,GAAW,wHAAwH,CAAC;QAClJ,IAAI,CAAC,0BAA0B,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;IAClE,CAAC;IAGD,YAAmB,UAAuoB;QACzpB,MAAM,IAAI,GAAW,kHAAkH,CAAC;QAExI,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACxG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,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wBAAwB,EAAE,UAAU,CAAC,wBAAwB,EAAE,uBAAuB,EAAE,UAAU,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,UAAU,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,UAAU,CAAC,uBAAuB,EAAE,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,CAAC,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;QAKnzB,IAAI,CAAC,UAAU,CAAC,UAAU;YACzB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,UAAU,CAAC,qBAAqB,IAAI,UAAU,CAAC,qBAAqB,KAAK,CAAC;YAAE,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IACjJ,CAAC;CAED"} \ No newline at end of file diff --git a/package.json b/package.json index c2bdb7e..4633d41 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Maxime Lecoq", "license": "MIT", "type": "module", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "repository": { "type": "git", "url": "https://github.com/datafoodconsortium/connector-typescript.git", diff --git a/src/DefinedProduct.ts b/src/DefinedProduct.ts index 1279205..80e583b 100644 --- a/src/DefinedProduct.ts +++ b/src/DefinedProduct.ts @@ -43,7 +43,7 @@ export default abstract class DefinedProduct extends SemanticObject implements I protected connector: IConnector; - protected constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, name?: string, description?: string, productType?: IProductType, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: IClaim[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: IGeographicalOrigin, catalogItems?: ICatalogItem[], certifications?: ICertification[], natureOrigin?: INatureOrigin[], partOrigin?: IPartOrigin[]}) { + protected constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, name?: string, description?: string, images?: string[], productType?: IProductType, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: IClaim[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: IGeographicalOrigin, catalogItems?: ICatalogItem[], certifications?: ICertification[], natureOrigin?: INatureOrigin[], partOrigin?: IPartOrigin[]}) { if (parameters.other) super({ semanticId: parameters.semanticId!, other: parameters.other }) else super({ semanticId: parameters.semanticId!, semanticType: parameters.semanticType! }); @@ -52,6 +52,7 @@ export default abstract class DefinedProduct extends SemanticObject implements I if (parameters.name) this.setName(parameters.name); if (parameters.description) this.setDescription(parameters.description); + if (parameters.images) parameters.images.forEach(e => this.addImage(e)); if (parameters.productType) this.setProductType(parameters.productType); if (parameters.quantity) this.setQuantity(parameters.quantity); if (parameters.alcoholPercentage || parameters.alcoholPercentage === 0) this.setAlcoholPercentage(parameters.alcoholPercentage); @@ -398,6 +399,15 @@ export default abstract class DefinedProduct extends SemanticObject implements I } return results; } + + public addImage(url: string): void { + const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"; + this.addSemanticPropertyLiteral(property, url); + } + + public getImages(): string[] { + return this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"); + } } diff --git a/src/IDefinedProduct.ts b/src/IDefinedProduct.ts index 92905cf..537a6c6 100644 --- a/src/IDefinedProduct.ts +++ b/src/IDefinedProduct.ts @@ -21,5 +21,8 @@ export default interface IDefinedProduct extends Semanticable, Proposable, Descr ; setProductType(productType: IProductType): void; removeClaim(claim: IClaim): void; + + addImage(url: string): void; + getImages(): string[]; } diff --git a/src/SuppliedProduct.ts b/src/SuppliedProduct.ts index 7a6a981..48069e9 100644 --- a/src/SuppliedProduct.ts +++ b/src/SuppliedProduct.ts @@ -55,7 +55,7 @@ export default class SuppliedProduct extends DefinedProduct implements ISupplied } - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, name?: string, description?: string, productType?: IProductType, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: IClaim[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: IGeographicalOrigin, catalogItems?: ICatalogItem[], certifications?: ICertification[], natureOrigin?: INatureOrigin[], partOrigin?: IPartOrigin[], totalTheoreticalStock?: number, doNotStore?: boolean}) { + public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, name?: string, description?: string, images?: string[], productType?: IProductType, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: IClaim[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: IGeographicalOrigin, catalogItems?: ICatalogItem[], certifications?: ICertification[], natureOrigin?: INatureOrigin[], partOrigin?: IPartOrigin[], totalTheoreticalStock?: number, doNotStore?: boolean}) { const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#SuppliedProduct"; if (parameters.other) { @@ -63,7 +63,7 @@ export default class SuppliedProduct extends DefinedProduct implements ISupplied if (!parameters.other.isSemanticTypeOf(type)) throw new Error("Can't create the semantic object of type " + type + " from a copy: the copy is of type " + parameters.other.getSemanticType() + "."); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, name: parameters.name, description: parameters.description, productType: parameters.productType, quantity: parameters.quantity, alcoholPercentage: parameters.alcoholPercentage, lifetime: parameters.lifetime, claims: parameters.claims, usageOrStorageConditions: parameters.usageOrStorageConditions, allergenCharacteristics: parameters.allergenCharacteristics, nutrientCharacteristics: parameters.nutrientCharacteristics, physicalCharacteristics: parameters.physicalCharacteristics, geographicalOrigin: parameters.geographicalOrigin, catalogItems: parameters.catalogItems, certifications: parameters.certifications, natureOrigin: parameters.natureOrigin, partOrigin: parameters.partOrigin }); + else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, name: parameters.name, description: parameters.description, images: parameters.images, productType: parameters.productType, quantity: parameters.quantity, alcoholPercentage: parameters.alcoholPercentage, lifetime: parameters.lifetime, claims: parameters.claims, usageOrStorageConditions: parameters.usageOrStorageConditions, allergenCharacteristics: parameters.allergenCharacteristics, nutrientCharacteristics: parameters.nutrientCharacteristics, physicalCharacteristics: parameters.physicalCharacteristics, geographicalOrigin: parameters.geographicalOrigin, catalogItems: parameters.catalogItems, certifications: parameters.certifications, natureOrigin: parameters.natureOrigin, partOrigin: parameters.partOrigin }); diff --git a/test/SuppliedProduct.test.js b/test/SuppliedProduct.test.js index 91f7fb9..16c6728 100644 --- a/test/SuppliedProduct.test.js +++ b/test/SuppliedProduct.test.js @@ -80,6 +80,7 @@ let suppliedProduct = new SuppliedProduct({ connector: connector, semanticId: "http://myplatform.com/tomato", description: "Awesome tomato", + images: ["http://example.org/image"], productType: connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO, quantity: quantity, totalTheoreticalStock: 2.23, @@ -375,4 +376,15 @@ test('SuppliedProduct:removePartOrigin', async () => { // const partOrigins = await suppliedProduct.getPartOrigin(); // expect(partOrigins.length).toStrictEqual(1); // expect(partOrigins[0].equals(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW)).toStrictEqual(true); +}); + +test('SuppliedProduct:getImages', async () => { + expect(suppliedProduct.getImages().length).toStrictEqual(1); + expect(suppliedProduct.getImages()).toStrictEqual(["http://example.org/image"]); +}); + +test('SuppliedProduct:addImage', async () => { + suppliedProduct.addImage("http://example.org/image2"); + expect(suppliedProduct.getImages().length).toStrictEqual(2); + expect(suppliedProduct.getImages()).toStrictEqual(["http://example.org/image", "http://example.org/image2"]); }); \ No newline at end of file