From 8b135c58d9d80e53e0183430052611b2f5b456fe Mon Sep 17 00:00:00 2001 From: Maxime Lecoq Date: Thu, 21 Mar 2024 14:49:43 +0100 Subject: [PATCH] Release alpha.9 --- CHANGELOG.md | 48 +- README.md | 265 +- index.js | 17 + lib/Address.d.ts | 19 +- lib/Address.d.ts.map | 2 +- lib/Address.js | 115 +- lib/Address.js.map | 2 +- lib/AddressOwner.d.ts | 7 + lib/AddressOwner.d.ts.map | 1 + lib/AddressOwner.js | 2 + lib/AddressOwner.js.map | 1 + lib/Affiliable.d.ts | 2 +- lib/Affiliable.d.ts.map | 2 +- lib/Agent.d.ts | 24 +- lib/Agent.d.ts.map | 2 +- lib/Agent.js | 178 +- lib/Agent.js.map | 2 +- lib/AllergenCharacteristic.d.ts | 12 +- lib/AllergenCharacteristic.d.ts.map | 2 +- lib/AllergenCharacteristic.js | 51 +- lib/AllergenCharacteristic.js.map | 2 +- lib/Browsable.d.ts | 4 +- lib/Browsable.d.ts.map | 2 +- lib/Buyable.d.ts.map | 2 +- lib/Catalog.d.ts | 10 +- lib/Catalog.d.ts.map | 2 +- lib/Catalog.js | 78 +- lib/Catalog.js.map | 2 +- lib/CatalogItem.d.ts | 18 +- lib/CatalogItem.d.ts.map | 2 +- lib/CatalogItem.js | 142 +- lib/CatalogItem.js.map | 2 +- lib/CatalogItemManager.d.ts | 2 +- lib/CatalogItemManager.d.ts.map | 2 +- lib/CatalogMaintainer.d.ts | 2 +- lib/CatalogMaintainer.d.ts.map | 2 +- lib/Catalogable.d.ts | 2 +- lib/Catalogable.d.ts.map | 2 +- lib/Certifiable.d.ts | 8 +- lib/Certifiable.d.ts.map | 2 +- lib/Characteristic.d.ts | 10 +- lib/Characteristic.d.ts.map | 2 +- lib/Characteristic.js | 43 +- lib/Characteristic.js.map | 2 +- lib/Claimable.d.ts.map | 2 +- lib/Claimable.js | 23 + lib/Claimable.js.map | 2 +- lib/Classable.d.ts | 2 +- lib/Classable.d.ts.map | 2 +- lib/Classable.js | 23 + lib/Classable.js.map | 2 +- lib/Connector.d.ts | 95 +- lib/Connector.d.ts.map | 2 +- lib/Connector.js | 38 +- lib/Connector.js.map | 2 +- lib/ConnectorExporterJsonldStream.d.ts | 2 +- lib/ConnectorExporterJsonldStream.d.ts.map | 2 +- lib/ConnectorExporterJsonldStream.js.map | 2 +- lib/ConnectorFactory.d.ts | 93 +- lib/ConnectorFactory.d.ts.map | 2 +- lib/ConnectorFactory.js | 32 +- lib/ConnectorFactory.js.map | 2 +- lib/ConnectorImporterJsonldStream.d.ts | 2 +- lib/ConnectorImporterJsonldStream.d.ts.map | 2 +- lib/ConnectorImporterJsonldStream.js.map | 2 +- lib/ConnectorStoreMap.d.ts.map | 2 +- lib/ConnectorStoreMap.js.map | 2 +- lib/ContactableByAddress.d.ts | 5 + lib/ContactableByAddress.d.ts.map | 1 + lib/ContactableByAddress.js | 2 + lib/ContactableByAddress.js.map | 1 + lib/ContactableByEmail.d.ts | 4 + lib/ContactableByEmail.d.ts.map | 1 + lib/ContactableByEmail.js | 25 + lib/ContactableByEmail.js.map | 1 + lib/ContactableByPhone.d.ts | 5 + lib/ContactableByPhone.d.ts.map | 1 + lib/ContactableByPhone.js | 2 + lib/ContactableByPhone.js.map | 1 + lib/ContactableBySocialMedia.d.ts | 5 + lib/ContactableBySocialMedia.d.ts.map | 1 + lib/ContactableBySocialMedia.js | 2 + lib/ContactableBySocialMedia.js.map | 1 + lib/ContactableByWebsite.d.ts | 4 + lib/ContactableByWebsite.d.ts.map | 1 + lib/ContactableByWebsite.js | 25 + lib/ContactableByWebsite.js.map | 1 + lib/CustomerCategory.d.ts | 2 +- lib/CustomerCategory.d.ts.map | 2 +- lib/CustomerCategory.js | 52 +- lib/CustomerCategory.js.map | 2 +- lib/DefinedProduct.d.ts | 99 +- lib/DefinedProduct.d.ts.map | 2 +- lib/DefinedProduct.js | 448 +- lib/DefinedProduct.js.map | 2 +- lib/Describable.d.ts | 2 +- lib/Describable.d.ts.map | 2 +- lib/Describable.js | 23 + lib/Describable.js.map | 2 +- lib/Dialable.d.ts | 6 +- lib/Dialable.d.ts.map | 2 +- lib/Dialable.js | 23 + lib/Dialable.js.map | 2 +- lib/Ellapsable.d.ts | 4 +- lib/Ellapsable.d.ts.map | 2 +- lib/Ellapsable.js | 23 + lib/Ellapsable.js.map | 2 +- lib/EmailOwner.d.ts | 6 + lib/EmailOwner.d.ts.map | 1 + lib/EmailOwner.js | 2 + lib/EmailOwner.js.map | 1 + lib/Enterprise.d.ts | 51 +- lib/Enterprise.d.ts.map | 2 +- lib/Enterprise.js | 208 +- lib/Enterprise.js.map | 2 +- lib/Exhibitable.d.ts | 2 +- lib/Exhibitable.d.ts.map | 2 +- lib/Exhibitable.js | 23 + lib/Exhibitable.js.map | 2 +- lib/Flow.d.ts | 19 + lib/Flow.d.ts.map | 1 + lib/Flow.js | 31 + lib/Flow.js.map | 1 + lib/Geolocalizable.d.ts | 4 +- lib/Geolocalizable.d.ts.map | 2 +- lib/Geolocalizable.js | 23 + lib/Geolocalizable.js.map | 2 +- lib/Groupable.d.ts.map | 2 +- lib/Groupable.js | 23 + lib/Groupable.js.map | 2 +- lib/IAddress.d.ts.map | 2 +- lib/IAgent.d.ts | 10 +- lib/IAgent.d.ts.map | 2 +- lib/IAllergenCharacteristic.d.ts.map | 2 +- lib/ICatalog.d.ts.map | 2 +- lib/ICatalogItem.d.ts | 8 +- lib/ICatalogItem.d.ts.map | 2 +- lib/ICharacteristic.d.ts.map | 2 +- lib/IConnector.d.ts | 76 +- lib/IConnector.d.ts.map | 2 +- lib/IConnectorFactory.d.ts | 69 +- lib/IConnectorFactory.d.ts.map | 2 +- lib/ICustomerCategory.d.ts | 2 +- lib/ICustomerCategory.d.ts.map | 2 +- lib/IDefinedProduct.d.ts | 24 +- lib/IDefinedProduct.d.ts.map | 2 +- lib/IEnterprise.d.ts | 10 +- lib/IEnterprise.d.ts.map | 2 +- lib/IFlow.d.ts | 7 + lib/IFlow.d.ts.map | 1 + lib/IFlow.js | 2 + lib/IFlow.js.map | 1 + lib/INutrientCharacteristic.d.ts.map | 2 +- lib/IOffer.d.ts | 4 +- lib/IOffer.d.ts.map | 2 +- lib/IOrder.d.ts | 15 +- lib/IOrder.d.ts.map | 2 +- lib/IOrderLine.d.ts | 6 +- lib/IOrderLine.d.ts.map | 2 +- lib/IPerson.d.ts | 2 +- lib/IPerson.d.ts.map | 2 +- lib/IPhoneNumber.d.ts | 5 + lib/IPhoneNumber.d.ts.map | 1 + lib/IPhoneNumber.js | 2 + lib/IPhoneNumber.js.map | 1 + lib/IPhysicalCharacteristic.d.ts.map | 2 +- lib/IPlannedConsumptionFlow.d.ts | 7 + lib/IPlannedConsumptionFlow.d.ts.map | 1 + lib/IPlannedConsumptionFlow.js | 2 + lib/IPlannedConsumptionFlow.js.map | 1 + lib/IPlannedFlow.d.ts | 7 + lib/IPlannedFlow.d.ts.map | 1 + lib/IPlannedFlow.js | 2 + lib/IPlannedFlow.js.map | 1 + lib/IPlannedProductionFlow.d.ts | 7 + lib/IPlannedProductionFlow.d.ts.map | 1 + lib/IPlannedProductionFlow.js | 2 + lib/IPlannedProductionFlow.js.map | 1 + lib/IPlannedTransformation.d.ts | 17 + lib/IPlannedTransformation.d.ts.map | 1 + lib/IPlannedTransformation.js | 2 + lib/IPlannedTransformation.js.map | 1 + lib/IPrice.d.ts | 10 +- lib/IPrice.d.ts.map | 2 +- lib/IQuantity.d.ts.map | 2 +- lib/ISKOSConcept.d.ts | 10 +- lib/ISKOSConcept.d.ts.map | 2 +- lib/ISKOSConceptScheme.d.ts.map | 2 +- lib/ISKOSConceptScheme.js | 23 + lib/ISKOSConceptScheme.js.map | 2 +- lib/ISKOSLabel.d.ts | 4 +- lib/ISKOSLabel.d.ts.map | 2 +- lib/ISKOSLabel.js | 23 + lib/ISKOSLabel.js.map | 2 +- lib/ISaleSession.d.ts | 4 +- lib/ISaleSession.d.ts.map | 2 +- lib/ISocialMedia.d.ts | 7 + lib/ISocialMedia.d.ts.map | 1 + lib/ISocialMedia.js | 2 + lib/ISocialMedia.js.map | 1 + lib/ISuppliedProduct.d.ts.map | 2 +- lib/ITechnicalProduct.d.ts.map | 2 +- lib/Invoiceable.d.ts | 2 +- lib/Invoiceable.d.ts.map | 2 +- lib/Localizable.d.ts | 14 +- lib/Localizable.d.ts.map | 2 +- lib/Localizable.js | 23 + lib/Localizable.js.map | 2 +- lib/MainContactOwner.d.ts | 6 + lib/MainContactOwner.d.ts.map | 1 + lib/MainContactOwner.js | 2 + lib/MainContactOwner.js.map | 1 + lib/ManagedByMainContact.d.ts | 5 + lib/ManagedByMainContact.d.ts.map | 1 + lib/ManagedByMainContact.js | 2 + lib/ManagedByMainContact.js.map | 1 + lib/Manufacturable.d.ts | 34 +- lib/Manufacturable.d.ts.map | 2 +- lib/Marketable.d.ts.map | 2 +- lib/Measurable.d.ts | 6 +- lib/Measurable.d.ts.map | 2 +- lib/Nameable.d.ts | 2 +- lib/Nameable.d.ts.map | 2 +- lib/Nameable.js | 23 + lib/Nameable.js.map | 2 +- lib/NutrientCharacteristic.d.ts | 14 +- lib/NutrientCharacteristic.d.ts.map | 2 +- lib/NutrientCharacteristic.js | 51 +- lib/NutrientCharacteristic.js.map | 2 +- lib/Offer.d.ts | 12 +- lib/Offer.d.ts.map | 2 +- lib/Offer.js | 94 +- lib/Offer.js.map | 2 +- lib/Offerable.d.ts | 4 +- lib/Offerable.d.ts.map | 2 +- lib/Onboardable.d.ts | 2 +- lib/Onboardable.d.ts.map | 2 +- lib/Order.d.ts | 26 +- lib/Order.d.ts.map | 2 +- lib/Order.js | 165 +- lib/Order.js.map | 2 +- lib/OrderLine.d.ts | 16 +- lib/OrderLine.d.ts.map | 2 +- lib/OrderLine.js | 103 +- lib/OrderLine.js.map | 2 +- lib/Orderable.d.ts.map | 2 +- lib/Payable.d.ts | 2 +- lib/Payable.d.ts.map | 2 +- lib/Person.d.ts | 13 +- lib/Person.d.ts.map | 2 +- lib/Person.js | 82 +- lib/Person.js.map | 2 +- lib/Personable.d.ts | 4 +- lib/Personable.d.ts.map | 2 +- lib/Personable.js | 23 + lib/Personable.js.map | 2 +- lib/PhoneNumber.d.ts | 20 + lib/PhoneNumber.d.ts.map | 1 + lib/PhoneNumber.js | 46 + lib/PhoneNumber.js.map | 1 + lib/PhoneNumberOwner.d.ts | 7 + lib/PhoneNumberOwner.d.ts.map | 1 + lib/PhoneNumberOwner.js | 2 + lib/PhoneNumberOwner.js.map | 1 + lib/PhysicalCharacteristic.d.ts | 14 +- lib/PhysicalCharacteristic.d.ts.map | 2 +- lib/PhysicalCharacteristic.js | 51 +- lib/PhysicalCharacteristic.js.map | 2 +- lib/PlannedConsumptionFlow.d.ts | 25 + lib/PlannedConsumptionFlow.d.ts.map | 1 + lib/PlannedConsumptionFlow.js | 75 + lib/PlannedConsumptionFlow.js.map | 1 + lib/PlannedProductionFlow.d.ts | 25 + lib/PlannedProductionFlow.d.ts.map | 1 + lib/PlannedProductionFlow.js | 75 + lib/PlannedProductionFlow.js.map | 1 + lib/PlannedTransformation.d.ts | 31 + lib/PlannedTransformation.d.ts.map | 1 + lib/PlannedTransformation.js | 157 + lib/PlannedTransformation.js.map | 1 + lib/Price.d.ts | 14 +- lib/Price.d.ts.map | 2 +- lib/Price.js | 91 +- lib/Price.js.map | 2 +- lib/ProductSupplier.d.ts | 2 +- lib/ProductSupplier.d.ts.map | 2 +- lib/Proposable.d.ts | 2 +- lib/Proposable.d.ts.map | 2 +- lib/Quantifiable.d.ts | 8 +- lib/Quantifiable.d.ts.map | 2 +- lib/QuantitativeValue.d.ts | 14 +- lib/QuantitativeValue.d.ts.map | 2 +- lib/QuantitativeValue.js | 61 +- lib/QuantitativeValue.js.map | 2 +- lib/Quantity.d.ts | 22 + lib/Quantity.d.ts.map | 1 + lib/Quantity.js | 62 + lib/Quantity.js.map | 1 + lib/SKOSConcept.js | 4 +- lib/SKOSConcept.js.map | 2 +- lib/SaleSession.d.ts | 14 +- lib/SaleSession.d.ts.map | 2 +- lib/SaleSession.js | 94 +- lib/SaleSession.js.map | 2 +- lib/SocialMedia.d.ts | 20 + lib/SocialMedia.d.ts.map | 1 + lib/SocialMedia.js | 46 + lib/SocialMedia.js.map | 1 + lib/SocialMediaOwner.d.ts | 7 + lib/SocialMediaOwner.d.ts.map | 1 + lib/SocialMediaOwner.js | 2 + lib/SocialMediaOwner.js.map | 1 + lib/Stockable.d.ts | 2 +- lib/Stockable.d.ts.map | 2 +- lib/Stockable.js | 23 + lib/Stockable.js.map | 2 +- lib/SuppliedProduct.d.ts | 31 +- lib/SuppliedProduct.d.ts.map | 2 +- lib/SuppliedProduct.js | 69 +- lib/SuppliedProduct.js.map | 2 +- lib/Taxable.d.ts | 2 +- lib/Taxable.d.ts.map | 2 +- lib/Taxable.js | 23 + lib/Taxable.js.map | 2 +- lib/TechnicalProduct.d.ts | 35 + lib/TechnicalProduct.d.ts.map | 1 + lib/TechnicalProduct.js | 43 + lib/TechnicalProduct.js.map | 1 + lib/TechnicalProductProposer.d.ts | 2 +- lib/TechnicalProductProposer.d.ts.map | 2 +- lib/WebsiteOwner.d.ts | 6 + lib/WebsiteOwner.d.ts.map | 1 + lib/WebsiteOwner.js | 2 + lib/WebsiteOwner.js.map | 1 + lib/context.d.ts | 27 +- lib/context.d.ts.map | 2 +- lib/context.js | 26 +- lib/context.js.map | 2 +- package-lock.json | 8079 ++------------------ package.json | 13 +- src/Address.ts | 143 +- src/AddressOwner.ts | 35 + src/Affiliable.ts | 28 +- src/Agent.ts | 158 +- src/AllergenCharacteristic.ts | 63 +- src/Browsable.ts | 33 +- src/Buyable.ts | 26 +- src/Catalog.ts | 98 +- src/CatalogItem.ts | 177 +- src/CatalogItemManager.ts | 28 +- src/CatalogMaintainer.ts | 28 +- src/Catalogable.ts | 27 +- src/Certifiable.ts | 34 +- src/Characteristic.ts | 39 +- src/Claimable.ts | 23 + src/Classable.ts | 27 +- src/Connector.ts | 105 +- src/ConnectorExporterJsonldStream.ts | 3 +- src/ConnectorFactory.ts | 99 +- src/ConnectorImporterJsonldStream.ts | 5 +- src/ConnectorStoreMap.ts | 1 - src/ContactableByAddress.ts | 32 + src/ContactableByEmail.ts | 32 + src/ContactableByPhone.ts | 32 + src/ContactableBySocialMedia.ts | 32 + src/ContactableByWebsite.ts | 32 + src/CustomerCategory.ts | 52 +- src/DefinedProduct.ts | 542 +- src/Describable.ts | 27 +- src/Dialable.ts | 34 +- src/Ellapsable.ts | 32 +- src/EmailOwner.ts | 34 + src/Enterprise.ts | 295 +- src/Exhibitable.ts | 27 +- src/Flow.ts | 76 + src/Geolocalizable.ts | 32 +- src/Groupable.ts | 23 + src/IAddress.ts | 25 +- src/IAgent.ts | 34 +- src/IAllergenCharacteristic.ts | 25 +- src/ICatalog.ts | 25 +- src/ICatalogItem.ts | 33 +- src/ICharacteristic.ts | 25 +- src/IConnector.ts | 65 +- src/IConnectorFactory.ts | 35 +- src/ICustomerCategory.ts | 27 +- src/IDefinedProduct.ts | 60 +- src/IEnterprise.ts | 33 +- src/IFlow.ts | 34 + src/INutrientCharacteristic.ts | 25 +- src/IOffer.ts | 27 +- src/IOrder.ts | 62 +- src/IOrderLine.ts | 46 +- src/IPerson.ts | 27 +- src/IPhoneNumber.ts | 31 + src/IPhysicalCharacteristic.ts | 25 +- src/IPlannedConsumptionFlow.ts | 35 + src/IPlannedFlow.ts | 35 + src/IPlannedProductionFlow.ts | 35 + src/IPlannedTransformation.ts | 52 + src/IPrice.ts | 37 +- src/IQuantity.ts | 25 +- src/ISKOSConcept.ts | 48 +- src/ISKOSConceptScheme.ts | 23 + src/ISKOSLabel.ts | 30 +- src/ISaleSession.ts | 34 +- src/ISocialMedia.ts | 34 + src/ISuppliedProduct.ts | 25 +- src/ITechnicalProduct.ts | 25 +- src/Invoiceable.ts | 26 +- src/Localizable.ts | 54 +- src/MainContactOwner.ts | 33 + src/ManagedByMainContact.ts | 32 + src/Manufacturable.ts | 88 +- src/Marketable.ts | 32 +- src/Measurable.ts | 32 +- src/Nameable.ts | 27 +- src/NutrientCharacteristic.ts | 65 +- src/Offer.ts | 127 +- src/Offerable.ts | 34 +- src/Onboardable.ts | 27 +- src/Order.ts | 210 +- src/OrderLine.ts | 140 +- src/Orderable.ts | 26 +- src/Payable.ts | 27 +- src/Person.ts | 103 +- src/Personable.ts | 32 +- src/PhoneNumber.ts | 94 + src/PhoneNumberOwner.ts | 35 + src/PhysicalCharacteristic.ts | 65 +- src/PlannedConsumptionFlow.ts | 113 + src/PlannedProductionFlow.ts | 113 + src/PlannedTransformation.ts | 158 + src/Price.ts | 103 +- src/ProductSupplier.ts | 29 +- src/Proposable.ts | 27 +- src/Quantifiable.ts | 36 +- src/QuantitativeValue.ts | 83 +- src/Quantity.ts | 100 + src/SKOSConcept.ts | 4 +- src/SaleSession.ts | 125 +- src/SocialMedia.ts | 94 + src/SocialMediaOwner.ts | 35 + src/Stockable.ts | 27 +- src/SuppliedProduct.ts | 100 +- src/Taxable.ts | 27 +- src/TechnicalProduct.ts | 104 + src/TechnicalProductProposer.ts | 28 +- src/WebsiteOwner.ts | 34 + src/context.ts | 166 +- test/Address.test.js | 56 +- test/AllergenCharacteristic.test.js | 31 +- test/Catalog.test.js | 71 +- test/CatalogItem.test.js | 77 +- test/Connector.test.js | 25 + test/CustomerCategory.test.js | 22 +- test/Enterprise.test.js | 147 +- test/NutrientCharacteristic.test.js | 39 +- test/Offer.test.js | 58 +- test/Order.test.js | 83 +- test/OrderLine.test.js | 58 +- test/Person.test.js | 87 +- test/PhysicalCharacteristic.test.js | 37 +- test/PlannedTransformationLoop.test.js | 69 + test/Price.test.js | 47 +- test/QuantitativeValue.test.js | 29 +- test/SaleSession.test.js | 69 +- test/SuppliedProduct.test.js | 312 +- test/thesaurus/productTypes.json | 86 +- test/thesaurus/vocabulary.json | 231 + 470 files changed, 10208 insertions(+), 11154 deletions(-) create mode 100644 index.js create mode 100644 lib/AddressOwner.d.ts create mode 100644 lib/AddressOwner.d.ts.map create mode 100644 lib/AddressOwner.js create mode 100644 lib/AddressOwner.js.map create mode 100644 lib/ContactableByAddress.d.ts create mode 100644 lib/ContactableByAddress.d.ts.map create mode 100644 lib/ContactableByAddress.js create mode 100644 lib/ContactableByAddress.js.map create mode 100644 lib/ContactableByEmail.d.ts create mode 100644 lib/ContactableByEmail.d.ts.map create mode 100644 lib/ContactableByEmail.js create mode 100644 lib/ContactableByEmail.js.map create mode 100644 lib/ContactableByPhone.d.ts create mode 100644 lib/ContactableByPhone.d.ts.map create mode 100644 lib/ContactableByPhone.js create mode 100644 lib/ContactableByPhone.js.map create mode 100644 lib/ContactableBySocialMedia.d.ts create mode 100644 lib/ContactableBySocialMedia.d.ts.map create mode 100644 lib/ContactableBySocialMedia.js create mode 100644 lib/ContactableBySocialMedia.js.map create mode 100644 lib/ContactableByWebsite.d.ts create mode 100644 lib/ContactableByWebsite.d.ts.map create mode 100644 lib/ContactableByWebsite.js create mode 100644 lib/ContactableByWebsite.js.map create mode 100644 lib/EmailOwner.d.ts create mode 100644 lib/EmailOwner.d.ts.map create mode 100644 lib/EmailOwner.js create mode 100644 lib/EmailOwner.js.map create mode 100644 lib/Flow.d.ts create mode 100644 lib/Flow.d.ts.map create mode 100644 lib/Flow.js create mode 100644 lib/Flow.js.map create mode 100644 lib/IFlow.d.ts create mode 100644 lib/IFlow.d.ts.map create mode 100644 lib/IFlow.js create mode 100644 lib/IFlow.js.map create mode 100644 lib/IPhoneNumber.d.ts create mode 100644 lib/IPhoneNumber.d.ts.map create mode 100644 lib/IPhoneNumber.js create mode 100644 lib/IPhoneNumber.js.map create mode 100644 lib/IPlannedConsumptionFlow.d.ts create mode 100644 lib/IPlannedConsumptionFlow.d.ts.map create mode 100644 lib/IPlannedConsumptionFlow.js create mode 100644 lib/IPlannedConsumptionFlow.js.map create mode 100644 lib/IPlannedFlow.d.ts create mode 100644 lib/IPlannedFlow.d.ts.map create mode 100644 lib/IPlannedFlow.js create mode 100644 lib/IPlannedFlow.js.map create mode 100644 lib/IPlannedProductionFlow.d.ts create mode 100644 lib/IPlannedProductionFlow.d.ts.map create mode 100644 lib/IPlannedProductionFlow.js create mode 100644 lib/IPlannedProductionFlow.js.map create mode 100644 lib/IPlannedTransformation.d.ts create mode 100644 lib/IPlannedTransformation.d.ts.map create mode 100644 lib/IPlannedTransformation.js create mode 100644 lib/IPlannedTransformation.js.map create mode 100644 lib/ISocialMedia.d.ts create mode 100644 lib/ISocialMedia.d.ts.map create mode 100644 lib/ISocialMedia.js create mode 100644 lib/ISocialMedia.js.map create mode 100644 lib/MainContactOwner.d.ts create mode 100644 lib/MainContactOwner.d.ts.map create mode 100644 lib/MainContactOwner.js create mode 100644 lib/MainContactOwner.js.map create mode 100644 lib/ManagedByMainContact.d.ts create mode 100644 lib/ManagedByMainContact.d.ts.map create mode 100644 lib/ManagedByMainContact.js create mode 100644 lib/ManagedByMainContact.js.map create mode 100644 lib/PhoneNumber.d.ts create mode 100644 lib/PhoneNumber.d.ts.map create mode 100644 lib/PhoneNumber.js create mode 100644 lib/PhoneNumber.js.map create mode 100644 lib/PhoneNumberOwner.d.ts create mode 100644 lib/PhoneNumberOwner.d.ts.map create mode 100644 lib/PhoneNumberOwner.js create mode 100644 lib/PhoneNumberOwner.js.map create mode 100644 lib/PlannedConsumptionFlow.d.ts create mode 100644 lib/PlannedConsumptionFlow.d.ts.map create mode 100644 lib/PlannedConsumptionFlow.js create mode 100644 lib/PlannedConsumptionFlow.js.map create mode 100644 lib/PlannedProductionFlow.d.ts create mode 100644 lib/PlannedProductionFlow.d.ts.map create mode 100644 lib/PlannedProductionFlow.js create mode 100644 lib/PlannedProductionFlow.js.map create mode 100644 lib/PlannedTransformation.d.ts create mode 100644 lib/PlannedTransformation.d.ts.map create mode 100644 lib/PlannedTransformation.js create mode 100644 lib/PlannedTransformation.js.map create mode 100644 lib/Quantity.d.ts create mode 100644 lib/Quantity.d.ts.map create mode 100644 lib/Quantity.js create mode 100644 lib/Quantity.js.map create mode 100644 lib/SocialMedia.d.ts create mode 100644 lib/SocialMedia.d.ts.map create mode 100644 lib/SocialMedia.js create mode 100644 lib/SocialMedia.js.map create mode 100644 lib/SocialMediaOwner.d.ts create mode 100644 lib/SocialMediaOwner.d.ts.map create mode 100644 lib/SocialMediaOwner.js create mode 100644 lib/SocialMediaOwner.js.map create mode 100644 lib/TechnicalProduct.d.ts create mode 100644 lib/TechnicalProduct.d.ts.map create mode 100644 lib/TechnicalProduct.js create mode 100644 lib/TechnicalProduct.js.map create mode 100644 lib/WebsiteOwner.d.ts create mode 100644 lib/WebsiteOwner.d.ts.map create mode 100644 lib/WebsiteOwner.js create mode 100644 lib/WebsiteOwner.js.map create mode 100644 src/AddressOwner.ts create mode 100644 src/ContactableByAddress.ts create mode 100644 src/ContactableByEmail.ts create mode 100644 src/ContactableByPhone.ts create mode 100644 src/ContactableBySocialMedia.ts create mode 100644 src/ContactableByWebsite.ts create mode 100644 src/EmailOwner.ts create mode 100644 src/Flow.ts create mode 100644 src/IFlow.ts create mode 100644 src/IPhoneNumber.ts create mode 100644 src/IPlannedConsumptionFlow.ts create mode 100644 src/IPlannedFlow.ts create mode 100644 src/IPlannedProductionFlow.ts create mode 100644 src/IPlannedTransformation.ts create mode 100644 src/ISocialMedia.ts create mode 100644 src/MainContactOwner.ts create mode 100644 src/ManagedByMainContact.ts create mode 100644 src/PhoneNumber.ts create mode 100644 src/PhoneNumberOwner.ts create mode 100644 src/PlannedConsumptionFlow.ts create mode 100644 src/PlannedProductionFlow.ts create mode 100644 src/PlannedTransformation.ts create mode 100644 src/Quantity.ts create mode 100644 src/SocialMedia.ts create mode 100644 src/SocialMediaOwner.ts create mode 100644 src/TechnicalProduct.ts create mode 100644 src/WebsiteOwner.ts create mode 100644 test/Connector.test.js create mode 100644 test/PlannedTransformationLoop.test.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 9480858..8d662a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ + + + # Changelog All notable changes to this project will be documented in this file. @@ -7,7 +10,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- None. +- None + +## [1.0.0-alpha.9] - 2024-03-20 + +### Changed + +- Update `rdf-ext` to version 2.5.1. +- Update `@types/rdf-ext` to version 2.5.0. +- Update `@virtual-assembly/semantizer` to version alpha.3 (use GitHub repository). +- Generate the code from the code generator. +- Generated from the next branch of UML data model [edac402](https://github.com/datafoodconsortium/data-model-uml/commit/edac40255591f46884e75da47e28f04adc53d97a). + +### Added + +- `Address`: + - latitute + - longitude + - region +- `Agent`: + - logo +- `PlannedConsumptionFlow`: + - quantity + - consumes +- `PlannedProductionFlow`: + - quantity + - produces +- `PlannedTransformation`: + - hasIncome + - hasOutcome + - hasTransformationType +- `DefinedProduct`: + - image +- `Order`: + - date + - hasFulfilmentStatus + - hasOrderStatus + - hasPaymentStatus + - orderNumber + +See the SUPPORTED.md file [comparison from main to next](https://github.com/datafoodconsortium/data-model-uml/compare/main...next#diff-25a3722bf6006b7a060d6900ea707cb596a854ea3cdb6ef3b1980531d5d85bc5). ## [1.0.0-alpha.8] - 2024-01-31 @@ -72,6 +114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Index does not export Semanticable anymore. - Update @types/rdf-ext to version 2.2.0. - Git ignore .code-workspace files. +- Update dependency to semantizer version alpha.2. ## [1.0.0-alpha.1] - 2023-03-27 @@ -119,7 +162,8 @@ 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 +[unreleased]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.9...HEAD +[1.0.0-alpha.9]: https://github.com/datafoodconsortium/connector-typescript/compare/v1.0.0-alpha.8...v1.0.0-alpha.9 [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 diff --git a/README.md b/README.md index a426e42..8001b94 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + # Data Food Consortium Connector The Data Food Consortium (DFC) Connector is a tool to help you to integrate the DFC standard within you application. @@ -29,6 +31,7 @@ You can then load our different SKOS taxonomies providing the corresponding JSON connector.loadMeasures(File.read("/path/to/measures.json")); connector.loadFacets(File.read("/path/to/facets.json")); connector.loadProductTypes(File.read("/path/to/productTypes.json")); +connector.loadVocabulary(File.read("/path/to/vocabulary.json")); ``` These taxonomies are accessible directly from the connector, like: @@ -41,15 +44,16 @@ const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; // Example of a product type const tomato = connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO; + +// Example of a transformation type +const combines = connector.VOCABULARY.TRANSFORMATIONTYPE.COMBINES; ``` ## Object creation -You can create objects using the connector's factory or by calling the new operator by yourself. - _Remark: each newly created object will be saved into the store provided to the Connector. This store will allow you to access to the referenced objects more easily. You can disable this behavior passing the `doNotStore: true` parameter when constructing the objects._ -### Using the connector's factory +Call the creation methods from the connector: ```JS import { Connector } from "@datafoodconsortium/connector"; @@ -120,97 +124,9 @@ _Remark: Except for anonymous objects (blank nodes), the `semanticId` constructo - `IConnector:createQuantity(parameters): IQuantity;` - `IConnector:createSaleSession(parameters): ISaleSession;` - `IConnector:createSuppliedProduct(parameters): ISuppliedProduct;` - -### Using the new operator - -This is identical to the previous method except: -- you have to import all the concreate classes -- you have to set the connector parameter in the constructor - -```JS -// You have to import all the concreate classes. -import { - CatalogItem, - SuppliedProduct, - QuantitativeValue, - AllergenCharacteristic, - NutrientCharacteristic, - PhysicalCharacteristic -} from "@datafoodconsortium/connector"; - -const quantity = new QuantitativeValue({ - connector: connector, // You have to pass a reference to the connector. - value: 1.2, - unit: kilogram -}); - -const allergenCharacteristic = new AllergenCharacteristic({ - connector: connector, // You have to pass a reference to the connector. - value: 1, - unit: kilogram, - allergenDimension: connector.MEASURES.DIMENSION.ALLERGENDIMENSION.PEANUTS -}); - -const nutrientCharacteristic = new NutrientCharacteristic({ - connector: connector, // You have to pass a reference to the connector. - value: 10, - unit: gram, - nutrientDimension: connector.MEASURES.DIMENSION.NUTRIENTDIMENSION.CALCIUM -}); - -const physicalCharacteristic = new PhysicalCharacteristic({ - connector: connector, // You have to pass a reference to the connector. - value: 100, - unit: gram, - physicalDimension: connector.MEASURES.DIMENSION.PHYSICALDIMENSION.WEIGHT -}); - -const catalogItem = new CatalogItem({ - connector: connector, // You have to pass a reference to the connector. - semanticId: "http://myplatform.com/catalogItem" -}); - -let suppliedProduct = new SuppliedProduct({ - connector: connector, // You have to pass a reference to the connector. - semanticId: "http://myplatform.com/tomato", - description: "Awesome tomato", - productType: connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO, - quantity: quantity, - totalTheoreticalStock: 2.23, - alcoholPercentage: 0, - lifetime: "a week", - claims: [connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS], - usageOrStorageConditions: "free text", - allergenCharacteristics: [allergenCharacteristic], - nutrientCharacteristics: [nutrientCharacteristic], - physicalCharacteristics: [physicalCharacteristic], - geographicalOrigin: connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.CENTREVALLOIRE, - catalogItems: [catalogItem], - certifications: [connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB, connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU], - natureOrigin: [connector.FACETS.NATUREORIGIN.PLANTORIGIN], - partOrigin: [connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT] -}); -``` - -_Remark: Except for anonymous objects (blank nodes), the `semanticId` constructor parameter is mandatory. All the other parameters are optional._ - -**Available concreate classes:** -- `Address` -- `AllergenCharacteristic` -- `Catalog` -- `CatalogItem` -- `CustomerCategory` -- `Enterprise` -- `NutrientCharacteristic` -- `Offer` -- `Order` -- `OrderLine` -- `Person` -- `PhysicalCharacteristic` -- `Price` -- `QuantitativeValue` -- `SaleSession` -- `SuppliedProduct` +- `IConnector:createPlannedTransformation(parameters);` +- `IConnector:createPlannedConsumptionFlow(parameters);` +- `IConnector:createPlannedProductionFlow(parameters);` ## Object accessors and mutators @@ -268,7 +184,7 @@ options?: { This will output DFC compliant valid JSON-LD like: ```JS { - "@context": "http://static.datafoodconsortium.org/ontologies/context.json", + "@context": "http://www.datafoodconsortium.org/ontologies/context.json", "@graph": [ { "@id": "_:b1", @@ -372,7 +288,7 @@ const Semanticable | undefined = await connector.importOne(jsonAsAString); You can pass the `only` option to target one type using the `importOneTyped` method: ```JS -const order: string = "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Order"; +const order: string = "http://www.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#Order"; const IOrder | undefined = await connector.importOneTyped(jsonAsAString, { only: order }); ``` @@ -401,7 +317,7 @@ Connector:setDefaultFactory(factory: IConnectorFactory); ### Address -`Connector:createAddress(parameters): IAddress` +`IConnector:createAddress(parameters): IAddress` ```JS parameters: { @@ -414,7 +330,7 @@ parameters: { } ``` -`Connector:createAddress(parameters): IAddress` +`IConnector:createAddress(parameters): IAddress` ```JS parameters: { @@ -425,7 +341,7 @@ parameters: { ### AllergenCharacteristic -`Connector:createAllergenCharacteristic(parameters): IAllergenCharacteristic` +`IConnector:createAllergenCharacteristic(parameters): IAllergenCharacteristic` ```JS parameters: { @@ -435,7 +351,7 @@ parameters: { } ``` -`Connector:createAllergenCharacteristic(parameters): IAllergenCharacteristic` +`IConnector:createAllergenCharacteristic(parameters): IAllergenCharacteristic` ```JS parameters: { @@ -445,7 +361,7 @@ parameters: { ### Catalog -`Connector:createCatalog(parameters): ICatalog` +`IConnector:createCatalog(parameters): ICatalog` ```JS parameters: { @@ -456,7 +372,7 @@ parameters: { } ``` -`Connector:createCatalog(parameters): ICatalog` +`IConnector:createCatalog(parameters): ICatalog` ```JS parameters: { @@ -467,7 +383,7 @@ parameters: { ### CatalogItem -`Connector:createCatalogItem(parameters): ICatalogItem` +`IConnector:createCatalogItem(parameters): ICatalogItem` ```JS parameters: { @@ -481,7 +397,7 @@ parameters: { } ``` -`Connector:createCatalogItem(parameters): ICatalogItem` +`IConnector:createCatalogItem(parameters): ICatalogItem` ```JS parameters: { @@ -492,7 +408,7 @@ parameters: { ### CustomerCategory -`Connector:createCustomerCategory(parameters): ICustomerCategory` +`IConnector:createCustomerCategory(parameters): ICustomerCategory` ```JS parameters: { @@ -502,7 +418,7 @@ parameters: { } ``` -`Connector:createCustomerCategory(parameters): ICustomerCategory` +`IConnector:createCustomerCategory(parameters): ICustomerCategory` ```JS parameters: { @@ -513,7 +429,7 @@ parameters: { ### Enterprise -`Connector:createEnterprise(parameters): IEnterprise` +`IConnector:createEnterprise(parameters): IEnterprise` ```JS parameters: { @@ -529,7 +445,7 @@ parameters: { } ``` -`Connector:createEnterprise(parameters): IEnterprise` +`IConnector:createEnterprise(parameters): IEnterprise` ```JS parameters: { @@ -540,7 +456,7 @@ parameters: { ### NutrientCharacteristic -`Connector:createNutrientCharacteristic(parameters): INutrientCharacteristic` +`IConnector:createNutrientCharacteristic(parameters): INutrientCharacteristic` ```JS parameters: { @@ -550,7 +466,7 @@ parameters: { } ``` -`Connector:createNutrientCharacteristic(parameters): INutrientCharacteristic` +`IConnector:createNutrientCharacteristic(parameters): INutrientCharacteristic` ```JS parameters: { @@ -560,7 +476,7 @@ parameters: { ### Offer -`Connector:createOffer(parameters): IOffer` +`IConnector:createOffer(parameters): IOffer` ```JS parameters: { @@ -573,7 +489,7 @@ parameters: { } ``` -`Connector:createOffer(parameters): IOffer` +`IConnector:createOffer(parameters): IOffer` ```JS parameters: { @@ -584,7 +500,7 @@ parameters: { ### Order -`Connector:createOrder(parameters): IOrder` +`IConnector:createOrder(parameters): IOrder` ```JS parameters: { @@ -598,7 +514,7 @@ parameters: { } ``` -`Connector:createOrder(parameters): IOrder` +`IConnector:createOrder(parameters): IOrder` ```JS parameters: { @@ -609,7 +525,7 @@ parameters: { ### OrderLine -`Connector:createOrderLine(parameters): IOrderLine` +`IConnector:createOrderLine(parameters): IOrderLine` ```JS parameters: { @@ -622,7 +538,7 @@ parameters: { } ``` -`Connector:createOrderLine(parameters): IOrderLine` +`IConnector:createOrderLine(parameters): IOrderLine` ```JS parameters: { @@ -633,7 +549,7 @@ parameters: { ### Person -`Connector:createPerson(parameters): IPerson` +`IConnector:createPerson(parameters): IPerson` ```JS parameters: { @@ -646,7 +562,7 @@ parameters: { } ``` -`Connector:createPerson(parameters): IPerson` +`IConnector:createPerson(parameters): IPerson` ```JS parameters: { @@ -657,7 +573,7 @@ parameters: { ### PhysicalCharacteristic -`Connector:createPhysicalCharacteristic(parameters): IPhysicalCharacteristic` +`IConnector:createPhysicalCharacteristic(parameters): IPhysicalCharacteristic` ```JS parameters: { @@ -667,7 +583,7 @@ parameters: { } ``` -`Connector:createPhysicalCharacteristic(parameters): IPhysicalCharacteristic` +`IConnector:createPhysicalCharacteristic(parameters): IPhysicalCharacteristic` ```JS parameters: { @@ -675,9 +591,53 @@ parameters: { } ``` +### PlannedConsumptionFlow + +`IConnector:createPlannedConsumptionFlow(parameters);` + +```ts +parameters: { + doNotStore?: boolean, + semanticId?: string, + other?: Semanticable, + quantity?: IQuantity, + transformation?: IPlannedTransformation, + product?: IDefinedProduct +} +``` + +### PlannedProductionFlow +`IConnector:createPlannedProductionFlow(parameters);` + +```ts +parameters: { + doNotStore?: boolean, + semanticId?: string, + other?: Semanticable, + quantity?: IQuantity, + transformation?: IPlannedTransformation, + product?: ISuppliedProduct +} +``` + +### PlannedTransformation + +`IConnector:createPlannedTransformation(parameters);` + +```ts +parameters: { + doNotStore?: boolean, + semanticId?: string, + other?: Semanticable, + transformationType?: ISKOSConcept, + consumptionFlow?: IPlannedConsumptionFlow, + productionFlow?: IPlannedProductionFlow +} +``` + ### Price -`Connector:createPrice(parameters): IPrice` +`IConnector:createPrice(parameters): IPrice` ```JS parameters: { @@ -687,7 +647,7 @@ parameters: { } ``` -`Connector:createPrice(parameters): IPrice` +`IConnector:createPrice(parameters): IPrice` ```JS parameters: { @@ -697,7 +657,7 @@ parameters: { ### Quantity -`Connector:createQuantity(parameters): IQuantity` +`IConnector:createQuantity(parameters): IQuantity` ```JS parameters: { @@ -706,7 +666,7 @@ parameters: { } ``` -`Connector:createQuantity(parameters): IQuantity` +`IConnector:createQuantity(parameters): IQuantity` ```JS parameters: { @@ -716,7 +676,7 @@ parameters: { ### SaleSession -`Connector:createSaleSession(parameters): ISaleSession` +`IConnector:createSaleSession(parameters): ISaleSession` ```JS parameters: { @@ -729,7 +689,7 @@ parameters: { } ``` -`Connector:createSaleSession(parameters): ISaleSession` +`IConnector:createSaleSession(parameters): ISaleSession` ```JS parameters: { @@ -740,7 +700,7 @@ parameters: { ### SuppliedProduct -`Connector:createSuppliedProduct(parameters): ISuppliedProduct` +`IConnector:createSuppliedProduct(parameters): ISuppliedProduct` ```JS parameters: { @@ -766,11 +726,60 @@ parameters: { } ``` -`Connector:createSuppliedProduct(parameters): ISuppliedProduct` +`IConnector:createSuppliedProduct(parameters): ISuppliedProduct` ```JS parameters: { other: ISuppliedProduct, // construct the object by copy doNotStore?: boolean // if true, do not save the object into the connector store } +``` + +## Examples + +### Transformation loop + +This example shows how to create a product case containing 10 pieces: + +```ts +const connector = new Connector(); +await connector.loadMeasures(JSON.stringify(measures)); +await connector.loadVocabulary(JSON.stringify(vocabulary)); + +const piece = connector.MEASURES.UNIT.QUANTITYUNIT.PIECE; + +const inputSuppliedProduct = connector.createSuppliedProduct({ + semanticId: "http://myplatform.com/inputProduct", + description: "Some product" +}); + +const outputSuppliedProduct = connector.createSuppliedProduct({ + semanticId: "http://myplatform.com/caseOfProduct", + description: "Case of 10 products" +}); + +const plannedConsumptionFlow = connector.createPlannedConsumptionFlow({ + semanticId: "http://myplatform.com/plannedConsumptionFlow", + quantity: connector.createQuantity({ + value: 10, + unit: piece + }), + product: inputSuppliedProduct +}) + +const plannedProductionFlow = connector.createPlannedProductionFlow({ + semanticId: "http://myplatform.com/plannedProductionFlow", + quantity: connector.createQuantity({ + value: 1.0, + unit: piece + }), + product: outputSuppliedProduct +}) + +const plannedTransformation = connector.createPlannedTransformation({ + semanticId: "http://myplatform.com/transformation", + transformationType: connector.VOCABULARY.TRANSFORMATIONTYPE.COMBINES, + consumptionFlows: [plannedConsumptionFlow], + productionFlows: [plannedProductionFlow] +}); ``` \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..fed9b24 --- /dev/null +++ b/index.js @@ -0,0 +1,17 @@ +import Address from './lib/Address.js'; +import Connector from "./lib/Connector.js"; + +const connector = new Connector(); + +const address = new Address({ + connector: connector, + semanticId: "http://myplatform.com/address/address1", + street: "1, place or Europe", + postalCode: "00001", + city: "Brussels", + country: "Belgium", +}); + +connector.export([address]).then((e) => console.log(e)); + +//console.log(address.toRdfDatasetExt()); \ No newline at end of file diff --git a/lib/Address.d.ts b/lib/Address.d.ts index 8a679ed..7512c81 100644 --- a/lib/Address.d.ts +++ b/lib/Address.d.ts @@ -12,15 +12,24 @@ export default class Address extends SemanticObject implements IAddress { postalCode?: string; city?: string; country?: string; + latitude?: number; + longitude?: number; + region?: string; doNotStore?: boolean; }); + getCountry(): string | undefined; + getCity(): string | undefined; + setLatitude(latitude: number): void; + getStreet(): string | undefined; + setPostalCode(postalCode: string): void; + getLongitude(): number | undefined; + getRegion(): string | undefined; setCountry(country: string): void; + getLatitude(): number | undefined; setStreet(street: string): void; + setLongitude(longitude: number): void; + getPostalCode(): string | undefined; + setRegion(region: string): void; setCity(city: string): void; - getCountry(): string; - setPostalCode(postalCode: string): void; - getPostalCode(): string; - getCity(): string; - getStreet(): string; } //# sourceMappingURL=Address.d.ts.map \ No newline at end of file diff --git a/lib/Address.d.ts.map b/lib/Address.d.ts.map index 8fafa5b..7e3dc36 100644 --- a/lib/Address.d.ts.map +++ b/lib/Address.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../src/Address.ts"],"names":[],"mappings":"AAwBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAe,YAAW,QAAQ;IAEtE,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAC;IAqBvL,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMjC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAM/B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM3B,UAAU,IAAI,MAAM;IAMpB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAMvC,aAAa,IAAI,MAAM;IAMvB,OAAO,IAAI,MAAM;IAMjB,SAAS,IAAI,MAAM;CAM1B"} \ No newline at end of file +{"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../src/Address.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC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644 --- a/lib/Address.js +++ b/lib/Address.js @@ -1,76 +1,91 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ import { SemanticObject } from "@virtual-assembly/semantizer"; +const ADDRESS_SEM_TYPE = "dfc-b:Address"; export default class Address extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Address"; + const type = ADDRESS_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.street) + } + if (parameters.street) { this.setStreet(parameters.street); - if (parameters.postalCode) + } + if (parameters.postalCode) { this.setPostalCode(parameters.postalCode); - if (parameters.city) + } + if (parameters.city) { this.setCity(parameters.city); - if (parameters.country) + } + if (parameters.country) { this.setCountry(parameters.country); + } + if (parameters.latitude || parameters.latitude === 0) { + this.setLatitude(parameters.latitude); + } + if (parameters.longitude || parameters.longitude === 0) { + this.setLongitude(parameters.longitude); + } + if (parameters.region) { + this.setRegion(parameters.region); + } } - setCountry(country) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCountry"; - this.setSemanticPropertyLiteral(property, country); + getCountry() { + return this.getSemanticProperty("dfc-b:hasCountry"); } - setStreet(street) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasStreet"; - this.setSemanticPropertyLiteral(property, street); + getCity() { + return this.getSemanticProperty("dfc-b:hasCity"); } - setCity(city) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCity"; - this.setSemanticPropertyLiteral(property, city); + setLatitude(latitude) { + this.setSemanticPropertyLiteral("dfc-b:latitude", latitude); } - getCountry() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCountry"); + getStreet() { + return this.getSemanticProperty("dfc-b:hasStreet"); } setPostalCode(postalCode) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPostalCode"; - this.setSemanticPropertyLiteral(property, postalCode); + this.setSemanticPropertyLiteral("dfc-b:hasPostalCode", postalCode); + } + getLongitude() { + return Number(this.getSemanticProperty("dfc-b:longitude")); + } + getRegion() { + return this.getSemanticProperty("dfc-b:region"); + } + setCountry(country) { + this.setSemanticPropertyLiteral("dfc-b:hasCountry", country); + } + getLatitude() { + return Number(this.getSemanticProperty("dfc-b:latitude")); + } + setStreet(street) { + this.setSemanticPropertyLiteral("dfc-b:hasStreet", street); + } + setLongitude(longitude) { + this.setSemanticPropertyLiteral("dfc-b:longitude", longitude); } getPostalCode() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPostalCode"); + return this.getSemanticProperty("dfc-b:hasPostalCode"); } - getCity() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCity"); + setRegion(region) { + this.setSemanticPropertyLiteral("dfc-b:region", region); } - getStreet() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasStreet"); + setCity(city) { + this.setSemanticPropertyLiteral("dfc-b:hasCity", city); } } //# sourceMappingURL=Address.js.map \ No newline at end of file diff --git a/lib/Address.js.map b/lib/Address.js.map index b405315..71eeb2a 100644 --- a/lib/Address.js.map +++ b/lib/Address.js.map @@ -1 +1 @@ -{"version":3,"file":"Address.js","sourceRoot":"","sources":["../src/Address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAGF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;IAIlD,YAAmB,UAA2K;QAC7L,MAAM,IAAI,GAAW,0GAA0G,CAAC;QAEhI,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,UAA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C,IAAI,CAAC,0BAA0B,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC;IAEM,YAAY;QAClB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC5D,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACjD,CAAC;IAEM,UAAU,CAAC,OAAe;QAChC,IAAI,CAAC,0BAA0B,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAEM,WAAW;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,0BAA0B,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAEM,YAAY,CAAC,SAAiB;QACpC,IAAI,CAAC,0BAA0B,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAEM,aAAa;QACnB,OAAO,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;IACxD,CAAC;IAEM,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,0BAA0B,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAEM,OAAO,CAAC,IAAY;QAC1B,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;CACD"} \ No newline at end of file diff --git a/lib/AddressOwner.d.ts b/lib/AddressOwner.d.ts new file mode 100644 index 0000000..475983c --- /dev/null +++ b/lib/AddressOwner.d.ts @@ -0,0 +1,7 @@ +import IAddress from "./IAddress.js"; +import ContactableByAddress from "./ContactableByAddress.js"; +export default interface AddressOwner extends ContactableByAddress { + addLocalization(localization: IAddress): void; + removeLocalization(localization: IAddress): void; +} +//# sourceMappingURL=AddressOwner.d.ts.map \ No newline at end of file diff --git a/lib/AddressOwner.d.ts.map b/lib/AddressOwner.d.ts.map new file mode 100644 index 0000000..a974567 --- /dev/null +++ b/lib/AddressOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AddressOwner.d.ts","sourceRoot":"","sources":["../src/AddressOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,oBAAoB,MAAM,2BAA2B,CAAA;AAI5D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,oBAAoB;IAEjE,eAAe,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE9C,kBAAkB,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;CAEjD"} \ No newline at end of file diff --git a/lib/AddressOwner.js b/lib/AddressOwner.js new file mode 100644 index 0000000..a400f95 --- /dev/null +++ b/lib/AddressOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=AddressOwner.js.map \ No newline at end of file diff --git a/lib/AddressOwner.js.map b/lib/AddressOwner.js.map new file mode 100644 index 0000000..46a3bb2 --- /dev/null +++ b/lib/AddressOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AddressOwner.js","sourceRoot":"","sources":["../src/AddressOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/Affiliable.d.ts b/lib/Affiliable.d.ts index 1b13a71..3ba8e52 100644 --- a/lib/Affiliable.d.ts +++ b/lib/Affiliable.d.ts @@ -1,6 +1,6 @@ import IEnterprise from "./IEnterprise.js"; export default interface Affiliable { - getAffiliatedOrganizations(): Promise>; + getAffiliatedOrganizations(): Promise; affiliateTo(organization: IEnterprise): void; leaveAffiliatedOrganization(organization: IEnterprise): void; } diff --git a/lib/Affiliable.d.ts.map b/lib/Affiliable.d.ts.map index a1c55fb..2945900 100644 --- a/lib/Affiliable.d.ts.map +++ b/lib/Affiliable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Affiliable.d.ts","sourceRoot":"","sources":["../src/Affiliable.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,0BAA0B,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACxD;IACD,WAAW,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7C,2BAA2B,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;CAE7D"} \ No newline at end of file +{"version":3,"file":"Affiliable.d.ts","sourceRoot":"","sources":["../src/Affiliable.ts"],"names":[],"mappings":"AAuBA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,0BAA0B,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAErD,WAAW,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IAE7C,2BAA2B,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;CAE7D"} \ No newline at end of file diff --git a/lib/Agent.d.ts b/lib/Agent.d.ts index 55554b5..e88a0d6 100644 --- a/lib/Agent.d.ts +++ b/lib/Agent.d.ts @@ -1,3 +1,5 @@ +import ISocialMedia from "./ISocialMedia.js"; +import IPhoneNumber from "./IPhoneNumber.js"; import IAddress from "./IAddress.js"; import IAgent from "./IAgent.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; @@ -12,9 +14,29 @@ export default abstract class Agent extends SemanticObject implements IAgent { semanticType?: string; other?: Semanticable; localizations?: IAddress[]; + phoneNumbers?: IPhoneNumber[]; + emails?: string[]; + websites?: string[]; + socialMedias?: ISocialMedia[]; + logo?: string; + doNotStore?: boolean; }); + removePhoneNumber(phoneNumber: IPhoneNumber): void; + getWebsites(): string[]; + addWebsite(website: string): void; + removeWebsite(website: string): void; + getLogo(): string | undefined; + setLogo(logo: string): void; + removeEmailAddress(emailAddress: string): void; addLocalization(localization: IAddress): void; + removeSocialMedia(socialMedia: ISocialMedia): void; + addPhoneNumber(phoneNumber: IPhoneNumber): void; + getEmails(): string[]; + getPhoneNumbers(options?: IGetterOptions): Promise; + addSocialMedia(socialMedia: ISocialMedia): void; removeLocalization(localization: IAddress): void; - getLocalizations(options?: IGetterOptions): Promise>; + getSocialMedias(options?: IGetterOptions): Promise; + addEmailAddress(emailAddress: string): void; + getLocalizations(options?: IGetterOptions): Promise; } //# sourceMappingURL=Agent.d.ts.map \ No newline at end of file diff --git a/lib/Agent.d.ts.map b/lib/Agent.d.ts.map index 8f9819c..72b27a0 100644 --- a/lib/Agent.d.ts.map +++ b/lib/Agent.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../src/Agent.ts"],"names":[],"mappings":"AAwBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,KAAM,SAAQ,cAAe,YAAW,MAAM;IAE3E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;IAEhC,SAAS,aAAa,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAA;KAAC;IAUhJ,eAAe,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI;IAY7C,kBAAkB,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI;IAK1C,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,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C,OAAO,IAAI,MAAM,GAAG,SAAS;IAI7B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI3B,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAI9C,eAAe,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI;IAU7C,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;IAIlD,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;IAU/C,SAAS,IAAI,MAAM,EAAE;IAIf,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUxE,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;IAU/C,kBAAkB,CAAC,YAAY,EAAE,QAAQ,GAAG,IAAI;IAI1C,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUxE,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAIrC,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;CAS5E"} \ No newline at end of file diff --git a/lib/Agent.js b/lib/Agent.js index 3a9f1f7..457bbfb 100644 --- a/lib/Agent.js +++ b/lib/Agent.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -40,32 +17,90 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { import { SemanticObject } from "@virtual-assembly/semantizer"; export default class Agent extends SemanticObject { constructor(parameters) { - if (parameters.other) - super({ semanticId: parameters.semanticId, other: parameters.other }); - else - super({ semanticId: parameters.semanticId, semanticType: parameters.semanticType }); + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + } + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: parameters.semanticType, + }); + } this.connector = parameters.connector; - if (parameters.localizations) + if (parameters.localizations) { parameters.localizations.forEach(e => this.addLocalization(e)); + } + if (parameters.phoneNumbers) { + parameters.phoneNumbers.forEach(e => this.addPhoneNumber(e)); + } + if (parameters.emails) { + parameters.emails.forEach(e => this.addEmailAddress(e)); + } + if (parameters.websites) { + parameters.websites.forEach(e => this.addWebsite(e)); + } + if (parameters.socialMedias) { + parameters.socialMedias.forEach(e => this.addSocialMedia(e)); + } + if (parameters.logo) { + this.setLogo(parameters.logo); + } + } + removePhoneNumber(phoneNumber) { + throw new Error("Not yet implemented."); + } + getWebsites() { + return this.getSemanticPropertyAll("dfc-b:websitePage"); + } + addWebsite(website) { + this.addSemanticPropertyLiteral("dfc-b:websitePage", website); + } + removeWebsite(website) { + throw new Error("Not yet implemented."); + } + getLogo() { + return this.getSemanticProperty("dfc-b:logo"); + } + setLogo(logo) { + this.setSemanticPropertyLiteral("dfc-b:logo", logo); + } + removeEmailAddress(emailAddress) { + throw new Error("Not yet implemented."); } addLocalization(localization) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAddress"; if (localization.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, localization); + this.addSemanticPropertyAnonymous("dfc-b:hasAddress", localization); } else { this.connector.store(localization); - this.addSemanticPropertyReference(property, localization); + this.addSemanticPropertyReference("dfc-b:hasAddress", localization); } } - removeLocalization(localization) { + removeSocialMedia(socialMedia) { throw new Error("Not yet implemented."); } - getLocalizations(options) { + addPhoneNumber(phoneNumber) { + if (phoneNumber.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPhoneNumber", phoneNumber); + } + else { + this.connector.store(phoneNumber); + this.addSemanticPropertyReference("dfc-b:hasPhoneNumber", phoneNumber); + } + } + getEmails() { + return this.getSemanticPropertyAll("dfc-b:email"); + } + getPhoneNumbers(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAddress"); + const properties = this.getSemanticPropertyAll("dfc-b:hasPhoneNumber"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -91,5 +126,80 @@ export default class Agent extends SemanticObject { return results; }); } + addSocialMedia(socialMedia) { + if (socialMedia.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasSocialMedia", socialMedia); + } + else { + this.connector.store(socialMedia); + this.addSemanticPropertyReference("dfc-b:hasSocialMedia", socialMedia); + } + } + removeLocalization(localization) { + throw new Error("Not yet implemented."); + } + getSocialMedias(options) { + var _a, e_2, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasSocialMedia"); + try { + for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { + _c = properties_2_1.value; + _d = false; + try { + const semanticId = _c; + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + results.push(semanticObject); + } + finally { + _d = true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (!_d && !_a && (_b = properties_2.return)) yield _b.call(properties_2); + } + finally { if (e_2) throw e_2.error; } + } + return results; + }); + } + addEmailAddress(emailAddress) { + this.addSemanticPropertyLiteral("dfc-b:email", emailAddress); + } + getLocalizations(options) { + var _a, e_3, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasAddress"); + try { + for (var _d = true, properties_3 = __asyncValues(properties), properties_3_1; properties_3_1 = yield properties_3.next(), _a = properties_3_1.done, !_a;) { + _c = properties_3_1.value; + _d = false; + try { + const semanticId = _c; + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + results.push(semanticObject); + } + finally { + _d = true; + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (!_d && !_a && (_b = properties_3.return)) yield _b.call(properties_3); + } + finally { if (e_3) throw e_3.error; } + } + return results; + }); + } } //# sourceMappingURL=Agent.js.map \ No newline at end of file diff --git a/lib/Agent.js.map b/lib/Agent.js.map index 35c945c..6b0b733 100644 --- a/lib/Agent.js.map +++ b/lib/Agent.js.map @@ -1 +1 @@ -{"version":3,"file":"Agent.js","sourceRoot":"","sources":["../src/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAIF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAgB,KAAM,SAAQ,cAAc;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I,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAW,cAAc,CAAC,CAAC;;;;;iBAC3D;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;CACD"} \ No newline at end of file diff --git a/lib/AllergenCharacteristic.d.ts b/lib/AllergenCharacteristic.d.ts index db47d0b..ad01303 100644 --- a/lib/AllergenCharacteristic.d.ts +++ b/lib/AllergenCharacteristic.d.ts @@ -1,8 +1,6 @@ -import ICharacteristicDimension from "./ICharacteristicDimension.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IAllergenDimension from "./IAllergenDimension.js"; import Characteristic from "./Characteristic.js"; -import IUnit from "./IUnit.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; @@ -12,11 +10,11 @@ export default class AllergenCharacteristic extends Characteristic implements IA semanticId?: string; semanticType?: string; other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - allergenDimension?: IAllergenDimension; + allergenDimension?: ISKOSConcept; }); - getQuantityDimension(options?: IGetterOptions): Promise; - setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + getQuantityDimension(options?: IGetterOptions): Promise; + setQuantityDimension(quantityDimension: ISKOSConcept): void; } //# sourceMappingURL=AllergenCharacteristic.d.ts.map \ No newline at end of file diff --git a/lib/AllergenCharacteristic.d.ts.map b/lib/AllergenCharacteristic.d.ts.map index 66bcde5..36bbd3a 100644 --- a/lib/AllergenCharacteristic.d.ts.map +++ b/lib/AllergenCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"AllergenCharacteristic.d.ts","sourceRoot":"","sources":["../src/AllergenCharacteristic.ts"],"names":[],"mappings":"AAwBA,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AACpE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,cAAc,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AK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,YAAY,CAAC;KACjC;IA6BY,oBAAoB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUvF,oBAAoB,CAAC,iBAAiB,EAAE,YAAY,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/lib/AllergenCharacteristic.js b/lib/AllergenCharacteristic.js index a4580fd..f325743 100644 --- a/lib/AllergenCharacteristic.js +++ b/lib/AllergenCharacteristic.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,23 +8,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import Characteristic from "./Characteristic.js"; +const ALLERGEN_CHARACTERISTIC_SEM_TYPE = "dfc-b:AllergenCharacteristic"; export default class AllergenCharacteristic extends Characteristic { constructor(parameters) { - const type = parameters.semanticType ? parameters.semanticType : "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#AllergenCharacteristic"; + const type = parameters.semanticType ? parameters.semanticType : ALLERGEN_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, unit: parameters.unit, value: parameters.value }); - if (parameters.allergenDimension) + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: type, + unit: parameters.unit, + value: parameters.value + }); + } + if (parameters.allergenDimension) { this.setQuantityDimension(parameters.allergenDimension); + } } getQuantityDimension(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenDimension"); + const semanticId = this.getSemanticProperty("dfc-b:hasAllergenDimension"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -57,8 +47,7 @@ export default class AllergenCharacteristic extends Characteristic { }); } setQuantityDimension(quantityDimension) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + this.setSemanticPropertyReference("dfc-b:hasAllergenDimension", quantityDimension); this.connector.store(quantityDimension); } } diff --git a/lib/AllergenCharacteristic.js.map b/lib/AllergenCharacteristic.js.map index 22f7bcd..1e6c727 100644 --- a/lib/AllergenCharacteristic.js.map +++ b/lib/AllergenCharacteristic.js.map @@ -1 +1 @@ -{"version":3,"file":"AllergenCharacteristic.js","sourceRoot":"","sources":["../src/AllergenCharacteristic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAKF,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAOhD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAc;IAGjE,YAAmB,UAA2K;QAC7L,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,yHAAyH,CAAC;QAEjM,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,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;QAKxJ,IAAI,UAAU,CAAC,iBAAiB;YAAE,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC3F,CAAC;IAEY,oBAAoB,CAAC,OAAwB;;YAEzD,IAAI,MAAM,GAAyC,SAAS,CAAC;YAC7D,MAAM,UAAU,GA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AC,CAAC;SACvJ;aAAM;YACN,KAAK,CAAC;gBACL,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,YAAY,EAAE,IAAI;gBAClB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;SACF;QAGD,IAAI,UAAU,CAAC,iBAAiB,EAAE;YACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;SACxD;IAEF,CAAC;IAEY,oBAAoB,CAAC,OAAwB;;YACzD,IAAI,MAAM,GAA6B,SAAS,CAAC;YACjD,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;YAC1E,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAAkB,cAAc,CAAC;aAC3D;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,oBAAoB,CAAC,iBAA+B;QAC1D,IAAI,CAAC,4BAA4B,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;QAEnF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Browsable.d.ts b/lib/Browsable.d.ts index 03348a1..6885a49 100644 --- a/lib/Browsable.d.ts +++ b/lib/Browsable.d.ts @@ -1,8 +1,8 @@ import ICatalogItem from "./ICatalogItem.js"; import IEnterprise from "./IEnterprise.js"; export default interface Browsable { - getMaintainers(): Promise>; - getItems(): Promise>; + getMaintainers(): Promise; + getItems(): Promise; removeItem(item: ICatalogItem): void; addItem(item: ICatalogItem): void; addMaintainer(maintainer: IEnterprise): void; diff --git a/lib/Browsable.d.ts.map b/lib/Browsable.d.ts.map index f6791a5..f152bf4 100644 --- a/lib/Browsable.d.ts.map +++ b/lib/Browsable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Browsable.d.ts","sourceRoot":"","sources":["../src/Browsable.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAC5C;IACD,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CACvC;IACD,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IACrC,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,aAAa,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAE7C"} \ No newline at end of file +{"version":3,"file":"Browsable.d.ts","sourceRoot":"","sources":["../src/Browsable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,cAAc,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEzC,QAAQ,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEpC,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAErC,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAElC,aAAa,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;CAE7C"} \ No newline at end of file diff --git a/lib/Buyable.d.ts.map b/lib/Buyable.d.ts.map index 7b46c8e..97a8e79 100644 --- a/lib/Buyable.d.ts.map +++ b/lib/Buyable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Buyable.d.ts","sourceRoot":"","sources":["../src/Buyable.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAIxC,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,eAAe,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CACjD;CAED"} \ No newline at end of file +{"version":3,"file":"Buyable.d.ts","sourceRoot":"","sources":["../src/Buyable.ts"],"names":[],"mappings":"AAuBA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAIxC,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,eAAe,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CAEnD"} \ No newline at end of file diff --git a/lib/Catalog.d.ts b/lib/Catalog.d.ts index 9664675..8367a6b 100644 --- a/lib/Catalog.d.ts +++ b/lib/Catalog.d.ts @@ -1,6 +1,6 @@ -import IEnterprise from "./IEnterprise.js"; -import ICatalog from "./ICatalog.js"; import ICatalogItem from "./ICatalogItem.js"; +import ICatalog from "./ICatalog.js"; +import IEnterprise from "./IEnterprise.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -15,10 +15,10 @@ export default class Catalog extends SemanticObject implements ICatalog { items?: ICatalogItem[]; doNotStore?: boolean; }); - getItems(options?: IGetterOptions): Promise>; + getItems(options?: IGetterOptions): Promise; addMaintainer(maintainer: IEnterprise): void; - removeItem(item: ICatalogItem): void; - getMaintainers(options?: IGetterOptions): Promise>; addItem(item: ICatalogItem): void; + removeItem(item: ICatalogItem): void; + getMaintainers(options?: IGetterOptions): Promise; } //# sourceMappingURL=Catalog.d.ts.map \ No newline at end of file diff --git a/lib/Catalog.d.ts.map b/lib/Catalog.d.ts.map index ea0e1bc..5388c1e 100644 --- a/lib/Catalog.d.ts.map +++ b/lib/Catalog.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Catalog.d.ts","sourceRoot":"","sources":["../src/Catalog.ts"],"names":[],"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AAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAe,YAAW,QAAQ;IAEtE,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;QAC5B,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;QACvB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAoCY,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUjE,aAAa,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAU5C,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAUjC,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAI9B,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAS7E"} \ No newline at end of file diff --git a/lib/Catalog.js b/lib/Catalog.js index e878114..2a52ba2 100644 --- a/lib/Catalog.js +++ b/lib/Catalog.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,29 +15,42 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const CATALOG_SEM_TYPE = "dfc-b:Catalog"; export default class Catalog extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Catalog"; + const type = CATALOG_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.maintainers) + } + if (parameters.maintainers) { parameters.maintainers.forEach(e => this.addMaintainer(e)); - if (parameters.items) + } + if (parameters.items) { parameters.items.forEach(e => this.addItem(e)); + } } getItems(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"); + const properties = this.getSemanticPropertyAll("dfc-b:lists"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -87,13 +77,21 @@ export default class Catalog extends SemanticObject { }); } addMaintainer(maintainer) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintainedBy"; if (maintainer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, maintainer); + this.addSemanticPropertyAnonymous("dfc-b:maintainedBy", maintainer); } else { this.connector.store(maintainer); - this.addSemanticPropertyReference(property, maintainer); + this.addSemanticPropertyReference("dfc-b:maintainedBy", maintainer); + } + } + addItem(item) { + if (item.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:lists", item); + } + else { + this.connector.store(item); + this.addSemanticPropertyReference("dfc-b:lists", item); } } removeItem(item) { @@ -103,7 +101,7 @@ export default class Catalog extends SemanticObject { var _a, e_2, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintainedBy"); + const properties = this.getSemanticPropertyAll("dfc-b:maintainedBy"); try { for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { _c = properties_2_1.value; @@ -129,15 +127,5 @@ export default class Catalog extends SemanticObject { return results; }); } - addItem(item) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"; - if (item.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, item); - } - else { - this.connector.store(item); - this.addSemanticPropertyReference(property, item); - } - } } //# sourceMappingURL=Catalog.js.map \ No newline at end of file diff --git a/lib/Catalog.js.map b/lib/Catalog.js.map index c391a9a..85623f6 100644 --- a/lib/Catalog.js.map +++ b/lib/Catalog.js.map @@ -1 +1 @@ -{"version":3,"file":"Catalog.js","sourceRoot":"","sources":["../src/Catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAMF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;IAIlD,YAAmB,UAAyJ;QAC3K,MAAM,IAAI,GAAW,0GAA0G,CAAC;QAEhI,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvE,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,CAAC,UAAU,CAAC,UAAU;YACzB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,UAAU,CAAC,WAAW;YAAE,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACvF,IAAI,UAAU,CAAC,K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ib/CatalogItem.d.ts +++ b/lib/CatalogItem.d.ts @@ -1,7 +1,7 @@ +import ICatalogItem from "./ICatalogItem.js"; +import IDefinedProduct from "./IDefinedProduct.js"; import ICatalog from "./ICatalog.js"; import IOffer from "./IOffer.js"; -import IDefinedProduct from "./IDefinedProduct.js"; -import ICatalogItem from "./ICatalogItem.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -19,15 +19,15 @@ export default class CatalogItem extends SemanticObject implements ICatalogItem catalogs?: ICatalog[]; doNotStore?: boolean; }); - registerInCatalog(repository: ICatalog): void; - getCatalogs(options?: IGetterOptions): Promise>; - setOfferedProduct(offeredProduct: IDefinedProduct): void; - getOfferers(options?: IGetterOptions): Promise>; getOfferedProduct(options?: IGetterOptions): Promise; + getSku(): string | undefined; addOffer(offer: IOffer): void; - setStockLimitation(stockLimitation: number): void; - getStockLimitation(): number; - getSku(): string; + registerInCatalog(repository: ICatalog): void; + getCatalogs(options?: IGetterOptions): Promise; + getStockLimitation(): number | undefined; setSku(sku: string): void; + setStockLimitation(stockLimitation: number): void; + getOfferers(options?: IGetterOptions): Promise; + setOfferedProduct(offeredProduct: IDefinedProduct): void; } //# sourceMappingURL=CatalogItem.d.ts.map \ No newline at end of file diff --git a/lib/CatalogItem.d.ts.map b/lib/CatalogItem.d.ts.map index 3f1a559..834687c 100644 --- a/lib/CatalogItem.d.ts.map +++ b/lib/CatalogItem.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"CatalogItem.d.ts","sourceRoot":"","sources":["../src/CatalogItem.ts"],"names":[],"mappings":"AAwBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,E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B,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI;IAI3C,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAU9D,iBAAiB,CAAC,cAAc,EAAE,eAAe,GAAG,IAAI;CAK/D"} \ No newline at end of file diff --git a/lib/CatalogItem.js b/lib/CatalogItem.js index 8a7c2d9..8d72fbd 100644 --- a/lib/CatalogItem.js +++ b/lib/CatalogItem.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,45 +15,84 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const CATALOG_ITEM_SEM_TYPE = "dfc-b:CatalogItem"; export default class CatalogItem extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CatalogItem"; + const type = CATALOG_ITEM_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.product) + } + if (parameters.product) { this.setOfferedProduct(parameters.product); - if (parameters.sku) + } + if (parameters.sku) { this.setSku(parameters.sku); - if (parameters.stockLimitation || parameters.stockLimitation === 0) + } + if (parameters.stockLimitation || parameters.stockLimitation === 0) { this.setStockLimitation(parameters.stockLimitation); - if (parameters.offers) + } + if (parameters.offers) { parameters.offers.forEach(e => this.addOffer(e)); - if (parameters.catalogs) + } + if (parameters.catalogs) { parameters.catalogs.forEach(e => this.registerInCatalog(e)); + } + } + getOfferedProduct(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:references"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + getSku() { + return this.getSemanticProperty("dfc-b:sku"); + } + addOffer(offer) { + if (offer.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:offeredThrough", offer); + } + else { + this.connector.store(offer); + this.addSemanticPropertyReference("dfc-b:offeredThrough", offer); + } } registerInCatalog(repository) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#listedIn"; if (repository.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, repository); + this.addSemanticPropertyAnonymous("dfc-b:listedIn", repository); } else { this.connector.store(repository); - this.addSemanticPropertyReference(property, repository); + this.addSemanticPropertyReference("dfc-b:listedIn", repository); } } getCatalogs(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#listedIn"); + const properties = this.getSemanticPropertyAll("dfc-b:listedIn"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -102,16 +118,20 @@ export default class CatalogItem extends SemanticObject { return results; }); } - setOfferedProduct(offeredProduct) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#references"; - this.setSemanticPropertyReference(property, offeredProduct); - this.connector.store(offeredProduct); + getStockLimitation() { + return Number(this.getSemanticProperty("dfc-b:stockLimitation")); + } + setSku(sku) { + this.setSemanticPropertyLiteral("dfc-b:sku", sku); + } + setStockLimitation(stockLimitation) { + this.setSemanticPropertyLiteral("dfc-b:stockLimitation", stockLimitation); } getOfferers(options) { var _a, e_2, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredThrough"); + const properties = this.getSemanticPropertyAll("dfc-b:offeredThrough"); try { for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { _c = properties_2_1.value; @@ -137,41 +157,9 @@ export default class CatalogItem extends SemanticObject { return results; }); } - getOfferedProduct(options) { - return __awaiter(this, void 0, void 0, function* () { - let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#references"); - if (semanticId) { - const semanticObject = yield this.connector.fetch(semanticId, options); - if (semanticObject) - result = semanticObject; - } - return result; - }); - } - addOffer(offer) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredThrough"; - if (offer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, offer); - } - else { - this.connector.store(offer); - this.addSemanticPropertyReference(property, offer); - } - } - setStockLimitation(stockLimitation) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation"; - this.setSemanticPropertyLiteral(property, stockLimitation); - } - getStockLimitation() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation")); - } - getSku() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#sku"); - } - setSku(sku) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#sku"; - this.setSemanticPropertyLiteral(property, sku); + setOfferedProduct(offeredProduct) { + this.setSemanticPropertyReference("dfc-b:references", offeredProduct); + this.connector.store(offeredProduct); } } //# sourceMappingURL=CatalogItem.js.map \ No newline at end of file diff --git a/lib/CatalogItem.js.map b/lib/CatalogItem.js.map index 9c706f1..9542bf3 100644 --- a/lib/CatalogItem.js.map +++ b/lib/CatalogItem.js.map @@ -1 +1 @@ -{"version":3,"file":"CatalogItem.js","sourceRoot":"","sources":["../src/CatalogItem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAMF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IAItD,YAAmB,UAAiN;QACnO,MAAM,IAAI,GAAW,8GAA8G,CAAC;QAEpI,IAAI,UAAU,CAAC,KA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C;IAEY,WAAW,CAAC,OAAwB;;;YAChD,MAAM,OAAO,GAAG,IAAI,KAAK,EAAU,CAAC;YACpC,MAAM,UAAU,GAAG,IAAI,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,CAAC;;gBACvE,KAA+B,eAAA,eAAA,cAAA,UAAU,CAAA,gBAAA;oBAAV,0BAAU;oBAAV,WAAU;;wBAA9B,MAAM,UAAU,KAAA,CAAA;wBAC1B,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACjG,IAAI,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAS,cAAc,CAAC,CAAC;;;;;iBACzD;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;IAEM,iBAAiB,CAAC,cAA+B;QACvD,IAAI,CAAC,4BAA4B,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;QAEtE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/CatalogItemManager.d.ts b/lib/CatalogItemManager.d.ts index d8d2cf2..91dca5c 100644 --- a/lib/CatalogItemManager.d.ts +++ b/lib/CatalogItemManager.d.ts @@ -1,6 +1,6 @@ import ICatalogItem from "./ICatalogItem.js"; export default interface CatalogItemManager { - getManagedCatalogItems(): Promise>; + getManagedCatalogItems(): Promise; manageCatalogItem(catalogItem: ICatalogItem): void; unmanageCatalogItem(catalogItem: ICatalogItem): void; } diff --git a/lib/CatalogItemManager.d.ts.map b/lib/CatalogItemManager.d.ts.map index 770ee39..08c3599 100644 --- a/lib/CatalogItemManager.d.ts.map +++ b/lib/CatalogItemManager.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"CatalogItemManager.d.ts","sourceRoot":"","sources":["../src/CatalogItemManager.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,kBAAkB;IAE1C,sBAAsB,IAAI,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CACrD;IACD,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IACnD,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAErD"} \ No newline at end of file +{"version":3,"file":"CatalogItemManager.d.ts","sourceRoot":"","sources":["../src/CatalogItemManager.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,kBAAkB;IAE1C,sBAAsB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAElD,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAEnD,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAErD"} \ No newline at end of file diff --git a/lib/CatalogMaintainer.d.ts b/lib/CatalogMaintainer.d.ts index bcca93a..0829c26 100644 --- a/lib/CatalogMaintainer.d.ts +++ b/lib/CatalogMaintainer.d.ts @@ -1,6 +1,6 @@ import ICatalog from "./ICatalog.js"; export default interface CatalogMaintainer { - getMaintainedCatalogs(): Promise>; + getMaintainedCatalogs(): Promise; maintainCatalog(catalog: ICatalog): void; unmaintainCatalog(catalog: ICatalog): void; } diff --git a/lib/CatalogMaintainer.d.ts.map b/lib/CatalogMaintainer.d.ts.map index 7c4da03..47e2eb4 100644 --- a/lib/CatalogMaintainer.d.ts.map +++ b/lib/CatalogMaintainer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"CatalogMaintainer.d.ts","sourceRoot":"","sources":["../src/CatalogMaintainer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,WAAW,iBAAiB;IAEzC,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAChD;IACD,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;CAE3C"} \ No newline at end of file +{"version":3,"file":"CatalogMaintainer.d.ts","sourceRoot":"","sources":["../src/CatalogMaintainer.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,WAAW,iBAAiB;IAEzC,qBAAqB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE7C,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEzC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;CAE3C"} \ No newline at end of file diff --git a/lib/Catalogable.d.ts b/lib/Catalogable.d.ts index 0096cd0..ecfcdae 100644 --- a/lib/Catalogable.d.ts +++ b/lib/Catalogable.d.ts @@ -1,6 +1,6 @@ import ICatalog from "./ICatalog.js"; export default interface Catalogable { - getCatalogs(): Promise>; + getCatalogs(): Promise; registerInCatalog(repository: ICatalog): void; } //# sourceMappingURL=Catalogable.d.ts.map \ No newline at end of file diff --git a/lib/Catalogable.d.ts.map b/lib/Catalogable.d.ts.map index 402246d..65d27bf 100644 --- a/lib/Catalogable.d.ts.map +++ b/lib/Catalogable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Catalogable.d.ts","sourceRoot":"","sources":["../src/Catalogable.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CACtC;IACD,iBAAiB,CAAC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;CAE9C"} \ No newline at end of file +{"version":3,"file":"Catalogable.d.ts","sourceRoot":"","sources":["../src/Catalogable.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,WAAW,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnC,iBAAiB,CAAC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;CAE9C"} \ No newline at end of file diff --git a/lib/Certifiable.d.ts b/lib/Certifiable.d.ts index 5e70db0..2801831 100644 --- a/lib/Certifiable.d.ts +++ b/lib/Certifiable.d.ts @@ -1,7 +1,7 @@ -import ICertification from "./ICertification.js"; +import ISKOSConcept from "./ISKOSConcept.js"; export default interface Certifiable { - addCertification(certification: ICertification): void; - getCertifications(): Promise>; - removeCertification(certification: ICertification): void; + addCertification(certification: ISKOSConcept): void; + getCertifications(): Promise; + removeCertification(certification: ISKOSConcept): void; } //# sourceMappingURL=Certifiable.d.ts.map \ No newline at end of file diff --git a/lib/Certifiable.d.ts.map b/lib/Certifiable.d.ts.map index 36584cd..8be9eb8 100644 --- a/lib/Certifiable.d.ts.map +++ b/lib/Certifiable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Certifiable.d.ts","sourceRoot":"","sources":["../src/Certifiable.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAIhD,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,gBAAgB,CAAC,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACtD,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAClD;IACD,mBAAmB,CAAC,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;CAEzD"} \ No newline at end of file +{"version":3,"file":"Certifiable.d.ts","sourceRoot":"","sources":["../src/Certifiable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,gBAAgB,CAAC,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;IAEpD,iBAAiB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE7C,mBAAmB,CAAC,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;CAEvD"} \ No newline at end of file diff --git a/lib/Characteristic.d.ts b/lib/Characteristic.d.ts index 654a497..f0e6bf5 100644 --- a/lib/Characteristic.d.ts +++ b/lib/Characteristic.d.ts @@ -1,19 +1,19 @@ +import ISKOSConcept from "./ISKOSConcept.js"; import ICharacteristic from "./ICharacteristic.js"; -import ICharacteristicDimension from "./ICharacteristicDimension.js"; -import IUnit from "./IUnit.js"; import QuantitativeValue from "./QuantitativeValue.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; export default abstract class Characteristic extends QuantitativeValue implements ICharacteristic { protected constructor(parameters: { connector: IConnector; semanticId?: string; semanticType?: string; other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }); - abstract getQuantityDimension(): Promise; - abstract setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + abstract getQuantityDimension(options?: IGetterOptions): Promise; + abstract setQuantityDimension(quantityDimension: ISKOSConcept): void; } //# sourceMappingURL=Characteristic.d.ts.map \ No newline at end of file diff --git a/lib/Characteristic.d.ts.map b/lib/Characteristic.d.ts.map index ddf5a31..f51088d 100644 --- a/lib/Characteristic.d.ts.map +++ b/lib/Characteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Characteristic.d.ts","sourceRoot":"","sources":["../src/Characteristic.ts"],"names":[],"mappings":"AAwBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,MAAM,CAAC,OAAO,CAAC,QAAQ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AC,iBAAiB,EAAE,YAAY,GAAG,IAAI;CACpE"} \ No newline at end of file diff --git a/lib/Characteristic.js b/lib/Characteristic.js index e848fd3..3980b18 100644 --- a/lib/Characteristic.js +++ b/lib/Characteristic.js @@ -1,33 +1,22 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ import QuantitativeValue from "./QuantitativeValue.js"; export default class Characteristic extends QuantitativeValue { constructor(parameters) { - if (parameters.other) - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); - else - super({ connector: parameters.connector, semanticId: parameters.semanticId, semanticType: parameters.semanticType, unit: parameters.unit, value: parameters.value }); + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); + } + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: parameters.semanticType, + unit: parameters.unit, + value: parameters.value + }); + } } } //# sourceMappingURL=Characteristic.js.map \ No newline at end of file diff --git a/lib/Characteristic.js.map b/lib/Characteristic.js.map index 0094c1f..ad9f5b9 100644 --- a/lib/Characteristic.js.map +++ b/lib/Characteristic.js.map @@ -1 +1 @@ -{"version":3,"file":"Characteristic.js","sourceRoot":"","sources":["../src/Characteristic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;AAKF,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAMtD,MAAM,CAAC,OAAO,OAAgB,cAAe,SAAQ,iBAAiB;IAGrE,YAAsB,UAAmI;QACxJ,IAAI,UAAU,CAAC,KAAK;YAAE,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAA;;YACxH,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,UAAU,CAAC,YAAa,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;IAM7K,CAAC;CAMD"} \ No newline at end of file +{"version":3,"file":"Characteristic.js","sourceRoot":"","sources":["../src/Characteristic.ts"],"names":[],"mappings":"AAyBA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAMtD,MAAM,CAAC,OAAO,OAAgB,cAAe,SAAQ,iBAAiB;IAErE,YAAsB,UAOrB;QAEA,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE,UAAU,CAAC,KAAK;aACvB,CAAC,CAAC;SACH;aAAM;YACN,KAAK,CAAC;gBACL,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,YAAY,EAAE,UAAU,CAAC,YAAa;gBACtC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;SACF;IAIF,CAAC;CAKD"} \ No newline at end of file diff --git a/lib/Claimable.d.ts.map b/lib/Claimable.d.ts.map index e6bded1..28f98fb 100644 --- a/lib/Claimable.d.ts.map +++ b/lib/Claimable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Claimable.d.ts","sourceRoot":"","sources":["../src/Claimable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,SAAS;CAGjC"} \ No newline at end of file +{"version":3,"file":"Claimable.d.ts","sourceRoot":"","sources":["../src/Claimable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,SAAS;CAGjC"} \ No newline at end of file diff --git a/lib/Claimable.js b/lib/Claimable.js index 70ce6a1..c2070fb 100644 --- a/lib/Claimable.js +++ b/lib/Claimable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Claimable.js.map \ No newline at end of file diff --git a/lib/Claimable.js.map b/lib/Claimable.js.map index 1c0337c..2bdf0ff 100644 --- a/lib/Claimable.js.map +++ b/lib/Claimable.js.map @@ -1 +1 @@ -{"version":3,"file":"Claimable.js","sourceRoot":"","sources":["../src/Claimable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Claimable.js","sourceRoot":"","sources":["../src/Claimable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Classable.d.ts b/lib/Classable.d.ts index db1eec2..fed38c8 100644 --- a/lib/Classable.d.ts +++ b/lib/Classable.d.ts @@ -1,5 +1,5 @@ export default interface Classable { - getType(): string; + getType(): string | undefined; setType(type: string): void; } //# sourceMappingURL=Classable.d.ts.map \ No newline at end of file diff --git a/lib/Classable.d.ts.map b/lib/Classable.d.ts.map index 955692b..223815e 100644 --- a/lib/Classable.d.ts.map +++ b/lib/Classable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Classable.d.ts","sourceRoot":"","sources":["../src/Classable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,OAAO,IAAI,MAAM,CAChB;IACD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAE5B"} \ No newline at end of file +{"version":3,"file":"Classable.d.ts","sourceRoot":"","sources":["../src/Classable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAE5B"} \ No newline at end of file diff --git a/lib/Classable.js b/lib/Classable.js index a190d07..2b56ccb 100644 --- a/lib/Classable.js +++ b/lib/Classable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Classable.js.map \ No newline at end of file diff --git a/lib/Classable.js.map b/lib/Classable.js.map index d2b46b6..b399912 100644 --- a/lib/Classable.js.map +++ b/lib/Classable.js.map @@ -1 +1 @@ -{"version":3,"file":"Classable.js","sourceRoot":"","sources":["../src/Classable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Classable.js","sourceRoot":"","sources":["../src/Classable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Connector.d.ts b/lib/Connector.d.ts index 2895f65..4f24f66 100644 --- a/lib/Connector.d.ts +++ b/lib/Connector.d.ts @@ -1,20 +1,20 @@ -import { Semanticable } from "@virtual-assembly/semantizer"; +import { ISemantizer, Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; import IConnectorExporter from "./IConnectorExporter"; +import IConnectorExportOptions from "./IConnectorExportOptions.js"; import IConnectorFactory from "./IConnectorFactory.js"; import IConnectorImporter from "./IConnectorImporter"; +import IConnectorImportOptions from "./IConnectorImportOptions.js"; import IConnectorStore from "./IConnectorStore"; import IGetterOptions from "./IGetterOptions.js"; -import ISKOSConcept from "./ISKOSConcept"; -import IConnectorImportOptions from "./IConnectorImportOptions.js"; -import IConnectorExportOptions from "./IConnectorExportOptions.js"; -import IConnector from "./IConnector.js"; import IAddress from "./IAddress.js"; +import IAgent from "./IAgent.js"; +import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import ICatalog from "./ICatalog.js"; import ICatalogItem from "./ICatalogItem.js"; import ICustomerCategory from "./ICustomerCategory.js"; import IEnterprise from "./IEnterprise.js"; import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import IOffer from "./IOffer.js"; import IOrder from "./IOrder.js"; import IOrderLine from "./IOrderLine.js"; @@ -23,22 +23,18 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; import IPrice from "./IPrice.js"; import IQuantity from "./IQuantity.js"; import ISaleSession from "./ISaleSession.js"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct.js"; -import IAllergenDimension from "./IAllergenDimension.js"; -import IUnit from "./IUnit.js"; -import INutrientDimension from "./INutrientDimension.js"; -import IAgent from "./IAgent.js"; -import IPhysicalDimension from "./IPhysicalDimension.js"; -import IPartOrigin from "./IPartOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; -import ICertification from "./ICertification.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; -import IClaim from "./IClaim.js"; -import IProductType from "./IProductType.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default class Connector implements IConnector { FACETS?: ISKOSConcept; MEASURES?: ISKOSConcept; PRODUCT_TYPES?: ISKOSConcept; + VOCABULARY?: ISKOSConcept; + private semantizer; private fetchFunction; private factory; private importer; @@ -58,9 +54,9 @@ export default class Connector implements IConnector { doNotStore?: boolean; }): IAddress; createAllergenCharacteristic(parameters: { - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - allergenDimension?: IAllergenDimension; + allergenDimension?: ISKOSConcept; }): IAllergenCharacteristic; createAllergenCharacteristic(parameters: { other: IAllergenCharacteristic; @@ -113,9 +109,9 @@ export default class Connector implements IConnector { doNotStore?: boolean; }): IEnterprise; createNutrientCharacteristic(parameters: { - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - nutrientDimension?: INutrientDimension; + nutrientDimension?: ISKOSConcept; }): INutrientCharacteristic; createNutrientCharacteristic(parameters: { other: INutrientCharacteristic; @@ -171,9 +167,9 @@ export default class Connector implements IConnector { doNotStore?: boolean; }): IPerson; createPhysicalCharacteristic(parameters: { - unit: IUnit; + unit: ISKOSConcept; value?: number; - physicalDimension?: IPhysicalDimension; + physicalDimension?: ISKOSConcept; }): IPhysicalCharacteristic; createPhysicalCharacteristic(parameters: { other: IPhysicalCharacteristic; @@ -182,14 +178,14 @@ export default class Connector implements IConnector { createPrice(parameters: { value?: number; vatRate?: number; - unit?: IUnit; + unit?: ISKOSConcept; }): IPrice; createPrice(parameters: { other: IPrice; doNotStore?: boolean; }): IPrice; createQuantity(parameters: { - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }): IQuantity; createQuantity(parameters: { @@ -212,20 +208,20 @@ export default class Connector implements IConnector { semanticId: string; name?: string; description?: string; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; totalTheoreticalStock?: number; doNotStore?: boolean; }): ISuppliedProduct; @@ -233,7 +229,41 @@ export default class Connector implements IConnector { other: ISuppliedProduct; doNotStore?: boolean; }): ISuppliedProduct; + createPlannedTransformation(parameters: { + doNotStore?: boolean; + semanticId: string; + transformationType?: ISKOSConcept; + consumptionFlow?: IPlannedConsumptionFlow; + productionFlow?: IPlannedProductionFlow; + }): IPlannedTransformation; + createPlannedTransformation(parameters: { + doNotStore?: boolean; + other: IPlannedTransformation; + }): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: { + doNotStore?: boolean; + semanticId: string; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: IDefinedProduct; + }): IPlannedConsumptionFlow; + createPlannedConsumptionFlow(parameters: { + doNotStore?: boolean; + other: IPlannedConsumptionFlow; + }): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: { + doNotStore?: boolean; + semanticId: string; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: ISuppliedProduct; + }): IPlannedProductionFlow; + createPlannedProductionFlow(parameters: { + doNotStore?: boolean; + other: IPlannedProductionFlow; + }): IPlannedProductionFlow; export(objects: Array, options?: IConnectorExportOptions): Promise; + getSemantizer(): ISemantizer; getDefaultFactory(): IConnectorFactory; import(data: string, options?: IConnectorImportOptions): Promise>; importOne(data: string, options?: IConnectorImportOptions): Promise; @@ -242,7 +272,8 @@ export default class Connector implements IConnector { loadFacets(facets: any): Promise; loadMeasures(measures: any): Promise; loadProductTypes(productTypes: any): Promise; - fetch(semanticObjectId: string, options?: IGetterOptions): Promise; + loadVocabulary(vocabulary: any): Promise; + fetch(semanticObject: string, options?: IGetterOptions): Promise; setDefaultFactory(factory: IConnectorFactory): void; setDefaultFetchFunction(fetch: (semanticId: string) => Promise): void; setDefaultExporter(exporter: IConnectorExporter): void; diff --git a/lib/Connector.d.ts.map b/lib/Connector.d.ts.map index d948e30..e203b46 100644 --- a/lib/Connector.d.ts.map +++ b/lib/Connector.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../src/Connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAK3D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AACnE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,O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,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAmCrF,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAM7F,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;YAO/F,eAAe;IAkDhB,UAAU,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtC,YAAY,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1C,gBAAgB,CAAC,YAAY,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD,cAAc,CAAC,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9C,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAgBhG,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAInD,uBAAuB,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI;IAI/E,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;IAItD,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;IAItD,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAI7C,KAAK,CAAC,cAAc,EAAE,YAAY,GAAG,IAAI;CAGnD"} \ No newline at end of file diff --git a/lib/Connector.js b/lib/Connector.js index ffb1827..10b450a 100644 --- a/lib/Connector.js +++ b/lib/Connector.js @@ -7,13 +7,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +// Exernal +import { Semantizer } from "@virtual-assembly/semantizer"; +// Static import ConnectorExporterJsonldStream from "./ConnectorExporterJsonldStream.js"; +import ConnectorFactory from "./ConnectorFactory.js"; import ConnectorImporterJsonldStream from "./ConnectorImporterJsonldStream.js"; import ConnectorStoreMap from "./ConnectorStoreMap.js"; import context from "./context.js"; -import ConnectorFactory from "./ConnectorFactory.js"; export default class Connector { constructor() { + this.semantizer = new Semantizer(context); this.storeObject = new ConnectorStoreMap(); this.fetchFunction = (semanticId) => __awaiter(this, void 0, void 0, function* () { return (yield fetch(semanticId)); }); this.factory = new ConnectorFactory(this); @@ -69,6 +73,15 @@ export default class Connector { createSuppliedProduct(parameters) { return this.factory.createSuppliedProduct(parameters); } + createPlannedTransformation(parameters) { + return this.factory.createPlannedTransformation(parameters); + } + createPlannedConsumptionFlow(parameters) { + return this.factory.createPlannedConsumptionFlow(parameters); + } + createPlannedProductionFlow(parameters) { + return this.factory.createPlannedProductionFlow(parameters); + } export(objects, options) { return __awaiter(this, void 0, void 0, function* () { const exporter = (options === null || options === void 0 ? void 0 : options.exporter) ? options.exporter : this.exporter; @@ -78,6 +91,9 @@ export default class Connector { }); }); } + getSemantizer() { + return this.semantizer; + } getDefaultFactory() { return this.factory; } @@ -152,8 +168,9 @@ export default class Connector { const setChildren = (parent) => { const narrowers = parent.getSemanticPropertyAll(skosNarrower); narrowers.forEach((narrower) => { - const name = narrower.split(prefix)[1].replace('-', '_').toUpperCase(); - const concept = concepts.get(narrower); + const expandedNarrower = this.getSemantizer().expand(narrower); + const name = expandedNarrower.split(prefix)[1].replace('-', '_').toUpperCase(); + const concept = concepts.get(expandedNarrower); if (concept) { // @ts-ignore parent[name] = concept; @@ -163,8 +180,10 @@ export default class Connector { }; // @ts-ignore: if the conceptScheme does not exist, an exception should have be already throwned conceptScheme.getSemanticPropertyAll(skosHasTopConcept).forEach((topConcept) => { - const name = topConcept.split(prefix)[1].replace('-', '_').toUpperCase(); - const concept = concepts.get(topConcept); + const expandedTopConcept = this.getSemantizer().expand(topConcept); + //const name: string = topConcept.split(prefix)[1].replace('-', '_').toUpperCase(); + const name = expandedTopConcept.split(prefix)[1].replace('-', '_').toUpperCase(); + const concept = concepts.get(expandedTopConcept); if (!concept) throw new Error("The thesaurus top concept " + topConcept + " was not found."); // @ts-ignore @@ -192,9 +211,16 @@ export default class Connector { this.PRODUCT_TYPES = yield this.importThesaurus(productTypes, prefix); }); } - fetch(semanticObjectId, options) { + loadVocabulary(vocabulary) { + return __awaiter(this, void 0, void 0, function* () { + const prefix = "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#"; + this.VOCABULARY = yield this.importThesaurus(vocabulary, prefix); + }); + } + fetch(semanticObject, options) { return __awaiter(this, void 0, void 0, function* () { const store = (options === null || options === void 0 ? void 0 : options.store) ? options.store : this.storeObject; + const semanticObjectId = this.getSemantizer().expand(semanticObject); if (!store.has(semanticObjectId)) { const fetchFunction = (options === null || options === void 0 ? void 0 : options.fetch) ? options.fetch : this.fetchFunction; const importer = (options === null || options === void 0 ? void 0 : options.importer) ? { importer: options.importer } : {}; diff --git a/lib/Connector.js.map b/lib/Connector.js.map index dab151f..9becd36 100644 --- a/lib/Connector.js.map +++ b/lib/Connector.js.map @@ -1 +1 @@ -{"version":3,"file":"Connector.js","sourceRoot":"","sources":["../src/Connector.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAOvD,OAAO,OAAO,MAAM,cAAc,CAAC;AAGnC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AA8BrD,MAAM,CAAC,OAAO,OAAO,SAAS;IAY1B;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,CAAO,UAAkB,EAAE,EAAE,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;gBACxE,MAAM,QAAQ,GAAa,MAAM,aAAa,CAAC,gBAAgB,CAAC,CAAC;gBACjE,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAC;gBAC3E,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;gBAC9B,OAAO,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,gBAAgB,CAAC,CAAC;aACtG;YAED,OAAO,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACvC,CAAC;KAAA;IAEM,iBAAiB,CAAC,OAA0B;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEM,uBAAuB,CAAC,KAAgD;QAC3E,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAEM,kBAAkB,CAAC,QAA4B;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAEM,kBAAkB,CAAC,QAA4B;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAEM,eAAe,CAAC,KAAsB;QACzC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,cAA4B;QACrC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzC,CAAC;CACJ"} \ No newline at end of file diff --git a/lib/ConnectorExporterJsonldStream.d.ts b/lib/ConnectorExporterJsonldStream.d.ts index f05483d..9afb0d0 100644 --- a/lib/ConnectorExporterJsonldStream.d.ts +++ b/lib/ConnectorExporterJsonldStream.d.ts @@ -1,6 +1,6 @@ import { Semanticable } from "@virtual-assembly/semantizer"; -import IConnectorExporter from "./IConnectorExporter"; import { ContextDefinition } from "jsonld"; +import IConnectorExporter from "./IConnectorExporter"; import IConnectorExporterOptions from "./IConnectorExporterOptions"; export default class ConnectorExporterJsonldStream implements IConnectorExporter { private context?; diff --git a/lib/ConnectorExporterJsonldStream.d.ts.map b/lib/ConnectorExporterJsonldStream.d.ts.map index 51daa28..c98a388 100644 --- a/lib/ConnectorExporterJsonldStream.d.ts.map +++ b/lib/ConnectorExporterJsonldStream.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorExporterJsonldStream.d.ts","sourceRoot":"","sources":["../src/ConnectorExporterJsonldStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,6BAA8B,YAAW,kBAAkB;IAE5E,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC,aAAa,CAAC,CAAM;gBAET,OAAO,CAAC,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,GAAG;IAKtD,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;CA0BjH"} \ No newline at end of file +{"version":3,"file":"ConnectorExporterJsonldStream.d.ts","sourceRoot":"","sources":["../src/ConnectorExporterJsonldStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,6BAA8B,YAAW,kBAAkB;IAE5E,OAAO,CAAC,OAAO,CAAC,CAAoB;IACpC,OAAO,CAAC,aAAa,CAAC,CAAM;gBAET,OAAO,CAAC,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,GAAG;IAKtD,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;CA0BjH"} \ No newline at end of file diff --git a/lib/ConnectorExporterJsonldStream.js.map b/lib/ConnectorExporterJsonldStream.js.map index b7cd56a..3a976be 100644 --- a/lib/ConnectorExporterJsonldStream.js.map +++ b/lib/ConnectorExporterJsonldStream.js.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorExporterJsonldStream.js","sourceRoot":"","sources":["../src/ConnectorExporterJsonldStream.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAK9C,YAAmB,OAA2B,EAAE,aAAmB;QAC/D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAEY,MAAM,CAAC,cAAmC,EAAE,OAAmC;;YACxF,MAAM,OAAO,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,EAAA,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;YAC3E,MAAM,aAAa,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,EAAA,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;YACzF,MAAM,UAAU,GAAG,IAAI,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;YAE7E,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC;gBACvB,UAAU,EAAE,IAAI;gBAChB,IAAI,EAAE,GAAG,EAAE;oBACP,cAAc,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBACjH,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACpB,CAAC;aACJ,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAExC,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC7C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;oBACvB,IAAI,aAAa,EAAE;wBACf,IAAI,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC;qBACpC;oBACD,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBAClC,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CAEJ"} \ No newline at end of file +{"version":3,"file":"ConnectorExporterJsonldStream.js","sourceRoot":"","sources":["../src/ConnectorExporterJsonldStream.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAK9C,YAAmB,OAA2B,EAAE,aAAmB;QAC/D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACv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AO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBAClC,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CAEJ"} \ No newline at end of file diff --git a/lib/ConnectorFactory.d.ts b/lib/ConnectorFactory.d.ts index c9de3f8..4c843f4 100644 --- a/lib/ConnectorFactory.d.ts +++ b/lib/ConnectorFactory.d.ts @@ -1,35 +1,30 @@ import { Semanticable } from "@virtual-assembly/semantizer"; -import IConnectorFactory from "./IConnectorFactory.js"; -import IAddress from "./IAddress.js"; -import IConnector from "./IConnector.js"; import DatasetExt from "rdf-ext/lib/Dataset.js"; import { DatasetCore } from '@rdfjs/types'; -import IAllergenDimension from "./IAllergenDimension.js"; -import IUnit from "./IUnit.js"; -import ICatalogItem from "./ICatalogItem.js"; -import IEnterprise from "./IEnterprise.js"; +import IConnector from "./IConnector.js"; +import IConnectorFactory from "./IConnectorFactory.js"; +import IAgent from "./IAgent.js"; +import IAddress from "./IAddress.js"; +import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import ICatalog from "./ICatalog.js"; -import IOffer from "./IOffer.js"; -import ISuppliedProduct from "./ISuppliedProduct.js"; +import ICatalogItem from "./ICatalogItem.js"; import ICustomerCategory from "./ICustomerCategory.js"; -import INutrientDimension from "./INutrientDimension.js"; +import IEnterprise from "./IEnterprise.js"; import IPrice from "./IPrice.js"; -import IOrderLine from "./IOrderLine.js"; -import IAgent from "./IAgent.js"; -import ISaleSession from "./ISaleSession.js"; +import ISuppliedProduct from "./ISuppliedProduct.js"; +import INutrientCharacteristic from "./INutrientCharacteristic.js"; +import IOffer from "./IOffer.js"; import IOrder from "./IOrder.js"; -import IPhysicalDimension from "./IPhysicalDimension.js"; -import IPartOrigin from "./IPartOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; -import ICertification from "./ICertification.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; +import IOrderLine from "./IOrderLine.js"; +import IPerson from "./IPerson.js"; import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; -import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IClaim from "./IClaim.js"; import IQuantity from "./IQuantity.js"; -import IProductType from "./IProductType.js"; -import IPerson from "./IPerson.js"; +import ISaleSession from "./ISaleSession.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default class ConnectorFactory implements IConnectorFactory { private connector; constructor(connector: IConnector); @@ -45,9 +40,9 @@ export default class ConnectorFactory implements IConnectorFactory { }): IAddress; createAllergenCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - allergenDimension?: IAllergenDimension; + allergenDimension?: ISKOSConcept; }): IAllergenCharacteristic; createCatalog(parameters: { doNotStore?: boolean; @@ -86,9 +81,9 @@ export default class ConnectorFactory implements IConnectorFactory { }): IEnterprise; createNutrientCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - nutrientDimension?: INutrientDimension; + nutrientDimension?: ISKOSConcept; }): INutrientCharacteristic; createOffer(parameters: { doNotStore?: boolean; @@ -129,19 +124,19 @@ export default class ConnectorFactory implements IConnectorFactory { }): IPerson; createPhysicalCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - physicalDimension?: IPhysicalDimension; + physicalDimension?: ISKOSConcept; }): IPhysicalCharacteristic; createPrice(parameters: { other?: Semanticable; value?: number; vatRate?: number; - unit?: IUnit; + unit?: ISKOSConcept; }): IPrice; createQuantity(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }): IQuantity; createSaleSession(parameters: { @@ -159,22 +154,46 @@ export default class ConnectorFactory implements IConnectorFactory { other?: Semanticable; name?: string; description?: string; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; totalTheoreticalStock?: number; }): ISuppliedProduct; + createPlannedTransformation(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + transformationType?: ISKOSConcept; + consumptionFlow?: IPlannedConsumptionFlow; + productionFlow?: IPlannedProductionFlow; + }): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: IDefinedProduct; + }): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: ISuppliedProduct; + }): IPlannedProductionFlow; createFromType(type: string): Semanticable | undefined; createFromRdfDataset(dataset: DatasetExt): Semanticable | undefined; } diff --git a/lib/ConnectorFactory.d.ts.map b/lib/ConnectorFactory.d.ts.map index fc1a25c..f446114 100644 --- a/lib/ConnectorFactory.d.ts.map +++ b/lib/ConnectorFactory.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorFactory.d.ts","sourceRoot":"","sources":["../src/ConnectorFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAU5D,OAAO,iBAAiB,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AC,GAAG,sBAAsB;IAI7N,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAiGtD,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS;CAU7E"} \ No newline at end of file diff --git a/lib/ConnectorFactory.js b/lib/ConnectorFactory.js index c6d04b6..74387f4 100644 --- a/lib/ConnectorFactory.js +++ b/lib/ConnectorFactory.js @@ -1,21 +1,25 @@ +import DatasetExt from "rdf-ext/lib/Dataset.js"; +// Generated Classes import Address from "./Address.js"; -import Catalog from "./Catalog.js"; -import SaleSession from "./SaleSession.js"; -import Order from "./Order.js"; -import OrderLine from "./OrderLine.js"; import AllergenCharacteristic from "./AllergenCharacteristic.js"; +import Catalog from "./Catalog.js"; import CatalogItem from "./CatalogItem.js"; import CustomerCategory from "./CustomerCategory.js"; import Enterprise from "./Enterprise.js"; import NutrientCharacteristic from "./NutrientCharacteristic.js"; import Offer from "./Offer.js"; +import Order from "./Order.js"; +import OrderLine from "./OrderLine.js"; import Person from "./Person.js"; import PhysicalCharacteristic from "./PhysicalCharacteristic.js"; import Price from "./Price.js"; import QuantitativeValue from "./QuantitativeValue.js"; +import SaleSession from "./SaleSession.js"; import SKOSConcept from "./SKOSConcept.js"; import SuppliedProduct from "./SuppliedProduct.js"; -import DatasetExt from "rdf-ext/lib/Dataset.js"; +import PlannedTransformation from "./PlannedTransformation.js"; +import PlannedConsumptionFlow from "./PlannedConsumptionFlow.js"; +import PlannedProductionFlow from "./PlannedProductionFlow.js"; export default class ConnectorFactory { constructor(connector) { this.connector = connector; @@ -73,6 +77,15 @@ export default class ConnectorFactory { createSuppliedProduct(parameters) { return new SuppliedProduct(Object.assign({ connector: this.connector }, parameters)); } + createPlannedTransformation(parameters) { + return new PlannedTransformation(Object.assign({ connector: this.connector }, parameters)); + } + createPlannedConsumptionFlow(parameters) { + return new PlannedConsumptionFlow(Object.assign({ connector: this.connector }, parameters)); + } + createPlannedProductionFlow(parameters) { + return new PlannedProductionFlow(Object.assign({ connector: this.connector }, parameters)); + } createFromType(type) { let result = undefined; const prefix = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#"; @@ -122,6 +135,15 @@ export default class ConnectorFactory { case prefix + "OrderLine": result = this.createOrderLine({ semanticId: "" }); break; + case prefix + "AsPlannedTransformation": + result = this.createPlannedTransformation({ semanticId: "" }); + break; + case prefix + "AsPlannedConsumptionFlow": + result = this.createPlannedConsumptionFlow({ semanticId: "" }); + break; + case prefix + "AsPlannedProductionFlow": + result = this.createPlannedProductionFlow({ semanticId: "" }); + break; case prefix + "SaleSession": result = this.createSaleSession({ semanticId: "" }); break; diff --git a/lib/ConnectorFactory.js.map b/lib/ConnectorFactory.js.map index b73e636..8674313 100644 --- a/lib/ConnectorFactory.js.map +++ b/lib/ConnectorFactory.js.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorFactory.js","sourceRoot":"","sources":["../src/ConnectorFactory.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,WAAW,MAAM,kBAAkB,CA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AC,CAAC,CAAC,CAAC;QAC5F,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC/B,MAAM,cAAc,GAA6B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,cAAc;YACd,cAAc,CAAC,oCAAoC,CAAC,OAAO,CAAC,CAAC;QACjE,OAAO,cAAc,CAAC;IAC1B,CAAC;CAEJ"} \ No newline at end of file diff --git a/lib/ConnectorImporterJsonldStream.d.ts b/lib/ConnectorImporterJsonldStream.d.ts index 5a0796f..93274e6 100644 --- a/lib/ConnectorImporterJsonldStream.d.ts +++ b/lib/ConnectorImporterJsonldStream.d.ts @@ -1,5 +1,5 @@ -import IConnectorImporter from "./IConnectorImporter"; import DatasetExt from "rdf-ext/lib/Dataset"; +import IConnectorImporter from "./IConnectorImporter"; import IConnectorImporterOptions from "./IConnectorImporterOptions"; export default class ConnectorImporterJsonldStream implements IConnectorImporter { private context; diff --git a/lib/ConnectorImporterJsonldStream.d.ts.map b/lib/ConnectorImporterJsonldStream.d.ts.map index 820f43d..ef2c2b7 100644 --- a/lib/ConnectorImporterJsonldStream.d.ts.map +++ b/lib/ConnectorImporterJsonldStream.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorImporterJsonldStream.d.ts","sourceRoot":"","sources":["../src/ConnectorImporterJsonldStream.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAG7C,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,6BAA8B,YAAW,kBAAkB;IAE5E,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,cAAc,CAAM;gBAGT,UAAU,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,GAAG,CAAA;KAAE;IAK1D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;CAmGrG"} \ No newline at end of file +{"version":3,"file":"ConnectorImporterJsonldStream.d.ts","sourceRoot":"","sources":["../src/ConnectorImporterJsonldStream.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAI7C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,6BAA8B,YAAW,kBAAkB;IAE5E,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,cAAc,CAAM;gBAGT,UAAU,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,GAAG,CAAC;QAAC,cAAc,CAAC,EAAE,GAAG,CAAA;KAAE;IAK1D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;CAmGrG"} \ No newline at end of file diff --git a/lib/ConnectorImporterJsonldStream.js.map b/lib/ConnectorImporterJsonldStream.js.map index 46db40a..99e8618 100644 --- a/lib/ConnectorImporterJsonldStream.js.map +++ b/lib/ConnectorImporterJsonldStream.js.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorImporterJsonldStream.js","sourceRoot":"","sources":["../src/ConnectorImporterJsonldStream.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,cAAc,MAAM,SAAS,CAAC;AAIrC,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAK9C,+DAA+D;IAC/D,YAAmB,UAAoD;QACnE,IAAI,CAAC,OAAO,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC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CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;oBACrB,iEAAiE;oBACjE,6BAA6B,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE;wBAC7D,MAAM,cAAc,GAAuB,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;wBAC9E,MAAM,YAAY,GAAW,mDAAmD,GAAG,aAAa,GAAG,4BAA4B,CAAC;wBAEhI,uEAAuE;wBACvE,IAAI,cAAc,KAAK,SAAS,EAAE;4BAC9B,MAAM,gBAAgB,GAA2B,UAAU,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;4BAE/E,6EAA6E;4BAC7E,IAAI,gBAAgB;gCAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;4BAEvD,qEAAqE;;gCAChE,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;yBACtC;wBAED,0EAA0E;;4BACrE,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;oBACvC,CAAC,CAAC,CAAC;oBAEH,2CAA2C;oBAC3C,uCAAuC;oBACvC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;wBAClD,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;qBAC/B;oBAED,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACtB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CAEJ"} \ No newline at end of file +{"version":3,"file":"ConnectorImporterJsonldStream.js","sourceRoot":"","sources":["../src/ConnectorImporterJsonldStream.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,cAAc,MAAM,SAAS,CAAC;AAMrC,MAAM,CAAC,OAAO,OA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-1 +1 @@ -{"version":3,"file":"ConnectorStoreMap.d.ts","sourceRoot":"","sources":["../src/ConnectorStoreMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,eAAe;IAE7D,OAAO,CAAC,WAAW,CAA4B;;IAMlC,GAAG,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAItE,GAAG,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO;IAItC,GAAG,CAAC,cAAc,EAAE,YAAY,GAAG,IAAI;IAMvC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI;CAI5D"} \ No newline at end of file +{"version":3,"file":"ConnectorStoreMap.d.ts","sourceRoot":"","sources":["../src/ConnectorStoreMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,eAAe;IAE7D,OAAO,CAAC,WAAW,CAA4B;;IAMlC,GAAG,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAItE,GAAG,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO;IAItC,GAAG,CAAC,cAAc,EAAE,YAAY,GAAG,IAAI;IAMvC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI;CAI5D"} \ No newline at end of file diff --git a/lib/ConnectorStoreMap.js.map b/lib/ConnectorStoreMap.js.map index 46f8120..42f123b 100644 --- a/lib/ConnectorStoreMap.js.map +++ b/lib/ConnectorStoreMap.js.map @@ -1 +1 @@ -{"version":3,"file":"ConnectorStoreMap.js","sourceRoot":"","sources":["../src/ConnectorStoreMap.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAIlC;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;IACvD,CAAC;IAEY,GAAG,CAAC,gBAAwB;;YACrC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAClD,CAAC;KAAA;IAEM,GAAG,CAAC,gBAAwB;QAC/B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAEM,GAAG,CAAC,cAA4B;QACnC,MAAM,UAAU,GAAW,cAAc,CAAC,aAAa,EAAE,CAAC;QAC1D,IAAI,UAAU,KAAK,EAAE;YACjB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,CAAC;IAEM,MAAM,CAAC,eAAoC;QAC9C,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IACxE,CAAC;CAEJ"} \ No newline at end of file +{"version":3,"file":"ConnectorStoreMap.js","sourceRoot":"","sources":["../src/ConnectorStoreMap.ts"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAIlC;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAwB,CAAC;IACvD,CAAC;IAEY,GAAG,CAAC,gBAAwB;;YACrC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAClD,CAAC;KAAA;IAEM,GAAG,CAAC,gBAAwB;QAC/B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;IAEM,GAAG,CAAC,cAA4B;QACnC,MAAM,UAAU,GAAW,cAAc,CAAC,aAAa,EAAE,CAAC;QAC1D,IAAI,UAAU,KAAK,EAAE;YACjB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,CAAC;IAEM,MAAM,CAAC,eAAoC;QAC9C,eAAe,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IACxE,CAAC;CAEJ"} \ No newline at end of file diff --git a/lib/ContactableByAddress.d.ts b/lib/ContactableByAddress.d.ts new file mode 100644 index 0000000..e67a16e --- /dev/null +++ b/lib/ContactableByAddress.d.ts @@ -0,0 +1,5 @@ +import IAddress from "./IAddress.js"; +export default interface ContactableByAddress { + getLocalizations(): Promise; +} +//# sourceMappingURL=ContactableByAddress.d.ts.map \ No newline at end of file diff --git a/lib/ContactableByAddress.d.ts.map b/lib/ContactableByAddress.d.ts.map new file mode 100644 index 0000000..9934be0 --- /dev/null +++ b/lib/ContactableByAddress.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByAddress.d.ts","sourceRoot":"","sources":["../src/ContactableByAddress.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,WAAW,oBAAoB;IAEa,gBAAgB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAEjG"} \ No newline at end of file diff --git a/lib/ContactableByAddress.js b/lib/ContactableByAddress.js new file mode 100644 index 0000000..2bc6185 --- /dev/null +++ b/lib/ContactableByAddress.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ContactableByAddress.js.map \ No newline at end of file diff --git a/lib/ContactableByAddress.js.map b/lib/ContactableByAddress.js.map new file mode 100644 index 0000000..5785624 --- /dev/null +++ b/lib/ContactableByAddress.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByAddress.js","sourceRoot":"","sources":["../src/ContactableByAddress.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/ContactableByEmail.d.ts b/lib/ContactableByEmail.d.ts new file mode 100644 index 0000000..406e9b0 --- /dev/null +++ b/lib/ContactableByEmail.d.ts @@ -0,0 +1,4 @@ +export default interface ContactableByEmail { + getEmails(): string[]; +} +//# sourceMappingURL=ContactableByEmail.d.ts.map \ No newline at end of file diff --git a/lib/ContactableByEmail.d.ts.map b/lib/ContactableByEmail.d.ts.map new file mode 100644 index 0000000..17a3f19 --- /dev/null +++ b/lib/ContactableByEmail.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByEmail.d.ts","sourceRoot":"","sources":["../src/ContactableByEmail.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,kBAAkB;IAE1C,SAAS,IAAI,MAAM,EAAE,CAAC;CAEtB"} \ No newline at end of file diff --git a/lib/ContactableByEmail.js b/lib/ContactableByEmail.js new file mode 100644 index 0000000..9702d65 --- /dev/null +++ b/lib/ContactableByEmail.js @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +export {}; +//# sourceMappingURL=ContactableByEmail.js.map \ No newline at end of file diff --git a/lib/ContactableByEmail.js.map b/lib/ContactableByEmail.js.map new file mode 100644 index 0000000..6a6da24 --- /dev/null +++ b/lib/ContactableByEmail.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByEmail.js","sourceRoot":"","sources":["../src/ContactableByEmail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/ContactableByPhone.d.ts b/lib/ContactableByPhone.d.ts new file mode 100644 index 0000000..3649260 --- /dev/null +++ b/lib/ContactableByPhone.d.ts @@ -0,0 +1,5 @@ +import IPhoneNumber from "./IPhoneNumber.js"; +export default interface ContactableByPhone { + getPhoneNumbers(): Promise; +} +//# sourceMappingURL=ContactableByPhone.d.ts.map \ No newline at end of file diff --git a/lib/ContactableByPhone.d.ts.map b/lib/ContactableByPhone.d.ts.map new file mode 100644 index 0000000..bab9084 --- /dev/null +++ b/lib/ContactableByPhone.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByPhone.d.ts","sourceRoot":"","sources":["../src/ContactableByPhone.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,kBAAkB;IAE1C,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAE3C"} \ No newline at end of file diff --git a/lib/ContactableByPhone.js b/lib/ContactableByPhone.js new file mode 100644 index 0000000..4b21ca8 --- /dev/null +++ b/lib/ContactableByPhone.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ContactableByPhone.js.map \ No newline at end of file diff --git a/lib/ContactableByPhone.js.map b/lib/ContactableByPhone.js.map new file mode 100644 index 0000000..6d389bf --- /dev/null +++ b/lib/ContactableByPhone.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByPhone.js","sourceRoot":"","sources":["../src/ContactableByPhone.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/ContactableBySocialMedia.d.ts b/lib/ContactableBySocialMedia.d.ts new file mode 100644 index 0000000..383a257 --- /dev/null +++ b/lib/ContactableBySocialMedia.d.ts @@ -0,0 +1,5 @@ +import ISocialMedia from "./ISocialMedia.js"; +export default interface ContactableBySocialMedia { + getSocialMedias(): Promise; +} +//# sourceMappingURL=ContactableBySocialMedia.d.ts.map \ No newline at end of file diff --git a/lib/ContactableBySocialMedia.d.ts.map b/lib/ContactableBySocialMedia.d.ts.map new file mode 100644 index 0000000..0380258 --- /dev/null +++ b/lib/ContactableBySocialMedia.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableBySocialMedia.d.ts","sourceRoot":"","sources":["../src/ContactableBySocialMedia.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,wBAAwB;IAEhD,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAE3C"} \ No newline at end of file diff --git a/lib/ContactableBySocialMedia.js b/lib/ContactableBySocialMedia.js new file mode 100644 index 0000000..b84ae74 --- /dev/null +++ b/lib/ContactableBySocialMedia.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ContactableBySocialMedia.js.map \ No newline at end of file diff --git a/lib/ContactableBySocialMedia.js.map b/lib/ContactableBySocialMedia.js.map new file mode 100644 index 0000000..e8389bf --- /dev/null +++ b/lib/ContactableBySocialMedia.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableBySocialMedia.js","sourceRoot":"","sources":["../src/ContactableBySocialMedia.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/ContactableByWebsite.d.ts b/lib/ContactableByWebsite.d.ts new file mode 100644 index 0000000..1a22164 --- /dev/null +++ b/lib/ContactableByWebsite.d.ts @@ -0,0 +1,4 @@ +export default interface ContactableByWebsite { + getWebsites(): string[]; +} +//# sourceMappingURL=ContactableByWebsite.d.ts.map \ No newline at end of file diff --git a/lib/ContactableByWebsite.d.ts.map b/lib/ContactableByWebsite.d.ts.map new file mode 100644 index 0000000..a1f3cd0 --- /dev/null +++ b/lib/ContactableByWebsite.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByWebsite.d.ts","sourceRoot":"","sources":["../src/ContactableByWebsite.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,oBAAoB;IAE5C,WAAW,IAAI,MAAM,EAAE,CAAC;CAExB"} \ No newline at end of file diff --git a/lib/ContactableByWebsite.js b/lib/ContactableByWebsite.js new file mode 100644 index 0000000..ca11768 --- /dev/null +++ b/lib/ContactableByWebsite.js @@ -0,0 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +export {}; +//# sourceMappingURL=ContactableByWebsite.js.map \ No newline at end of file diff --git a/lib/ContactableByWebsite.js.map b/lib/ContactableByWebsite.js.map new file mode 100644 index 0000000..4861283 --- /dev/null +++ b/lib/ContactableByWebsite.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ContactableByWebsite.js","sourceRoot":"","sources":["../src/ContactableByWebsite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/CustomerCategory.d.ts b/lib/CustomerCategory.d.ts index e430bea..82a3cc4 100644 --- a/lib/CustomerCategory.d.ts +++ b/lib/CustomerCategory.d.ts @@ -12,6 +12,6 @@ export default class CustomerCategory extends SemanticObject implements ICustome doNotStore?: boolean; }); setDescription(description: string): void; - getDescription(): string; + getDescription(): string | undefined; } //# sourceMappingURL=CustomerCategory.d.ts.map \ No newline at end of file diff --git a/lib/CustomerCategory.d.ts.map b/lib/CustomerCategory.d.ts.map index 865a11e..6e422ec 100644 --- a/lib/CustomerCategory.d.ts.map +++ b/lib/CustomerCategory.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"CustomerCategory.d.ts","sourceRoot":"","sources":["../src/CustomerCategory.ts"],"names":[],"mappings":"AAwBA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAe,YAAW,iBAAiB;IAExF,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAC;IAkBtI,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAMzC,cAAc,IAAI,MAAM;CAM/B"} \ No newline at end of file +{"version":3,"file":"CustomerCategory.d.ts","sourceRoot":"","sources":["../src/CustomerCategory.ts"],"names":[],"mappings":"AAuBA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAKzC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAe,YAAW,iBAAiB;IAExF,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAgCM,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC,cAAc,IAAI,MAAM,GAAG,SAAS;CAG3C"} \ No newline at end of file diff --git a/lib/CustomerCategory.js b/lib/CustomerCategory.js index 266a5dc..4302d9e 100644 --- a/lib/CustomerCategory.js +++ b/lib/CustomerCategory.js @@ -1,49 +1,37 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ import { SemanticObject } from "@virtual-assembly/semantizer"; +const CUSTOMER_CATEGORY_SEM_TYPE = "dfc-b:CustomerCategory"; export default class CustomerCategory extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CustomerCategory"; + const type = CUSTOMER_CATEGORY_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.description) + } + if (parameters.description) { this.setDescription(parameters.description); + } } setDescription(description) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); + this.setSemanticPropertyLiteral("dfc-b:description", description); } getDescription() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); + return this.getSemanticProperty("dfc-b:description"); } } //# sourceMappingURL=CustomerCategory.js.map \ No newline at end of file diff --git a/lib/CustomerCategory.js.map b/lib/CustomerCategory.js.map index 34e4029..b3fb5f3 100644 --- a/lib/CustomerCategory.js.map +++ b/lib/C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,CAAC,CAAC;IACnE,CAAC;IAEM,cAAc;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;CACD"} \ No newline at end of file diff --git a/lib/DefinedProduct.d.ts b/lib/DefinedProduct.d.ts index 43f147f..d5131d1 100644 --- a/lib/DefinedProduct.d.ts +++ b/lib/DefinedProduct.d.ts @@ -1,15 +1,10 @@ -import IProductType from "./IProductType.js"; import ICatalogItem from "./ICatalogItem.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; -import ICertification from "./ICertification.js"; -import INatureOrigin from "./INatureOrigin.js"; -import IQuantity from "./IQuantity.js"; +import IDefinedProduct from "./IDefinedProduct.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IDefinedProduct from "./IDefinedProduct.js"; +import IQuantity from "./IQuantity.js"; import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IClaim from "./IClaim.js"; -import IPartOrigin from "./IPartOrigin.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -23,62 +18,64 @@ export default abstract class DefinedProduct extends SemanticObject implements I other?: Semanticable; name?: string; description?: string; - images?: string[]; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; + images?: string[]; + doNotStore?: boolean; }); + setQuantity(quantity: IQuantity): void; setName(name: string): void; - getName(): string; - getPartOrigin(options?: IGetterOptions): Promise>; + addPartOrigin(partOrigin: ISKOSConcept): void; + getDescription(): string | undefined; + setAlcoholPercentage(alcoholPercentage: number): void; addNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; - getUsageOrStorageConditions(): string; - getGeographicalOrigin(options?: IGetterOptions): Promise; - getAlcoholPercentage(): number; - removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; - getNutrientCharacteristics(options?: IGetterOptions): Promise>; - getPhysicalCharacteristics(options?: IGetterOptions): Promise>; - removeNatureOrigin(natureOrigin: INatureOrigin): void; - getNatureOrigin(options?: IGetterOptions): Promise>; - addPartOrigin(partOrigin: IPartOrigin): void; - removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; + removeCertification(certification: ISKOSConcept): void; + addImage(image: string): void; + removeClaim(claim: ISKOSConcept): void; + getUsageOrStorageConditions(): string | undefined; + removeNatureOrigin(natureOrigin: ISKOSConcept): void; + addCatalogItem(catalogItem: ICatalogItem): void; + getAlcoholPercentage(): number | undefined; + getNatureOrigin(options?: IGetterOptions): Promise; + getLifetime(): string | undefined; + setUsageOrStorageConditions(usageOrStorageConditions: string): void; + getQuantity(): IQuantity | undefined; setLifetime(lifetime: string): void; - setAlcoholPercentage(alcoholPercentage: number): void; - addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - getAllergenCharacteristics(options?: IGetterOptions): Promise>; - getLifetime(): string; - addNatureOrigin(natureOrigin: INatureOrigin): void; + getImages(): string[]; + getCatalogItems(options?: IGetterOptions): Promise; + addNatureOrigin(natureOrigin: ISKOSConcept): void; + addClaim(claim: ISKOSConcept): void; + removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; + setDescription(description: string): void; addAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; removePhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - removePartOrigin(partOrigin: IPartOrigin): void; - setUsageOrStorageConditions(usageOrStorageConditions: string): void; - setGeographicalOrigin(geographicalOrigin: IGeographicalOrigin): void; - setDescription(description: string): void; - getDescription(): string; - removeCertification(certification: ICertification): void; - getCertifications(options?: IGetterOptions): Promise>; - addCertification(certification: ICertification): void; - getQuantity(options?: IGetterOptions): Promise; - getProductType(options?: IGetterOptions): Promise; - removeClaim(claim: IClaim): void; - getClaims(options?: IGetterOptions): Promise>; - addClaim(claim: IClaim): void; - setProductType(productType: IProductType): void; - setQuantity(quantity: IQuantity): void; - addCatalogItem(catalogItem: ICatalogItem): void; - getCatalogItems(options?: IGetterOptions): Promise>; - addImage(url: string): void; - getImages(): string[]; + getProductType(options?: IGetterOptions): Promise; + getPartOrigin(options?: IGetterOptions): Promise; + addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; + setProductType(productType: ISKOSConcept): void; + getName(): string | undefined; + getClaims(options?: IGetterOptions): Promise; + getNutrientCharacteristics(options?: IGetterOptions): Promise; + getPhysicalCharacteristics(options?: IGetterOptions): Promise; + addCertification(certification: ISKOSConcept): void; + removeImage(image: string): void; + removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; + removePartOrigin(partOrigin: ISKOSConcept): void; + getGeographicalOrigin(options?: IGetterOptions): Promise; + getCertifications(options?: IGetterOptions): Promise; + getAllergenCharacteristics(options?: IGetterOptions): Promise; + setGeographicalOrigin(geographicalOrigin: ISKOSConcept): void; } //# 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 ba2fdb6..2e3f00f 100644 --- a/lib/DefinedProduct.d.ts.map +++ b/lib/DefinedProduct.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"DefinedProduct.d.ts","sourceRoot":"","sources":["../src/DefinedProduct.ts"],"names":[],"mappings":"AAwBA,OAAO,YAAY,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AO,CAAC,uBAAuB,EAAE,CAAC;IAUxF,0BAA0B,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAU9F,gBAAgB,CAAC,aAAa,EAAE,YAAY,GAAG,IAAI;IAUnD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIhC,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI;IAInF,gBAAgB,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAI1C,qBAAqB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUlF,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUpE,0BAA0B,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAU9F,qBAAqB,CAAC,kBAAkB,EAAE,YAAY,GAAG,IAAI;CAKpE"} \ No newline at end of file diff --git a/lib/DefinedProduct.js b/lib/DefinedProduct.js index 1b07f6f..b95e24e 100644 --- a/lib/DefinedProduct.js +++ b/lib/DefinedProduct.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -40,58 +17,135 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { import { SemanticObject } from "@virtual-assembly/semantizer"; export default class DefinedProduct extends SemanticObject { constructor(parameters) { - if (parameters.other) - super({ semanticId: parameters.semanticId, other: parameters.other }); - else - super({ semanticId: parameters.semanticId, semanticType: parameters.semanticType }); + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + } + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: parameters.semanticType, + }); + } this.connector = parameters.connector; - if (parameters.name) + if (parameters.name) { this.setName(parameters.name); - if (parameters.description) + } + if (parameters.description) { this.setDescription(parameters.description); - if (parameters.images) - parameters.images.forEach(e => this.addImage(e)); - if (parameters.productType) + } + if (parameters.productType) { this.setProductType(parameters.productType); - if (parameters.quantity) + } + if (parameters.quantity) { this.setQuantity(parameters.quantity); - if (parameters.alcoholPercentage || parameters.alcoholPercentage === 0) + } + if (parameters.alcoholPercentage || parameters.alcoholPercentage === 0) { this.setAlcoholPercentage(parameters.alcoholPercentage); - if (parameters.lifetime) + } + if (parameters.lifetime) { this.setLifetime(parameters.lifetime); - if (parameters.claims) + } + if (parameters.claims) { parameters.claims.forEach(e => this.addClaim(e)); - if (parameters.usageOrStorageConditions) + } + if (parameters.usageOrStorageConditions) { this.setUsageOrStorageConditions(parameters.usageOrStorageConditions); - if (parameters.allergenCharacteristics) + } + if (parameters.allergenCharacteristics) { parameters.allergenCharacteristics.forEach(e => this.addAllergenCharacteristic(e)); - if (parameters.nutrientCharacteristics) + } + if (parameters.nutrientCharacteristics) { parameters.nutrientCharacteristics.forEach(e => this.addNutrientCharacteristic(e)); - if (parameters.physicalCharacteristics) + } + if (parameters.physicalCharacteristics) { parameters.physicalCharacteristics.forEach(e => this.addPhysicalCharacteristic(e)); - if (parameters.geographicalOrigin) + } + if (parameters.geographicalOrigin) { this.setGeographicalOrigin(parameters.geographicalOrigin); - if (parameters.catalogItems) + } + if (parameters.catalogItems) { parameters.catalogItems.forEach(e => this.addCatalogItem(e)); - if (parameters.certifications) + } + if (parameters.certifications) { parameters.certifications.forEach(e => this.addCertification(e)); - if (parameters.natureOrigin) + } + if (parameters.natureOrigin) { parameters.natureOrigin.forEach(e => this.addNatureOrigin(e)); - if (parameters.partOrigin) + } + if (parameters.partOrigin) { parameters.partOrigin.forEach(e => this.addPartOrigin(e)); + } + if (parameters.images) { + parameters.images.forEach(e => this.addImage(e)); + } + } + setQuantity(quantity) { + this.setSemanticPropertyAnonymous("dfc-b:hasQuantity", quantity); } setName(name) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#name"; - this.setSemanticPropertyLiteral(property, name); + this.setSemanticPropertyLiteral("dfc-b:name", name); } - getName() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#name"); + addPartOrigin(partOrigin) { + if (partOrigin.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPartOrigin", partOrigin); + } + else { + this.connector.store(partOrigin); + this.addSemanticPropertyReference("dfc-b:hasPartOrigin", partOrigin); + } } - getPartOrigin(options) { + getDescription() { + return this.getSemanticProperty("dfc-b:description"); + } + setAlcoholPercentage(alcoholPercentage) { + this.setSemanticPropertyLiteral("dfc-b:alcoholPercentage", alcoholPercentage); + } + addNutrientCharacteristic(nutrientCharacteristic) { + if (nutrientCharacteristic.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasNutrientCharacteristic", nutrientCharacteristic); + } + else { + this.connector.store(nutrientCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasNutrientCharacteristic", nutrientCharacteristic); + } + } + removeCertification(certification) { + throw new Error("Not yet implemented."); + } + addImage(image) { + this.addSemanticPropertyLiteral("dfc-b:image", image); + } + removeClaim(claim) { + throw new Error("Not yet implemented."); + } + getUsageOrStorageConditions() { + return this.getSemanticProperty("dfc-b:usageOrStorageCondition"); + } + removeNatureOrigin(natureOrigin) { + throw new Error("Not yet implemented."); + } + addCatalogItem(catalogItem) { + if (catalogItem.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:referencedBy", catalogItem); + } + else { + this.connector.store(catalogItem); + this.addSemanticPropertyReference("dfc-b:referencedBy", catalogItem); + } + } + getAlcoholPercentage() { + return Number(this.getSemanticProperty("dfc-b:alcoholPercentage")); + } + getNatureOrigin(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPartOrigin"); + const properties = this.getSemanticPropertyAll("dfc-b:hasNatureOrigin"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -117,67 +171,27 @@ export default class DefinedProduct extends SemanticObject { return results; }); } - addNutrientCharacteristic(nutrientCharacteristic) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientCharacteristic"; - if (nutrientCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, nutrientCharacteristic); - } - else { - this.connector.store(nutrientCharacteristic); - this.addSemanticPropertyReference(property, nutrientCharacteristic); - } - } - getUsageOrStorageConditions() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#usageOrStorageCondition"); - } - getGeographicalOrigin(options) { - return __awaiter(this, void 0, void 0, function* () { - let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasGeographicalOrigin"); - if (semanticId) { - const semanticObject = yield this.connector.fetch(semanticId, options); - if (semanticObject) - result = semanticObject; - } - return result; - }); + getLifetime() { + return this.getSemanticProperty("dfc-b:lifetime"); } - getAlcoholPercentage() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#alcoholPercentage")); + setUsageOrStorageConditions(usageOrStorageConditions) { + this.setSemanticPropertyLiteral("dfc-b:usageOrStorageCondition", usageOrStorageConditions); } - removeAllergenCharacteristic(allergenCharacteristic) { - throw new Error("Not yet implemented."); + getQuantity() { + const blankNode = this.getSemanticPropertyAnonymous("dfc-b:hasQuantity"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); } - getNutrientCharacteristics(options) { - return __awaiter(this, void 0, void 0, function* () { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - }); - return results; - }); - } - getPhysicalCharacteristics(options) { - return __awaiter(this, void 0, void 0, function* () { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - }); - return results; - }); + setLifetime(lifetime) { + this.setSemanticPropertyLiteral("dfc-b:lifetime", lifetime); } - removeNatureOrigin(natureOrigin) { - throw new Error("Not yet implemented."); + getImages() { + return this.getSemanticPropertyAll("dfc-b:image"); } - getNatureOrigin(options) { + getCatalogItems(options) { var _a, e_2, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNatureOrigin"); + const properties = this.getSemanticPropertyAll("dfc-b:referencedBy"); try { for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { _c = properties_2_1.value; @@ -203,101 +217,59 @@ export default class DefinedProduct extends SemanticObject { return results; }); } - addPartOrigin(partOrigin) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPartOrigin"; - if (partOrigin.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, partOrigin); + addNatureOrigin(natureOrigin) { + if (natureOrigin.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasNatureOrigin", natureOrigin); } else { - this.connector.store(partOrigin); - this.addSemanticPropertyReference(property, partOrigin); + this.connector.store(natureOrigin); + this.addSemanticPropertyReference("dfc-b:hasNatureOrigin", natureOrigin); } } - removeNutrientCharacteristic(nutrientCharacteristic) { - throw new Error("Not yet implemented."); - } - setLifetime(lifetime) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lifetime"; - this.setSemanticPropertyLiteral(property, lifetime); - } - setAlcoholPercentage(alcoholPercentage) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#alcoholPercentage"; - this.setSemanticPropertyLiteral(property, alcoholPercentage); - } - addPhysicalCharacteristic(physicalCharacteristic) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalCharacteristic"; - if (physicalCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, physicalCharacteristic); + addClaim(claim) { + if (claim.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasClaim", claim); } else { - this.connector.store(physicalCharacteristic); - this.addSemanticPropertyReference(property, physicalCharacteristic); + this.connector.store(claim); + this.addSemanticPropertyReference("dfc-b:hasClaim", claim); } } - getAllergenCharacteristics(options) { - return __awaiter(this, void 0, void 0, function* () { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - }); - return results; - }); - } - getLifetime() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lifetime"); + removeNutrientCharacteristic(nutrientCharacteristic) { + throw new Error("Not yet implemented."); } - addNatureOrigin(natureOrigin) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNatureOrigin"; - if (natureOrigin.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, natureOrigin); - } - else { - this.connector.store(natureOrigin); - this.addSemanticPropertyReference(property, natureOrigin); - } + setDescription(description) { + this.setSemanticPropertyLiteral("dfc-b:description", description); } addAllergenCharacteristic(allergenCharacteristic) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenCharacteristic"; if (allergenCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, allergenCharacteristic); + this.addSemanticPropertyAnonymous("dfc-b:hasAllergenCharacteristic", allergenCharacteristic); } else { this.connector.store(allergenCharacteristic); - this.addSemanticPropertyReference(property, allergenCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasAllergenCharacteristic", allergenCharacteristic); } } removePhysicalCharacteristic(physicalCharacteristic) { throw new Error("Not yet implemented."); } - removePartOrigin(partOrigin) { - throw new Error("Not yet implemented."); - } - setUsageOrStorageConditions(usageOrStorageConditions) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#usageOrStorageCondition"; - this.setSemanticPropertyLiteral(property, usageOrStorageConditions); - } - setGeographicalOrigin(geographicalOrigin) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasGeographicalOrigin"; - this.setSemanticPropertyReference(property, geographicalOrigin); - this.connector.store(geographicalOrigin); - } - setDescription(description) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); - } - getDescription() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); - } - removeCertification(certification) { - throw new Error("Not yet implemented."); + getProductType(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasType"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); } - getCertifications(options) { + getPartOrigin(options) { var _a, e_3, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCertification"); + const properties = this.getSemanticPropertyAll("dfc-b:hasPartOrigin"); try { for (var _d = true, properties_3 = __asyncValues(properties), properties_3_1; properties_3_1 = yield properties_3.next(), _a = properties_3_1.done, !_a;) { _c = properties_3_1.value; @@ -323,42 +295,27 @@ export default class DefinedProduct extends SemanticObject { return results; }); } - addCertification(certification) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCertification"; - if (certification.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, certification); + addPhysicalCharacteristic(physicalCharacteristic) { + if (physicalCharacteristic.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPhysicalCharacteristic", physicalCharacteristic); } else { - this.connector.store(certification); - this.addSemanticPropertyReference(property, certification); + this.connector.store(physicalCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasPhysicalCharacteristic", physicalCharacteristic); } } - getQuantity(options) { - return __awaiter(this, void 0, void 0, function* () { - const blankNode = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasQuantity"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); - }); - } - getProductType(options) { - return __awaiter(this, void 0, void 0, function* () { - let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasType"); - if (semanticId) { - const semanticObject = yield this.connector.fetch(semanticId, options); - if (semanticObject) - result = semanticObject; - } - return result; - }); + setProductType(productType) { + this.setSemanticPropertyReference("dfc-b:hasType", productType); + this.connector.store(productType); } - removeClaim(claim) { - throw new Error("Not yet implemented."); + getName() { + return this.getSemanticProperty("dfc-b:name"); } getClaims(options) { var _a, e_4, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasClaim"); + const properties = this.getSemanticPropertyAll("dfc-b:hasClaim"); try { for (var _d = true, properties_4 = __asyncValues(properties), properties_4_1; properties_4_1 = yield properties_4.next(), _a = properties_4_1.done, !_a;) { _c = properties_4_1.value; @@ -384,40 +341,63 @@ export default class DefinedProduct extends SemanticObject { return results; }); } - addClaim(claim) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasClaim"; - if (claim.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, claim); + getNutrientCharacteristics(options) { + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasNutrientCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; + }); + } + getPhysicalCharacteristics(options) { + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasPhysicalCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; + }); + } + addCertification(certification) { + if (certification.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasCertification", certification); } else { - this.connector.store(claim); - this.addSemanticPropertyReference(property, claim); + this.connector.store(certification); + this.addSemanticPropertyReference("dfc-b:hasCertification", certification); } } - setProductType(productType) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasType"; - this.setSemanticPropertyReference(property, productType); - this.connector.store(productType); + removeImage(image) { + throw new Error("Not yet implemented."); } - setQuantity(quantity) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasQuantity"; - this.setSemanticPropertyAnonymous(property, quantity); + removeAllergenCharacteristic(allergenCharacteristic) { + throw new Error("Not yet implemented."); } - addCatalogItem(catalogItem) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#referencedBy"; - if (catalogItem.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalogItem); - } - else { - this.connector.store(catalogItem); - this.addSemanticPropertyReference(property, catalogItem); - } + removePartOrigin(partOrigin) { + throw new Error("Not yet implemented."); } - getCatalogItems(options) { + getGeographicalOrigin(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasGeographicalOrigin"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + getCertifications(options) { var _a, e_5, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#referencedBy"); + const properties = this.getSemanticPropertyAll("dfc-b:hasCertification"); try { for (var _d = true, properties_5 = __asyncValues(properties), properties_5_1; properties_5_1 = yield properties_5.next(), _a = properties_5_1.done, !_a;) { _c = properties_5_1.value; @@ -443,12 +423,20 @@ 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); + getAllergenCharacteristics(options) { + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasAllergenCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; + }); } - getImages() { - return this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"); + setGeographicalOrigin(geographicalOrigin) { + this.setSemanticPropertyReference("dfc-b:hasGeographicalOrigin", geographicalOrigin); + this.connector.store(geographicalOrigin); } } //# sourceMappingURL=DefinedProduct.js.map \ No newline at end of file diff --git a/lib/DefinedProduct.js.map b/lib/DefinedProduct.js.map index 37123ca..1b5b0de 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,UAA2nB;QACh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able.d.ts @@ -1,5 +1,5 @@ export default interface Describable { - getDescription(): string; + getDescription(): string | undefined; setDescription(description: string): void; } //# sourceMappingURL=Describable.d.ts.map \ No newline at end of file diff --git a/lib/Describable.d.ts.map b/lib/Describable.d.ts.map index 4789541..84c9ab6 100644 --- a/lib/Describable.d.ts.map +++ b/lib/Describable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Describable.d.ts","sourceRoot":"","sources":["../src/Describable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,cAAc,IAAI,MAAM,CACvB;IACD,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1C"} \ No newline at end of file +{"version":3,"file":"Describable.d.ts","sourceRoot":"","sources":["../src/Describable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IAErC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1C"} \ No newline at end of file diff --git a/lib/Describable.js b/lib/Describable.js index cb66c82..1691734 100644 --- a/lib/Describable.js +++ b/lib/Describable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Describable.js.map \ No newline at end of file diff --git a/lib/Describable.js.map b/lib/Describable.js.map index 741dc18..3ab8da6 100644 --- a/lib/Describable.js.map +++ b/lib/Describable.js.map @@ -1 +1 @@ -{"version":3,"file":"Describable.js","sourceRoot":"","sources":["../src/Describable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Describable.js","sourceRoot":"","sources":["../src/Describable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Dialable.d.ts b/lib/Dialable.d.ts index 0f98b86..c3c9381 100644 --- a/lib/Dialable.d.ts +++ b/lib/Dialable.d.ts @@ -1,7 +1,7 @@ export default interface Dialable { - getNumber(): number; - getCountryCode(): number; - setNumber(number: number): void; + getNumber(): string | undefined; + getCountryCode(): number | undefined; + setNumber(number: string): void; setCountryCode(countryCode: number): void; } //# sourceMappingURL=Dialable.d.ts.map \ No newline at end of file diff --git a/lib/Dialable.d.ts.map b/lib/Dialable.d.ts.map index 08d486d..80361a3 100644 --- a/lib/Dialable.d.ts.map +++ b/lib/Dialable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Dialable.d.ts","sourceRoot":"","sources":["../src/Dialable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,QAAQ;IAEhC,SAAS,IAAI,MAAM,CAClB;IACD,cAAc,IAAI,MAAM,CACvB;IACD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1C"} \ No newline at end of file +{"version":3,"file":"Dialable.d.ts","sourceRoot":"","sources":["../src/Dialable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,QAAQ;IAEhC,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IAErC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1C"} \ No newline at end of file diff --git a/lib/Dialable.js b/lib/Dialable.js index 5b3374c..8398ac5 100644 --- a/lib/Dialable.js +++ b/lib/Dialable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Dialable.js.map \ No newline at end of file diff --git a/lib/Dialable.js.map b/lib/Dialable.js.map index 9290672..93ab167 100644 --- a/lib/Dialable.js.map +++ b/lib/Dialable.js.map @@ -1 +1 @@ -{"version":3,"file":"Dialable.js","sourceRoot":"","sources":["../src/Dialable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Dialable.js","sourceRoot":"","sources":["../src/Dialable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Ellapsable.d.ts b/lib/Ellapsable.d.ts index 8fab9a3..a0ee43c 100644 --- a/lib/Ellapsable.d.ts +++ b/lib/Ellapsable.d.ts @@ -1,6 +1,6 @@ export default interface Ellapsable { - getBeginDate(): string; - getEndDate(): string; + getBeginDate(): string | undefined; + getEndDate(): string | undefined; setBeginDate(beginDate: string): void; setEndDate(endDate: string): void; } diff --git a/lib/Ellapsable.d.ts.map b/lib/Ellapsable.d.ts.map index 07e1fd7..b989bcc 100644 --- a/lib/Ellapsable.d.ts.map +++ b/lib/Ellapsable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Ellapsable.d.ts","sourceRoot":"","sources":["../src/Ellapsable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,YAAY,IAAI,MAAM,CACrB;IACD,UAAU,IAAI,MAAM,CACnB;IACD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAElC"} \ No newline at end of file +{"version":3,"file":"Ellapsable.d.ts","sourceRoot":"","sources":["../src/Ellapsable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC,UAAU,IAAI,MAAM,GAAG,SAAS,CAAC;IAEjC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAElC"} \ No newline at end of file diff --git a/lib/Ellapsable.js b/lib/Ellapsable.js index abcb2c6..b52821c 100644 --- a/lib/Ellapsable.js +++ b/lib/Ellapsable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Ellapsable.js.map \ No newline at end of file diff --git a/lib/Ellapsable.js.map b/lib/Ellapsable.js.map index 9c3c2cf..3791fc0 100644 --- a/lib/Ellapsable.js.map +++ b/lib/Ellapsable.js.map @@ -1 +1 @@ -{"version":3,"file":"Ellapsable.js","sourceRoot":"","sources":["../src/Ellapsable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Ellapsable.js","sourceRoot":"","sources":["../src/Ellapsable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/EmailOwner.d.ts b/lib/EmailOwner.d.ts new file mode 100644 index 0000000..fc33f2c --- /dev/null +++ b/lib/EmailOwner.d.ts @@ -0,0 +1,6 @@ +import ContactableByEmail from "./ContactableByEmail.js"; +export default interface EmailOwner extends ContactableByEmail { + addEmailAddress(emailAddress: string): void; + removeEmailAddress(emailAddress: string): void; +} +//# sourceMappingURL=EmailOwner.d.ts.map \ No newline at end of file diff --git a/lib/EmailOwner.d.ts.map b/lib/EmailOwner.d.ts.map new file mode 100644 index 0000000..65d8ae2 --- /dev/null +++ b/lib/EmailOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"EmailOwner.d.ts","sourceRoot":"","sources":["../src/EmailOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,UAAW,SAAQ,kBAAkB;IAE7D,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5C,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAE/C"} \ No newline at end of file diff --git a/lib/EmailOwner.js b/lib/EmailOwner.js new file mode 100644 index 0000000..479721e --- /dev/null +++ b/lib/EmailOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=EmailOwner.js.map \ No newline at end of file diff --git a/lib/EmailOwner.js.map b/lib/EmailOwner.js.map new file mode 100644 index 0000000..812df67 --- /dev/null +++ b/lib/EmailOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"EmailOwner.js","sourceRoot":"","sources":["../src/EmailOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/Enterprise.d.ts b/lib/Enterprise.d.ts index de5d6b5..23353f8 100644 --- a/lib/Enterprise.d.ts +++ b/lib/Enterprise.d.ts @@ -1,21 +1,24 @@ -import ISuppliedProduct from "./ISuppliedProduct.js"; import ICatalogItem from "./ICatalogItem.js"; -import IEnterprise from "./IEnterprise.js"; -import ICatalog from "./ICatalog.js"; -import Agent from "./Agent.js"; +import ManagedByMainContact from "./ManagedByMainContact.js"; import ICustomerCategory from "./ICustomerCategory.js"; +import ISuppliedProduct from "./ISuppliedProduct.js"; +import IAddress from "./IAddress.js"; +import ProductSupplier from "./ProductSupplier.js"; +import ICatalog from "./ICatalog.js"; import Onboardable from "./Onboardable.js"; +import IEnterprise from "./IEnterprise.js"; import ITechnicalProduct from "./ITechnicalProduct.js"; -import ProductSupplier from "./ProductSupplier.js"; -import IAddress from "./IAddress.js"; +import IPerson from "./IPerson.js"; +import Agent from "./Agent.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; -export default class Enterprise extends Agent implements Onboardable, ProductSupplier, IEnterprise { +export default class Enterprise extends Agent implements ProductSupplier, Onboardable, IEnterprise, ManagedByMainContact { constructor(parameters: { connector: IConnector; semanticId?: string; other?: Semanticable; + name?: string; localizations?: IAddress[]; description?: string; vatNumber?: string; @@ -24,25 +27,31 @@ export default class Enterprise extends Agent implements Onboardable, ProductSup catalogItems?: ICatalogItem[]; suppliedProducts?: ISuppliedProduct[]; technicalProducts?: ITechnicalProduct[]; + mainContact?: IPerson; + logo?: string; doNotStore?: boolean; }); - manageCatalogItem(catalogItem: ICatalogItem): void; - getManagedCatalogItems(options?: IGetterOptions): Promise>; - unmanageCatalogItem(catalogItem: ICatalogItem): void; - maintainCatalog(catalog: ICatalog): void; - getMaintainedCatalogs(options?: IGetterOptions): Promise>; + getManagedCatalogItems(options?: IGetterOptions): Promise; + addCustomerCategory(customerCategory: ICustomerCategory): void; unmaintainCatalog(catalog: ICatalog): void; - unsupplyProduct(suppliedProduct: ISuppliedProduct): void; + setVatNumber(vatNumber: string): void; + setDescription(description: string): void; + setName(name: string): void; + maintainCatalog(catalog: ICatalog): void; + getDescription(): string | undefined; supplyProduct(suppliedProduct: ISuppliedProduct): void; - getSuppliedProducts(options?: IGetterOptions): Promise>; + getName(): string | undefined; + getProposedTechnicalProducts(options?: IGetterOptions): Promise; + unmanageCatalogItem(catalogItem: ICatalogItem): void; unproposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; + getMaintainedCatalogs(options?: IGetterOptions): Promise; + setMainContact(mainContact: IPerson): void; + unsupplyProduct(suppliedProduct: ISuppliedProduct): void; + getCustomerCategories(options?: IGetterOptions): Promise; + getMainContact(options?: IGetterOptions): Promise; proposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; - getProposedTechnicalProducts(options?: IGetterOptions): Promise>; - setDescription(description: string): void; - getDescription(): string; - setVatNumber(vatNumber: string): void; - getVatNumber(): string; - getCustomerCategories(options?: IGetterOptions): Promise>; - addCustomerCategory(customerCategory: ICustomerCategory): void; + getVatNumber(): string | undefined; + getSuppliedProducts(options?: IGetterOptions): Promise; + manageCatalogItem(catalogItem: ICatalogItem): void; } //# sourceMappingURL=Enterprise.d.ts.map \ No newline at end of file diff --git a/lib/Enterprise.d.ts.map b/lib/Enterprise.d.ts.map index bd380fb..a01bc24 100644 --- a/lib/Enterprise.d.ts.map +++ b/lib/Enterprise.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Enterprise.d.ts","sourceRoot":"","sources":["../src/Enterprise.ts"],"names":[],"mappings":"AAwBA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAM,YAAW,WAAW,EAAE,eAAe,EAAE,WAAW;gBAG9E,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;Q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,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAU1E,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAM1C,eAAe,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI;IAIlD,qBAAqB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAU7E,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAU5E,wBAAwB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI;IAUpE,YAAY,IAAI,MAAM,GAAG,SAAS;IAI5B,mBAAmB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAUhF,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI;CASzD"} \ No newline at end of file diff --git a/lib/Enterprise.js b/lib/Enterprise.js index 0f30921..bfd93f9 100644 --- a/lib/Enterprise.js +++ b/lib/Enterprise.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,48 +15,64 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import Agent from "./Agent.js"; +const ENTERPRISE_SEM_TYPE = "dfc-b:Enterprise"; export default class Enterprise extends Agent { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Enterprise"; + const type = ENTERPRISE_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, localizations: parameters.localizations }); - if (!parameters.doNotStore) + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: type, + localizations: parameters.localizations, + logo: parameters.logo + }); + } + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.description) + } + if (parameters.name) { + this.setName(parameters.name); + } + if (parameters.description) { this.setDescription(parameters.description); - if (parameters.vatNumber) + } + if (parameters.vatNumber) { this.setVatNumber(parameters.vatNumber); - if (parameters.customerCategories) + } + if (parameters.customerCategories) { parameters.customerCategories.forEach(e => this.addCustomerCategory(e)); - if (parameters.catalogs) + } + if (parameters.catalogs) { parameters.catalogs.forEach(e => this.maintainCatalog(e)); - if (parameters.catalogItems) + } + if (parameters.catalogItems) { parameters.catalogItems.forEach(e => this.manageCatalogItem(e)); - if (parameters.suppliedProducts) + } + if (parameters.suppliedProducts) { parameters.suppliedProducts.forEach(e => this.supplyProduct(e)); - if (parameters.technicalProducts) + } + if (parameters.technicalProducts) { parameters.technicalProducts.forEach(e => this.proposeTechnicalProducts(e)); - } - manageCatalogItem(catalogItem) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#manages"; - if (catalogItem.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalogItem); } - else { - this.connector.store(catalogItem); - this.addSemanticPropertyReference(property, catalogItem); + if (parameters.mainContact) { + this.setMainContact(parameters.mainContact); } } getManagedCatalogItems(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#manages"); + const properties = this.getSemanticPropertyAll("dfc-b:manages"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -105,24 +98,56 @@ export default class Enterprise extends Agent { return results; }); } - unmanageCatalogItem(catalogItem) { + addCustomerCategory(customerCategory) { + if (customerCategory.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:defines", customerCategory); + } + else { + this.connector.store(customerCategory); + this.addSemanticPropertyReference("dfc-b:defines", customerCategory); + } + } + unmaintainCatalog(catalog) { throw new Error("Not yet implemented."); } + setVatNumber(vatNumber) { + this.setSemanticPropertyLiteral("dfc-b:VATnumber", vatNumber); + } + setDescription(description) { + this.setSemanticPropertyLiteral("dfc-b:hasDescription", description); + } + setName(name) { + this.setSemanticPropertyLiteral("dfc-b:name", name); + } maintainCatalog(catalog) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintains"; if (catalog.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalog); + this.addSemanticPropertyAnonymous("dfc-b:maintains", catalog); } else { this.connector.store(catalog); - this.addSemanticPropertyReference(property, catalog); + this.addSemanticPropertyReference("dfc-b:maintains", catalog); } } - getMaintainedCatalogs(options) { + getDescription() { + return this.getSemanticProperty("dfc-b:hasDescription"); + } + supplyProduct(suppliedProduct) { + if (suppliedProduct.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:supplies", suppliedProduct); + } + else { + this.connector.store(suppliedProduct); + this.addSemanticPropertyReference("dfc-b:supplies", suppliedProduct); + } + } + getName() { + return this.getSemanticProperty("dfc-b:name"); + } + getProposedTechnicalProducts(options) { var _a, e_2, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintains"); + const properties = this.getSemanticPropertyAll("dfc-b:proposes"); try { for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { _c = properties_2_1.value; @@ -148,27 +173,17 @@ export default class Enterprise extends Agent { return results; }); } - unmaintainCatalog(catalog) { + unmanageCatalogItem(catalogItem) { throw new Error("Not yet implemented."); } - unsupplyProduct(suppliedProduct) { + unproposeTechnicalProducts(technicalProducts) { throw new Error("Not yet implemented."); } - supplyProduct(suppliedProduct) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#supplies"; - if (suppliedProduct.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, suppliedProduct); - } - else { - this.connector.store(suppliedProduct); - this.addSemanticPropertyReference(property, suppliedProduct); - } - } - getSuppliedProducts(options) { + getMaintainedCatalogs(options) { var _a, e_3, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#supplies"); + const properties = this.getSemanticPropertyAll("dfc-b:maintains"); try { for (var _d = true, properties_3 = __asyncValues(properties), properties_3_1; properties_3_1 = yield properties_3.next(), _a = properties_3_1.done, !_a;) { _c = properties_3_1.value; @@ -194,24 +209,18 @@ export default class Enterprise extends Agent { return results; }); } - unproposeTechnicalProducts(technicalProducts) { - throw new Error("Not yet implemented."); + setMainContact(mainContact) { + this.setSemanticPropertyReference("dfc-b:hasMainContact", mainContact); + this.connector.store(mainContact); } - proposeTechnicalProducts(technicalProducts) { - const property = ""; - if (technicalProducts.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, technicalProducts); - } - else { - this.connector.store(technicalProducts); - this.addSemanticPropertyReference(property, technicalProducts); - } + unsupplyProduct(suppliedProduct) { + throw new Error("Not yet implemented."); } - getProposedTechnicalProducts(options) { + getCustomerCategories(options) { var _a, e_4, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll(""); + const properties = this.getSemanticPropertyAll("dfc-b:defines"); try { for (var _d = true, properties_4 = __asyncValues(properties), properties_4_1; properties_4_1 = yield properties_4.next(), _a = properties_4_1.done, !_a;) { _c = properties_4_1.value; @@ -237,25 +246,35 @@ export default class Enterprise extends Agent { return results; }); } - setDescription(description) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasDescription"; - this.setSemanticPropertyLiteral(property, description); - } - getDescription() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasDescription"); + getMainContact(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasMainContact"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); } - setVatNumber(vatNumber) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATnumber"; - this.setSemanticPropertyLiteral(property, vatNumber); + proposeTechnicalProducts(technicalProducts) { + if (technicalProducts.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:proposes", technicalProducts); + } + else { + this.connector.store(technicalProducts); + this.addSemanticPropertyReference("dfc-b:proposes", technicalProducts); + } } getVatNumber() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATnumber"); + return this.getSemanticProperty("dfc-b:VATnumber"); } - getCustomerCategories(options) { + getSuppliedProducts(options) { var _a, e_5, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#defines"); + const properties = this.getSemanticPropertyAll("dfc-b:supplies"); try { for (var _d = true, properties_5 = __asyncValues(properties), properties_5_1; properties_5_1 = yield properties_5.next(), _a = properties_5_1.done, !_a;) { _c = properties_5_1.value; @@ -281,14 +300,13 @@ export default class Enterprise extends Agent { return results; }); } - addCustomerCategory(customerCategory) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#defines"; - if (customerCategory.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, customerCategory); + manageCatalogItem(catalogItem) { + if (catalogItem.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:manages", catalogItem); } else { - this.connector.store(customerCategory); - this.addSemanticPropertyReference(property, customerCategory); + this.connector.store(catalogItem); + this.addSemanticPropertyReference("dfc-b:manages", catalogItem); } } } diff --git a/lib/Enterprise.js.map b/lib/Enterprise.js.map index 028ee7e..a39bc09 100644 --- a/lib/Enterprise.js.map +++ b/lib/Enterprise.js.map @@ -1 +1 @@ -{"version":3,"file":"Enterprise.js","sourceRoot":"","sources":["../src/Enterprise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAMF,OAAO,KAAK,MAAM,YAAY,CAAA;AAW9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AC,CAAC;;gBACjE,KAA+B,eAAA,eAAA,cAAA,UAAU,CAAA,gBAAA;oBAAV,0BAAU;oBAAV,WAAU;;wBAA9B,MAAM,UAAU,KAAA,CAAA;wBAC1B,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACjG,IAAI,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAmB,cAAc,CAAC,CAAC;;;;;iBACnE;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;IAEM,iBAAiB,CAAC,WAAyB;QACjD,IAAI,WAAW,CAAC,yBAAyB,EAAE,EAAE;YAC5C,IAAI,CAAC,4BAA4B,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;SAChE;aACI;YACJ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YAClC,IAAI,CAAC,4BAA4B,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;SAChE;IACF,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Exhibitable.d.ts b/lib/Exhibitable.d.ts index bd7978c..9afb899 100644 --- a/lib/Exhibitable.d.ts +++ b/lib/Exhibitable.d.ts @@ -1,5 +1,5 @@ export default interface Exhibitable { - getImage(): string; + getImage(): string | undefined; setImage(image: string): void; } //# sourceMappingURL=Exhibitable.d.ts.map \ No newline at end of file diff --git a/lib/Exhibitable.d.ts.map b/lib/Exhibitable.d.ts.map index ba4a335..e6a79ee 100644 --- a/lib/Exhibitable.d.ts.map +++ b/lib/Exhibitable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Exhibitable.d.ts","sourceRoot":"","sources":["../src/Exhibitable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,QAAQ,IAAI,MAAM,CACjB;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file +{"version":3,"file":"Exhibitable.d.ts","sourceRoot":"","sources":["../src/Exhibitable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;IAE/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file diff --git a/lib/Exhibitable.js b/lib/Exhibitable.js index 7e64a22..178febb 100644 --- a/lib/Exhibitable.js +++ b/lib/Exhibitable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Exhibitable.js.map \ No newline at end of file diff --git a/lib/Exhibitable.js.map b/lib/Exhibitable.js.map index ff6910e..d54f91a 100644 --- a/lib/Exhibitable.js.map +++ b/lib/Exhibitable.js.map @@ -1 +1 @@ -{"version":3,"file":"Exhibitable.js","sourceRoot":"","sources":["../src/Exhibitable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Exhibitable.js","sourceRoot":"","sources":["../src/Exhibitable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Flow.d.ts b/lib/Flow.d.ts new file mode 100644 index 0000000..f598983 --- /dev/null +++ b/lib/Flow.d.ts @@ -0,0 +1,19 @@ +import IFlow from "./IFlow.js"; +import IQuantity from "./IQuantity.js"; +import { SemanticObject } from "@virtual-assembly/semantizer"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +export default abstract class Flow extends SemanticObject implements IFlow { + protected connector: IConnector; + protected constructor(parameters: { + connector: IConnector; + semanticId?: string; + semanticType?: string; + other?: Semanticable; + quantity?: IQuantity; + doNotStore?: boolean; + }); + setQuantity(quantity: IQuantity): void; + getQuantity(): IQuantity | undefined; +} +//# sourceMappingURL=Flow.d.ts.map \ No newline at end of file diff --git a/lib/Flow.d.ts.map b/lib/Flow.d.ts.map new file mode 100644 index 0000000..716eb2a --- /dev/null +++ b/lib/Flow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../src/Flow.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAGzC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,IAAK,SAAQ,cAAe,YAAW,KAAK;IAEzE,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;IAEhC,SAAS,aAAa,UAAU,EAAE;QACjC,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAyBM,WAAW,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI;IAKtC,WAAW,IAAI,SAAS,GAAG,SAAS;CAI3C"} \ No newline at end of file diff --git a/lib/Flow.js b/lib/Flow.js new file mode 100644 index 0000000..a0ad3e4 --- /dev/null +++ b/lib/Flow.js @@ -0,0 +1,31 @@ +import { SemanticObject } from "@virtual-assembly/semantizer"; +export default class Flow extends SemanticObject { + constructor(parameters) { + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + } + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: parameters.semanticType, + }); + } + this.connector = parameters.connector; + if (parameters.quantity) { + this.setQuantity(parameters.quantity); + } + } + setQuantity(quantity) { + this.setSemanticPropertyAnonymous("dfc-b:hasQuantity", quantity); + } + getQuantity() { + const blankNode = this.getSemanticPropertyAnonymous("dfc-b:hasQuantity"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + } +} +//# sourceMappingURL=Flow.js.map \ No newline at end of file diff --git a/lib/Flow.js.map b/lib/Flow.js.map new file mode 100644 index 0000000..41a759d --- /dev/null +++ b/lib/Flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Flow.js","sourceRoot":"","sources":["../src/Flow.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAgB,IAAK,SAAQ,cAAc;IAIxD,YAAsB,UAOrB;QAEA,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE,UAAU,CAAC,KAAK;aACvB,CAAC,CAAC;SACH;aAAM;YACN,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,YAAY,EAAE,UAAU,CAAC,YAAa;aAEvC,CAAC,CAAC;SACF;QACD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,UAAU,CAAC,QAAQ,EAAE;YACxB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;SACtC;IAEF,CAAC;IAEM,WAAW,CAAC,QAAmB;QACrC,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAElE,CAAC;IAEM,WAAW;QACjB,MAAM,SAAS,GAAQ,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,CAAC,CAAC;QAC9E,OAAmB,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACvF,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Geolocalizable.d.ts b/lib/Geolocalizable.d.ts index 3449991..0abad84 100644 --- a/lib/Geolocalizable.d.ts +++ b/lib/Geolocalizable.d.ts @@ -1,6 +1,6 @@ export default interface Geolocalizable { - getLatitude(): number; - getLongitude(): number; + getLatitude(): number | undefined; + getLongitude(): number | undefined; setLatitude(latitude: number): void; setLongitude(longitude: number): void; } diff --git a/lib/Geolocalizable.d.ts.map b/lib/Geolocalizable.d.ts.map index 9126322..bbebb39 100644 --- a/lib/Geolocalizable.d.ts.map +++ b/lib/Geolocalizable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Geolocalizable.d.ts","sourceRoot":"","sources":["../src/Geolocalizable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,cAAc;IAEtC,WAAW,IAAI,MAAM,CACpB;IACD,YAAY,IAAI,MAAM,CACrB;IACD,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAEtC"} \ No newline at end of file +{"version":3,"file":"Geolocalizable.d.ts","sourceRoot":"","sources":["../src/Geolocalizable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,cAAc;IAEtC,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAElC,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAEtC"} \ No newline at end of file diff --git a/lib/Geolocalizable.js b/lib/Geolocalizable.js index fb10baa..6600f00 100644 --- a/lib/Geolocalizable.js +++ b/lib/Geolocalizable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Geolocalizable.js.map \ No newline at end of file diff --git a/lib/Geolocalizable.js.map b/lib/Geolocalizable.js.map index 6d5dcc1..c5e2f9c 100644 --- a/lib/Geolocalizable.js.map +++ b/lib/Geolocalizable.js.map @@ -1 +1 @@ -{"version":3,"file":"Geolocalizable.js","sourceRoot":"","sources":["../src/Geolocalizable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Geolocalizable.js","sourceRoot":"","sources":["../src/Geolocalizable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/Groupable.d.ts.map b/lib/Groupable.d.ts.map index 41d6639..e95649a 100644 --- a/lib/Groupable.d.ts.map +++ b/lib/Groupable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Groupable.d.ts","sourceRoot":"","sources":["../src/Groupable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,SAAS;CAGjC"} \ No newline at end of file +{"version":3,"file":"Groupable.d.ts","sourceRoot":"","sources":["../src/Groupable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,SAAS;CAGjC"} \ No newline at end of file diff --git a/lib/Groupable.js b/lib/Groupable.js index e6795e6..b4ecef2 100644 --- a/lib/Groupable.js +++ b/lib/Groupable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Groupable.js.map \ No newline at end of file diff --git a/lib/Groupable.js.map b/lib/Groupable.js.map index 8d3c2bd..47913dd 100644 --- a/lib/Groupable.js.map +++ b/lib/Groupable.js.map @@ -1 +1 @@ -{"version":3,"file":"Groupable.js","sourceRoot":"","sources":["../src/Groupable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Groupable.js","sourceRoot":"","sources":["../src/Groupable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/IAddress.d.ts.map b/lib/IAddress.d.ts.map index 14f3494..d4b360b 100644 --- a/lib/IAddress.d.ts.map +++ b/lib/IAddress.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IAddress.d.ts","sourceRoot":"","sources":["../src/IAddress.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,QAAS,SAAQ,YAAY,EAAE,WAAW;CAGlE"} \ No newline at end of file +{"version":3,"file":"IAddress.d.ts","sourceRoot":"","sources":["../src/IAddress.ts"],"names":[],"mappings":"AAuBA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,QAAS,SAAQ,YAAY,EAAE,WAAW;CAGlE"} \ No newline at end of file diff --git a/lib/IAgent.d.ts b/lib/IAgent.d.ts index 448752f..5d9eb01 100644 --- a/lib/IAgent.d.ts +++ b/lib/IAgent.d.ts @@ -1,5 +1,11 @@ -import Identifiable from "./Identifiable.js"; +import WebsiteOwner from "./WebsiteOwner.js"; +import PhoneNumberOwner from "./PhoneNumberOwner.js"; +import SocialMediaOwner from "./SocialMediaOwner.js"; +import AddressOwner from "./AddressOwner.js"; +import EmailOwner from "./EmailOwner.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface IAgent extends Semanticable, Identifiable { +export default interface IAgent extends Semanticable, PhoneNumberOwner, SocialMediaOwner, EmailOwner, AddressOwner, WebsiteOwner { + getLogo(): string | undefined; + setLogo(logo: string): void; } //# sourceMappingURL=IAgent.d.ts.map \ No newline at end of file diff --git a/lib/IAgent.d.ts.map b/lib/IAgent.d.ts.map index a89e48a..e30893b 100644 --- a/lib/IAgent.d.ts.map +++ b/lib/IAgent.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IAgent.d.ts","sourceRoot":"","sources":["../src/IAgent.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY,EAAE,YAAY;CAGjE"} \ No newline at end of file +{"version":3,"file":"IAgent.d.ts","sourceRoot":"","sources":["../src/IAgent.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY;IAE/H,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAE5B"} \ No newline at end of file diff --git a/lib/IAllergenCharacteristic.d.ts.map b/lib/IAllergenCharacteristic.d.ts.map index 5b8cd7c..4a24900 100644 --- a/lib/IAllergenCharacteristic.d.ts.map +++ b/lib/IAllergenCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IAllergenCharacteristic.d.ts","sourceRoot":"","sources":["../src/IAllergenCharacteristic.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file +{"version":3,"file":"IAllergenCharacteristic.d.ts","sourceRoot":"","sources":["../src/IAllergenCharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file diff --git a/lib/ICatalog.d.ts.map b/lib/ICatalog.d.ts.map index 0dad5de..2751dad 100644 --- a/lib/ICatalog.d.ts.map +++ b/lib/ICatalog.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ICatalog.d.ts","sourceRoot":"","sources":["../src/ICatalog.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,QAAS,SAAQ,YAAY,EAAE,SAAS;CAGhE"} \ No newline at end of file +{"version":3,"file":"ICatalog.d.ts","sourceRoot":"","sources":["../src/ICatalog.ts"],"names":[],"mappings":"AAuBA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,QAAS,SAAQ,YAAY,EAAE,SAAS;CAGhE"} \ No newline at end of file diff --git a/lib/ICatalogItem.d.ts b/lib/ICatalogItem.d.ts index a5312d6..9d3d915 100644 --- a/lib/ICatalogItem.d.ts +++ b/lib/ICatalogItem.d.ts @@ -1,9 +1,9 @@ -import Catalogable from "./Catalogable.js"; -import Offerable from "./Offerable.js"; import Stockable from "./Stockable.js"; +import Offerable from "./Offerable.js"; +import Catalogable from "./Catalogable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface ICatalogItem extends Semanticable, Catalogable, Stockable, Offerable { - getSku(): string; +export default interface ICatalogItem extends Semanticable, Catalogable, Offerable, Stockable { + getSku(): string | undefined; setSku(sku: string): void; } //# sourceMappingURL=ICatalogItem.d.ts.map \ No newline at end of file diff --git a/lib/ICatalogItem.d.ts.map b/lib/ICatalogItem.d.ts.map index 08c42b5..df4aadb 100644 --- a/lib/ICatalogItem.d.ts.map +++ b/lib/ICatalogItem.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ICatalogItem.d.ts","sourceRoot":"","sources":["../src/ICatalogItem.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS;IAE5F,MAAM,IAAI,MAAM,CACf;IACD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1B"} \ No newline at end of file +{"version":3,"file":"ICatalogItem.d.ts","sourceRoot":"","sources":["../src/ICatalogItem.ts"],"names":[],"mappings":"AAuBA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS;IAE5F,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC;IAE7B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1B"} \ No newline at end of file diff --git a/lib/ICharacteristic.d.ts.map b/lib/ICharacteristic.d.ts.map index 7d9c9ba..45af483 100644 --- a/lib/ICharacteristic.d.ts.map +++ b/lib/ICharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ICharacteristic.d.ts","sourceRoot":"","sources":["../src/ICharacteristic.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,YAAY,EAAE,UAAU;CAGxE"} \ No newline at end of file +{"version":3,"file":"ICharacteristic.d.ts","sourceRoot":"","sources":["../src/ICharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,YAAY,EAAE,UAAU;CAGxE"} \ No newline at end of file diff --git a/lib/IConnector.d.ts b/lib/IConnector.d.ts index 56ba770..775ad20 100644 --- a/lib/IConnector.d.ts +++ b/lib/IConnector.d.ts @@ -1,7 +1,10 @@ -import { Semanticable } from "@virtual-assembly/semantizer"; +import { ISemantizer, Semanticable } from "@virtual-assembly/semantizer"; import IConnectorFactory from "./IConnectorFactory.js"; import IGetterOptions from "./IGetterOptions.js"; +import IConnectorExportOptions from "./IConnectorExportOptions.js"; +import IConnectorImportOptions from "./IConnectorImportOptions.js"; import IAddress from "./IAddress"; +import IAgent from "./IAgent"; import IAllergenCharacteristic from "./IAllergenCharacteristic"; import ICatalog from "./ICatalog"; import ICatalogItem from "./ICatalogItem"; @@ -16,20 +19,12 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic"; import IPrice from "./IPrice"; import IQuantity from "./IQuantity"; import ISaleSession from "./ISaleSession"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct"; -import IUnit from "./IUnit"; -import IAllergenDimension from "./IAllergenDimension"; -import INutrientDimension from "./INutrientDimension"; -import IAgent from "./IAgent"; -import IPhysicalDimension from "./IPhysicalDimension"; -import IPartOrigin from "./IPartOrigin"; -import INatureOrigin from "./INatureOrigin"; -import ICertification from "./ICertification"; -import IGeographicalOrigin from "./IGeographicalOrigin"; -import IClaim from "./IClaim"; -import IProductType from "./IProductType"; -import IConnectorExportOptions from "./IConnectorExportOptions.js"; -import IConnectorImportOptions from "./IConnectorImportOptions.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default interface IConnector { createAddress(parameters: { doNotStore?: boolean; @@ -42,9 +37,9 @@ export default interface IConnector { }): IAddress; createAllergenCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - allergenDimension?: IAllergenDimension; + allergenDimension?: ISKOSConcept; }): IAllergenCharacteristic; createCatalog(parameters: { doNotStore?: boolean; @@ -83,9 +78,9 @@ export default interface IConnector { }): IEnterprise; createNutrientCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - nutrientDimension?: INutrientDimension; + nutrientDimension?: ISKOSConcept; }): INutrientCharacteristic; createOffer(parameters: { doNotStore?: boolean; @@ -126,19 +121,19 @@ export default interface IConnector { }): IPerson; createPhysicalCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - physicalDimension?: IPhysicalDimension; + physicalDimension?: ISKOSConcept; }): IPhysicalCharacteristic; createPrice(parameters: { other?: Semanticable; value?: number; vatRate?: number; - unit?: IUnit; + unit?: ISKOSConcept; }): IPrice; createQuantity(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }): IQuantity; createSaleSession(parameters: { @@ -156,24 +151,49 @@ export default interface IConnector { other?: Semanticable; name?: string; description?: string; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; totalTheoreticalStock?: number; }): ISuppliedProduct; + createPlannedTransformation(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + transformationType?: ISKOSConcept; + consumptionFlow?: IPlannedConsumptionFlow; + productionFlow?: IPlannedProductionFlow; + }): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: IDefinedProduct; + }): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: ISuppliedProduct; + }): IPlannedProductionFlow; export(objects: Array, options?: IConnectorExportOptions): Promise; fetch(semanticObjectId: string, options?: IGetterOptions): Promise; + getSemantizer(): ISemantizer; getDefaultFactory(): IConnectorFactory; import(data: string, options?: IConnectorImportOptions): Promise>; importOne(data: string, options?: IConnectorImportOptions): Promise; diff --git a/lib/IConnector.d.ts.map b/lib/IConnector.d.ts.map index 2f00ea8..b19929e 100644 --- a/lib/IConnector.d.ts.map +++ b/lib/IConnector.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IConnector.d.ts","sourceRoot":"","sources":["../src/IConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,W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AC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IACtF,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAC9F,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC;IAEjG,KAAK,CAAC,cAAc,EAAE,YAAY,GAAG,IAAI,CAAC;CAE7C"} \ No newline at end of file diff --git a/lib/IConnectorFactory.d.ts b/lib/IConnectorFactory.d.ts index 8f68a88..459528e 100644 --- a/lib/IConnectorFactory.d.ts +++ b/lib/IConnectorFactory.d.ts @@ -2,6 +2,7 @@ import { Semanticable } from "@virtual-assembly/semantizer"; import DatasetExt from "rdf-ext/lib/Dataset"; import { DatasetCore } from '@rdfjs/types'; import IAddress from "./IAddress"; +import IAgent from "./IAgent"; import IAllergenCharacteristic from "./IAllergenCharacteristic"; import ICatalog from "./ICatalog"; import ICatalogItem from "./ICatalogItem"; @@ -16,18 +17,12 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic"; import IPrice from "./IPrice"; import IQuantity from "./IQuantity"; import ISaleSession from "./ISaleSession"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct"; -import IUnit from "./IUnit"; -import IAllergenDimension from "./IAllergenDimension"; -import INutrientDimension from "./INutrientDimension"; -import IAgent from "./IAgent"; -import IPhysicalDimension from "./IPhysicalDimension"; -import IPartOrigin from "./IPartOrigin"; -import INatureOrigin from "./INatureOrigin"; -import ICertification from "./ICertification"; -import IGeographicalOrigin from "./IGeographicalOrigin"; -import IClaim from "./IClaim"; -import IProductType from "./IProductType"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow"; +import IPlannedProductionFlow from "./IPlannedProductionFlow"; +import IPlannedTransformation from "./IPlannedTransformation"; +import IDefinedProduct from "./IDefinedProduct"; export default interface IConnectorFactory { createFromRdfDataset(dataset: DatasetExt): Semanticable | undefined; createFromRdfDatasetCore(dataset: DatasetCore): Semanticable | undefined; @@ -43,9 +38,9 @@ export default interface IConnectorFactory { }): IAddress; createAllergenCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - allergenDimension?: IAllergenDimension; + allergenDimension?: ISKOSConcept; }): IAllergenCharacteristic; createCatalog(parameters: { doNotStore?: boolean; @@ -84,9 +79,9 @@ export default interface IConnectorFactory { }): IEnterprise; createNutrientCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - nutrientDimension?: INutrientDimension; + nutrientDimension?: ISKOSConcept; }): INutrientCharacteristic; createOffer(parameters: { doNotStore?: boolean; @@ -127,19 +122,19 @@ export default interface IConnectorFactory { }): IPerson; createPhysicalCharacteristic(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - physicalDimension?: IPhysicalDimension; + physicalDimension?: ISKOSConcept; }): IPhysicalCharacteristic; createPrice(parameters: { other?: Semanticable; value?: number; vatRate?: number; - unit?: IUnit; + unit?: ISKOSConcept; }): IPrice; createQuantity(parameters: { other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }): IQuantity; createSaleSession(parameters: { @@ -157,21 +152,45 @@ export default interface IConnectorFactory { other?: Semanticable; name?: string; description?: string; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; totalTheoreticalStock?: number; }): ISuppliedProduct; + createPlannedTransformation(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + transformationType?: ISKOSConcept; + consumptionFlow?: IPlannedConsumptionFlow; + productionFlow?: IPlannedProductionFlow; + }): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: IDefinedProduct; + }): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: { + doNotStore?: boolean; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: ISuppliedProduct; + }): IPlannedProductionFlow; } //# sourceMappingURL=IConnectorFactory.d.ts.map \ No newline at end of file diff --git a/lib/IConnectorFactory.d.ts.map b/lib/IConnectorFactory.d.ts.map index 116aedc..d176cf8 100644 --- a/lib/IConnectorFactory.d.ts.map +++ b/lib/IConnectorFactory.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IConnectorFactory.d.ts","sourceRoot":"","sources":["../src/IConnectorFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,M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CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,gBAAgB,CAAC;IACvpB,2BAA2B,CAAC,UAAU,EAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAA,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,kBAAkB,CAAC,EAAE,YAAY,CAAC;QAAC,eAAe,CAAC,EAAE,uBAAuB,CAAC;QAAC,cAAc,CAAC,EAAE,sBAAsB,CAAA;KAAC,GAAG,sBAAsB,CAAC;IACzP,4BAA4B,CAAC,UAAU,EAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;QAAC,cAAc,CAAC,EAAE,sBAAsB,CAAC;QAAC,OAAO,CAAC,EAAE,eAAe,CAAA;KAAC,GAAG,uBAAuB,CAAC;IAC/N,2BAA2B,CAAC,UAAU,EAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;QAAC,cAAc,CAAC,EAAE,sBAAsB,CAAC;QAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;KAAC,GAAG,sBAAsB,CAAC;CAEjO"} \ No newline at end of file diff --git a/lib/ICustomerCategory.d.ts b/lib/ICustomerCategory.d.ts index 64c90a5..9a52572 100644 --- a/lib/ICustomerCategory.d.ts +++ b/lib/ICustomerCategory.d.ts @@ -1,5 +1,5 @@ -import Describable from "./Describable.js"; import Groupable from "./Groupable.js"; +import Describable from "./Describable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface ICustomerCategory extends Semanticable, Describable, Groupable { } diff --git a/lib/ICustomerCategory.d.ts.map b/lib/ICustomerCategory.d.ts.map index 5f3d05d..be4a805 100644 --- a/lib/ICustomerCategory.d.ts.map +++ b/lib/ICustomerCategory.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ICustomerCategory.d.ts","sourceRoot":"","sources":["../src/ICustomerCategory.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,YAAY,EAAE,WAAW,EAAE,SAAS;CAGtF"} \ No newline at end of file +{"version":3,"file":"ICustomerCategory.d.ts","sourceRoot":"","sources":["../src/ICustomerCategory.ts"],"names":[],"mappings":"AAuBA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,YAAY,EAAE,WAAW,EAAE,SAAS;CAGtF"} \ No newline at end of file diff --git a/lib/IDefinedProduct.d.ts b/lib/IDefinedProduct.d.ts index 875fe67..9247712 100644 --- a/lib/IDefinedProduct.d.ts +++ b/lib/IDefinedProduct.d.ts @@ -1,21 +1,21 @@ -import IProductType from "./IProductType.js"; import Certifiable from "./Certifiable.js"; -import Manufacturable from "./Manufacturable.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import Proposable from "./Proposable.js"; -import Nameable from "./Nameable.js"; import Describable from "./Describable.js"; +import Nameable from "./Nameable.js"; import IQuantity from "./IQuantity.js"; -import IClaim from "./IClaim.js"; +import Manufacturable from "./Manufacturable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface IDefinedProduct extends Semanticable, Proposable, Describable, Certifiable, Manufacturable, Nameable { - addClaim(claim: IClaim): void; - getQuantity(): Promise; +export default interface IDefinedProduct extends Semanticable, Describable, Certifiable, Proposable, Nameable, Manufacturable { + addClaim(claim: ISKOSConcept): void; + getQuantity(): IQuantity | undefined; setQuantity(quantity: IQuantity): void; - getClaims(): Promise>; - getProductType(): Promise; - setProductType(productType: IProductType): void; - removeClaim(claim: IClaim): void; - addImage(url: string): void; + getClaims(): Promise; + getProductType(): Promise; + setProductType(productType: ISKOSConcept): void; + removeClaim(claim: ISKOSConcept): void; + addImage(image: string): void; + removeImage(image: 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 7f92e43..05fface 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,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ;IAE5H,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAC5C;IACD,WAAW,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IACvC,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,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,GAAG,IAAI,CAAC;IAE9B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,SAAS,IAAI,MAAM,EAAE,CAAC;CAEtB"} \ No newline at end of file diff --git a/lib/IEnterprise.d.ts b/lib/IEnterprise.d.ts index 2fd7e24..6912693 100644 --- a/lib/IEnterprise.d.ts +++ b/lib/IEnterprise.d.ts @@ -1,11 +1,13 @@ +import TechnicalProductProposer from "./TechnicalProductProposer.js"; +import MainContactOwner from "./MainContactOwner.js"; import ProductSupplier from "./ProductSupplier.js"; +import CatalogMaintainer from "./CatalogMaintainer.js"; import CatalogItemManager from "./CatalogItemManager.js"; -import Onboardable from "./Onboardable.js"; import Taxable from "./Taxable.js"; -import CatalogMaintainer from "./CatalogMaintainer.js"; import Describable from "./Describable.js"; -import TechnicalProductProposer from "./TechnicalProductProposer.js"; +import Onboardable from "./Onboardable.js"; +import Nameable from "./Nameable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface IEnterprise extends Semanticable, ProductSupplier, Taxable, TechnicalProductProposer, CatalogMaintainer, CatalogItemManager, Describable, Onboardable { +export default interface IEnterprise extends Semanticable, MainContactOwner, CatalogItemManager, Onboardable, Describable, ProductSupplier, Nameable, TechnicalProductProposer, CatalogMaintainer, Taxable { } //# sourceMappingURL=IEnterprise.d.ts.map \ No newline at end of file diff --git a/lib/IEnterprise.d.ts.map b/lib/IEnterprise.d.ts.map index 09502ad..7377437 100644 --- a/lib/IEnterprise.d.ts.map +++ b/lib/IEnterprise.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IEnterprise.d.ts","sourceRoot":"","sources":["../src/IEnterprise.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAEpE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,WAAY,SAAQ,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW;CAG7K"} \ No newline at end of file +{"version":3,"file":"IEnterprise.d.ts","sourceRoot":"","sources":["../src/IEnterprise.ts"],"names":[],"mappings":"AAuBA,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AACpE,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,WAAY,SAAQ,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,OAAO;CAGzM"} \ No newline at end of file diff --git a/lib/IFlow.d.ts b/lib/IFlow.d.ts new file mode 100644 index 0000000..5d87510 --- /dev/null +++ b/lib/IFlow.d.ts @@ -0,0 +1,7 @@ +import IQuantity from "./IQuantity.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +export default interface IFlow extends Semanticable { + getQuantity(): IQuantity | undefined; + setQuantity(quantity: IQuantity): void; +} +//# sourceMappingURL=IFlow.d.ts.map \ No newline at end of file diff --git a/lib/IFlow.d.ts.map b/lib/IFlow.d.ts.map new file mode 100644 index 0000000..911a4bc --- /dev/null +++ b/lib/IFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IFlow.d.ts","sourceRoot":"","sources":["../src/IFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,KAAM,SAAQ,YAAY;IAElD,WAAW,IAAI,SAAS,GAAG,SAAS,CAAC;IAErC,WAAW,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;CAEvC"} \ No newline at end of file diff --git a/lib/IFlow.js b/lib/IFlow.js new file mode 100644 index 0000000..92077af --- /dev/null +++ b/lib/IFlow.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IFlow.js.map \ No newline at end of file diff --git a/lib/IFlow.js.map b/lib/IFlow.js.map new file mode 100644 index 0000000..4a902ac --- /dev/null +++ b/lib/IFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IFlow.js","sourceRoot":"","sources":["../src/IFlow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/INutrientCharacteristic.d.ts.map b/lib/INutrientCharacteristic.d.ts.map index 00220fb..ffc56e4 100644 --- a/lib/INutrientCharacteristic.d.ts.map +++ b/lib/INutrientCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"INutrientCharacteristic.d.ts","sourceRoot":"","sources":["../src/INutrientCharacteristic.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file +{"version":3,"file":"INutrientCharacteristic.d.ts","sourceRoot":"","sources":["../src/INutrientCharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file diff --git a/lib/IOffer.d.ts b/lib/IOffer.d.ts index ff1ecce..5d28bdb 100644 --- a/lib/IOffer.d.ts +++ b/lib/IOffer.d.ts @@ -1,7 +1,7 @@ -import Stockable from "./Stockable.js"; import Marketable from "./Marketable.js"; +import Stockable from "./Stockable.js"; import Payable from "./Payable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface IOffer extends Semanticable, Payable, Stockable, Marketable { +export default interface IOffer extends Semanticable, Marketable, Payable, Stockable { } //# sourceMappingURL=IOffer.d.ts.map \ No newline at end of file diff --git a/lib/IOffer.d.ts.map b/lib/IOffer.d.ts.map index df2780a..d541e54 100644 --- a/lib/IOffer.d.ts.map +++ b/lib/IOffer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IOffer.d.ts","sourceRoot":"","sources":["../src/IOffer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU;CAGnF"} \ No newline at end of file +{"version":3,"file":"IOffer.d.ts","sourceRoot":"","sources":["../src/IOffer.ts"],"names":[],"mappings":"AAuBA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,OAAO,MAAM,cAAc,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS;CAGnF"} \ No newline at end of file diff --git a/lib/IOrder.d.ts b/lib/IOrder.d.ts index db7fac7..ddf9f4c 100644 --- a/lib/IOrder.d.ts +++ b/lib/IOrder.d.ts @@ -1,17 +1,24 @@ +import IOrderLine from "./IOrderLine.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import ISaleSession from "./ISaleSession.js"; import IAgent from "./IAgent.js"; -import IOrderLine from "./IOrderLine.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface IOrder extends Semanticable { - getNumber(): string; - getDate(): string; + getNumber(): string | undefined; + getDate(): string | undefined; getSaleSession(): Promise; getClient(): Promise; - getLines(): Promise>; + getLines(): Promise; setNumber(number: string): void; setDate(date: string): void; setSaleSession(saleSession: ISaleSession): void; setClient(client: IAgent): void; addLine(line: IOrderLine): void; + getFulfilmentStatus(): Promise; + setFulfilmentStatus(fulfilmentState: ISKOSConcept): void; + getOrderStatus(): Promise; + setOrderStatus(orderState: ISKOSConcept): void; + getPaymentStatus(): Promise; + setPaymentStatus(paymentState: ISKOSConcept): void; } //# sourceMappingURL=IOrder.d.ts.map \ No newline at end of file diff --git a/lib/IOrder.d.ts.map b/lib/IOrder.d.ts.map index ca9daae..21dd56d 100644 --- a/lib/IOrder.d.ts.map +++ b/lib/IOrder.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IOrder.d.ts","sourceRoot":"","sources":["../src/IOrder.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY;IAEnD,SAAS,IAAI,MAAM,CAClB;IACD,OAAO,IAAI,MAAM,CAChB;IACD,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAClD;IACD,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CACvC;IACD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mB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAEzD,mBAAmB,CAAC,eAAe,EAAE,YAAY,GAAG,IAAI,CAAC;IAEzD,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAEpD,cAAc,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;IAE/C,gBAAgB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAEtD,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;CAEnD"} \ No newline at end of file diff --git a/lib/IOrderLine.d.ts b/lib/IOrderLine.d.ts index d087d06..3bdcce4 100644 --- a/lib/IOrderLine.d.ts +++ b/lib/IOrderLine.d.ts @@ -1,11 +1,11 @@ -import IPrice from "./IPrice.js"; import IOrder from "./IOrder.js"; +import IPrice from "./IPrice.js"; import Describable from "./Describable.js"; import IOffer from "./IOffer.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface IOrderLine extends Semanticable, Describable { - getQuantity(): number; - getPrice(): Promise; + getQuantity(): number | undefined; + getPrice(): IPrice | undefined; getOffer(): Promise; getOrder(): Promise; setQuantity(quantity: number): void; diff --git a/lib/IOrderLine.d.ts.map b/lib/IOrderLine.d.ts.map index 1abacbe..b596e35 100644 --- a/lib/IOrderLine.d.ts.map +++ b/lib/IOrderLine.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IOrderLine.d.ts","sourceRoot":"","sources":["../src/IOrderLine.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,UAAW,SAAQ,YAAY,EAAE,WAAW;IAEpE,WAAW,IAA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git a/lib/IPerson.d.ts b/lib/IPerson.d.ts index db3db7b..f797b84 100644 --- a/lib/IPerson.d.ts +++ b/lib/IPerson.d.ts @@ -1,5 +1,5 @@ -import Personable from "./Personable.js"; import Affiliable from "./Affiliable.js"; +import Personable from "./Personable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface IPerson extends Semanticable, Affiliable, Personable { } diff --git a/lib/IPerson.d.ts.map b/lib/IPerson.d.ts.map index 41f0d6f..cec053b 100644 --- a/lib/IPerson.d.ts.map +++ b/lib/IPerson.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IPerson.d.ts","sourceRoot":"","sources":["../src/IPerson.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,YAAY,EAAE,UAAU,EAAE,UAAU;CAG5E"} \ No newline at end of file +{"version":3,"file":"IPerson.d.ts","sourceRoot":"","sources":["../src/IPerson.ts"],"names":[],"mappings":"AAuBA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,UAAU,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,OAAQ,SAAQ,YAAY,EAAE,UAAU,EAAE,UAAU;CAG5E"} \ No newline at end of file diff --git a/lib/IPhoneNumber.d.ts b/lib/IPhoneNumber.d.ts new file mode 100644 index 0000000..08b1b17 --- /dev/null +++ b/lib/IPhoneNumber.d.ts @@ -0,0 +1,5 @@ +import Dialable from "./Dialable.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +export default interface IPhoneNumber extends Semanticable, Dialable { +} +//# sourceMappingURL=IPhoneNumber.d.ts.map \ No newline at end of file diff --git a/lib/IPhoneNumber.d.ts.map b/lib/IPhoneNumber.d.ts.map new file mode 100644 index 0000000..128c16d --- /dev/null +++ b/lib/IPhoneNumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IPhoneNumber.d.ts","sourceRoot":"","sources":["../src/IPhoneNumber.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,QAAQ;CAGnE"} \ No newline at end of file diff --git a/lib/IPhoneNumber.js b/lib/IPhoneNumber.js new file mode 100644 index 0000000..5f3b1c3 --- /dev/null +++ b/lib/IPhoneNumber.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IPhoneNumber.js.map \ No newline at end of file diff --git a/lib/IPhoneNumber.js.map b/lib/IPhoneNumber.js.map new file mode 100644 index 0000000..9e6db5e --- /dev/null +++ b/lib/IPhoneNumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IPhoneNumber.js","sourceRoot":"","sources":["../src/IPhoneNumber.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/IPhysicalCharacteristic.d.ts.map b/lib/IPhysicalCharacteristic.d.ts.map index 9992905..9985278 100644 --- a/lib/IPhysicalCharacteristic.d.ts.map +++ b/lib/IPhysicalCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IPhysicalCharacteristic.d.ts","sourceRoot":"","sources":["../src/IPhysicalCharacteristic.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file +{"version":3,"file":"IPhysicalCharacteristic.d.ts","sourceRoot":"","sources":["../src/IPhysicalCharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,eAAe;CAGvE"} \ No newline at end of file diff --git a/lib/IPlannedConsumptionFlow.d.ts b/lib/IPlannedConsumptionFlow.d.ts new file mode 100644 index 0000000..b1df4a7 --- /dev/null +++ b/lib/IPlannedConsumptionFlow.d.ts @@ -0,0 +1,7 @@ +import IDefinedProduct from "./IDefinedProduct.js"; +import IPlannedFlow from "./IPlannedFlow.js"; +export default interface IPlannedConsumptionFlow extends IPlannedFlow { + getConsumedProduct(): Promise; + setConsumedProduct(consumedProduct: IDefinedProduct): void; +} +//# sourceMappingURL=IPlannedConsumptionFlow.d.ts.map \ No newline at end of file diff --git a/lib/IPlannedConsumptionFlow.d.ts.map b/lib/IPlannedConsumptionFlow.d.ts.map new file mode 100644 index 0000000..2f886f6 --- /dev/null +++ b/lib/IPlannedConsumptionFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedConsumptionFlow.d.ts","sourceRoot":"","sources":["../src/IPlannedConsumptionFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,uBAAwB,SAAQ,YAAY;IAEpE,kBAAkB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IAE3D,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CAE3D"} \ No newline at end of file diff --git a/lib/IPlannedConsumptionFlow.js b/lib/IPlannedConsumptionFlow.js new file mode 100644 index 0000000..cfb5df8 --- /dev/null +++ b/lib/IPlannedConsumptionFlow.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IPlannedConsumptionFlow.js.map \ No newline at end of file diff --git a/lib/IPlannedConsumptionFlow.js.map b/lib/IPlannedConsumptionFlow.js.map new file mode 100644 index 0000000..e5562a0 --- /dev/null +++ b/lib/IPlannedConsumptionFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedConsumptionFlow.js","sourceRoot":"","sources":["../src/IPlannedConsumptionFlow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/IPlannedFlow.d.ts b/lib/IPlannedFlow.d.ts new file mode 100644 index 0000000..5de2b6e --- /dev/null +++ b/lib/IPlannedFlow.d.ts @@ -0,0 +1,7 @@ +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IFlow from "./IFlow.js"; +export default interface IPlannedFlow extends IFlow { + getPlannedTransformation(): Promise; + setPlannedTransformation(plannedTransformation: IPlannedTransformation): void; +} +//# sourceMappingURL=IPlannedFlow.d.ts.map \ No newline at end of file diff --git a/lib/IPlannedFlow.d.ts.map b/lib/IPlannedFlow.d.ts.map new file mode 100644 index 0000000..ba35e36 --- /dev/null +++ b/lib/IPlannedFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedFlow.d.ts","sourceRoot":"","sources":["../src/IPlannedFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,MAAM,YAAY,CAAA;AAI9B,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,KAAK;IAElD,wBAAwB,IAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;IAExE,wBAAwB,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAE9E"} \ No newline at end of file diff --git a/lib/IPlannedFlow.js b/lib/IPlannedFlow.js new file mode 100644 index 0000000..9056c3e --- /dev/null +++ b/lib/IPlannedFlow.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IPlannedFlow.js.map \ No newline at end of file diff --git a/lib/IPlannedFlow.js.map b/lib/IPlannedFlow.js.map new file mode 100644 index 0000000..cca4732 --- /dev/null +++ b/lib/IPlannedFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedFlow.js","sourceRoot":"","sources":["../src/IPlannedFlow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/IPlannedProductionFlow.d.ts b/lib/IPlannedProductionFlow.d.ts new file mode 100644 index 0000000..28b0959 --- /dev/null +++ b/lib/IPlannedProductionFlow.d.ts @@ -0,0 +1,7 @@ +import ISuppliedProduct from "./ISuppliedProduct.js"; +import IPlannedFlow from "./IPlannedFlow.js"; +export default interface IPlannedProductionFlow extends IPlannedFlow { + getProducedProduct(): Promise; + setProducedProduct(producedProduct: ISuppliedProduct): void; +} +//# sourceMappingURL=IPlannedProductionFlow.d.ts.map \ No newline at end of file diff --git a/lib/IPlannedProductionFlow.d.ts.map b/lib/IPlannedProductionFlow.d.ts.map new file mode 100644 index 0000000..31b1572 --- /dev/null +++ b/lib/IPlannedProductionFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedProductionFlow.d.ts","sourceRoot":"","sources":["../src/IPlannedProductionFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,sBAAuB,SAAQ,YAAY;IAEnE,kBAAkB,IAAI,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IAE5D,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAE5D"} \ No newline at end of file diff --git a/lib/IPlannedProductionFlow.js b/lib/IPlannedProductionFlow.js new file mode 100644 index 0000000..bc89e3b --- /dev/null +++ b/lib/IPlannedProductionFlow.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IPlannedProductionFlow.js.map \ No newline at end of file diff --git a/lib/IPlannedProductionFlow.js.map b/lib/IPlannedProductionFlow.js.map new file mode 100644 index 0000000..1e1977d --- /dev/null +++ b/lib/IPlannedProductionFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedProductionFlow.js","sourceRoot":"","sources":["../src/IPlannedProductionFlow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/IPlannedTransformation.d.ts b/lib/IPlannedTransformation.d.ts new file mode 100644 index 0000000..dc13a83 --- /dev/null +++ b/lib/IPlannedTransformation.d.ts @@ -0,0 +1,17 @@ +import ISKOSConcept from "./ISKOSConcept.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +export default interface IPlannedTransformation extends Semanticable { + getTransformationType(): Promise; + setTransformationType(transformationType: ISKOSConcept): void; + getPlannedConsumptionFlows(): Promise; + setPlannedConsumptionFlows(plannedConsumptionFlows: IPlannedConsumptionFlow[]): void; + getPlannedProductionFlows(): Promise; + setPlannedProductionFlows(plannedProductionFlows: IPlannedProductionFlow[]): void; + addPlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + removePlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + addPlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; + removePlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; +} +//# sourceMappingURL=IPlannedTransformation.d.ts.map \ No newline at end of file diff --git a/lib/IPlannedTransformation.d.ts.map b/lib/IPlannedTransformation.d.ts.map new file mode 100644 index 0000000..3732d35 --- /dev/null +++ b/lib/IPlannedTransformation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedTransformation.d.ts","sourceRoot":"","sources":["../src/IPlannedTransformation.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,sBAAuB,SAAQ,YAAY;IAEnE,qBAAqB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE3D,qBAAqB,CAAC,kBAAkB,EAAE,YAAY,GAAG,IAAI,CAAC;IAE9D,0BAA0B,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAEjE,0BAA0B,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC;IAErF,yBAAyB,IAAI,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC;IAE/D,yBAAyB,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;IAElF,yBAAyB,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAEjF,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAEpF,wBAAwB,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAE9E,2BAA2B,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAEjF"} \ No newline at end of file diff --git a/lib/IPlannedTransformation.js b/lib/IPlannedTransformation.js new file mode 100644 index 0000000..90aa74c --- /dev/null +++ b/lib/IPlannedTransformation.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IPlannedTransformation.js.map \ No newline at end of file diff --git a/lib/IPlannedTransformation.js.map b/lib/IPlannedTransformation.js.map new file mode 100644 index 0000000..b19984e --- /dev/null +++ b/lib/IPlannedTransformation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IPlannedTransformation.js","sourceRoot":"","sources":["../src/IPlannedTransformation.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/IPrice.d.ts b/lib/IPrice.d.ts index 902c867..21c8c03 100644 --- a/lib/IPrice.d.ts +++ b/lib/IPrice.d.ts @@ -1,11 +1,7 @@ -import IUnit from "./IUnit.js"; +import Quantifiable from "./Quantifiable.js"; import { Semanticable } from "@virtual-assembly/semantizer"; -export default interface IPrice extends Semanticable { - getValue(): number; - getVatRate(): number; - getUnit(): Promise; - setValue(value: number): void; +export default interface IPrice extends Semanticable, Quantifiable { + getVatRate(): number | undefined; setVatRate(vatRate: number): void; - setUnit(unit: IUnit): void; } //# sourceMappingURL=IPrice.d.ts.map \ No newline at end of file diff --git a/lib/IPrice.d.ts.map b/lib/IPrice.d.ts.map index 82645eb..43072cf 100644 --- a/lib/IPrice.d.ts.map +++ b/lib/IPrice.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IPrice.d.ts","sourceRoot":"","sources":["../src/IPrice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY;IAEnD,QAAQ,IAAI,MAAM,CACjB;IACD,UAAU,IAAI,MAAM,CACnB;IACD,OAAO,IAAI,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CACpC;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;CAE3B"} \ No newline at end of file +{"version":3,"file":"IPrice.d.ts","sourceRoot":"","sources":["../src/IPrice.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,YAAY,EAAE,YAAY;IAEjE,UAAU,IAAI,MAAM,GAAG,SAAS,CAAC;IAEjC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAElC"} \ No newline at end of file diff --git a/lib/IQuantity.d.ts.map b/lib/IQuantity.d.ts.map index e42e990..7d5733d 100644 --- a/lib/IQuantity.d.ts.map +++ b/lib/IQuantity.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"IQuantity.d.ts","sourceRoot":"","sources":["../src/IQuantity.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,SAAU,SAAQ,YAAY,EAAE,YAAY;CAGpE"} \ No newline at end of file +{"version":3,"file":"IQuantity.d.ts","sourceRoot":"","sources":["../src/IQuantity.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,SAAU,SAAQ,YAAY,EAAE,YAAY;CAGpE"} \ No newline at end of file diff --git a/lib/ISKOSConcept.d.ts b/lib/ISKOSConcept.d.ts index f9ae9e8..b4dd93d 100644 --- a/lib/ISKOSConcept.d.ts +++ b/lib/ISKOSConcept.d.ts @@ -1,15 +1,15 @@ -import ISKOSLabel from "./ISKOSLabel.js"; import ISKOSConceptScheme from "./ISKOSConceptScheme.js"; +import ISKOSLabel from "./ISKOSLabel.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface ISKOSConcept extends Semanticable { addBroader(broader: ISKOSConcept): void; addScheme(scheme: ISKOSConceptScheme): void; addNarrower(narrower: ISKOSConcept): void; addPrefLabel(prefLabel: ISKOSLabel): void; - getBroader(): Promise>; - getScheme(): Promise>; - getNarrower(): Promise>; - getPrefLabel(): Promise>; + getBroader(): Promise; + getScheme(): Promise; + getNarrower(): Promise; + getPrefLabel(): Promise; removeBroader(broader: ISKOSConcept): void; removeScheme(scheme: ISKOSConceptScheme): void; removeNarrower(narrower: ISKOSConcept): void; diff --git a/lib/ISKOSConcept.d.ts.map b/lib/ISKOSConcept.d.ts.map index 2afcae4..7f7b9ce 100644 --- a/lib/ISKOSConcept.d.ts.map +++ b/lib/ISKOSConcept.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ISKOSConcept.d.ts","sourceRoot":"","sources":["../src/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,YAAY,GAAG,IAAI,CAAC;IAExC,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAE5C,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAE1C,YAAY,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IAE1C,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEtC,SAAS,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE3C,WAAW,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEvC,YAAY,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAEtC,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAE3C,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAE/C,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;IAE7C,eAAe,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;CAE7C"} \ No newline at end of file diff --git a/lib/ISKOSConceptScheme.d.ts.map b/lib/ISKOSConceptScheme.d.ts.map index 56ad7ad..75d6dae 100644 --- a/lib/ISKOSConceptScheme.d.ts.map +++ b/lib/ISKOSConceptScheme.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ISKOSConceptScheme.d.ts","sourceRoot":"","sources":["../src/ISKOSConceptScheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,kBAAmB,SAAQ,YAAY;CAG/D"} \ No newline at end of file +{"version":3,"file":"ISKOSConceptScheme.d.ts","sourceRoot":"","sources":["../src/ISKOSConceptScheme.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,kBAAmB,SAAQ,YAAY;CAG/D"} \ No newline at end of file diff --git a/lib/ISKOSConceptScheme.js b/lib/ISKOSConceptScheme.js index 4fa98e7..19e7ea1 100644 --- a/lib/ISKOSConceptScheme.js +++ b/lib/ISKOSConceptScheme.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=ISKOSConceptScheme.js.map \ No newline at end of file diff --git a/lib/ISKOSConceptScheme.js.map b/lib/ISKOSConceptScheme.js.map index 0f113f6..6bb06c6 100644 --- a/lib/ISKOSConceptScheme.js.map +++ b/lib/ISKOSConceptScheme.js.map @@ -1 +1 @@ -{"version":3,"file":"ISKOSConceptScheme.js","sourceRoot":"","sources":["../src/ISKOSConceptScheme.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"ISKOSConceptScheme.js","sourceRoot":"","sources":["../src/ISKOSConceptScheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/ISKOSLabel.d.ts b/lib/ISKOSLabel.d.ts index 3a50386..f0c3fd3 100644 --- a/lib/ISKOSLabel.d.ts +++ b/lib/ISKOSLabel.d.ts @@ -1,6 +1,6 @@ import { Semanticable } from "@virtual-assembly/semantizer"; export default interface ISKOSLabel extends Semanticable { - getLanguage(): string; - getValue(): string; + getLanguage(): string | undefined; + getValue(): string | undefined; } //# sourceMappingURL=ISKOSLabel.d.ts.map \ No newline at end of file diff --git a/lib/ISKOSLabel.d.ts.map b/lib/ISKOSLabel.d.ts.map index 35bfd9a..33d6d1f 100644 --- a/lib/ISKOSLabel.d.ts.map +++ b/lib/ISKOSLabel.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ISKOSLabel.d.ts","sourceRoot":"","sources":["../src/ISKOSLabel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,UAAW,SAAQ,YAAY;IAEvD,WAAW,IAAI,MAAM,CACpB;IACD,QAAQ,IAAI,MAAM,CACjB;CAED"} \ No newline at end of file +{"version":3,"file":"ISKOSLabel.d.ts","sourceRoot":"","sources":["../src/ISKOSLabel.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,UAAW,SAAQ,YAAY;IAEvD,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAElC,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;CAE/B"} \ No newline at end of file diff --git a/lib/ISKOSLabel.js b/lib/ISKOSLabel.js index 21ed251..10a52e1 100644 --- a/lib/ISKOSLabel.js +++ b/lib/ISKOSLabel.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=ISKOSLabel.js.map \ No newline at end of file diff --git a/lib/ISKOSLabel.js.map b/lib/ISKOSLabel.js.map index 2be5c0f..5d2cb69 100644 --- a/lib/ISKOSLabel.js.map +++ b/lib/ISKOSLabel.js.map @@ -1 +1 @@ -{"version":3,"file":"ISKOSLabel.js","sourceRoot":"","sources":["../src/ISKOSLabel.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"ISKOSLabel.js","sourceRoot":"","sources":["../src/ISKOSLabel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/ISaleSession.d.ts b/lib/ISaleSession.d.ts index 3d2f172..ed2d4d9 100644 --- a/lib/ISaleSession.d.ts +++ b/lib/ISaleSession.d.ts @@ -2,9 +2,9 @@ import Ellapsable from "./Ellapsable.js"; import IOffer from "./IOffer.js"; import { Semanticable } from "@virtual-assembly/semantizer"; export default interface ISaleSession extends Semanticable, Ellapsable { - getQuantity(): number; + getQuantity(): number | undefined; setQuantity(quantity: number): void; - getOffers(): Promise>; + getOffers(): Promise; addOffer(offer: IOffer): void; } //# sourceMappingURL=ISaleSession.d.ts.map \ No newline at end of file diff --git a/lib/ISaleSession.d.ts.map b/lib/ISaleSession.d.ts.map index b24d684..1792755 100644 --- a/lib/ISaleSession.d.ts.map +++ b/lib/ISaleSession.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ISaleSession.d.ts","sourceRoot":"","sources":["../src/ISaleSession.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,UAAU;IAErE,WAAW,IAAI,MAAM,CACpB;IACD,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAClC;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file +{"version":3,"file":"ISaleSession.d.ts","sourceRoot":"","sources":["../src/ISaleSession.ts"],"names":[],"mappings":"AAuBA,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,UAAU;IAErE,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAElC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file diff --git a/lib/ISocialMedia.d.ts b/lib/ISocialMedia.d.ts new file mode 100644 index 0000000..9823f39 --- /dev/null +++ b/lib/ISocialMedia.d.ts @@ -0,0 +1,7 @@ +import Nameable from "./Nameable.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +export default interface ISocialMedia extends Semanticable, Nameable { + getUrl(): string | undefined; + setUrl(url: string): void; +} +//# sourceMappingURL=ISocialMedia.d.ts.map \ No newline at end of file diff --git a/lib/ISocialMedia.d.ts.map b/lib/ISocialMedia.d.ts.map new file mode 100644 index 0000000..7c1c208 --- /dev/null +++ b/lib/ISocialMedia.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ISocialMedia.d.ts","sourceRoot":"","sources":["../src/ISocialMedia.ts"],"names":[],"mappings":"AAuBA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,YAAY,EAAE,QAAQ;IAEnE,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC;IAE7B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAE1B"} \ No newline at end of file diff --git a/lib/ISocialMedia.js b/lib/ISocialMedia.js new file mode 100644 index 0000000..f6b84e4 --- /dev/null +++ b/lib/ISocialMedia.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ISocialMedia.js.map \ No newline at end of file diff --git a/lib/ISocialMedia.js.map b/lib/ISocialMedia.js.map new file mode 100644 index 0000000..9cb8fc7 --- /dev/null +++ b/lib/ISocialMedia.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ISocialMedia.js","sourceRoot":"","sources":["../src/ISocialMedia.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/ISuppliedProduct.d.ts.map b/lib/ISuppliedProduct.d.ts.map index 774a369..394a801 100644 --- a/lib/ISuppliedProduct.d.ts.map +++ b/lib/ISuppliedProduct.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ISuppliedProduct.d.ts","sourceRoot":"","sources":["../src/ISuppliedProduct.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,eAAe;CAGhE"} \ No newline at end of file +{"version":3,"file":"ISuppliedProduct.d.ts","sourceRoot":"","sources":["../src/ISuppliedProduct.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,eAAe;CAGhE"} \ No newline at end of file diff --git a/lib/ITechnicalProduct.d.ts.map b/lib/ITechnicalProduct.d.ts.map index ec6379a..ffb6585 100644 --- a/lib/ITechnicalProduct.d.ts.map +++ b/lib/ITechnicalProduct.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ITechnicalProduct.d.ts","sourceRoot":"","sources":["../src/ITechnicalProduct.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,eAAe;CAGjE"} \ No newline at end of file +{"version":3,"file":"ITechnicalProduct.d.ts","sourceRoot":"","sources":["../src/ITechnicalProduct.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,iBAAkB,SAAQ,eAAe;CAGjE"} \ No newline at end of file diff --git a/lib/Invoiceable.d.ts b/lib/Invoiceable.d.ts index 15cb3df..fd2674d 100644 --- a/lib/Invoiceable.d.ts +++ b/lib/Invoiceable.d.ts @@ -1,5 +1,5 @@ import Orderable from "./Orderable.js"; export default interface Invoiceable { - getOrders(): Promise>; + getOrders(): Promise; } //# sourceMappingURL=Invoiceable.d.ts.map \ No newline at end of file diff --git a/lib/Invoiceable.d.ts.map b/lib/Invoiceable.d.ts.map index 9df1bcd..f911689 100644 --- a/lib/Invoiceable.d.ts.map +++ b/lib/Invoiceable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Invoiceable.d.ts","sourceRoot":"","sources":["../src/Invoiceable.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAItC,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,SAAS,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CACrC;CAED"} \ No newline at end of file +{"version":3,"file":"Invoiceable.d.ts","sourceRoot":"","sources":["../src/Invoiceable.ts"],"names":[],"mappings":"AAuBA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAItC,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CAElC"} \ No newline at end of file diff --git a/lib/Localizable.d.ts b/lib/Localizable.d.ts index 86b71ac..b7b4342 100644 --- a/lib/Localizable.d.ts +++ b/lib/Localizable.d.ts @@ -1,11 +1,17 @@ export default interface Localizable { - getStreet(): string; - getPostalCode(): string; - getCity(): string; - getCountry(): string; + getStreet(): string | undefined; + getPostalCode(): string | undefined; + getCity(): string | undefined; + getCountry(): string | undefined; setStreet(street: string): void; setPostalCode(postalCode: string): void; setCity(city: string): void; setCountry(country: string): void; + getLatitude(): number | undefined; + setLatitude(latitude: number): void; + getLongitude(): number | undefined; + setLongitude(longitude: number): void; + getRegion(): string | undefined; + setRegion(region: string): void; } //# sourceMappingURL=Localizable.d.ts.map \ No newline at end of file diff --git a/lib/Localizable.d.ts.map b/lib/Localizable.d.ts.map index d879bab..69df317 100644 --- a/lib/Localizable.d.ts.map +++ b/lib/Localizable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Localizable.d.ts","sourceRoot":"","sources":["../src/Localizable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,SAAS,IAAI,MAAM,CAClB;IACD,aAAa,IAAI,MAAM,CACtB;IACD,OAAO,IAAI,MAAM,CAChB;IACD,UAAU,IAAI,MAAM,CACnB;IACD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAElC"} \ No newline at end of file +{"version":3,"file":"Localizable.d.ts","sourceRoot":"","sources":["../src/Localizable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,aAAa,IAAI,MAAM,GAAG,SAAS,CAAC;IAEpC,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B,UAAU,IAAI,MAAM,GAAG,SAAS,CAAC;IAEjC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAElC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,SAAS,IAAI,MAAM,GAAG,SAAS,CAAC;IAEhC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAEhC"} \ No newline at end of file diff --git a/lib/Localizable.js b/lib/Localizable.js index 265a905..a0dfb7c 100644 --- a/lib/Localizable.js +++ b/lib/Localizable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Localizable.js.map \ No newline at end of file diff --git a/lib/Localizable.js.map b/lib/Localizable.js.map index e24583c..57e3cfe 100644 --- a/lib/Localizable.js.map +++ b/lib/Localizable.js.map @@ -1 +1 @@ -{"version":3,"file":"Localizable.js","sourceRoot":"","sources":["../src/Localizable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Localizable.js","sourceRoot":"","sources":["../src/Localizable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/MainContactOwner.d.ts b/lib/MainContactOwner.d.ts new file mode 100644 index 0000000..8d6d6a6 --- /dev/null +++ b/lib/MainContactOwner.d.ts @@ -0,0 +1,6 @@ +import ManagedByMainContact from "./ManagedByMainContact.js"; +import IPerson from "./IPerson.js"; +export default interface MainContactOwner extends ManagedByMainContact { + setMainContact(mainContact: IPerson): void; +} +//# sourceMappingURL=MainContactOwner.d.ts.map \ No newline at end of file diff --git a/lib/MainContactOwner.d.ts.map b/lib/MainContactOwner.d.ts.map new file mode 100644 index 0000000..85e17f0 --- /dev/null +++ b/lib/MainContactOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MainContactOwner.d.ts","sourceRoot":"","sources":["../src/MainContactOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,oBAAoB,MAAM,2BAA2B,CAAA;AAC5D,OAAO,OAAO,MAAM,cAAc,CAAA;AAIlC,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,oBAAoB;IAErE,cAAc,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;CAE3C"} \ No newline at end of file diff --git a/lib/MainContactOwner.js b/lib/MainContactOwner.js new file mode 100644 index 0000000..907599d --- /dev/null +++ b/lib/MainContactOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=MainContactOwner.js.map \ No newline at end of file diff --git a/lib/MainContactOwner.js.map b/lib/MainContactOwner.js.map new file mode 100644 index 0000000..55a637d --- /dev/null +++ b/lib/MainContactOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MainContactOwner.js","sourceRoot":"","sources":["../src/MainContactOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/ManagedByMainContact.d.ts b/lib/ManagedByMainContact.d.ts new file mode 100644 index 0000000..1bcb1f4 --- /dev/null +++ b/lib/ManagedByMainContact.d.ts @@ -0,0 +1,5 @@ +import IPerson from "./IPerson.js"; +export default interface ManagedByMainContact { + getMainContact(): Promise; +} +//# sourceMappingURL=ManagedByMainContact.d.ts.map \ No newline at end of file diff --git a/lib/ManagedByMainContact.d.ts.map b/lib/ManagedByMainContact.d.ts.map new file mode 100644 index 0000000..ac66cf1 --- /dev/null +++ b/lib/ManagedByMainContact.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ManagedByMainContact.d.ts","sourceRoot":"","sources":["../src/ManagedByMainContact.ts"],"names":[],"mappings":"AAuBA,OAAO,OAAO,MAAM,cAAc,CAAA;AAIlC,MAAM,CAAC,OAAO,WAAW,oBAAoB;IAE5C,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CAE/C"} \ No newline at end of file diff --git a/lib/ManagedByMainContact.js b/lib/ManagedByMainContact.js new file mode 100644 index 0000000..25e55ee --- /dev/null +++ b/lib/ManagedByMainContact.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ManagedByMainContact.js.map \ No newline at end of file diff --git a/lib/ManagedByMainContact.js.map b/lib/ManagedByMainContact.js.map new file mode 100644 index 0000000..ae7a13e --- /dev/null +++ b/lib/ManagedByMainContact.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ManagedByMainContact.js","sourceRoot":"","sources":["../src/ManagedByMainContact.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/Manufacturable.d.ts b/lib/Manufacturable.d.ts index eaf6c22..f109f32 100644 --- a/lib/Manufacturable.d.ts +++ b/lib/Manufacturable.d.ts @@ -1,32 +1,30 @@ +import ISKOSConcept from "./ISKOSConcept.js"; +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IPartOrigin from "./IPartOrigin.js"; import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; export default interface Manufacturable { - getAlcoholPercentage(): number; - getLifetime(): string; - getUsageOrStorageConditions(): string; - getAllergenCharacteristics(): Promise>; - getNutrientCharacteristics(): Promise>; - getPhysicalCharacteristics(): Promise>; - getGeographicalOrigin(): Promise; - getNatureOrigin(): Promise>; - getPartOrigin(): Promise>; - setGeographicalOrigin(geographicalOrigin: IGeographicalOrigin): void; + getAlcoholPercentage(): number | undefined; + getLifetime(): string | undefined; + getUsageOrStorageConditions(): string | undefined; + getAllergenCharacteristics(): Promise; + getNutrientCharacteristics(): Promise; + getPhysicalCharacteristics(): Promise; + getGeographicalOrigin(): Promise; + getNatureOrigin(): Promise; + getPartOrigin(): Promise; + setGeographicalOrigin(geographicalOrigin: ISKOSConcept): void; setAlcoholPercentage(alcoholPercentage: number): void; setLifetime(lifetime: string): void; setUsageOrStorageConditions(usageOrStorageConditions: string): void; addAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; addNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - addNatureOrigin(natureOrigin: INatureOrigin): void; - addPartOrigin(partOrigin: IPartOrigin): void; + addNatureOrigin(natureOrigin: ISKOSConcept): void; + addPartOrigin(partOrigin: ISKOSConcept): void; removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; removePhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - removeNatureOrigin(natureOrigin: INatureOrigin): void; - removePartOrigin(partOrigin: IPartOrigin): void; + removeNatureOrigin(natureOrigin: ISKOSConcept): void; + removePartOrigin(partOrigin: ISKOSConcept): void; } //# sourceMappingURL=Manufacturable.d.ts.map \ No newline at end of file diff --git a/lib/Manufacturable.d.ts.map b/lib/Manufacturable.d.ts.map index 00e99e6..f23ff1b 100644 --- a/lib/Manufacturable.d.ts.map +++ b/lib/Manufacturable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Manufacturable.d.ts","sourceRoot":"","sources":["../src/Manufacturable.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAC1C,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,mBAAmB,MAAM,0BAA0B,CAAA;AAC1D,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAI9C,MAAM,CAAC,OAAO,WAAW,cAAc;IAEtC,oBAAoB,IAAI,MAAM,CAC7B;IACD,WAAW,IAAI,MAAM,CACpB;IACD,2BA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,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAElD,aAAa,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;IAE9C,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAEpF,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAEpF,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAEpF,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAErD,gBAAgB,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;CAEjD"} \ No newline at end of file diff --git a/lib/Marketable.d.ts.map b/lib/Marketable.d.ts.map index a075f50..cff4720 100644 --- a/lib/Marketable.d.ts.map +++ b/lib/Marketable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Marketable.d.ts","sourceRoot":"","sources":["../src/Marketable.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAClD;IACD,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAC5D;IACD,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAChD,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAE/D"} \ No newline at end of file +{"version":3,"file":"Marketable.d.ts","sourceRoot":"","sources":["../src/Marketable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,cAAc,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAEpD,mBAAmB,IAAI,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;IAE9D,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAEhD,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAE/D"} \ No newline at end of file diff --git a/lib/Measurable.d.ts b/lib/Measurable.d.ts index 476500c..22c5450 100644 --- a/lib/Measurable.d.ts +++ b/lib/Measurable.d.ts @@ -1,6 +1,6 @@ -import ICharacteristicDimension from "./ICharacteristicDimension.js"; +import ISKOSConcept from "./ISKOSConcept.js"; export default interface Measurable { - getQuantityDimension(): Promise; - setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + getQuantityDimension(): Promise; + setQuantityDimension(quantityDimension: ISKOSConcept): void; } //# sourceMappingURL=Measurable.d.ts.map \ No newline at end of file diff --git a/lib/Measurable.d.ts.map b/lib/Measurable.d.ts.map index ffb7da9..08bb64b 100644 --- a/lib/Measurable.d.ts.map +++ b/lib/Measurable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Measurable.d.ts","sourceRoot":"","sources":["../src/Measurable.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAKpE,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,oBAAoB,IAAI,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CACpE;IACD,oBAAoB,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAExE"} \ No newline at end of file +{"version":3,"file":"Measurable.d.ts","sourceRoot":"","sources":["../src/Measurable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,oBAAoB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE1D,oBAAoB,CAAC,iBAAiB,EAAE,YAAY,GAAG,IAAI,CAAC;CAE5D"} \ No newline at end of file diff --git a/lib/Nameable.d.ts b/lib/Nameable.d.ts index d9500cc..964eaf6 100644 --- a/lib/Nameable.d.ts +++ b/lib/Nameable.d.ts @@ -1,5 +1,5 @@ export default interface Nameable { - getName(): string; + getName(): string | undefined; setName(name: string): void; } //# sourceMappingURL=Nameable.d.ts.map \ No newline at end of file diff --git a/lib/Nameable.d.ts.map b/lib/Nameable.d.ts.map index a6c30eb..f7636f9 100644 --- a/lib/Nameable.d.ts.map +++ b/lib/Nameable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Nameable.d.ts","sourceRoot":"","sources":["../src/Nameable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,QAAQ;IAEhC,OAAO,IAAI,MAAM,CAChB;IACD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAE5B"} \ No newline at end of file +{"version":3,"file":"Nameable.d.ts","sourceRoot":"","sources":["../src/Nameable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,QAAQ;IAEhC,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAE5B"} \ No newline at end of file diff --git a/lib/Nameable.js b/lib/Nameable.js index fe3353a..8b94b8a 100644 --- a/lib/Nameable.js +++ b/lib/Nameable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Nameable.js.map \ No newline at end of file diff --git a/lib/Nameable.js.map b/lib/Nameable.js.map index b9f1360..c35a1e4 100644 --- a/lib/Nameable.js.map +++ b/lib/Nameable.js.map @@ -1 +1 @@ -{"version":3,"file":"Nameable.js","sourceRoot":"","sources":["../src/Nameable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Nameable.js","sourceRoot":"","sources":["../src/Nameable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/NutrientCharacteristic.d.ts b/lib/NutrientCharacteristic.d.ts index bdc499d..dc8f4a0 100644 --- a/lib/NutrientCharacteristic.d.ts +++ b/lib/NutrientCharacteristic.d.ts @@ -1,8 +1,6 @@ -import ICharacteristicDimension from "./ICharacteristicDimension.js"; -import Characteristic from "./Characteristic.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IUnit from "./IUnit.js"; -import INutrientDimension from "./INutrientDimension.js"; +import Characteristic from "./Characteristic.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; @@ -12,11 +10,11 @@ export default class NutrientCharacteristic extends Characteristic implements IN semanticId?: string; semanticType?: string; other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - nutrientDimension?: INutrientDimension; + nutrientDimension?: ISKOSConcept; }); - getQuantityDimension(options?: IGetterOptions): Promise; - setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + getQuantityDimension(options?: IGetterOptions): Promise; + setQuantityDimension(quantityDimension: ISKOSConcept): void; } //# sourceMappingURL=NutrientCharacteristic.d.ts.map \ No newline at end of file diff --git a/lib/NutrientCharacteristic.d.ts.map b/lib/NutrientCharacteristic.d.ts.map index 4682b58..460d2d3 100644 --- a/lib/NutrientCharacteristic.d.ts.map +++ b/lib/NutrientCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"NutrientCharacteristic.d.ts","sourceRoot":"","sources":["../src/NutrientCharacteristic.ts"],"names":[],"mappings":"AAwBA,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AACpE,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAe,YAAW,uBAAuB;gBAGjF,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;KAAC;IAgBjL,oBAAoB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAanG,oBAAoB,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,IAAI;CAQ9E"} \ No newline at end of file +{"version":3,"file":"NutrientCharacteristic.d.ts","sourceRoot":"","sources":["../src/NutrientCharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAe,YAAW,uBAAuB;gBAEjF,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,YAAY,CAAC;KACjC;IA6BY,oBAAoB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUvF,oBAAoB,CAAC,iBAAiB,EAAE,YAAY,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/lib/NutrientCharacteristic.js b/lib/NutrientCharacteristic.js index fcf83c4..da4575d 100644 --- a/lib/NutrientCharacteristic.js +++ b/lib/NutrientCharacteristic.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,23 +8,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import Characteristic from "./Characteristic.js"; +const NUTRIENT_CHARACTERISTIC_SEM_TYPE = "dfc-b:NutrientCharacteristic"; export default class NutrientCharacteristic extends Characteristic { constructor(parameters) { - const type = parameters.semanticType ? parameters.semanticType : "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#NutrientCharacteristic"; + const type = parameters.semanticType ? parameters.semanticType : NUTRIENT_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, unit: parameters.unit, value: parameters.value }); - if (parameters.nutrientDimension) + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: type, + unit: parameters.unit, + value: parameters.value + }); + } + if (parameters.nutrientDimension) { this.setQuantityDimension(parameters.nutrientDimension); + } } getQuantityDimension(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientDimension"); + const semanticId = this.getSemanticProperty("dfc-b:hasNutrientDimension"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -57,8 +47,7 @@ export default class NutrientCharacteristic extends Characteristic { }); } setQuantityDimension(quantityDimension) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + this.setSemanticPropertyReference("dfc-b:hasNutrientDimension", quantityDimension); this.connector.store(quantityDimension); } } diff --git a/lib/NutrientCharacteristic.js.map b/lib/NutrientCharacteristic.js.map index 7a16eb2..5c068d9 100644 --- a/lib/NutrientCharacteristic.js.map +++ b/lib/NutrientCharacteristic.js.map @@ -1 +1 @@ -{"version":3,"file":"NutrientCharacteristic.js","sourceRoot":"","sources":["../src/NutrientCharacteristic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAGF,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAShD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAc;IAGjE,YAAmB,UAA2K;QAC7L,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,yHAAyH,CAAC;QAEjM,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,IAAI,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CAAC;KAAA;IAEM,oBAAoB,CAAC,iBAA+B;QAC1D,IAAI,CAAC,4BAA4B,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;QAEnF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Offer.d.ts b/lib/Offer.d.ts index 966f724..2d2e028 100644 --- a/lib/Offer.d.ts +++ b/lib/Offer.d.ts @@ -1,7 +1,7 @@ -import IOffer from "./IOffer.js"; +import ICatalogItem from "./ICatalogItem.js"; import ICustomerCategory from "./ICustomerCategory.js"; import IPrice from "./IPrice.js"; -import ICatalogItem from "./ICatalogItem.js"; +import IOffer from "./IOffer.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -18,13 +18,13 @@ export default class Offer extends SemanticObject implements IOffer { stockLimitation?: number; doNotStore?: boolean; }); - setPrice(price: IPrice): void; - getPrice(options?: IGetterOptions): Promise; getOfferedItem(options?: IGetterOptions): Promise; setCustomerCategory(customerCategory: ICustomerCategory): void; getCustomerCategory(options?: IGetterOptions): Promise; - setOfferedItem(offeredItem: ICatalogItem): void; + getPrice(): IPrice | undefined; + setPrice(price: IPrice): void; + getStockLimitation(): number | undefined; setStockLimitation(stockLimitation: number): void; - getStockLimitation(): number; + setOfferedItem(offeredItem: ICatalogItem): void; } //# sourceMappingURL=Offer.d.ts.map \ No newline at end of file diff --git a/lib/Offer.d.ts.map b/lib/Offer.d.ts.map index 7fca79d..8d409ac 100644 --- a/lib/Offer.d.ts.map +++ b/lib/Offer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Offer.d.ts","sourceRoot":"","sources":["../src/Offer.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,MAAM,MAAM,aAAa,CAAA;A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er.js b/lib/Offer.js index eddee74..74fff85 100644 --- a/lib/Offer.js +++ b/lib/Offer.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,42 +8,47 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const OFFER_SEM_TYPE = "dfc-b:Offer"; export default class Offer extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Offer"; + const type = OFFER_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.offeredItem) + } + if (parameters.offeredItem) { this.setOfferedItem(parameters.offeredItem); - if (parameters.offeredTo) + } + if (parameters.offeredTo) { this.setCustomerCategory(parameters.offeredTo); - if (parameters.price) + } + if (parameters.price) { this.setPrice(parameters.price); - if (parameters.stockLimitation || parameters.stockLimitation === 0) + } + if (parameters.stockLimitation || parameters.stockLimitation === 0) { this.setStockLimitation(parameters.stockLimitation); - } - setPrice(price) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"; - this.setSemanticPropertyAnonymous(property, price); - } - getPrice(options) { - return __awaiter(this, void 0, void 0, function* () { - const blankNode = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); - }); + } } getOfferedItem(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredItem"); + const semanticId = this.getSemanticProperty("dfc-b:offeredItem"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -76,14 +58,13 @@ export default class Offer extends SemanticObject { }); } setCustomerCategory(customerCategory) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredTo"; - this.setSemanticPropertyReference(property, customerCategory); + this.setSemanticPropertyReference("dfc-b:offeredTo", customerCategory); this.connector.store(customerCategory); } getCustomerCategory(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredTo"); + const semanticId = this.getSemanticProperty("dfc-b:offeredTo"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -92,17 +73,22 @@ export default class Offer extends SemanticObject { return result; }); } - setOfferedItem(offeredItem) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredItem"; - this.setSemanticPropertyReference(property, offeredItem); - this.connector.store(offeredItem); + getPrice() { + const blankNode = this.getSemanticPropertyAnonymous("dfc-b:hasPrice"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); } - setStockLimitation(stockLimitation) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation"; - this.setSemanticPropertyLiteral(property, stockLimitation); + setPrice(price) { + this.setSemanticPropertyAnonymous("dfc-b:hasPrice", price); } getStockLimitation() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation")); + return Number(this.getSemanticProperty("dfc-b:stockLimitation")); + } + setStockLimitation(stockLimitation) { + this.setSemanticPropertyLiteral("dfc-b:stockLimitation", stockLimitation); + } + setOfferedItem(offeredItem) { + this.setSemanticPropertyReference("dfc-b:offeredItem", offeredItem); + this.connector.store(offeredItem); } } //# sourceMappingURL=Offer.js.map \ No newline at end of file diff --git a/lib/Offer.js.map b/lib/Offer.js.map index 71cc9e0..3e65fd0 100644 --- a/lib/Offer.js.map +++ b/lib/Offer.js.map @@ -1 +1 @@ -{"version":3,"file":"Offer.js","sourceRoot":"","sources":["../src/Offer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAMF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,cAAc;IAIhD,YAA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,CAAC,iBAAiB,CAAC,CAAC;YAC/D,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAAuB,cAAc,CAAC;aAChE;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,QAAQ;QACd,MAAM,SAAS,GAAQ,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;QAC3E,OAAgB,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACpF,CAAC;IAEM,QAAQ,CAAC,KAAa;QAC5B,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAE5D,CAAC;IAEM,kBAAkB;QACxB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAClE,CAAC;IAEM,kBAAkB,CAAC,eAAuB;QAChD,IAAI,CAAC,0BAA0B,CAAC,uBAAuB,EAAE,eAAe,CAAC,CAAC;IAC3E,CAAC;IAEM,cAAc,CAAC,WAAyB;QAC9C,IAAI,CAAC,4BAA4B,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;QAEpE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Offerable.d.ts b/lib/Offerable.d.ts index 01d4ed0..0393265 100644 --- a/lib/Offerable.d.ts +++ b/lib/Offerable.d.ts @@ -1,7 +1,7 @@ -import IOffer from "./IOffer.js"; import IDefinedProduct from "./IDefinedProduct.js"; +import IOffer from "./IOffer.js"; export default interface Offerable { - getOfferers(): Promise>; + getOfferers(): Promise; getOfferedProduct(): Promise; addOffer(offer: IOffer): void; setOfferedProduct(offeredProduct: IDefinedProduct): void; diff --git a/lib/Offerable.d.ts.map b/lib/Offerable.d.ts.map index 044dcc6..d572b00 100644 --- a/lib/Offerable.d.ts.map +++ b/lib/Offerable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Offerable.d.ts","sourceRoot":"","sources":["../src/Offerable.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,WAAW,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CACpC;IACD,iBAAiB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CACxD;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,CAAC,cAAc,EAAE,eAAe,GAAG,IAAI,CAAC;CAEzD"} \ No newline at end of file +{"version":3,"file":"Offerable.d.ts","sourceRoot":"","sources":["../src/Offerable.ts"],"names":[],"mappings":"AAuBA,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,MAAM,MAAM,aAAa,CAAA;AAIhC,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEjC,iBAAiB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IAE1D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,iBAAiB,CAAC,cAAc,EAAE,eAAe,GAAG,IAAI,CAAC;CAEzD"} \ No newline at end of file diff --git a/lib/Onboardable.d.ts b/lib/Onboardable.d.ts index a6b9330..778e070 100644 --- a/lib/Onboardable.d.ts +++ b/lib/Onboardable.d.ts @@ -1,6 +1,6 @@ import ICustomerCategory from "./ICustomerCategory.js"; export default interface Onboardable { - getCustomerCategories(): Promise>; + getCustomerCategories(): Promise; addCustomerCategory(customerCategory: ICustomerCategory): void; } //# sourceMappingURL=Onboardable.d.ts.map \ No newline at end of file diff --git a/lib/Onboardable.d.ts.map b/lib/Onboardable.d.ts.map index 2fa5d02..34d56d0 100644 --- a/lib/Onboardable.d.ts.map +++ b/lib/Onboardable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Onboardable.d.ts","sourceRoot":"","sources":["../src/Onboardable.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CACzD;IACD,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAE/D"} \ No newline at end of file +{"version":3,"file":"Onboardable.d.ts","sourceRoot":"","sources":["../src/Onboardable.ts"],"names":[],"mappings":"AAuBA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,WAAW;IAEnC,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAEtD,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAE/D"} \ No newline at end of file diff --git a/lib/Order.d.ts b/lib/Order.d.ts index 96f6fdb..d08cd97 100644 --- a/lib/Order.d.ts +++ b/lib/Order.d.ts @@ -1,6 +1,7 @@ -import IOrder from "./IOrder.js"; -import ISaleSession from "./ISaleSession.js"; import IOrderLine from "./IOrderLine.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import ISaleSession from "./ISaleSession.js"; +import IOrder from "./IOrder.js"; import IAgent from "./IAgent.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; @@ -17,17 +18,26 @@ export default class Order extends SemanticObject implements IOrder { saleSession?: ISaleSession; client?: IAgent; lines?: IOrderLine[]; + fulfilmentStatus?: ISKOSConcept; + orderStatus?: ISKOSConcept; + paymentStatus?: ISKOSConcept; doNotStore?: boolean; }); + setPaymentStatus(paymentState: ISKOSConcept): void; + getFulfilmentStatus(options?: IGetterOptions): Promise; setDate(date: string): void; - getNumber(): string; - getDate(): string; - addLine(line: IOrderLine): void; + getDate(): string | undefined; + getNumber(): string | undefined; + getOrderStatus(options?: IGetterOptions): Promise; + getPaymentStatus(options?: IGetterOptions): Promise; + setFulfilmentStatus(fulfilmentState: ISKOSConcept): void; getClient(options?: IGetterOptions): Promise; - getSaleSession(options?: IGetterOptions): Promise; + setSaleSession(saleSession: ISaleSession): void; setClient(client: IAgent): void; - getLines(options?: IGetterOptions): Promise>; + getSaleSession(options?: IGetterOptions): Promise; + addLine(line: IOrderLine): void; + getLines(options?: IGetterOptions): Promise; setNumber(number: string): void; - setSaleSession(saleSession: ISaleSession): void; + setOrderStatus(orderState: ISKOSConcept): void; } //# sourceMappingURL=Order.d.ts.map \ No newline at end of file diff --git a/lib/Order.d.ts.map b/lib/Order.d.ts.map index 2c54353..a8dd4f5 100644 --- a/lib/Order.d.ts.map +++ b/lib/Order.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../src/Order.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,cAAe,YAAW,MAAM;IAElE,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAA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AW,EAAE,YAAY,GAAG,IAAI;IAM/C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAMzB,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUjF,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAUzB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAU/D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B,cAAc,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;CAKrD"} \ No newline at end of file diff --git a/lib/Order.js b/lib/Order.js index 2d7996e..1f1453b 100644 --- a/lib/Order.js +++ b/lib/Order.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,54 +15,112 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const ORDER_SEM_TYPE = "dfc-b:Order"; export default class Order extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Order"; + const type = ORDER_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.number) + } + if (parameters.number) { this.setNumber(parameters.number); - if (parameters.date) + } + if (parameters.date) { this.setDate(parameters.date); - if (parameters.saleSession) + } + if (parameters.saleSession) { this.setSaleSession(parameters.saleSession); - if (parameters.client) + } + if (parameters.client) { this.setClient(parameters.client); - if (parameters.lines) + } + if (parameters.lines) { parameters.lines.forEach(e => this.addLine(e)); + } + if (parameters.fulfilmentStatus) { + this.setFulfilmentStatus(parameters.fulfilmentStatus); + } + if (parameters.orderStatus) { + this.setOrderStatus(parameters.orderStatus); + } + if (parameters.paymentStatus) { + this.setPaymentStatus(parameters.paymentStatus); + } + } + setPaymentStatus(paymentState) { + this.setSemanticPropertyReference("dfc-b:hasPaymentStatus", paymentState); + this.connector.store(paymentState); + } + getFulfilmentStatus(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasFulfilmentStatus"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); } setDate(date) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#date"; - this.setSemanticPropertyLiteral(property, date); + this.setSemanticPropertyLiteral("dfc-b:date", date); + } + getDate() { + return this.getSemanticProperty("dfc-b:date"); } getNumber() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderNumber"); + return this.getSemanticProperty("dfc-b:orderNumber"); } - getDate() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#date"); + getOrderStatus(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasOrderStatus"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); } - addLine(line) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPart"; - if (line.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, line); - } - else { - this.connector.store(line); - this.addSemanticPropertyReference(property, line); - } + getPaymentStatus(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasPaymentStatus"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + setFulfilmentStatus(fulfilmentState) { + this.setSemanticPropertyReference("dfc-b:hasFulfilmentStatus", fulfilmentState); + this.connector.store(fulfilmentState); } getClient(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderedBy"); + const semanticId = this.getSemanticProperty("dfc-b:orderedBy"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -94,10 +129,18 @@ export default class Order extends SemanticObject { return result; }); } + setSaleSession(saleSession) { + this.setSemanticPropertyReference("dfc-b:belongsTo", saleSession); + this.connector.store(saleSession); + } + setClient(client) { + this.setSemanticPropertyReference("dfc-b:orderedBy", client); + this.connector.store(client); + } getSaleSession(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#belongsTo"); + const semanticId = this.getSemanticProperty("dfc-b:belongsTo"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -106,16 +149,20 @@ export default class Order extends SemanticObject { return result; }); } - setClient(client) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderedBy"; - this.setSemanticPropertyReference(property, client); - this.connector.store(client); + addLine(line) { + if (line.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPart", line); + } + else { + this.connector.store(line); + this.addSemanticPropertyReference("dfc-b:hasPart", line); + } } getLines(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPart"); + const properties = this.getSemanticPropertyAll("dfc-b:hasPart"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -142,13 +189,11 @@ export default class Order extends SemanticObject { }); } setNumber(number) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderNumber"; - this.setSemanticPropertyLiteral(property, number); + this.setSemanticPropertyLiteral("dfc-b:orderNumber", number); } - setSaleSession(saleSession) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#belongsTo"; - this.setSemanticPropertyReference(property, saleSession); - this.connector.store(saleSession); + setOrderStatus(orderState) { + this.setSemanticPropertyReference("dfc-b:hasOrderStatus", orderState); + this.connector.store(orderState); } } //# sourceMappingURL=Order.js.map \ No newline at end of file diff --git a/lib/Order.js.map b/lib/Order.js.map index 7b68dde..873145b 100644 --- a/lib/Order.js.map +++ b/lib/Order.js.map @@ -1 +1 @@ -{"version":3,"file":"Order.js","sourceRoot":"","sources":["../src/Order.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAMF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,cAAc;IAIhD,YAAmB,UAAuM;QACzN,MAAM,IAAI,GAAW,wGAAwG,CAAC;QAE9H,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvE,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,CAAC,UAAU,CAAC,UAAU;YACzB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,UAAU,CAAC,MAAM;YAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,IA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import IOffer from "./IOffer.js"; import IOrderLine from "./IOrderLine.js"; import IOrder from "./IOrder.js"; +import IPrice from "./IPrice.js"; +import IOffer from "./IOffer.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -19,14 +19,14 @@ export default class OrderLine extends SemanticObject implements IOrderLine { doNotStore?: boolean; }); setOffer(offer: IOffer): void; - setQuantity(quantity: number): void; - getPrice(options?: IGetterOptions): Promise; + getQuantity(): number | undefined; + setDescription(description: string): void; setOrder(order: IOrder): void; - getOffer(options?: IGetterOptions): Promise; + getDescription(): string | undefined; + getPrice(): IPrice | undefined; getOrder(options?: IGetterOptions): Promise; - getQuantity(): number; + getOffer(options?: IGetterOptions): Promise; + setQuantity(quantity: number): void; setPrice(price: IPrice): void; - setDescription(description: string): void; - getDescription(): string; } //# sourceMappingURL=OrderLine.d.ts.map \ No newline at end of file diff --git a/lib/OrderLine.d.ts.map b/lib/OrderLine.d.ts.map index c6ec002..d0366f8 100644 --- a/lib/OrderLine.d.ts.map +++ b/lib/OrderLine.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"OrderLine.d.ts","sourceRoot":"","sources":["../src/OrderLine.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAe,YAAW,UAAU;IAE1E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;Q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ACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAe,YAAW,UAAU;IAE1E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IA4CM,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B,cAAc,IAAI,MAAM,GAAG,SAAS;IAIpC,QAAQ,IAAI,MAAM,GAAG,SAAS;IAKxB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAU/D,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUrE,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAIpC"} \ No newline at end of file diff --git a/lib/OrderLine.js b/lib/OrderLine.js index eab9069..4d67f07 100644 --- a/lib/OrderLine.js +++ b/lib/OrderLine.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,52 +8,68 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const ORDER_LINE_SEM_TYPE = "dfc-b:OrderLine"; export default class OrderLine extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#OrderLine"; + const type = ORDER_LINE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.quantity || parameters.quantity === 0) + } + if (parameters.quantity || parameters.quantity === 0) { this.setQuantity(parameters.quantity); - if (parameters.price) + } + if (parameters.price) { this.setPrice(parameters.price); - if (parameters.offer) + } + if (parameters.offer) { this.setOffer(parameters.offer); - if (parameters.order) + } + if (parameters.order) { this.setOrder(parameters.order); + } } setOffer(offer) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#concerns"; - this.setSemanticPropertyReference(property, offer); + this.setSemanticPropertyReference("dfc-b:concerns", offer); this.connector.store(offer); } - setQuantity(quantity) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity"; - this.setSemanticPropertyLiteral(property, quantity); + getQuantity() { + return Number(this.getSemanticProperty("dfc-b:quantity")); } - getPrice(options) { - return __awaiter(this, void 0, void 0, function* () { - const blankNode = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); - }); + setDescription(description) { + this.setSemanticPropertyLiteral("dfc-b:description", description); } setOrder(order) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#partOf"; - this.setSemanticPropertyReference(property, order); + this.setSemanticPropertyReference("dfc-b:partOf", order); this.connector.store(order); } - getOffer(options) { + getDescription() { + return this.getSemanticProperty("dfc-b:description"); + } + getPrice() { + const blankNode = this.getSemanticPropertyAnonymous("dfc-b:hasPrice"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + } + getOrder(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#concerns"); + const semanticId = this.getSemanticProperty("dfc-b:partOf"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -85,10 +78,10 @@ export default class OrderLine extends SemanticObject { return result; }); } - getOrder(options) { + getOffer(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#partOf"); + const semanticId = this.getSemanticProperty("dfc-b:concerns"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -97,19 +90,11 @@ export default class OrderLine extends SemanticObject { return result; }); } - getQuantity() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity")); + setQuantity(quantity) { + this.setSemanticPropertyLiteral("dfc-b:quantity", quantity); } setPrice(price) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"; - this.setSemanticPropertyAnonymous(property, price); - } - setDescription(description) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); - } - getDescription() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); + this.setSemanticPropertyAnonymous("dfc-b:hasPrice", price); } } //# sourceMappingURL=OrderLine.js.map \ No newline at end of file diff --git a/lib/OrderLine.js.map b/lib/OrderLine.js.map index 01f5f9c..36f83ae 100644 --- a/lib/OrderLine.js.map +++ b/lib/OrderLine.js.map @@ -1 +1 @@ -{"version":3,"file":"OrderLine.js","sourceRoot":"","sources":["../src/OrderLine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAMF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAc;IAIpD,YAAmB,UAAuK;QACzL,MAAM,IAAI,GAAW,4GAA4G,CAAC;QAElI,IAAI,UAAU,CAAC,KAAK,EA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;CACD"} \ No newline at end of file diff --git a/lib/Orderable.d.ts.map b/lib/Orderable.d.ts.map index 05baabb..0dc678d 100644 --- a/lib/Orderable.d.ts.map +++ b/lib/Orderable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Orderable.d.ts","sourceRoot":"","sources":["../src/Orderable.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,WAAW,IAAI,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAC9C;CAED"} \ No newline at end of file +{"version":3,"file":"Orderable.d.ts","sourceRoot":"","sources":["../src/Orderable.ts"],"names":[],"mappings":"AAuBA,OAAO,WAAW,MAAM,kBAAkB,CAAA;AAI1C,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,WAAW,IAAI,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;CAEhD"} \ No newline at end of file diff --git a/lib/Payable.d.ts b/lib/Payable.d.ts index 1157c55..ebfb991 100644 --- a/lib/Payable.d.ts +++ b/lib/Payable.d.ts @@ -1,6 +1,6 @@ import IPrice from "./IPrice.js"; export default interface Payable { - getPrice(): Promise; + getPrice(): IPrice | undefined; setPrice(price: IPrice): void; } //# sourceMappingURL=Payable.d.ts.map \ No newline at end of file diff --git a/lib/Payable.d.ts.map b/lib/Payable.d.ts.map index 0bc5e02..952e94f 100644 --- a/lib/Payable.d.ts.map +++ b/lib/Payable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Payable.d.ts","sourceRoot":"","sources":["../src/Payable.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAIhC,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CACtC;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file +{"version":3,"file":"Payable.d.ts","sourceRoot":"","sources":["../src/Payable.ts"],"names":[],"mappings":"AAuBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAIhC,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;IAE/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9B"} \ No newline at end of file diff --git a/lib/Person.d.ts b/lib/Person.d.ts index 0e41d17..acd72e9 100644 --- a/lib/Person.d.ts +++ b/lib/Person.d.ts @@ -1,7 +1,7 @@ -import IPerson from "./IPerson.js"; -import Agent from "./Agent.js"; import IAddress from "./IAddress.js"; import IEnterprise from "./IEnterprise.js"; +import IPerson from "./IPerson.js"; +import Agent from "./Agent.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; @@ -14,14 +14,15 @@ export default class Person extends Agent implements IPerson { lastName?: string; localizations?: IAddress[]; organizations?: IEnterprise[]; + logo?: string; doNotStore?: boolean; }); - getLastName(): string; - getFirstName(): string; + getFirstName(): string | undefined; + getLastName(): string | undefined; setLastName(lastName: string): void; + leaveAffiliatedOrganization(organization: IEnterprise): void; setFirstName(firstName: string): void; affiliateTo(organization: IEnterprise): void; - leaveAffiliatedOrganization(organization: IEnterprise): void; - getAffiliatedOrganizations(options?: IGetterOptions): Promise>; + getAffiliatedOrganizations(options?: IGetterOptions): Promise; } //# sourceMappingURL=Person.d.ts.map \ No newline at end of file diff --git a/lib/Person.d.ts.map b/lib/Person.d.ts.map index fa92078..dbd467d 100644 --- a/lib/Person.d.ts.map +++ b/lib/Person.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Person.d.ts","sourceRoot":"","sources":["../src/Person.ts"],"names":[],"mappings":"AAwBA,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,WAA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M,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAM,YAAW,OAAO;gBAExC,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;QAC3B,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;QAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAwCM,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInC,2BAA2B,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI;IAI5D,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIrC,WAAW,CAAC,YAAY,EAAE,WAAW,GAAG,IAAI;IAUtC,0BAA0B,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CASzF"} \ No newline at end of file diff --git a/lib/Person.js b/lib/Person.js index c91c760..33e0499 100644 --- a/lib/Person.js +++ b/lib/Person.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,57 +15,70 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import Agent from "./Agent.js"; +const PERSON_SEM_TYPE = "dfc-b:Person"; export default class Person extends Agent { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Person"; + const type = PERSON_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, localizations: parameters.localizations }); - if (!parameters.doNotStore) + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: type, + localizations: parameters.localizations, + logo: parameters.logo + }); + } + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.firstName) + } + if (parameters.firstName) { this.setFirstName(parameters.firstName); - if (parameters.lastName) + } + if (parameters.lastName) { this.setLastName(parameters.lastName); - if (parameters.organizations) + } + if (parameters.organizations) { parameters.organizations.forEach(e => this.affiliateTo(e)); - } - getLastName() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#familyName"); + } } getFirstName() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#firstName"); + return this.getSemanticProperty("dfc-b:firstName"); + } + getLastName() { + return this.getSemanticProperty("dfc-b:familyName"); } setLastName(lastName) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#familyName"; - this.setSemanticPropertyLiteral(property, lastName); + this.setSemanticPropertyLiteral("dfc-b:familyName", lastName); + } + leaveAffiliatedOrganization(organization) { + throw new Error("Not yet implemented."); } setFirstName(firstName) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#firstName"; - this.setSemanticPropertyLiteral(property, firstName); + this.setSemanticPropertyLiteral("dfc-b:firstName", firstName); } affiliateTo(organization) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#affiliates"; if (organization.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, organization); + this.addSemanticPropertyAnonymous("dfc-b:affiliates", organization); } else { this.connector.store(organization); - this.addSemanticPropertyReference(property, organization); + this.addSemanticPropertyReference("dfc-b:affiliates", organization); } } - leaveAffiliatedOrganization(organization) { - throw new Error("Not yet implemented."); - } getAffiliatedOrganizations(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#affiliates"); + const properties = this.getSemanticPropertyAll("dfc-b:affiliates"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; diff --git a/lib/Person.js.map b/lib/Person.js.map index ae3324c..53f3a14 100644 --- a/lib/Person.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B,CAAC,CAAC;;gBACnE,KAA+B,eAAA,eAAA,cAAA,UAAU,CAAA,gBAAA;oBAAV,0BAAU;oBAAV,WAAU;;wBAA9B,MAAM,UAAU,KAAA,CAAA;wBAC1B,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACjG,IAAI,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAc,cAAc,CAAC,CAAC;;;;;iBAC9D;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;CACD"} \ No newline at end of file diff --git a/lib/Personable.d.ts b/lib/Personable.d.ts index cea1765..ed63579 100644 --- a/lib/Personable.d.ts +++ b/lib/Personable.d.ts @@ -1,6 +1,6 @@ export default interface Personable { - getFirstName(): string; - getLastName(): string; + getFirstName(): string | undefined; + getLastName(): string | undefined; setFirstName(firstName: string): void; setLastName(lastName: string): void; } diff --git a/lib/Personable.d.ts.map b/lib/Personable.d.ts.map index 5a8cfa1..98900dd 100644 --- a/lib/Personable.d.ts.map +++ b/lib/Personable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Personable.d.ts","sourceRoot":"","sources":["../src/Personable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,YAAY,IAAI,MAAM,CACrB;IACD,WAAW,IAAI,MAAM,CACpB;IACD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAEpC"} \ No newline at end of file +{"version":3,"file":"Personable.d.ts","sourceRoot":"","sources":["../src/Personable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC,WAAW,IAAI,MAAM,GAAG,SAAS,CAAC;IAElC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAEpC"} \ No newline at end of file diff --git a/lib/Personable.js b/lib/Personable.js index 82a156d..ff1148c 100644 --- a/lib/Personable.js +++ b/lib/Personable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Personable.js.map \ No newline at end of file diff --git a/lib/Personable.js.map b/lib/Personable.js.map index 249bda4..571409c 100644 --- a/lib/Personable.js.map +++ b/lib/Personable.js.map @@ -1 +1 @@ -{"version":3,"file":"Personable.js","sourceRoot":"","sources":["../src/Personable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Personable.js","sourceRoot":"","sources":["../src/Personable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/PhoneNumber.d.ts b/lib/PhoneNumber.d.ts new file mode 100644 index 0000000..b0a9456 --- /dev/null +++ b/lib/PhoneNumber.d.ts @@ -0,0 +1,20 @@ +import IPhoneNumber from "./IPhoneNumber.js"; +import { SemanticObject } from "@virtual-assembly/semantizer"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +export default class PhoneNumber extends SemanticObject implements IPhoneNumber { + protected connector: IConnector; + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + countryCode?: number; + phoneNumber?: string; + doNotStore?: boolean; + }); + setNumber(number: string): void; + setCountryCode(countryCode: number): void; + getNumber(): string | undefined; + getCountryCode(): number | undefined; +} +//# sourceMappingURL=PhoneNumber.d.ts.map \ No newline at end of file diff --git a/lib/PhoneNumber.d.ts.map b/lib/PhoneNumber.d.ts.map new file mode 100644 index 0000000..0cdd90e --- /dev/null +++ b/lib/PhoneNumber.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PhoneNumber.d.ts","sourceRoot":"","sources":["../src/PhoneNumber.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAKzC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAe,YAAW,YAAY;IAE9E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAoCM,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC,SAAS,IAAI,MAAM,GAAG,SAAS;IAI/B,cAAc,IAAI,MAAM,GAAG,SAAS;CAG3C"} \ No newline at end of file diff --git a/lib/PhoneNumber.js b/lib/PhoneNumber.js new file mode 100644 index 0000000..4fc5c8e --- /dev/null +++ b/lib/PhoneNumber.js @@ -0,0 +1,46 @@ +import { SemanticObject } from "@virtual-assembly/semantizer"; +const PHONE_NUMBER_SEM_TYPE = "dfc-b:PhoneNumber"; +export default class PhoneNumber extends SemanticObject { + constructor(parameters) { + const type = PHONE_NUMBER_SEM_TYPE; + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } + this.connector = parameters.connector; + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.countryCode || parameters.countryCode === 0) { + this.setCountryCode(parameters.countryCode); + } + if (parameters.phoneNumber) { + this.setNumber(parameters.phoneNumber); + } + } + setNumber(number) { + this.setSemanticPropertyLiteral("dfc-b:phoneNumber", number); + } + setCountryCode(countryCode) { + this.setSemanticPropertyLiteral("dfc-b:countryCode", countryCode); + } + getNumber() { + return this.getSemanticProperty("dfc-b:phoneNumber"); + } + getCountryCode() { + return Number(this.getSemanticProperty("dfc-b:countryCode")); + } +} +//# sourceMappingURL=PhoneNumber.js.map \ No newline at end of file diff --git a/lib/PhoneNumber.js.map b/lib/PhoneNumber.js.map new file mode 100644 index 0000000..7e723d7 --- /dev/null +++ b/lib/PhoneNumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PhoneNumber.js","sourceRoot":"","sources":["../src/PhoneNumber.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,qBAAqB,GA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Ac,CAAC,WAAmB;QACxC,IAAI,CAAC,0BAA0B,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACnE,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;IAEM,cAAc;QACpB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC9D,CAAC;CACD"} \ No newline at end of file diff --git a/lib/PhoneNumberOwner.d.ts b/lib/PhoneNumberOwner.d.ts new file mode 100644 index 0000000..bca7cd6 --- /dev/null +++ b/lib/PhoneNumberOwner.d.ts @@ -0,0 +1,7 @@ +import IPhoneNumber from "./IPhoneNumber.js"; +import ContactableByPhone from "./ContactableByPhone.js"; +export default interface PhoneNumberOwner extends ContactableByPhone { + addPhoneNumber(phoneNumber: IPhoneNumber): void; + removePhoneNumber(phoneNumber: IPhoneNumber): void; +} +//# sourceMappingURL=PhoneNumberOwner.d.ts.map \ No newline at end of file diff --git a/lib/PhoneNumberOwner.d.ts.map b/lib/PhoneNumberOwner.d.ts.map new file mode 100644 index 0000000..55fdd56 --- /dev/null +++ b/lib/PhoneNumberOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PhoneNumberOwner.d.ts","sourceRoot":"","sources":["../src/PhoneNumberOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,kBAAkB;IAEnE,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAEhD,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAEnD"} \ No newline at end of file diff --git a/lib/PhoneNumberOwner.js b/lib/PhoneNumberOwner.js new file mode 100644 index 0000000..84815ee --- /dev/null +++ b/lib/PhoneNumberOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=PhoneNumberOwner.js.map \ No newline at end of file diff --git a/lib/PhoneNumberOwner.js.map b/lib/PhoneNumberOwner.js.map new file mode 100644 index 0000000..df8dad1 --- /dev/null +++ b/lib/PhoneNumberOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PhoneNumberOwner.js","sourceRoot":"","sources":["../src/PhoneNumberOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/PhysicalCharacteristic.d.ts b/lib/PhysicalCharacteristic.d.ts index 5f09854..3c02245 100644 --- a/lib/PhysicalCharacteristic.d.ts +++ b/lib/PhysicalCharacteristic.d.ts @@ -1,8 +1,6 @@ -import Characteristic from "./Characteristic.js"; -import IPhysicalDimension from "./IPhysicalDimension.js"; -import IUnit from "./IUnit.js"; -import ICharacteristicDimension from "./ICharacteristicDimension.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; +import Characteristic from "./Characteristic.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; @@ -12,11 +10,11 @@ export default class PhysicalCharacteristic extends Characteristic implements IP semanticId?: string; semanticType?: string; other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; - physicalDimension?: IPhysicalDimension; + physicalDimension?: ISKOSConcept; }); - getQuantityDimension(options?: IGetterOptions): Promise; - setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + getQuantityDimension(options?: IGetterOptions): Promise; + setQuantityDimension(quantityDimension: ISKOSConcept): void; } //# sourceMappingURL=PhysicalCharacteristic.d.ts.map \ No newline at end of file diff --git a/lib/PhysicalCharacteristic.d.ts.map b/lib/PhysicalCharacteristic.d.ts.map index 2e1d9d0..6ff14bc 100644 --- a/lib/PhysicalCharacteristic.d.ts.map +++ b/lib/PhysicalCharacteristic.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"PhysicalCharacteristic.d.ts","sourceRoot":"","sources":["../src/PhysicalCharacteristic.ts"],"names":[],"mappings":"AAwBA,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,kBAAkB,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AACpE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAe,YAAW,uBAAuB;gBAGjF,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;KAAC;IAgBjL,oBAAoB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAanG,oBAAoB,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,IAAI;CAQ9E"} \ No newline at end of file +{"version":3,"file":"PhysicalCharacteristic.d.ts","sourceRoot":"","sources":["../src/PhysicalCharacteristic.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAe,YAAW,uBAAuB;gBAEjF,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,YAAY,CAAC;KACjC;IA6BY,oBAAoB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUvF,oBAAoB,CAAC,iBAAiB,EAAE,YAAY,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/lib/PhysicalCharacteristic.js b/lib/PhysicalCharacteristic.js index 99bce9f..625e89c 100644 --- a/lib/PhysicalCharacteristic.js +++ b/lib/PhysicalCharacteristic.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,23 +8,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import Characteristic from "./Characteristic.js"; +const PHYSICAL_CHARACTERISTIC_SEM_TYPE = "dfc-b:PhysicalCharacteristic"; export default class PhysicalCharacteristic extends Characteristic { constructor(parameters) { - const type = parameters.semanticType ? parameters.semanticType : "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#PhysicalCharacteristic"; + const type = parameters.semanticType ? parameters.semanticType : PHYSICAL_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, unit: parameters.unit, value: parameters.value }); - if (parameters.physicalDimension) + else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + semanticType: type, + unit: parameters.unit, + value: parameters.value + }); + } + if (parameters.physicalDimension) { this.setQuantityDimension(parameters.physicalDimension); + } } getQuantityDimension(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalDimension"); + const semanticId = this.getSemanticProperty("dfc-b:hasPhysicalDimension"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -57,8 +47,7 @@ export default class PhysicalCharacteristic extends Characteristic { }); } setQuantityDimension(quantityDimension) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + this.setSemanticPropertyReference("dfc-b:hasPhysicalDimension", quantityDimension); this.connector.store(quantityDimension); } } diff --git a/lib/PhysicalCharacteristic.js.map b/lib/PhysicalCharacteristic.js.map index aeb7c03..006aae6 100644 --- a/lib/PhysicalCharacteristic.js.map +++ b/lib/PhysicalCharacteristic.js.map @@ -1 +1 @@ -{"version":3,"file":"PhysicalCharacteristic.js","sourceRoot":"","sources":["../src/PhysicalCharacteristic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAEF,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAUhD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,cAAc;IAGjE,YAAmB,UAA2K;QAC7L,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,UAAU,CAAC,YAAY,CAAA,CAAC,CAAC,yHAAyH,CAAC;QAEjM,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,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAA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AU,CAAC,KAAK;aACvB,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;aAAM;YACN,KAAK,CAAC;gBACL,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,YAAY,EAAE,IAAI;gBAClB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,CAAC;SACF;QAGD,IAAI,UAAU,CAAC,iBAAiB,EAAE;YACjC,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;SACxD;IAEF,CAAC;IAEY,oBAAoB,CAAC,OAAwB;;YACzD,IAAI,MAAM,GAA6B,SAAS,CAAC;YACjD,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;YAC1E,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAAkB,cAAc,CAAC;aAC3D;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,oBAAoB,CAAC,iBAA+B;QAC1D,IAAI,CAAC,4BAA4B,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,CAAC;QAEnF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACzC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/PlannedConsumptionFlow.d.ts b/lib/PlannedConsumptionFlow.d.ts new file mode 100644 index 0000000..552b334 --- /dev/null +++ b/lib/PlannedConsumptionFlow.d.ts @@ -0,0 +1,25 @@ +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IDefinedProduct from "./IDefinedProduct.js"; +import Flow from "./Flow.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IQuantity from "./IQuantity.js"; +import IPlannedFlow from "./IPlannedFlow.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; +export default class PlannedConsumptionFlow extends Flow implements IPlannedConsumptionFlow, IPlannedFlow { + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: IDefinedProduct; + doNotStore?: boolean; + }); + setConsumedProduct(consumedProduct: IDefinedProduct): void; + getConsumedProduct(options?: IGetterOptions): Promise; + getPlannedTransformation(options?: IGetterOptions): Promise; + setPlannedTransformation(plannedTransformation: IPlannedTransformation): void; +} +//# sourceMappingURL=PlannedConsumptionFlow.d.ts.map \ No newline at end of file diff --git a/lib/PlannedConsumptionFlow.d.ts.map b/lib/PlannedConsumptionFlow.d.ts.map new file mode 100644 index 0000000..675e307 --- /dev/null +++ b/lib/PlannedConsumptionFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedConsumptionFlow.d.ts","sourceRoot":"","sources":["../src/PlannedConsumptionFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,IAAK,YAAW,uBAAuB,EAAE,YAAY;gBAErF,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,cAAc,CAAC,EAAE,sBAAsB,CAAC;QACxC,OAAO,CAAC,EAAE,eAAe,CAAC;QAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAmCM,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IAMpD,kBAAkB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAUlF,wBAAwB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAUrG,wBAAwB,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI;CAKpF"} \ No newline at end of file diff --git a/lib/PlannedConsumptionFlow.js b/lib/PlannedConsumptionFlow.js new file mode 100644 index 0000000..734da5a --- /dev/null +++ b/lib/PlannedConsumptionFlow.js @@ -0,0 +1,75 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import Flow from "./Flow.js"; +const PLANNED_CONSUMPTION_FLOW_SEM_TYPE = "dfc-b:AsPlannedConsumptionFlow"; +export default class PlannedConsumptionFlow extends Flow { + constructor(parameters) { + const type = PLANNED_CONSUMPTION_FLOW_SEM_TYPE; + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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, + quantity: parameters.quantity + }); + } + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformation) { + this.setPlannedTransformation(parameters.transformation); + } + if (parameters.product) { + this.setConsumedProduct(parameters.product); + } + } + setConsumedProduct(consumedProduct) { + this.setSemanticPropertyReference("dfc-b:consumes", consumedProduct); + this.connector.store(consumedProduct); + } + getConsumedProduct(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:consumes"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + getPlannedTransformation(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:incomeOf"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + setPlannedTransformation(plannedTransformation) { + this.setSemanticPropertyReference("dfc-b:incomeOf", plannedTransformation); + this.connector.store(plannedTransformation); + } +} +//# sourceMappingURL=PlannedConsumptionFlow.js.map \ No newline at end of file diff --git a/lib/PlannedConsumptionFlow.js.map b/lib/PlannedConsumptionFlow.js.map new file mode 100644 index 0000000..d78c311 --- /dev/null +++ b/lib/PlannedConsumptionFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedConsumptionFlow.js","sourceRoot":"","sources":["../src/PlannedConsumptionFlow.ts"],"names":[],"mappings":";;;;;;;;;AAyBA,OAAO,IAAI,MAAM,WAAW,CAAA;AAS5B,MAAM,iCAAiC,GAAW,gCAAgC,CAAC;AAEnF,MAAM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SAAS,CAAC;YACpD,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YAC9D,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAAqB,cAAc,CAAC;aAC9D;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEY,wBAAwB,CAAC,OAAwB;;YAC7D,IAAI,MAAM,GAAuC,SAAS,CAAC;YAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YAC9D,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAA4B,cAAc,CAAC;aACrE;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,wBAAwB,CAAC,qBAA6C;QAC5E,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC;QAE3E,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,CAAC;CACD"} \ No newline at end of file diff --git a/lib/PlannedProductionFlow.d.ts b/lib/PlannedProductionFlow.d.ts new file mode 100644 index 0000000..2d51ebc --- /dev/null +++ b/lib/PlannedProductionFlow.d.ts @@ -0,0 +1,25 @@ +import IPlannedTransformation from "./IPlannedTransformation.js"; +import ISuppliedProduct from "./ISuppliedProduct.js"; +import Flow from "./Flow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IQuantity from "./IQuantity.js"; +import IPlannedFlow from "./IPlannedFlow.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; +export default class PlannedProductionFlow extends Flow implements IPlannedProductionFlow, IPlannedFlow { + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + quantity?: IQuantity; + transformation?: IPlannedTransformation; + product?: ISuppliedProduct; + doNotStore?: boolean; + }); + getProducedProduct(options?: IGetterOptions): Promise; + getPlannedTransformation(options?: IGetterOptions): Promise; + setPlannedTransformation(plannedTransformation: IPlannedTransformation): void; + setProducedProduct(producedProduct: ISuppliedProduct): void; +} +//# sourceMappingURL=PlannedProductionFlow.d.ts.map \ No newline at end of file diff --git a/lib/PlannedProductionFlow.d.ts.map b/lib/PlannedProductionFlow.d.ts.map new file mode 100644 index 0000000..ab2d002 --- /dev/null +++ b/lib/PlannedProductionFlow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedProductionFlow.d.ts","sourceRoot":"","sources":["../src/PlannedProductionFlow.ts"],"names":[],"mappings":"AAuBA,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,IAAK,YAAW,sBAAsB,EAAE,YAAY;gBAEnF,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,cAAc,CAAC,EAAE,sBAAsB,CAAC;QACxC,OAAO,CAAC,EAAE,gBAAgB,CAAC;QAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAmCY,kBAAkB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAUnF,wBAAwB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAUrG,wBAAwB,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI;IAM7E,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI;CAKlE"} \ No newline at end of file diff --git a/lib/PlannedProductionFlow.js b/lib/PlannedProductionFlow.js new file mode 100644 index 0000000..9980e0a --- /dev/null +++ b/lib/PlannedProductionFlow.js @@ -0,0 +1,75 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import Flow from "./Flow.js"; +const PLANNED_PRODUCTION_FLOW_SEM_TYPE = "dfc-b:AsPlannedProductionFlow"; +export default class PlannedProductionFlow extends Flow { + constructor(parameters) { + const type = PLANNED_PRODUCTION_FLOW_SEM_TYPE; + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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, + quantity: parameters.quantity + }); + } + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformation) { + this.setPlannedTransformation(parameters.transformation); + } + if (parameters.product) { + this.setProducedProduct(parameters.product); + } + } + getProducedProduct(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:produces"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + getPlannedTransformation(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:outcomeOf"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + setPlannedTransformation(plannedTransformation) { + this.setSemanticPropertyReference("dfc-b:outcomeOf", plannedTransformation); + this.connector.store(plannedTransformation); + } + setProducedProduct(producedProduct) { + this.setSemanticPropertyReference("dfc-b:produces", producedProduct); + this.connector.store(producedProduct); + } +} +//# sourceMappingURL=PlannedProductionFlow.js.map \ No newline at end of file diff --git a/lib/PlannedProductionFlow.js.map b/lib/PlannedProductionFlow.js.map new file mode 100644 index 0000000..c1cca39 --- /dev/null +++ b/lib/PlannedProductionFlow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedProductionFlow.js","sourceRoot":"","sources":["../src/PlannedProductionFlow.ts"],"names":[],"mappings":";;;;;;;;;AAyBA,OAAO,IAAI,MAAM,WAAW,CAAA;AAS5B,MAAM,gCAAgC,GAAW,+BAA+B,CAAC;AAEjF,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,IAAI;IAEtD,YAAmB,UAQlB;QAEA,MAAM,IAAI,GAAW,gCAAgC,CAAC;QAEtD,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE,UAAU,CAAC,KAAK;aACvB,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAA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A6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAA4B,cAAc,CAAC;aACrE;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,wBAAwB,CAAC,qBAA6C;QAC5E,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,CAAC;QAE5E,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,CAAC;IAEM,kBAAkB,CAAC,eAAiC;QAC1D,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;QAErE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACvC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/PlannedTransformation.d.ts b/lib/PlannedTransformation.d.ts new file mode 100644 index 0000000..6c449af --- /dev/null +++ b/lib/PlannedTransformation.d.ts @@ -0,0 +1,31 @@ +import IPlannedTransformation from "./IPlannedTransformation.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import { SemanticObject } from "@virtual-assembly/semantizer"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; +export default class PlannedTransformation extends SemanticObject implements IPlannedTransformation { + protected connector: IConnector; + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + transformationType?: ISKOSConcept; + consumptionFlows?: IPlannedConsumptionFlow[]; + productionFlows?: IPlannedProductionFlow[]; + doNotStore?: boolean; + }); + setPlannedProductionFlows(plannedProductionFlows: IPlannedProductionFlow[]): void; + removePlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + addPlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; + getTransformationType(options?: IGetterOptions): Promise; + getPlannedConsumptionFlows(options?: IGetterOptions): Promise; + setTransformationType(transformationType: ISKOSConcept): void; + setPlannedConsumptionFlows(plannedConsumptionFlows: IPlannedConsumptionFlow[]): void; + getPlannedProductionFlows(options?: IGetterOptions): Promise; + addPlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + removePlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; +} +//# sourceMappingURL=PlannedTransformation.d.ts.map \ No newline at end of file diff --git a/lib/PlannedTransformation.d.ts.map b/lib/PlannedTransformation.d.ts.map new file mode 100644 index 0000000..4266ea9 --- /dev/null +++ b/lib/PlannedTransformation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedTransformation.d.ts","sourceRoot":"","sources":["../src/PlannedTransformation.ts"],"names":[],"mappings":"AAuBA,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,sBAAsB,MAAM,6BAA6B,CAAA;AAChE,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,cAAe,YAAW,sBAAsB;IAElG,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,kBAAkB,CAAC,EAAE,YAAY,CAAC;QAClC,gBAAgB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QAC7C,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAC;QAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAwCM,yBAAyB,CAAC,sBAAsB,EAAE,sBAAsB,EAAE,GAAG,IAAI;IAIjF,4BAA4B,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI;IAInF,wBAAwB,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI;IAUvE,qBAAqB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUlF,0BAA0B,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAU9F,qBAAqB,CAAC,kBAAkB,EAAE,YAAY,GAAG,IAAI;IAM7D,0BAA0B,CAAC,uBAAuB,EAAE,uBAAuB,EAAE,GAAG,IAAI;IAI9E,yBAAyB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAU5F,yBAAyB,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,IAAI;IAUhF,2BAA2B,CAAC,qBAAqB,EAAE,sBAAsB,GAAG,IAAI;CAGvF"} \ No newline at end of file diff --git a/lib/PlannedTransformation.js b/lib/PlannedTransformation.js new file mode 100644 index 0000000..dd3298e --- /dev/null +++ b/lib/PlannedTransformation.js @@ -0,0 +1,157 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +}; +import { SemanticObject } from "@virtual-assembly/semantizer"; +const PLANNED_TRANSFORMATION_SEM_TYPE = "dfc-b:AsPlannedTransformation"; +export default class PlannedTransformation extends SemanticObject { + constructor(parameters) { + const type = PLANNED_TRANSFORMATION_SEM_TYPE; + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } + this.connector = parameters.connector; + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformationType) { + this.setTransformationType(parameters.transformationType); + } + if (parameters.consumptionFlows) { + parameters.consumptionFlows.forEach(e => this.addPlannedConsumptionFlow(e)); + } + if (parameters.productionFlows) { + parameters.productionFlows.forEach(e => this.addPlannedProductionFlow(e)); + } + } + setPlannedProductionFlows(plannedProductionFlows) { + } + removePlannedConsumptionFlow(plannedConsumptionFlow) { + throw new Error("Not yet implemented."); + } + addPlannedProductionFlow(plannedProductionFlow) { + if (plannedProductionFlow.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasOutcome", plannedProductionFlow); + } + else { + this.connector.store(plannedProductionFlow); + this.addSemanticPropertyReference("dfc-b:hasOutcome", plannedProductionFlow); + } + } + getTransformationType(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasTransformationType"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + getPlannedConsumptionFlows(options) { + var _a, e_1, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasIncome"); + try { + for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { + _c = properties_1_1.value; + _d = false; + try { + const semanticId = _c; + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + results.push(semanticObject); + } + finally { + _d = true; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (!_d && !_a && (_b = properties_1.return)) yield _b.call(properties_1); + } + finally { if (e_1) throw e_1.error; } + } + return results; + }); + } + setTransformationType(transformationType) { + this.setSemanticPropertyReference("dfc-b:hasTransformationType", transformationType); + this.connector.store(transformationType); + } + setPlannedConsumptionFlows(plannedConsumptionFlows) { + } + getPlannedProductionFlows(options) { + var _a, e_2, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasOutcome"); + try { + for (var _d = true, properties_2 = __asyncValues(properties), properties_2_1; properties_2_1 = yield properties_2.next(), _a = properties_2_1.done, !_a;) { + _c = properties_2_1.value; + _d = false; + try { + const semanticId = _c; + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + results.push(semanticObject); + } + finally { + _d = true; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (!_d && !_a && (_b = properties_2.return)) yield _b.call(properties_2); + } + finally { if (e_2) throw e_2.error; } + } + return results; + }); + } + addPlannedConsumptionFlow(plannedConsumptionFlow) { + if (plannedConsumptionFlow.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasIncome", plannedConsumptionFlow); + } + else { + this.connector.store(plannedConsumptionFlow); + this.addSemanticPropertyReference("dfc-b:hasIncome", plannedConsumptionFlow); + } + } + removePlannedProductionFlow(plannedProductionFlow) { + throw new Error("Not yet implemented."); + } +} +//# sourceMappingURL=PlannedTransformation.js.map \ No newline at end of file diff --git a/lib/PlannedTransformation.js.map b/lib/PlannedTransformation.js.map new file mode 100644 index 0000000..af84fad --- /dev/null +++ b/lib/PlannedTransformation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlannedTransformation.js","sourceRoot":"","sources":["../src/PlannedTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2BA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,+BAA+B,GAAW,+BAA+B,CAAC;AAEhF,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,cAAc;IAIhE,YAAmB,UAQlB;QAEA,MAAM,IAAI,GAAW,+BAA+B,CAAC;QAErD,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE,UAAU,CAAC,KAAK;aACvB,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;aAAM;YACN,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,YAAY,EAAE,IAAI;aAEnB,CAAC,CAAC;SACF;QACD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,C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Ac,CAAC,CAAC;;;;;iBACzE;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;IAEM,yBAAyB,CAAC,sBAA+C;QAC/E,IAAI,sBAAsB,CAAC,yBAAyB,EAAE,EAAE;YACvD,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;SAC7E;aACI;YACJ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC7C,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;SAC7E;IACF,CAAC;IAEM,2BAA2B,CAAC,qBAA6C;QAC/E,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACzC,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Price.d.ts b/lib/Price.d.ts index 44b7ba7..74c4d82 100644 --- a/lib/Price.d.ts +++ b/lib/Price.d.ts @@ -1,5 +1,5 @@ +import ISKOSConcept from "./ISKOSConcept.js"; import IPrice from "./IPrice.js"; -import IUnit from "./IUnit.js"; import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -13,13 +13,13 @@ export default class Price extends SemanticObjectAnonymous implements IPrice { other?: Semanticable; value?: number; vatRate?: number; - unit?: IUnit; + unit?: ISKOSConcept; }); - getUnit(options?: IGetterOptions): Promise; - setValue(value: number): void; - getValue(): number; - setUnit(unit: IUnit): void; - getVatRate(): number; + getQuantityValue(): number | undefined; + getVatRate(): number | undefined; setVatRate(vatRate: number): void; + setQuantityUnit(quantityUnit: ISKOSConcept): void; + getQuantityUnit(options?: IGetterOptions): Promise; + setQuantityValue(quantityValue: number): void; } //# sourceMappingURL=Price.d.ts.map \ No newline at end of file diff --git a/lib/Price.d.ts.map b/lib/Price.d.ts.map index 26edc55..6b66d02 100644 --- a/lib/Price.d.ts.map +++ b/lib/Price.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../src/Price.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,uBAAwB,YAAW,MAAM;IAE3E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAA;KAAC;IAkB3J,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;IAanE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM7B,QAAQ,IAAI,MAAM;IAMlB,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI;IAO1B,UAAU,IAAI,MAAM;IAMpB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAMxC"} \ No newline at end of file +{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../src/Price.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,uBAAwB,YAAW,MAAM;IAE3E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,YAAY,CAAC;KACpB;IAqCM,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,UAAU,IAAI,MAAM,GAAG,SAAS;IAIhC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAM3C,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUlF,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGpD"} \ No newline at end of file diff --git a/lib/Price.js b/lib/Price.js index d74f2a0..f6116ca 100644 --- a/lib/Price.js +++ b/lib/Price.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,28 +8,54 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; +const PRICE_SEM_TYPE = "dfc-b:Price"; export default class Price extends SemanticObjectAnonymous { constructor(parameters) { - const type = parameters.semanticType ? parameters.semanticType : "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Price"; + const type = parameters.semanticType ? parameters.semanticType : PRICE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (parameters.value || parameters.value === 0) - this.setValue(parameters.value); - if (parameters.vatRate || parameters.vatRate === 0) + if (parameters.value || parameters.value === 0) { + this.setQuantityValue(parameters.value); + } + if (parameters.vatRate || parameters.vatRate === 0) { this.setVatRate(parameters.vatRate); - if (parameters.unit) - this.setUnit(parameters.unit); + } + if (parameters.unit) { + this.setQuantityUnit(parameters.unit); + } + } + getQuantityValue() { + return Number(this.getSemanticProperty("dfc-b:value")); + } + getVatRate() { + return Number(this.getSemanticProperty("dfc-b:VATrate")); + } + setVatRate(vatRate) { + this.setSemanticPropertyLiteral("dfc-b:VATrate", vatRate); + } + setQuantityUnit(quantityUnit) { + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); + this.connector.store(quantityUnit); } - getUnit(options) { + getQuantityUnit(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"); + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -61,24 +64,8 @@ export default class Price extends SemanticObjectAnonymous { return result; }); } - setValue(value) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value"; - this.setSemanticPropertyLiteral(property, value); - } - getValue() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value")); - } - setUnit(unit) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"; - this.setSemanticPropertyReference(property, unit); - this.connector.store(unit); - } - getVatRate() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATrate")); - } - setVatRate(vatRate) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATrate"; - this.setSemanticPropertyLiteral(property, vatRate); + setQuantityValue(quantityValue) { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); } } //# sourceMappingURL=Price.js.map \ No newline at end of file diff --git a/lib/Price.js.map b/lib/Price.js.map index 20680ee..a3b21af 100644 --- a/lib/Price.js.map +++ b/lib/Price.js.map @@ -1 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AC,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC;IACxD,CAAC;IAEM,UAAU;QAChB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,CAAC;IAEM,UAAU,CAAC,OAAe;QAChC,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEM,eAAe,CAAC,YAA0B;QAChD,IAAI,CAAC,4BAA4B,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;QAEjE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAEY,eAAe,CAAC,OAAwB;;YACpD,IAAI,MAAM,GAA6B,SAAS,CAAC;YACjD,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;YAC7D,IAAI,UAAU,EAAE;gBACf,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;gBACjG,IAAI,cAAc;oBAAE,MAAM,GAAkB,cAAc,CAAC;aAC3D;YACD,OAAO,MAAM,CAAC;QACf,CAAC;KAAA;IAEM,gBAAgB,CAAC,aAAqB;QAC5C,IAAI,CAAC,0BAA0B,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAC/D,CAAC;CACD"} \ No newline at end of file diff --git a/lib/ProductSupplier.d.ts b/lib/ProductSupplier.d.ts index 1a6c91f..a2f29ae 100644 --- a/lib/ProductSupplier.d.ts +++ b/lib/ProductSupplier.d.ts @@ -1,6 +1,6 @@ import ISuppliedProduct from "./ISuppliedProduct.js"; export default interface ProductSupplier { - getSuppliedProducts(): Promise>; + getSuppliedProducts(): Promise; supplyProduct(suppliedProduct: ISuppliedProduct): void; unsupplyProduct(suppliedProduct: ISuppliedProduct): void; } diff --git a/lib/ProductSupplier.d.ts.map b/lib/ProductSupplier.d.ts.map index 5cbc577..c291678 100644 --- a/lib/ProductSupplier.d.ts.map +++ b/lib/ProductSupplier.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ProductSupplier.d.ts","sourceRoot":"","sources":["../src/ProductSupplier.ts"],"names":[],"mappings":"AACA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AAIpD,MAAM,CAAC,OAAO,WAAW,eAAe;IAEvC,mBAAmB,IAAI,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CACtD;IACD,aAAa,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACvD,eAAe,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAEzD"} \ No newline at end of file +{"version":3,"file":"ProductSupplier.d.ts","sourceRoot":"","sources":["../src/ProductSupplier.ts"],"names":[],"mappings":"AAuBA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AAIpD,MAAM,CAAC,OAAO,WAAW,eAAe;IAEvC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAEnD,aAAa,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEvD,eAAe,CAAC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAEzD"} \ No newline at end of file diff --git a/lib/Proposable.d.ts b/lib/Proposable.d.ts index 6add2fc..c52fd7e 100644 --- a/lib/Proposable.d.ts +++ b/lib/Proposable.d.ts @@ -1,6 +1,6 @@ import ICatalogItem from "./ICatalogItem.js"; export default interface Proposable { - getCatalogItems(): Promise>; + getCatalogItems(): Promise; addCatalogItem(catalogItem: ICatalogItem): void; } //# sourceMappingURL=Proposable.d.ts.map \ No newline at end of file diff --git a/lib/Proposable.d.ts.map b/lib/Proposable.d.ts.map index cb19bd4..a704ef7 100644 --- a/lib/Proposable.d.ts.map +++ b/lib/Proposable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Proposable.d.ts","sourceRoot":"","sources":["../src/Proposable.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,eAAe,IAAI,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAC9C;IACD,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAEhD"} \ No newline at end of file +{"version":3,"file":"Proposable.d.ts","sourceRoot":"","sources":["../src/Proposable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,UAAU;IAElC,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE3C,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAEhD"} \ No newline at end of file diff --git a/lib/Quantifiable.d.ts b/lib/Quantifiable.d.ts index 9b6bb71..4a86098 100644 --- a/lib/Quantifiable.d.ts +++ b/lib/Quantifiable.d.ts @@ -1,8 +1,8 @@ -import IUnit from "./IUnit.js"; +import ISKOSConcept from "./ISKOSConcept.js"; export default interface Quantifiable { - getQuantityUnit(): Promise; - getQuantityValue(): number; - setQuantityUnit(quantityUnit: IUnit): void; + getQuantityUnit(): Promise; + getQuantityValue(): number | undefined; + setQuantityUnit(quantityUnit: ISKOSConcept): void; setQuantityValue(quantityValue: number): void; } //# sourceMappingURL=Quantifiable.d.ts.map \ No newline at end of file diff --git a/lib/Quantifiable.d.ts.map b/lib/Quantifiable.d.ts.map index 3b38f0c..b45740c 100644 --- a/lib/Quantifiable.d.ts.map +++ b/lib/Quantifiable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Quantifiable.d.ts","sourceRoot":"","sources":["../src/Quantifiable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAA;AAI9B,MAAM,CAAC,OAAO,WAAW,YAAY;IAEpC,eAAe,IAAI,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAC5C;IACD,gBAAgB,IAAI,MAAM,CACzB;IACD,eAAe,CAAC,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3C,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9C"} \ No newline at end of file +{"version":3,"file":"Quantifiable.d.ts","sourceRoot":"","sources":["../src/Quantifiable.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAI5C,MAAM,CAAC,OAAO,WAAW,YAAY;IAEpC,eAAe,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAErD,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAAC;IAEvC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAElD,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAE9C"} \ No newline at end of file diff --git a/lib/QuantitativeValue.d.ts b/lib/QuantitativeValue.d.ts index 2aaea19..83186f3 100644 --- a/lib/QuantitativeValue.d.ts +++ b/lib/QuantitativeValue.d.ts @@ -1,22 +1,22 @@ -import IUnit from "./IUnit.js"; -import IQuantity from "./IQuantity.js"; +import Quantifiable from "./Quantifiable.js"; +import ISKOSConcept from "./ISKOSConcept.js"; import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; import IGetterOptions from "./IGetterOptions.js"; -export default class QuantitativeValue extends SemanticObjectAnonymous implements IQuantity { +export default class QuantitativeValue extends SemanticObjectAnonymous implements Quantifiable { protected connector: IConnector; constructor(parameters: { connector: IConnector; semanticId?: string; semanticType?: string; other?: Semanticable; - unit?: IUnit; + unit?: ISKOSConcept; value?: number; }); - getQuantityValue(): number; - setQuantityUnit(quantityUnit: IUnit): void; + getQuantityValue(): number | undefined; + setQuantityUnit(quantityUnit: ISKOSConcept): void; + getQuantityUnit(options?: IGetterOptions): Promise; setQuantityValue(quantityValue: number): void; - getQuantityUnit(options?: IGetterOptions): Promise; } //# sourceMappingURL=QuantitativeValue.d.ts.map \ No newline at end of file diff --git a/lib/QuantitativeValue.d.ts.map b/lib/QuantitativeValue.d.ts.map index 291bb50..622f7af 100644 --- a/lib/QuantitativeValue.d.ts.map +++ b/lib/QuantitativeValue.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"QuantitativeValue.d.ts","sourceRoot":"","sources":["../src/QuantitativeValue.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,YAAY,CAAA;AAC9B,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,uBAAwB,YAAW,SAAS;IAE1F,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC;IAiB/I,gBAAgB,IAAI,MAAM;IAM1B,eAAe,CAAC,YAAY,EAAE,KAAK,GAAG,IAAI;IAO1C,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IAMvC,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;CAalF"} \ No newline at end of file +{"version":3,"file":"QuantitativeValue.d.ts","sourceRoot":"","sources":["../src/QuantitativeValue.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,uBAAwB,YAAW,YAAY;IAE7F,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KACf;IAiCM,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAM3C,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUlF,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGpD"} \ No newline at end of file diff --git a/lib/QuantitativeValue.js b/lib/QuantitativeValue.js index 313db59..538c59f 100644 --- a/lib/QuantitativeValue.js +++ b/lib/QuantitativeValue.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -31,38 +8,45 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; +const QUANTITATIVE_VALUE_SEM_TYPE = "dfc-b:QuantitativeValue"; export default class QuantitativeValue extends SemanticObjectAnonymous { constructor(parameters) { - const type = parameters.semanticType ? parameters.semanticType : "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#QuantitativeValue"; + const type = parameters.semanticType ? parameters.semanticType : QUANTITATIVE_VALUE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (parameters.unit) + if (parameters.unit) { this.setQuantityUnit(parameters.unit); - if (parameters.value || parameters.value === 0) + } + if (parameters.value || parameters.value === 0) { this.setQuantityValue(parameters.value); + } } getQuantityValue() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value")); + return Number(this.getSemanticProperty("dfc-b:value")); } setQuantityUnit(quantityUnit) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"; - this.setSemanticPropertyReference(property, quantityUnit); + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); this.connector.store(quantityUnit); } - setQuantityValue(quantityValue) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value"; - this.setSemanticPropertyLiteral(property, quantityValue); - } getQuantityUnit(options) { return __awaiter(this, void 0, void 0, function* () { let result = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"); + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); if (semanticId) { const semanticObject = yield this.connector.fetch(semanticId, options); if (semanticObject) @@ -71,5 +55,8 @@ export default class QuantitativeValue extends SemanticObjectAnonymous { return result; }); } + setQuantityValue(quantityValue) { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); + } } //# sourceMappingURL=QuantitativeValue.js.map \ No newline at end of file diff --git a/lib/QuantitativeValue.js.map b/lib/QuantitativeValue.js.map index 1dd8f94..6a2071c 100644 --- a/lib/QuantitativeValue.js.map +++ b/lib/QuantitativeValue.js.map @@ -1 +1 @@ -{"version":3,"file":"QuantitativeValue.js","sourceRoot":"","sources":["../src/QuantitativeValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;AAIF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAKtE,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,uBAAuB;IAIrE,YAAmB,UAAmI;QACrJ,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAAA,CAAC,CAA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.ts @@ -0,0 +1,22 @@ +import ISKOSConcept from "./ISKOSConcept.js"; +import IQuantity from "./IQuantity.js"; +import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; +export default class Quantity extends SemanticObjectAnonymous implements IQuantity { + protected connector: IConnector; + constructor(parameters: { + connector: IConnector; + semanticId?: string; + semanticType?: string; + other?: Semanticable; + unit?: ISKOSConcept; + value?: number; + }); + getQuantityValue(): number | undefined; + setQuantityUnit(quantityUnit: ISKOSConcept): void; + getQuantityUnit(options?: IGetterOptions): Promise; + setQuantityValue(quantityValue: number): void; +} +//# sourceMappingURL=Quantity.d.ts.map \ No newline at end of file diff --git a/lib/Quantity.d.ts.map b/lib/Quantity.d.ts.map new file mode 100644 index 0000000..5bdf92f --- /dev/null +++ b/lib/Quantity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Quantity.d.ts","sourceRoot":"","sources":["../src/Quantity.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,uBAAwB,YAAW,SAAS;IAEjF,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KACf;IAiCM,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAItC,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAM3C,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAUlF,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;CAGpD"} \ No newline at end of file diff --git a/lib/Quantity.js b/lib/Quantity.js new file mode 100644 index 0000000..5873b0c --- /dev/null +++ b/lib/Quantity.js @@ -0,0 +1,62 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer"; +const QUANTITY_SEM_TYPE = "dfc-b:Quantity"; +export default class Quantity extends SemanticObjectAnonymous { + constructor(parameters) { + const type = parameters.semanticType ? parameters.semanticType : QUANTITY_SEM_TYPE; + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } + this.connector = parameters.connector; + if (parameters.unit) { + this.setQuantityUnit(parameters.unit); + } + if (parameters.value || parameters.value === 0) { + this.setQuantityValue(parameters.value); + } + } + getQuantityValue() { + return Number(this.getSemanticProperty("dfc-b:value")); + } + setQuantityUnit(quantityUnit) { + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); + this.connector.store(quantityUnit); + } + getQuantityUnit(options) { + return __awaiter(this, void 0, void 0, function* () { + let result = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); + if (semanticId) { + const semanticObject = yield this.connector.fetch(semanticId, options); + if (semanticObject) + result = semanticObject; + } + return result; + }); + } + setQuantityValue(quantityValue) { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); + } +} +//# sourceMappingURL=Quantity.js.map \ No newline at end of file diff --git a/lib/Quantity.js.map b/lib/Quantity.js.map new file mode 100644 index 0000000..c3da5ba --- /dev/null +++ b/lib/Quantity.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Quantity.js","sourceRoot":"","sources":["../src/Quantity.ts"],"names":[],"mappings":";;;;;;;;;AAyBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAKtE,MAAM,iBAAiB,GAAW,gBAAgB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,uBAAuB;IAI5D,YAAmB,UAOlB;QAEA,MAAM,IAAI,GAAW,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC;QAE3F,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE,UAAU,CAAC,KAAK;aACvB,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;aAAM;YACN,KAAK,CAAC;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2..8337117 100644 --- a/lib/SKOSConcept.js +++ b/lib/SKOSConcept.js @@ -42,12 +42,12 @@ export default class SKOSConcept extends SemanticObject { constructor(parameters) { const type = "http://www.w3.org/2004/02/skos/core#Concept"; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ semantizer: parameters.connector.getSemantizer(), semanticId: parameters.semanticId, other: parameters.other }); 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({ semanticId: parameters.semanticId, semanticType: type }); + super({ semantizer: parameters.connector.getSemantizer(), semanticId: parameters.semanticId, semanticType: type }); this.connector = parameters.connector; if (!parameters.doNotStore) this.connector.store(this); diff --git a/lib/SKOSConcept.js.map b/lib/SKOSConcept.js.map index 45cd016..89d1c8f 100644 --- a/lib/SKOSConcept.js.map +++ b/lib/SKOSConcept.js.map @@ -1 +1 @@ -{"version":3,"file":"SKOSConcept.js","sourceRoot":"","sources":["../src/SKOSConcept.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAKF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IAItD,YAAmB,UAAoG;QACtH,MAAM,IAAI,GAAW,6CAA6C,CAAC;QAEnE,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,K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1,5 +1,5 @@ -import IOffer from "./IOffer.js"; import ISaleSession from "./ISaleSession.js"; +import IOffer from "./IOffer.js"; import { SemanticObject } from "@virtual-assembly/semantizer"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; @@ -16,13 +16,13 @@ export default class SaleSession extends SemanticObject implements ISaleSession offers?: IOffer[]; doNotStore?: boolean; }); - getBeginDate(): string; - getEndDate(): string; - setBeginDate(beginDate: string): void; + getBeginDate(): string | undefined; + addOffer(offer: IOffer): void; setEndDate(endDate: string): void; setQuantity(quantity: number): void; - addOffer(offer: IOffer): void; - getOffers(options?: IGetterOptions): Promise>; - getQuantity(): number; + getOffers(options?: IGetterOptions): Promise; + getQuantity(): number | undefined; + getEndDate(): string | undefined; + setBeginDate(beginDate: string): void; } //# sourceMappingURL=SaleSession.d.ts.map \ No newline at end of file diff --git a/lib/SaleSession.d.ts.map b/lib/SaleSession.d.ts.map index 8be95f9..8a0b51c 100644 --- a/lib/SaleSession.d.ts.map +++ b/lib/SaleSession.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SaleSession.d.ts","sourceRoot":"","sources":["../src/SaleSession.ts"],"names":[],"mappings":"AAwBA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAe,YAAW,YAAY;IAE9E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAAC,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAC;QAAC,SAAS,CAAC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AClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IA4CM,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAU7B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI7B,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAU5D,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC,UAAU,IAAI,MAAM,GAAG,SAAS;IAIhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAG5C"} \ No newline at end of file diff --git a/lib/SaleSession.js b/lib/SaleSession.js index 4283fbc..5d2c906 100644 --- a/lib/SaleSession.js +++ b/lib/SaleSession.js @@ -1,26 +1,3 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -38,61 +15,66 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; import { SemanticObject } from "@virtual-assembly/semantizer"; +const SALE_SESSION_SEM_TYPE = "dfc-b:SaleSession"; export default class SaleSession extends SemanticObject { constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#SaleSession"; + const type = SALE_SESSION_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); 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({ semanticId: parameters.semanticId, semanticType: type }); + else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.beginDate) + } + if (parameters.beginDate) { this.setBeginDate(parameters.beginDate); - if (parameters.endDate) + } + if (parameters.endDate) { this.setEndDate(parameters.endDate); - if (parameters.quantity || parameters.quantity === 0) + } + if (parameters.quantity || parameters.quantity === 0) { this.setQuantity(parameters.quantity); - if (parameters.offers) + } + if (parameters.offers) { parameters.offers.forEach(e => this.addOffer(e)); + } } getBeginDate() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#beginDate"); - } - getEndDate() { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#endDate"); - } - setBeginDate(beginDate) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#beginDate"; - this.setSemanticPropertyLiteral(property, beginDate); - } - setEndDate(endDate) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#endDate"; - this.setSemanticPropertyLiteral(property, endDate); - } - setQuantity(quantity) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity"; - this.setSemanticPropertyLiteral(property, quantity); + return this.getSemanticProperty("dfc-b:beginDate"); } addOffer(offer) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"; if (offer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, offer); + this.addSemanticPropertyAnonymous("dfc-b:lists", offer); } else { this.connector.store(offer); - this.addSemanticPropertyReference(property, offer); + this.addSemanticPropertyReference("dfc-b:lists", offer); } } + setEndDate(endDate) { + this.setSemanticPropertyLiteral("dfc-b:endDate", endDate); + } + setQuantity(quantity) { + this.setSemanticPropertyLiteral("dfc-b:quantity", quantity); + } getOffers(options) { var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"); + const properties = this.getSemanticPropertyAll("dfc-b:lists"); try { for (var _d = true, properties_1 = __asyncValues(properties), properties_1_1; properties_1_1 = yield properties_1.next(), _a = properties_1_1.done, !_a;) { _c = properties_1_1.value; @@ -119,7 +101,13 @@ export default class SaleSession extends SemanticObject { }); } getQuantity() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity")); + return Number(this.getSemanticProperty("dfc-b:quantity")); + } + getEndDate() { + return this.getSemanticProperty("dfc-b:endDate"); + } + setBeginDate(beginDate) { + this.setSemanticPropertyLiteral("dfc-b:beginDate", beginDate); } } //# sourceMappingURL=SaleSession.js.map \ No newline at end of file diff --git a/lib/SaleSession.js.map b/lib/SaleSession.js.map index c178304..4083e69 100644 --- a/lib/SaleSession.js.map +++ b/lib/SaleSession.js.map @@ -1 +1 @@ -{"version":3,"file":"SaleSession.js","sourceRoot":"","sources":["../src/SaleSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;;;;;;;AAIF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IAItD,YAAmB,UAAgL;QAClM,MAAM,IAAI,GAAW,8GAA8G,CAAC;QAEpI,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,2CAA2C,GAAG,IAAI,GAAG,oCAAoC,GAAG,UAAU,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,GAAG,CAAC,CAAC;SACvJ;;YACI,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,UAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvE,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QAGtC,IAAI,CAAC,UAAU,CAAC,UAAU;YACzB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,UAAU,CAAC,SAAS;YAAE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,UAAU,CAAC,OAAO;YAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC5D,IAAI,UAAU,CAAC,QAAQ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AAU,CAAC,OAAe;QAChC,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAEM,WAAW,CAAC,QAAgB;QAClC,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC7D,CAAC;IAEY,SAAS,CAAC,OAAwB;;;YAC9C,MAAM,OAAO,GAAG,IAAI,KAAK,EAAU,CAAC;YACpC,MAAM,UAAU,GAAG,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;;gBAC9D,KAA+B,eAAA,eAAA,cAAA,UAAU,CAAA,gBAAA;oBAAV,0BAAU;oBAAV,WAAU;;wBAA9B,MAAM,UAAU,KAAA,CAAA;wBAC1B,MAAM,cAAc,GAA6B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;wBACjG,IAAI,cAAc;4BAAE,OAAO,CAAC,IAAI,CAAS,cAAc,CAAC,CAAC;;;;;iBACzD;;;;;;;;;YACD,OAAO,OAAO,CAAC;;KACf;IAEM,WAAW;QACjB,OAAO,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,UAAU;QAChB,OAAO,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;IAClD,CAAC;IAEM,YAAY,CAAC,SAAiB;QACpC,IAAI,CAAC,0BAA0B,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;CACD"} \ No newline at end of file diff --git a/lib/SocialMedia.d.ts b/lib/SocialMedia.d.ts new file mode 100644 index 0000000..60175f8 --- /dev/null +++ b/lib/SocialMedia.d.ts @@ -0,0 +1,20 @@ +import ISocialMedia from "./ISocialMedia.js"; +import { SemanticObject } from "@virtual-assembly/semantizer"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +export default class SocialMedia extends SemanticObject implements ISocialMedia { + protected connector: IConnector; + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + name?: string; + url?: string; + doNotStore?: boolean; + }); + setName(name: string): void; + setUrl(url: string): void; + getName(): string | undefined; + getUrl(): string | undefined; +} +//# sourceMappingURL=SocialMedia.d.ts.map \ No newline at end of file diff --git a/lib/SocialMedia.d.ts.map b/lib/SocialMedia.d.ts.map new file mode 100644 index 0000000..1d71493 --- /dev/null +++ b/lib/SocialMedia.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SocialMedia.d.ts","sourceRoot":"","sources":["../src/SocialMedia.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAKzC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAe,YAAW,YAAY;IAE9E,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC;gBAEb,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;IAoCM,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI3B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,OAAO,IAAI,MAAM,GAAG,SAAS;IAI7B,MAAM,IAAI,MAAM,GAAG,SAAS;CAGnC"} \ No newline at end of file diff --git a/lib/SocialMedia.js b/lib/SocialMedia.js new file mode 100644 index 0000000..3e5a310 --- /dev/null +++ b/lib/SocialMedia.js @@ -0,0 +1,46 @@ +import { SemanticObject } from "@virtual-assembly/semantizer"; +const SOCIAL_MEDIA_SEM_TYPE = "dfc-b:SocialMedia"; +export default class SocialMedia extends SemanticObject { + constructor(parameters) { + const type = SOCIAL_MEDIA_SEM_TYPE; + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId, + semanticType: type, + }); + } + this.connector = parameters.connector; + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.name) { + this.setName(parameters.name); + } + if (parameters.url) { + this.setUrl(parameters.url); + } + } + setName(name) { + this.setSemanticPropertyLiteral("dfc-b:name", name); + } + setUrl(url) { + this.setSemanticPropertyLiteral("dfc-b:URL", url); + } + getName() { + return this.getSemanticProperty("dfc-b:name"); + } + getUrl() { + return this.getSemanticProperty("dfc-b:URL"); + } +} +//# sourceMappingURL=SocialMedia.js.map \ No newline at end of file diff --git a/lib/SocialMedia.js.map b/lib/SocialMedia.js.map new file mode 100644 index 0000000..5a2494e --- /dev/null +++ b/lib/SocialMedia.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SocialMedia.js","sourceRoot":"","sources":["../src/SocialMedia.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAK7D,MAAM,qBAAqB,GAAW,mBAAmB,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IAItD,YAAmB,UAOlB;QAEA,MAAM,IAAI,GAAW,qBAAqB,CAAC;QAE3C,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC;gBACL,UAAU,EAAE,UAAU,CAAC,SAAS,CAAC,aAAa,EAAE;gBAChD,UAAU,EAAE,UAAU,CAAC,UAAW;gBAClC,KAAK,EAAE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000000..b7082e6 --- /dev/null +++ b/lib/SocialMediaOwner.d.ts @@ -0,0 +1,7 @@ +import ISocialMedia from "./ISocialMedia.js"; +import ContactableBySocialMedia from "./ContactableBySocialMedia.js"; +export default interface SocialMediaOwner extends ContactableBySocialMedia { + addSocialMedia(socialMedia: ISocialMedia): void; + removeSocialMedia(socialMedia: ISocialMedia): void; +} +//# sourceMappingURL=SocialMediaOwner.d.ts.map \ No newline at end of file diff --git a/lib/SocialMediaOwner.d.ts.map b/lib/SocialMediaOwner.d.ts.map new file mode 100644 index 0000000..12b7011 --- /dev/null +++ b/lib/SocialMediaOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SocialMediaOwner.d.ts","sourceRoot":"","sources":["../src/SocialMediaOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAIpE,MAAM,CAAC,OAAO,WAAW,gBAAiB,SAAQ,wBAAwB;IAEzE,cAAc,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;IAEhD,iBAAiB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAC;CAEnD"} \ No newline at end of file diff --git a/lib/SocialMediaOwner.js b/lib/SocialMediaOwner.js new file mode 100644 index 0000000..fde3aa8 --- /dev/null +++ b/lib/SocialMediaOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=SocialMediaOwner.js.map \ No newline at end of file diff --git a/lib/SocialMediaOwner.js.map b/lib/SocialMediaOwner.js.map new file mode 100644 index 0000000..a9562db --- /dev/null +++ b/lib/SocialMediaOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SocialMediaOwner.js","sourceRoot":"","sources":["../src/SocialMediaOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/Stockable.d.ts b/lib/Stockable.d.ts index 82a5e5e..c2303be 100644 --- a/lib/Stockable.d.ts +++ b/lib/Stockable.d.ts @@ -1,5 +1,5 @@ export default interface Stockable { - getStockLimitation(): number; + getStockLimitation(): number | undefined; setStockLimitation(stockLimitation: number): void; } //# sourceMappingURL=Stockable.d.ts.map \ No newline at end of file diff --git a/lib/Stockable.d.ts.map b/lib/Stockable.d.ts.map index fe310e2..2776343 100644 --- a/lib/Stockable.d.ts.map +++ b/lib/Stockable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Stockable.d.ts","sourceRoot":"","sources":["../src/Stockable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,kBAAkB,IAAI,MAAM,CAC3B;IACD,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAElD"} \ No newline at end of file +{"version":3,"file":"Stockable.d.ts","sourceRoot":"","sources":["../src/Stockable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,SAAS;IAEjC,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAAC;IAEzC,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAElD"} \ No newline at end of file diff --git a/lib/Stockable.js b/lib/Stockable.js index 764e71b..1d74902 100644 --- a/lib/Stockable.js +++ b/lib/Stockable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Stockable.js.map \ No newline at end of file diff --git a/lib/Stockable.js.map b/lib/Stockable.js.map index f389081..cdd0eda 100644 --- a/lib/Stockable.js.map +++ b/lib/Stockable.js.map @@ -1 +1 @@ -{"version":3,"file":"Stockable.js","sourceRoot":"","sources":["../src/Stockable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Stockable.js","sourceRoot":"","sources":["../src/Stockable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/SuppliedProduct.d.ts b/lib/SuppliedProduct.d.ts index dca0236..aaa37af 100644 --- a/lib/SuppliedProduct.d.ts +++ b/lib/SuppliedProduct.d.ts @@ -1,20 +1,15 @@ -import IClaim from "./IClaim.js"; -import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; -import IPartOrigin from "./IPartOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; -import ICertification from "./ICertification.js"; -import IQuantity from "./IQuantity.js"; -import IProductType from "./IProductType.js"; +import ICatalogItem from "./ICatalogItem.js"; import ISuppliedProduct from "./ISuppliedProduct.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; import DefinedProduct from "./DefinedProduct.js"; -import ICatalogItem from "./ICatalogItem.js"; +import INutrientCharacteristic from "./INutrientCharacteristic.js"; +import IQuantity from "./IQuantity.js"; import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; import { Semanticable } from "@virtual-assembly/semantizer"; import IConnector from "./IConnector.js"; export default class SuppliedProduct extends DefinedProduct implements ISuppliedProduct { - getTotalTheoreticalStock(): number; + getTotalTheoreticalStock(): number | undefined; setTotalTheoreticalStock(totalTheoreticalStock: number): void; constructor(parameters: { connector: IConnector; @@ -22,22 +17,22 @@ export default class SuppliedProduct extends DefinedProduct implements ISupplied other?: Semanticable; name?: string; description?: string; - images?: string[]; - productType?: IProductType; + productType?: ISKOSConcept; quantity?: IQuantity; alcoholPercentage?: number; lifetime?: string; - claims?: IClaim[]; + claims?: ISKOSConcept[]; usageOrStorageConditions?: string; allergenCharacteristics?: IAllergenCharacteristic[]; nutrientCharacteristics?: INutrientCharacteristic[]; physicalCharacteristics?: IPhysicalCharacteristic[]; - geographicalOrigin?: IGeographicalOrigin; + geographicalOrigin?: ISKOSConcept; catalogItems?: ICatalogItem[]; - certifications?: ICertification[]; - natureOrigin?: INatureOrigin[]; - partOrigin?: IPartOrigin[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; totalTheoreticalStock?: number; + images?: string[]; doNotStore?: boolean; }); } diff --git a/lib/SuppliedProduct.d.ts.map b/lib/SuppliedProduct.d.ts.map index 6642875..27e5a94 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,OAA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AE,CAAC;QACpD,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QACpD,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QACpD,kBAAkB,CAAC,EAAE,YAAY,CAAC;QAClC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAC9B,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;QAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAC9B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;QAC5B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;CA8CD"} \ No newline at end of file diff --git a/lib/SuppliedProduct.js b/lib/SuppliedProduct.js index a322b41..5e7e10b 100644 --- a/lib/SuppliedProduct.js +++ b/lib/SuppliedProduct.js @@ -1,48 +1,53 @@ -/* - * MIT License - * - * Copyright (c) 2023 Maxime Lecoq - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. -*/ import DefinedProduct from "./DefinedProduct.js"; +const SUPPLIED_PRODUCT_SEM_TYPE = "dfc-b:SuppliedProduct"; export default class SuppliedProduct extends DefinedProduct { getTotalTheoreticalStock() { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#totalTheoreticalStock")); + return Number(this.getSemanticProperty("dfc-b:totalTheoreticalStock")); } setTotalTheoreticalStock(totalTheoreticalStock) { - const property = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#totalTheoreticalStock"; - this.setSemanticPropertyLiteral(property, totalTheoreticalStock); + this.setSemanticPropertyLiteral("dfc-b:totalTheoreticalStock", totalTheoreticalStock); } constructor(parameters) { - const type = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#SuppliedProduct"; + const type = SUPPLIED_PRODUCT_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); 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, 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) + 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, + images: parameters.images + }); + } + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.totalTheoreticalStock || parameters.totalTheoreticalStock === 0) + } + if (parameters.totalTheoreticalStock || parameters.totalTheoreticalStock === 0) { this.setTotalTheoreticalStock(parameters.totalTheoreticalStock); + } } } //# sourceMappingURL=SuppliedProduct.js.map \ No newline at end of file diff --git a/lib/SuppliedProduct.js.map b/lib/SuppliedProduct.js.map index d50c6fa..95c7c2d 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,UAA0pB;QAC5qB,MAAM,IAAI,GAAW,kHAAkH,CAAC;QAExI,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,KAAK,CAAC,EAAE,SAAS,E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CAAC,WAAW;gBACnC,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;gBAC/C,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,wBAAwB,EAAE,UAAU,CAAC,wBAAwB;gBAC7D,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;gBAC3D,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;gBAC3D,uBAAuB,EAAE,UAAU,CAAC,uBAAuB;gBAC3D,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;gBACjD,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC;SACF;QAGD,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;QACD,IAAI,UAAU,CAAC,qBAAqB,IAAI,UAAU,CAAC,qBAAqB,KAAK,CAAC,EAAE;YAC/E,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;SAChE;IAEF,CAAC;CACD"} \ No newline at end of file diff --git a/lib/Taxable.d.ts b/lib/Taxable.d.ts index b92d587..22cf913 100644 --- a/lib/Taxable.d.ts +++ b/lib/Taxable.d.ts @@ -1,5 +1,5 @@ export default interface Taxable { - getVatNumber(): string; + getVatNumber(): string | undefined; setVatNumber(vatNumber: string): void; } //# sourceMappingURL=Taxable.d.ts.map \ No newline at end of file diff --git a/lib/Taxable.d.ts.map b/lib/Taxable.d.ts.map index bb24728..edd1aad 100644 --- a/lib/Taxable.d.ts.map +++ b/lib/Taxable.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Taxable.d.ts","sourceRoot":"","sources":["../src/Taxable.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,YAAY,IAAI,MAAM,CACrB;IACD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAEtC"} \ No newline at end of file +{"version":3,"file":"Taxable.d.ts","sourceRoot":"","sources":["../src/Taxable.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,WAAW,OAAO;IAE/B,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAEtC"} \ No newline at end of file diff --git a/lib/Taxable.js b/lib/Taxable.js index 4f8b5a4..e48f123 100644 --- a/lib/Taxable.js +++ b/lib/Taxable.js @@ -1,2 +1,25 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ export {}; //# sourceMappingURL=Taxable.js.map \ No newline at end of file diff --git a/lib/Taxable.js.map b/lib/Taxable.js.map index d0cf1c0..d8c5119 100644 --- a/lib/Taxable.js.map +++ b/lib/Taxable.js.map @@ -1 +1 @@ -{"version":3,"file":"Taxable.js","sourceRoot":"","sources":["../src/Taxable.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"Taxable.js","sourceRoot":"","sources":["../src/Taxable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE"} \ No newline at end of file diff --git a/lib/TechnicalProduct.d.ts b/lib/TechnicalProduct.d.ts new file mode 100644 index 0000000..b43c2d1 --- /dev/null +++ b/lib/TechnicalProduct.d.ts @@ -0,0 +1,35 @@ +import ICatalogItem from "./ICatalogItem.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; +import DefinedProduct from "./DefinedProduct.js"; +import INutrientCharacteristic from "./INutrientCharacteristic.js"; +import IQuantity from "./IQuantity.js"; +import ITechnicalProduct from "./ITechnicalProduct.js"; +import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; +import { Semanticable } from "@virtual-assembly/semantizer"; +import IConnector from "./IConnector.js"; +export default class TechnicalProduct extends DefinedProduct implements ITechnicalProduct { + constructor(parameters: { + connector: IConnector; + semanticId?: string; + other?: Semanticable; + name?: string; + description?: string; + productType?: ISKOSConcept; + quantity?: IQuantity; + alcoholPercentage?: number; + lifetime?: string; + claims?: ISKOSConcept[]; + usageOrStorageConditions?: string; + allergenCharacteristics?: IAllergenCharacteristic[]; + nutrientCharacteristics?: INutrientCharacteristic[]; + physicalCharacteristics?: IPhysicalCharacteristic[]; + geographicalOrigin?: ISKOSConcept; + catalogItems?: ICatalogItem[]; + certifications?: ISKOSConcept[]; + natureOrigin?: ISKOSConcept[]; + partOrigin?: ISKOSConcept[]; + doNotStore?: boolean; + }); +} +//# sourceMappingURL=TechnicalProduct.d.ts.map \ No newline at end of file diff --git a/lib/TechnicalProduct.d.ts.map b/lib/TechnicalProduct.d.ts.map new file mode 100644 index 0000000..023f63e --- /dev/null +++ b/lib/TechnicalProduct.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TechnicalProduct.d.ts","sourceRoot":"","sources":["../src/TechnicalProduct.ts"],"names":[],"mappings":"AAuBA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAChD,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAClE,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AACtD,OAAO,uBAAuB,MAAM,8BAA8B,CAAA;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAKzC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,cAAe,YAAW,iBAAiB;gBAErE,UAAU,EAAE;QAC9B,SAAS,EAAE,UAAU,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;QACxB,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAClC,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QACpD,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QACpD,uBAAuB,CAAC,EAAE,uBAAuB,EAAE,CAAC;QACpD,kBAAkB,CAAC,EAAE,YAAY,CAAC;QAClC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAC9B,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;QAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAC9B,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;QAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;KACrB;CA0CD"} \ No newline at end of file diff --git a/lib/TechnicalProduct.js b/lib/TechnicalProduct.js new file mode 100644 index 0000000..9fffbed --- /dev/null +++ b/lib/TechnicalProduct.js @@ -0,0 +1,43 @@ +import DefinedProduct from "./DefinedProduct.js"; +const TECHNICAL_PRODUCT_SEM_TYPE = "dfc-b:TechnicalProduct"; +export default class TechnicalProduct extends DefinedProduct { + constructor(parameters) { + const type = TECHNICAL_PRODUCT_SEM_TYPE; + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId, + other: parameters.other, + }); + 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 + }); + } + if (!parameters.doNotStore) { + this.connector.store(this); + } + } +} +//# sourceMappingURL=TechnicalProduct.js.map \ No newline at end of file diff --git a/lib/TechnicalProduct.js.map b/lib/TechnicalProduct.js.map new file mode 100644 index 0000000..6662ff9 --- /dev/null +++ b/lib/Techn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B,EAAE,UAAU,CAAC,uBAAuB;gBAC3D,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;gBACjD,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,UAAU,EAAE,UAAU,CAAC,UAAU;aAClC,CAAC,CAAC;SACF;QAGD,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SAC3B;IAEF,CAAC;CACD"} \ No newline at end of file diff --git a/lib/TechnicalProductProposer.d.ts b/lib/TechnicalProductProposer.d.ts index e72a1bc..b8e307e 100644 --- a/lib/TechnicalProductProposer.d.ts +++ b/lib/TechnicalProductProposer.d.ts @@ -1,6 +1,6 @@ import ITechnicalProduct from "./ITechnicalProduct.js"; export default interface TechnicalProductProposer { - getProposedTechnicalProducts(): Promise>; + getProposedTechnicalProducts(): Promise; proposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; unproposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; } diff --git a/lib/TechnicalProductProposer.d.ts.map b/lib/TechnicalProductProposer.d.ts.map index dc2ff08..ca28be7 100644 --- a/lib/TechnicalProductProposer.d.ts.map +++ b/lib/TechnicalProductProposer.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"TechnicalProductProposer.d.ts","sourceRoot":"","sources":["../src/TechnicalProductProposer.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,wBAAwB;IAEhD,4BAA4B,IAAI,OAAO,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAChE;IACD,wBAAwB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACrE,0BAA0B,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAEvE"} \ No newline at end of file +{"version":3,"file":"TechnicalProductProposer.d.ts","sourceRoot":"","sources":["../src/TechnicalProductProposer.ts"],"names":[],"mappings":"AAuBA,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,wBAAwB;IAEhD,4BAA4B,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAE7D,wBAAwB,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAErE,0BAA0B,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAEvE"} \ No newline at end of file diff --git a/lib/WebsiteOwner.d.ts b/lib/WebsiteOwner.d.ts new file mode 100644 index 0000000..2374f20 --- /dev/null +++ b/lib/WebsiteOwner.d.ts @@ -0,0 +1,6 @@ +import ContactableByWebsite from "./ContactableByWebsite.js"; +export default interface WebsiteOwner extends ContactableByWebsite { + addWebsite(website: string): void; + removeWebsite(website: string): void; +} +//# sourceMappingURL=WebsiteOwner.d.ts.map \ No newline at end of file diff --git a/lib/WebsiteOwner.d.ts.map b/lib/WebsiteOwner.d.ts.map new file mode 100644 index 0000000..089f09f --- /dev/null +++ b/lib/WebsiteOwner.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"WebsiteOwner.d.ts","sourceRoot":"","sources":["../src/WebsiteOwner.ts"],"names":[],"mappings":"AAuBA,OAAO,oBAAoB,MAAM,2BAA2B,CAAA;AAI5D,MAAM,CAAC,OAAO,WAAW,YAAa,SAAQ,oBAAoB;IAEjE,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAErC"} \ No newline at end of file diff --git a/lib/WebsiteOwner.js b/lib/WebsiteOwner.js new file mode 100644 index 0000000..49eb744 --- /dev/null +++ b/lib/WebsiteOwner.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=WebsiteOwner.js.map \ No newline at end of file diff --git a/lib/WebsiteOwner.js.map b/lib/WebsiteOwner.js.map new file mode 100644 index 0000000..696f3a1 --- /dev/null +++ b/lib/WebsiteOwner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WebsiteOwner.js","sourceRoot":"","sources":["../src/WebsiteOwner.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/context.d.ts b/lib/context.d.ts index f606028..437e750 100644 --- a/lib/context.d.ts +++ b/lib/context.d.ts @@ -1,18 +1,39 @@ -declare const context: { +declare const _default: { rdfs: string; skos: string; + dfc: string; dc: string; "dfc-b": string; + "dfc-p": string; "dfc-t": string; "dfc-m": string; "dfc-pt": string; "dfc-f": string; + "dfc-v": string; "dfc-b:hasUnit": { "@type": string; }; + "dfc-b:consumes": { + "@type": string; + }; + "dfc-b:produces": { + "@type": string; + }; + "dfc-b:hasIncome": { + "@type": string; + }; + "dfc-b:hasOutcome": { + "@type": string; + }; + "dfc-b:hasTransformationType": { + "@type": string; + }; "dfc-b:hasQuantity": { "@type": string; }; + "dfc-p:hasType": { + "@type": string; + }; "dfc-b:hasType": { "@type": string; }; @@ -52,7 +73,7 @@ declare const context: { "dfc-b:hasAllergenDimension": { "@type": string; }; - "dfc-b:hasNutrimentDimension": { + "dfc-b:hasNutrientDimension": { "@type": string; }; "dfc-b:hasPhysicalDimension": { @@ -71,5 +92,5 @@ declare const context: { "@type": string; }; }; -export default context; +export default _default; //# sourceMappingURL=context.d.ts.map \ No newline at end of file diff --git a/lib/context.d.ts.map b/lib/context.d.ts.map index fc9a125..6e09a0e 100644 --- a/lib/context.d.ts.map +++ b/lib/context.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEV,CAAA;AACH,eAAe,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA6FC"} \ No newline at end of file diff --git a/lib/context.js b/lib/context.js index 4468f06..326704e 100644 --- a/lib/context.js +++ b/lib/context.js @@ -1,18 +1,39 @@ -const context = { +export default { "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "skos": "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", "dc": "http://purl.org/dc/elements/1.1/#", "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-p": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_ProductOntology.owl#", "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", "dfc-b:hasUnit": { "@type": "@id" }, + "dfc-b:consumes": { + "@type": "@id" + }, + "dfc-b:produces": { + "@type": "@id" + }, + "dfc-b:hasIncome": { + "@type": "@id" + }, + "dfc-b:hasOutcome": { + "@type": "@id" + }, + "dfc-b:hasTransformationType": { + "@type": "@id" + }, "dfc-b:hasQuantity": { "@type": "@id" }, + "dfc-p:hasType": { + "@type": "@id" + }, "dfc-b:hasType": { "@type": "@id" }, @@ -52,7 +73,7 @@ const context = { "dfc-b:hasAllergenDimension": { "@type": "@id" }, - "dfc-b:hasNutrimentDimension": { + "dfc-b:hasNutrientDimension": { "@type": "@id" }, "dfc-b:hasPhysicalDimension": { @@ -71,5 +92,4 @@ const context = { "@type": "@id" } }; -export default context; //# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/lib/context.js.map b/lib/context.js.map index f372d67..8619b9f 100644 --- a/lib/context.js.map +++ b/lib/context.js.map @@ -1 +1 @@ -{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IACZ,MAAM,EAAE,uCAAuC;IAC/C,MAAM,EAAG,sCAAsC;IAC/C,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,mGAAmG;IAC5G,OAAO,EAAE,oGAAoG;IAC7G,OAAO,EAAE,yFAAyF;IACpG,QAAQ,EAAE,6FAA6F;IACvG,OAAO,EAAE,uFAAuF;IAC9F,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,mBAAmB,EAAC;QAClB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,kBAAkB,EAAC;QACjB,OAAO,EAAC,KAAK;KACd;IACD,oBAAoB,EAAC;QACnB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,kBAAkB,EAAC;QACjB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,sBAAsB,EAAC;QACrB,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,6BAA6B,EAAC;QAC5B,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,4BAA4B,EAAC;QAC3B,OAAO,EAAC,KAAK;KACd;IACD,6BAA6B,EAAC;QAC5B,OAAO,EAAC,KAAK;KACd;IACD,4BAA4B,EAAC;QAC3B,OAAO,EAAC,KAAK;KACd;IACD,WAAW,EAAC;QACV,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,iBAAiB,EAAC;QAChB,OAAO,EAAC,KAAK;KACd;CACF,CAAA;AACH,eAAe,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,MAAM,EAAE,uCAAuC;IAC/C,MAAM,EAAG,sCAAsC;IAC/C,KAAK,EAAE,4FAA4F;IACnG,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,mGAAmG;IAC5G,OAAO,EAAE,kGAAkG;IAC3G,OAAO,EAAE,oGAAoG;IAC7G,OAAO,EAAE,yFAAyF;IAClG,QAAQ,EAAE,6FAA6F;IACvG,OAAO,EAAE,uFAAuF;IAChG,OAAO,EAAE,2FAA2F;IACpG,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,iBAAiB,EAAC;QAChB,OAAO,EAAC,KAAK;KACd;IACD,kBAAkB,EAAC;QACjB,OAAO,EAAC,KAAK;KACd;IACD,6BAA6B,EAAC;QAC5B,OAAO,EAAC,KAAK;KACd;IACD,mBAAmB,EAAC;QAClB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,kBAAkB,EAAC;QACjB,OAAO,EAAC,KAAK;KACd;IACD,oBAAoB,EAAC;QACnB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,kBAAkB,EAAC;QACjB,OAAO,EAAC,KAAK;KACd;IACD,eAAe,EAAC;QACd,OAAO,EAAC,KAAK;KACd;IACD,sBAAsB,EAAC;QACrB,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,6BAA6B,EAAC;QAC5B,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,4BAA4B,EAAC;QAC3B,OAAO,EAAC,KAAK;KACd;IACD,4BAA4B,EAAC;QAC3B,OAAO,EAAC,KAAK;KACd;IACD,4BAA4B,EAAC;QAC3B,OAAO,EAAC,KAAK;KACd;IACD,WAAW,EAAC;QACV,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,gBAAgB,EAAC;QACf,OAAO,EAAC,KAAK;KACd;IACD,iBAAiB,EAAC;QAChB,OAAO,EAAC,KAAK;KACd;CACF,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 99bcaea..0cd6504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7175 +1,1002 @@ { "name": "@datafoodconsortium/connector", - "version": "1.0.0-alpha.5.0", - "lockfileVersion": 2, + "version": "1.0.0-alpha.9", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datafoodconsortium/connector", - "version": "1.0.0-alpha.5.0", + "version": "1.0.0-alpha.9", "license": "MIT", "dependencies": { "@rdfjs/serializer-jsonld-ext": "^4.0.0", - "@virtual-assembly/semantizer": "^1.0.0-alpha.2", + "@virtual-assembly/semantizer": "github:assemblee-virtuelle/semantizer-typescript#alpha.3", "jsonld": "^8.1.0", "jsonld-streaming-parser": "^3.2.0", - "rdf-ext": "^2.2.0", + "rdf-ext": "^2.5.1", "readable-stream": "^4.3.0" }, "devDependencies": { "@types/jsonld": "^1.5.7", - "@types/rdf-ext": "^2.2.0", + "@types/rdf-ext": "^2.5.0", "@types/rdfjs__serializer-jsonld-ext": "^2.0.5", - "jest": "^29.5.0", "typescript": "^4.5" } }, - "../../semantizer-typescript": { - "name": "@virtual-assembly/semantizer", - "version": "1.0.0-alpha.1", - "extraneous": true, - "license": "MIT", + "node_modules/@bergos/jsonparse": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@bergos/jsonparse/-/jsonparse-1.4.1.tgz", + "integrity": "sha512-vXIT0nzZGX/+yMD5bx2VhTzc92H55tPoehh1BW/FZHOndWGFddrH3MAfdx39FRc7irABirW6EQaGxIJYV6CGuA==", + "engines": [ + "node >= 0.2.0" + ], "dependencies": { - "@types/rdf-ext": "^1.3.11", - "rdf-ext": "^2.2.0" - }, - "devDependencies": { - "jest": "^29.0.3", - "typescript": "^4.5" + "buffer": "^6.0.3" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, + "node_modules/@digitalbazaar/http-client": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@digitalbazaar/http-client/-/http-client-3.4.1.tgz", + "integrity": "sha512-Ahk1N+s7urkgj7WvvUND5f8GiWEPfUw0D41hdElaqLgu8wZScI8gdI0q+qWw5N1d35x7GCRH2uk9mi+Uzo9M3g==", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "ky": "^0.33.3", + "ky-universal": "^0.11.0", + "undici": "^5.21.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=14.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.5" - }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", "engines": { - "node": ">=6.9.0" + "node": ">=14" } }, - "node_modules/@babel/compat-data": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.6.tgz", - "integrity": "sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/data-model": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-2.0.2.tgz", + "integrity": "sha512-v5LRNkLRJazMCGU7VtEzhz5wKwz/IrOdJEKapCtd35HuFbQfeGpoJP6QOXGyFHhWwKmtG+UMlZzYFyNDVE1m6g==", + "bin": { + "rdfjs-data-model-test": "bin/test.js" } }, - "node_modules/@babel/core": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.8.tgz", - "integrity": "sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw==", - "dev": true, + "node_modules/@rdfjs/dataset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@rdfjs/dataset/-/dataset-2.0.2.tgz", + "integrity": "sha512-6YJx+5n5Uxzq9dd9I0GGcIo6eopZOPfcsAfxSGX5d+YBzDgVa1cbtEBFnaPyPKiQsOm4+Cr3nwypjpg02YKPlA==", + "bin": { + "rdfjs-dataset-test": "bin/test.js" + } + }, + "node_modules/@rdfjs/environment": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rdfjs/environment/-/environment-1.0.0.tgz", + "integrity": "sha512-+S5YjSvfoQR5r7YQCRCCVHvIEyrWia7FJv2gqM3s5EDfotoAQmFeBagApa9c/eQFi5EiNhmBECE5nB8LIxTaHg==" + }, + "node_modules/@rdfjs/fetch-lite": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@rdfjs/fetch-lite/-/fetch-lite-3.2.2.tgz", + "integrity": "sha512-hcdg9gvMgaOLPGS1LAYPjyS3rjQg2x8G/do+ZTlHjIHrAtRzXZCa0ui+pzoT98258RQzxEGqajY4ug4IqSuHZw==", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "@nicolo-ribaudo/semver-v6": "^6.3.3", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "is-stream": "^3.0.0", + "nodeify-fetch": "^3.1.0", + "readable-stream": "^4.4.2" } }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "node_modules/@rdfjs/formats": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rdfjs/formats/-/formats-4.0.0.tgz", + "integrity": "sha512-9e0DX+iWi8d958Px6Ggb1otl/EhfyvlfWcop+lS0aZlsGV2YK9Phl5lzCUYTfTefSyyQk8tJd5XN52hhDLb5Wg==", + "dependencies": { + "@rdfjs/parser-jsonld": "^2.1.0", + "@rdfjs/parser-n3": "^2.0.1", + "@rdfjs/serializer-jsonld": "^2.0.0", + "@rdfjs/serializer-jsonld-ext": "^4.0.0", + "@rdfjs/serializer-ntriples": "^2.0.0", + "@rdfjs/serializer-turtle": "^1.1.1", + "@rdfjs/sink-map": "^2.0.0", + "rdfxml-streaming-parser": "^2.3.0" + } }, - "node_modules/@babel/generator": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.7.tgz", - "integrity": "sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==", - "dev": true, + "node_modules/@rdfjs/io": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@rdfjs/io/-/io-1.0.0.tgz", + "integrity": "sha512-+yBzq3Tlrw7vd4NFTdKfKjtJi+PiYi5jLqGwNh3H/kqrYBQOK3iuZuUAT8mpIAPNx/ZTs0+egwGcP1Felh79KA==", "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "duplex-to": "^2.0.0", + "readable-stream": "^4.4.2", + "stream-chunks": "^1.0.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz", - "integrity": "sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA==", - "dev": true, + "node_modules/@rdfjs/namespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/namespace/-/namespace-2.0.1.tgz", + "integrity": "sha512-U85NWVGnL3gWvOZ4eXwUcv3/bom7PAcutSBQqmVWvOaslPy+kDzAJCH1WYBLpdQd4yMmJ+bpJcDl9rcHtXeixg==", "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-validator-option": "^7.22.5", - "@nicolo-ribaudo/semver-v6": "^6.3.3", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "@rdfjs/data-model": "^2.0.1" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/normalize": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/normalize/-/normalize-2.0.1.tgz", + "integrity": "sha512-Cz6AvVdNjxSTTtcYN1z6bSaeD6uWU93jxHqgS1w5l+b99ABUzCTct5/y8DAJFjpH8wrG4eRqwVA4Bpka4ltakg==", + "dependencies": { + "rdf-canonize": "^3.4.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, + "node_modules/@rdfjs/parser-jsonld": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@rdfjs/parser-jsonld/-/parser-jsonld-2.1.1.tgz", + "integrity": "sha512-bddq04r/p7booWk+5IqcTlWpDljy8Sv1cdFynpzawNruZTD99n3eSj7LCHPBUzqnpXc1Dnt8tgXiqB02WSYtiw==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/data-model": "^2.0.2", + "@rdfjs/sink": "^2.0.1", + "duplex-to": "^2.0.0", + "jsonld-streaming-parser": "^3.3.0", + "readable-stream": "^4.5.2" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, + "node_modules/@rdfjs/parser-n3": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@rdfjs/parser-n3/-/parser-n3-2.0.2.tgz", + "integrity": "sha512-rrrvyh+kkj9ndwep2h6nYmugIfggDOC9uGpmDAHn/I/z52K7dHxi7xOkPPrezTsIbgNvFhV3zS7mzyObRxcLWA==", "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/data-model": "^2.0.2", + "@rdfjs/sink": "^2.0.1", + "duplex-to": "^2.0.0", + "n3": "^1.17.2", + "readable-stream": "^4.5.2" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, + "node_modules/@rdfjs/prefix-map": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.1.tgz", + "integrity": "sha512-w9VrJ/YfMyvdcpuKG0XEzgbH6AXtUSugvgL1U1IvbTYdL2rfIifaYkSyp86lEhD2hHeYUYAGZTKkpDErtXCMxQ==", "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "readable-stream": "^4.3.0" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", - "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", - "dev": true, + "node_modules/@rdfjs/score": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@rdfjs/score/-/score-0.1.2.tgz", + "integrity": "sha512-HKiC6q6sCsEPYVf9B4k/R0Hd+9e0QsjKr4zRdfuv6V4VPiPyzHfAsSUiFfRdi8UvNfpdKmoSWX8PM/ZIPwvq1g==", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/data-model": "^2.0.2", + "@rdfjs/term-map": "^2.0.1", + "@rdfjs/term-set": "^2.0.2", + "@rdfjs/to-ntriples": "^3.0.1" } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/score/node_modules/@rdfjs/to-ntriples": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/to-ntriples/-/to-ntriples-3.0.1.tgz", + "integrity": "sha512-gjoPAvh4j7AbGMjcDn/8R4cW+d/FPtbfbMM0uQXkyfBFtNUW2iVgrqsgJ65roLc54Y9A2TTFaeeTGSvY9a0HCQ==" + }, + "node_modules/@rdfjs/serializer-jsonld": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/serializer-jsonld/-/serializer-jsonld-2.0.1.tgz", + "integrity": "sha512-O8WzdY7THsse/nMsrMLd2e51ADHO2SIUrkiZ9Va/8W3lXeeeiwDRPMppWy/i9yL4q6EM8iMW1riV7E0mK3fsBQ==", + "dependencies": { + "@rdfjs/sink": "^2.0.1", + "readable-stream": "^4.5.2" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, + "node_modules/@rdfjs/serializer-jsonld-ext": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@rdfjs/serializer-jsonld-ext/-/serializer-jsonld-ext-4.0.0.tgz", + "integrity": "sha512-HP5DCmhyfVuQuk58AO5vzNY+dIFVHe2oHY8NX2K+3XmrTmu/yzrFzPbDeU9Cwr71XC4RifEMoksIg+8jnhxmfQ==", "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/sink": "^2.0.0", + "jsonld": "^8.1.0", + "readable-stream": "^4.3.0", + "stream-chunks": "^1.0.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, + "node_modules/@rdfjs/serializer-ntriples": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/serializer-ntriples/-/serializer-ntriples-2.0.1.tgz", + "integrity": "sha512-G1ZI0qaN/MUHxeCwr59JscO2LdyIb6MNQdXOv7NFBZuodyHsxxhJRFmMVn+3SEXeNJbVeEEbWBrLglCUgJ8XjQ==", "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/sink": "^2.0.1", + "@rdfjs/to-ntriples": "^3.0.1", + "duplex-to": "^2.0.0", + "readable-stream": "^4.5.2" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/serializer-ntriples/node_modules/@rdfjs/to-ntriples": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/to-ntriples/-/to-ntriples-3.0.1.tgz", + "integrity": "sha512-gjoPAvh4j7AbGMjcDn/8R4cW+d/FPtbfbMM0uQXkyfBFtNUW2iVgrqsgJ65roLc54Y9A2TTFaeeTGSvY9a0HCQ==" + }, + "node_modules/@rdfjs/serializer-turtle": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rdfjs/serializer-turtle/-/serializer-turtle-1.1.2.tgz", + "integrity": "sha512-jLcFpa2TlyK4Se+fjaI0ur+BtlhFqzmAL3QGczBl8oa8Q15deuVVNaOTGO3pcy/TbMQD4jKv7G9PHw56brjQrA==", + "dependencies": { + "@rdfjs/data-model": "^2.0.1", + "@rdfjs/namespace": "^2.0.0", + "@rdfjs/prefix-map": "^0.1.1", + "@rdfjs/sink": "^2.0.0", + "@rdfjs/term-map": "^2.0.0", + "@rdfjs/to-ntriples": "^2.0.0", + "@rdfjs/tree": "^0.2.1", + "readable-stream": "^4.3.0", + "stream-chunks": "^1.0.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/sink": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/sink/-/sink-2.0.1.tgz", + "integrity": "sha512-smzIFGF6EH1sLAJR9F3p2wMNrN44JjPeYAoITTJLqtuNC319K7IXaJ+qNLBGTtapZ/jvpx2Tks0TjcH9KrAvEA==" + }, + "node_modules/@rdfjs/sink-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/sink-map/-/sink-map-2.0.1.tgz", + "integrity": "sha512-BwCTTsMN/tfQl6QzD2oHn9A08e4af+hlzAz/d5XXrlOkYMEDUAqFuh2Odj9EbayhAEeN4wA743Mj2yC0/s69rg==" + }, + "node_modules/@rdfjs/term-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rdfjs/term-map/-/term-map-2.0.1.tgz", + "integrity": "sha512-kyaq8KfTxnMVclD5trsVkB774Q/4/mj+fwNBRxkMHCu/gTw3S1x7W8ZDFN9Yt1AiRkfG2CQe/b/iLbl5RMHvUQ==", + "dependencies": { + "@rdfjs/to-ntriples": "^2.0.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, - "engines": { - "node": ">=6.9.0" + "node_modules/@rdfjs/term-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@rdfjs/term-set/-/term-set-2.0.2.tgz", + "integrity": "sha512-XSP+G9Q+QxeRcmTvUyFzdPJtGHdYDWr166UARO8UPhG/thUY2aHw7Qx17KTwTV0auJDSzO43AoJ6v/WdjrJ6pg==", + "dependencies": { + "@rdfjs/to-ntriples": "^2.0.0" } }, - "node_modules/@babel/helpers": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", - "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", - "dev": true, + "node_modules/@rdfjs/to-ntriples": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rdfjs/to-ntriples/-/to-ntriples-2.0.0.tgz", + "integrity": "sha512-nDhpfhx6W6HKsy4HjyLp3H1nbrX1CiUCWhWQwKcYZX1s9GOjcoQTwY7GUUbVec0hzdJDQBR6gnjxtENBDt482Q==" + }, + "node_modules/@rdfjs/traverser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@rdfjs/traverser/-/traverser-0.1.2.tgz", + "integrity": "sha512-EBB/p9LrTMzupZ6VlxtBXyL0bdXFY7e5lAp2tHNwxOoe3kcR6hOJFVWdPT7pdWaSotyXbTIEQxG4PkXMw/OY7w==", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/to-ntriples": "^2.0.0" } }, - "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", - "dev": true, + "node_modules/@rdfjs/tree": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@rdfjs/tree/-/tree-0.2.1.tgz", + "integrity": "sha512-J70CQ7R8Ivfs1FFUxtFN7ADb5wTMgbhn0O558NXSXQHItmSavT6cXmQlIokbmboU+grhu56iR/8Bl9do8LCq+w==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/namespace": "^2.0.0", + "@rdfjs/term-map": "^2.0.0", + "@rdfjs/term-set": "^2.0.1" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, + "node_modules/@rdfjs/types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.1.0.tgz", + "integrity": "sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw==", "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "@types/node": "*" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, + "node_modules/@rubensworks/saxes": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@rubensworks/saxes/-/saxes-6.0.1.tgz", + "integrity": "sha512-UW4OTIsOtJ5KSXo2Tchi4lhZqu+tlHrOAs4nNti7CrtB53kAZl3/hyrTi6HkMihxdbDM6m2Zc3swc/ZewEe1xw==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "xmlchars": "^2.2.0" }, "engines": { - "node": ">=4" + "node": ">=v12.22.12" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, + "node_modules/@types/http-link-header": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/http-link-header/-/http-link-header-1.0.5.tgz", + "integrity": "sha512-AxhIKR8UbyoqCTNp9rRepkktHuUOw3DjfOfDCaO9kwI8AYzjhxyrvZq4+mRw/2daD3hYDknrtSeV6SsPwmc71w==", "dependencies": { - "color-name": "1.1.3" + "@types/node": "*" } }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "node_modules/@types/jsonld": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/@types/jsonld/-/jsonld-1.5.13.tgz", + "integrity": "sha512-n7fUU6W4kSYK8VQlf/LsE9kddBHPKhODoVOjsZswmve+2qLwBy6naWxs/EiuSZN9NU0N06Ra01FR+j87C62T0A==", "dev": true }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" + "node_modules/@types/node": { + "version": "20.11.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", + "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", + "dependencies": { + "undici-types": "~5.26.4" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/@types/rdf-ext": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@types/rdf-ext/-/rdf-ext-2.5.0.tgz", + "integrity": "sha512-d+O6WnpKTHULLYZ/EeHfCnpt38J+w5QmAQ3Bsijdk0p+RIbEhoVh9XvXzs/H6Os3rxltiQOUm2Bg/+JqLmQcEg==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "@rdfjs/types": "*", + "@types/rdfjs__data-model": "*", + "@types/rdfjs__dataset": "*", + "@types/rdfjs__environment": "*", + "@types/rdfjs__fetch-lite": "*", + "@types/rdfjs__formats": "*", + "@types/rdfjs__namespace": "*", + "@types/rdfjs__prefix-map": "*", + "@types/rdfjs__score": "*", + "@types/rdfjs__term-map": "*", + "@types/rdfjs__term-set": "*", + "@types/rdfjs__traverser": "*" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@types/rdfjs__data-model": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/rdfjs__data-model/-/rdfjs__data-model-2.0.7.tgz", + "integrity": "sha512-ysEnLulluo12hQLPulSheQIFrU3J+cV0X46NGUFO+TVsMDO4oc25KdrGD+9UnVAlUZTKJO6YYKWbDCl7V/0ADA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "@rdfjs/types": "^1.0.1" } }, - "node_modules/@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "node_modules/@types/rdfjs__dataset": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/rdfjs__dataset/-/rdfjs__dataset-2.0.7.tgz", + "integrity": "sha512-+GaYIL9C7N1N0HyH+obU4IXuL7DX+fXuf827aUQ2Vx2UghO47+OTxo2v3seEQj/1YHoHBfQFk5Y4P6Q7Ht4Hqw==", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@rdfjs/types": "*" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "node_modules/@types/rdfjs__environment": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/rdfjs__environment/-/rdfjs__environment-1.0.0.tgz", + "integrity": "sha512-MDcnv3qfJvbHoEpUQXj5muT8g3e+xz1D8sGevrq3+Q4TzeEvQf5ijGX5l8485XFYrN/OBApgzXkHMZC04/kd5w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*", + "@types/node": "*" } }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "node_modules/@types/rdfjs__fetch-lite": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/rdfjs__fetch-lite/-/rdfjs__fetch-lite-3.0.10.tgz", + "integrity": "sha512-5EokVEj3eJGBknxM3pFV8y6w/ZVMAqZkmHKFLz6zgLxonCmC/bHHXeCTZGE1+5Heji/4vc84vinZMaQ1+n7t6Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*", + "@types/node": "*", + "@types/rdfjs__formats": "*" } }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "node_modules/@types/rdfjs__formats": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/rdfjs__formats/-/rdfjs__formats-4.0.1.tgz", + "integrity": "sha512-Zj7hQEn5HeCj+pJCWshY2gqBcdBdwyc2j20Ht3PH91pkdRuG2AlGDD3N9PQ1oZ3+J6Q96rAlhxUbjQUp9+s3FQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0", + "@types/node": "*", + "@types/rdfjs__parser-jsonld": "*", + "@types/rdfjs__parser-n3": "*", + "@types/rdfjs__serializer-jsonld": "*", + "@types/rdfjs__serializer-jsonld-ext": "*", + "@types/rdfjs__serializer-ntriples": "*", + "@types/rdfjs__serializer-turtle": "*", + "@types/rdfjs__sink-map": "*", + "rdfxml-streaming-parser": ">=2" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "node_modules/@types/rdfjs__namespace": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/rdfjs__namespace/-/rdfjs__namespace-2.0.10.tgz", + "integrity": "sha512-xoVzEIOxcpyteEmzaj94MSBbrBFs+vqv05joMhzLEiPRwsBBDnhkdBCaaDxR1Tf7wOW0kB2R1IYe4C3vEBFPgA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "node_modules/@types/rdfjs__parser-jsonld": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@types/rdfjs__parser-jsonld/-/rdfjs__parser-jsonld-2.1.6.tgz", + "integrity": "sha512-2O8584S2yT819CjUFtTde36Wl9olAmg3s4ZWkmvtnd6xCS1MJvCfI1rWfxApP+fy+k5TXsC3gciMbnAJ00NgCw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0", + "@types/jsonld": "*" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "node_modules/@types/rdfjs__parser-n3": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/rdfjs__parser-n3/-/rdfjs__parser-n3-2.0.6.tgz", + "integrity": "sha512-VHfdq7BDV6iMCtHkzTFSOuUWnqGlMUmEF0UZyK4+g9SzLWvc6TMcU5TYwQPQIz/e0s7dZ+xomxx6mVtIzsRQ/A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "node_modules/@types/rdfjs__prefix-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@types/rdfjs__prefix-map/-/rdfjs__prefix-map-0.1.5.tgz", + "integrity": "sha512-RAwyS/2dT9X79QwM0F8KLweTfuBoe6xtiAlU7wKPB+/t/sfk6A50LYtAWaDVP5qBjcu50UkKkZT+VR47CiLkfg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "node_modules/@types/rdfjs__score": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@types/rdfjs__score/-/rdfjs__score-0.1.6.tgz", + "integrity": "sha512-TZZaI0PntOUnfA6vKsVlgeYuyiGvtlMygu0ycmmFn5quldbDWzIIxadciTIaBQBcPXmJHcnXiS8/mbZ9FkX4hQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "node_modules/@types/rdfjs__serializer-jsonld": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-jsonld/-/rdfjs__serializer-jsonld-2.0.5.tgz", + "integrity": "sha512-ubdLD9QgZzAt+65NSPzh2qWCPWcGYlHEWgkP6uRwfm7JC48Xh/QjzwOTG13MTomOkQqcN4R7PIG0j3Ca8iyNWQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "node_modules/@types/rdfjs__serializer-jsonld-ext": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-jsonld-ext/-/rdfjs__serializer-jsonld-ext-2.0.10.tgz", + "integrity": "sha512-9HELzeyab34Yr81v6oSQt/VZlJN5YQ+Qkhr50jtK2b7xDdWyx4tc9Stxk6J0/gwQQmcIC6iZ8xMG4CFUcnt/DQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0", + "@types/jsonld": "*" } }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "node_modules/@types/rdfjs__serializer-ntriples": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-ntriples/-/rdfjs__serializer-ntriples-2.0.6.tgz", + "integrity": "sha512-Nn3e3eyuymLvbI5MFzI7ODD/X6ZGpbB9fLaWOB00RtFHd2vttk3wQL2fzzsZZQPJ/ihC/xlFE4cNQkO6SoHa7w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "node_modules/@types/rdfjs__serializer-turtle": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-turtle/-/rdfjs__serializer-turtle-1.1.0.tgz", + "integrity": "sha512-NGHnbz5985UwS/YS6WL/FkS94B+QiVTdsfvJCqPwLmY3E7UeClw91c2KbiphZUR/uh7uwLwxeKKhV2T1gYgT5Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": ">=1.0.0", + "@types/node": "*", + "@types/rdfjs__prefix-map": "*" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "node_modules/@types/rdfjs__sink-map": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/rdfjs__sink-map/-/rdfjs__sink-map-2.0.5.tgz", + "integrity": "sha512-ycUBlOMbp9YpjrBrMwGv3uiqulOWgodess06cinYLxomOTc2ET9rEQklgM5rJqnu5WMsVP8SFG3fFw36/5hADQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "node_modules/@types/rdfjs__term-map": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/rdfjs__term-map/-/rdfjs__term-map-2.0.10.tgz", + "integrity": "sha512-YlpYkya+Xq9fmcw+BMi1SCh+w2sBu7G0/qd2+ZhB4QIK3V1xq2o3EOAZnlahyQdwrW9t5+Ihw8IVVvZsJvDOTA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "node_modules/@types/rdfjs__term-set": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@types/rdfjs__term-set/-/rdfjs__term-set-2.0.9.tgz", + "integrity": "sha512-RRXs5DwFGanZyT705f7KLSiN68gUVUtGWTp508CXJhLfD7AWmilqc1BLgLUoac48h3pnh9w5lRhwFm6fj1ZE5Q==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/types": "*" } }, - "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "node_modules/@types/rdfjs__traverser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@types/rdfjs__traverser/-/rdfjs__traverser-0.1.5.tgz", + "integrity": "sha512-tTpiM6lAddw+bGRDjhzwdpo1EQK73m8gYgMVNfO4OsevnuLZvQJeCJBckpuDC4H5HVAEwCapI0UlH9dVnZ9u5g==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" + "@rdfjs/types": "*" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@bergos/jsonparse": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@bergos/jsonparse/-/jsonparse-1.4.1.tgz", - "integrity": "sha512-vXIT0nzZGX/+yMD5bx2VhTzc92H55tPoehh1BW/FZHOndWGFddrH3MAfdx39FRc7irABirW6EQaGxIJYV6CGuA==", - "engines": [ - "node >= 0.2.0" - ], + "node_modules/@types/readable-stream": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", + "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", "dependencies": { - "buffer": "^6.0.3" + "@types/node": "*", + "safe-buffer": "~5.1.1" } }, - "node_modules/@digitalbazaar/http-client": { - "version": "3.3.0", - "license": "BSD-3-Clause", + "node_modules/@virtual-assembly/semantizer": { + "version": "1.0.0-alpha.3", + "resolved": "git+ssh://git@github.com/assemblee-virtuelle/semantizer-typescript.git#861e7b402d1e997463f8e79997b69ec8cb18e88f", + "license": "MIT", "dependencies": { - "ky": "^0.33.2", - "ky-universal": "^0.11.0", - "undici": "^5.15.0" - }, - "engines": { - "node": ">=14.0" + "rdf-ext": "^2.5.1" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "event-target-shim": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=6.5" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/@jest/console": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.1.tgz", - "integrity": "sha512-Aj772AYgwTSr5w8qnyoJ0eDYvN6bMsH3ORH1ivMotrInHLKdUz6BDlaEXHdM6kODaBIkNIyQGzsMvRdOv7VG7Q==", - "dev": true, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/@jest/core": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.1.tgz", - "integrity": "sha512-CcowHypRSm5oYQ1obz1wfvkjZZ2qoQlrKKvlfPwh5jUXVU12TWr2qMeH8chLMuTFzHh5a1g2yaqlqDICbr+ukQ==", - "dev": true, + "node_modules/canonicalize": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-1.0.8.tgz", + "integrity": "sha512-0CNTVCLZggSh7bc5VkX5WWPWO+cyZbNd07IHIsSXLia/eAq+r836hgk+8BKoEh7949Mda87VUOitx5OddVj64A==" + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", "dependencies": { - "@jest/console": "^29.6.1", - "@jest/reporters": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.6.1", - "jest-haste-map": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-resolve-dependencies": "^29.6.1", - "jest-runner": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "jest-watcher": "^29.6.1", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node-fetch": "^2.6.12" } }, - "node_modules/@jest/environment": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.1.tgz", - "integrity": "sha512-RMMXx4ws+Gbvw3DfLSuo2cfQlK7IwGbpuEWXCqyYDcqYTI+9Ju3a5hDnXaxjNsa6uKh9PQF2v+qg+RLe63tz5A==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.1" - }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 12" } }, - "node_modules/@jest/expect": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.1.tgz", - "integrity": "sha512-N5xlPrAYaRNyFgVf2s9Uyyvr795jnB6rObuPx4QFvNJz8aAjpZUDfO4bh5G/xuplMID8PrnuF1+SfSyDxhsgYg==", - "dev": true, - "dependencies": { - "expect": "^29.6.1", - "jest-snapshot": "^29.6.1" - }, + "node_modules/duplex-to": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/duplex-to/-/duplex-to-2.0.0.tgz", + "integrity": "sha512-f2nMnk11mwDptEFBTv2mcWHpF4ENAbuQ63yTiSy/99rG4Exsxsf0GJhJYq/AHF2cdMYswSx23LPuoijBflpquQ==" + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=6" } }, - "node_modules/@jest/expect-utils": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.1.tgz", - "integrity": "sha512-o319vIf5pEMx0LmzSxxkYYxo4wrRLKHq9dP1yJU7FoPTB0LfAKSz8SWD6D/6U3v/O52t9cF5t+MeJiRsfk7zMw==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.4.3" - }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=0.8.x" } }, - "node_modules/@jest/fake-timers": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.1.tgz", - "integrity": "sha512-RdgHgbXyosCDMVYmj7lLpUwXA4c69vcNzhrt69dJJdf8azUrpRh3ckFCaTPNjsEeRi27Cig0oKDGxy5j7hOgHg==", - "dev": true, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], "dependencies": { - "@jest/types": "^29.6.1", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.6.1", - "jest-mock": "^29.6.1", - "jest-util": "^29.6.1" + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^12.20 || >= 14.13" } }, - "node_modules/@jest/globals": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.1.tgz", - "integrity": "sha512-2VjpaGy78JY9n9370H8zGRCFbYVWwjY6RdDMhoJHa1sYfwe6XM/azGN0SjY8kk7BOZApIejQ1BFPyH7FPG0w3A==", - "dev": true, + "node_modules/file-fetch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-fetch/-/file-fetch-2.0.0.tgz", + "integrity": "sha512-zNBKfKZThjf5354uAcfXPMfxwDBiyZluznykkZc1HmMjP3IKKqAydDpDj7MO9oeUD0rVjqyuqhDjDi10blpwRA==", "dependencies": { - "@jest/environment": "^29.6.1", - "@jest/expect": "^29.6.1", - "@jest/types": "^29.6.1", - "jest-mock": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "mime-types": "^2.1.35", + "readable-stream": "^4.4.2", + "stream-chunks": "^1.0.0" } }, - "node_modules/@jest/reporters": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.1.tgz", - "integrity": "sha512-9zuaI9QKr9JnoZtFQlw4GREQbxgmNYXU6QuWtmuODvk5nvPUeBYapVR/VYMyi2WSx3jXTLJTJji8rN6+Cm4+FA==", - "dev": true, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "jest-worker": "^29.6.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" + "fetch-blob": "^3.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=12.20.0" } }, - "node_modules/@jest/schemas": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", - "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", - "dev": true, + "node_modules/grapoi": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/grapoi/-/grapoi-1.1.2.tgz", + "integrity": "sha512-FknMk4EPaVroumWDURlAScwr+cYE/e9dVmnTkuhhoghq9PWx2ap+A4+iS37dGoT6mhJbV0O+xgex6lI4c64plQ==", "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@rdfjs/namespace": "^2.0.0", + "@rdfjs/term-set": "^2.0.0" } }, - "node_modules/@jest/source-map": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", - "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, + "node_modules/http-link-header": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.2.tgz", + "integrity": "sha512-6qz1XhMq/ryde52SZGzVhzi3jcG2KqO16KITkupyQxvW6u7iylm0Fq7r3OpCYsc0S0ELlCiFpuxDcccUwjbEqA==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/test-result": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.1.tgz", - "integrity": "sha512-Ynr13ZRcpX6INak0TPUukU8GWRfm/vAytE3JbJNGAvINySWYdfE7dGZMbk36oVuK4CigpbhMn8eg1dixZ7ZJOw==", - "dev": true, - "dependencies": { - "@jest/console": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@jest/test-sequencer": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.1.tgz", - "integrity": "sha512-oBkC36PCDf/wb6dWeQIhaviU0l5u6VCsXa119yqdUosYAt7/FbQU2M2UoziO3igj/HBDEgp57ONQ3fm0v9uyyg==", - "dev": true, + "node_modules/jsonld": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-8.3.2.tgz", + "integrity": "sha512-MwBbq95szLwt8eVQ1Bcfwmgju/Y5P2GdtlHE2ncyfuYjIdEhluUVyj1eudacf1mOkWIoS9GpDBTECqhmq7EOaA==", "dependencies": { - "@jest/test-result": "^29.6.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "slash": "^3.0.0" + "@digitalbazaar/http-client": "^3.4.1", + "canonicalize": "^1.0.1", + "lru-cache": "^6.0.0", + "rdf-canonize": "^3.4.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=14" } }, - "node_modules/@jest/transform": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.1.tgz", - "integrity": "sha512-URnTneIU3ZjRSaf906cvf6Hpox3hIeJXRnz3VDSw5/X93gR8ycdfSIEy19FlVx8NFmpN7fe3Gb1xF+NjXaQLWg==", - "dev": true, + "node_modules/jsonld-context-parser": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.4.0.tgz", + "integrity": "sha512-ZYOfvh525SdPd9ReYY58dxB3E2RUEU4DJ6ZibO8AitcowPeBH4L5rCAitE2om5G1P+HMEgYEYEr4EZKbVN4tpA==", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "@types/http-link-header": "^1.0.1", + "@types/node": "^18.0.0", + "cross-fetch": "^3.0.6", + "http-link-header": "^1.0.2", + "relative-to-absolute-iri": "^1.0.5" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "bin": { + "jsonld-context-parse": "bin/jsonld-context-parse.js" } }, - "node_modules/@jest/types": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", - "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", - "dev": true, + "node_modules/jsonld-context-parser/node_modules/@types/node": { + "version": "18.19.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.24.tgz", + "integrity": "sha512-eghAz3gnbQbvnHqB+mgB2ZR3aH6RhdEmHGS48BnV75KceQPHqabkxKI0BbUSsqhqy2Ddhc2xD/VAR9ySZd57Lw==", "dependencies": { - "@jest/schemas": "^29.6.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "undici-types": "~5.26.4" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, + "node_modules/jsonld-streaming-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-3.3.0.tgz", + "integrity": "sha512-6aWiAsWGZioTB/vNQ3KenREz9ddEOliZoEETi+jLrlL7+vkgMeHjnxyFlGe4UOCU7SVUNPhz/lgLGZjnxgVYtA==", "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" + "@bergos/jsonparse": "^1.4.0", + "@rdfjs/types": "*", + "@types/http-link-header": "^1.0.1", + "@types/readable-stream": "^2.3.13", + "buffer": "^6.0.3", + "canonicalize": "^1.0.1", + "http-link-header": "^1.0.2", + "jsonld-context-parser": "^2.4.0", + "rdf-data-factory": "^1.1.0", + "readable-stream": "^4.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "node_modules/ky": { + "version": "0.33.3", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.33.3.tgz", + "integrity": "sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==", "engines": { - "node": ">=6.0.0" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@nicolo-ribaudo/semver-v6": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", - "integrity": "sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@rdfjs/data-model": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-2.0.1.tgz", - "integrity": "sha512-oRDYpy7/fJ9NNjS+M7m+dbnhi4lOWYGbBiM/A+u9bBExnN6ifXUF5mUsFxwZaQulmwTDaMhKERdV6iKTBUMgtw==", - "bin": { - "rdfjs-data-model-test": "bin/test.js" - } - }, - "node_modules/@rdfjs/dataset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/dataset/-/dataset-2.0.1.tgz", - "integrity": "sha512-hDIaXpUmU/ZdofX/BMFDAchkhN/AjmP5dMCOuVL2VCqWuFjeQxd2KV84E4+7S2Biw8tjEFhPBeQZP7KW+ARV7Q==", - "bin": { - "rdfjs-dataset-test": "bin/test.js" - } - }, - "node_modules/@rdfjs/environment": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@rdfjs/environment/-/environment-0.1.2.tgz", - "integrity": "sha512-R4N73kaoaOt3XvgLy2Cb98bJUgMJv/wRsUPGDxeogbtalkENPmo3X5to/rKQEwOjnj+jw+ILzN2webUHb8pvEw==", + "node_modules/ky-universal": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.11.0.tgz", + "integrity": "sha512-65KyweaWvk+uKKkCrfAf+xqN2/epw1IJDtlyCPxYffFCMR8u1sp2U65NtWpnozYfZxQ6IUzIlvUcw+hQ82U2Xw==", "dependencies": { - "@rdfjs/data-model": "^2.0.1", - "@rdfjs/dataset": "^2.0.1", - "@rdfjs/fetch-lite": "^3.2.1", - "@rdfjs/namespace": "^2.0.0", - "@rdfjs/sink-map": "^2.0.0", - "@rdfjs/term-map": "^2.0.0", - "@rdfjs/term-set": "^2.0.1" + "abort-controller": "^3.0.0", + "node-fetch": "^3.2.10" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky-universal?sponsor=1" + }, + "peerDependencies": { + "ky": ">=0.31.4", + "web-streams-polyfill": ">=3.2.1" + }, + "peerDependenciesMeta": { + "web-streams-polyfill": { + "optional": true + } } }, - "node_modules/@rdfjs/fetch-lite": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@rdfjs/fetch-lite/-/fetch-lite-3.2.1.tgz", - "integrity": "sha512-cnCuSkEpMGsSbkd3+bIKheCKTDE4iBSGG6l/Inp0qg4y5WMLtcffKtSUzWhq09cAajm0dWs+5W3EGPNBqF5A4w==", + "node_modules/ky-universal/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { - "is-stream": "^3.0.0", - "nodeify-fetch": "^3.1.0", - "readable-stream": "^4.2.0" - } - }, - "node_modules/@rdfjs/fetch-lite/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/@rdfjs/namespace": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/namespace/-/namespace-2.0.0.tgz", - "integrity": "sha512-cBBvNrlSOah4z7u2vS74Lxng/ivELy6tNPjx+G/Ag14up8z5xmX8njn+U/mJ+nlcXO7nDGK4rgaAq7jtl9S3CQ==", - "dependencies": { - "@rdfjs/data-model": "^2.0.0" - } + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, - "node_modules/@rdfjs/normalize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/normalize/-/normalize-2.0.0.tgz", - "integrity": "sha512-jOSdIKz9r/oPI9nuWXMTYzFaCbrFQj9qEOPdqs1/7oAR1JTvqpS69HVZPkVqbH+WhL52PJbBXyA5QadoyNLgpQ==", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { - "rdf-canonize": "^3.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@rdfjs/prefix-map": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.1.tgz", - "integrity": "sha512-w9VrJ/YfMyvdcpuKG0XEzgbH6AXtUSugvgL1U1IvbTYdL2rfIifaYkSyp86lEhD2hHeYUYAGZTKkpDErtXCMxQ==", - "dependencies": { - "readable-stream": "^4.3.0" - } - }, - "node_modules/@rdfjs/score": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/score/-/score-0.1.1.tgz", - "integrity": "sha512-+t9Sf5nFUJTvH8X2Xy7H+egLKIyVCwlDzCGrWThSrSCmIENcC9n3+GkMMImnsmYDeSXaWi3awcI1f1TmA84FIQ==", - "dependencies": { - "@rdfjs/data-model": "^2.0.1", - "@rdfjs/term-map": "^2.0.0", - "@rdfjs/term-set": "^2.0.1", - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "node_modules/@rdfjs/serializer-jsonld-ext": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/serializer-jsonld-ext/-/serializer-jsonld-ext-4.0.0.tgz", - "integrity": "sha512-HP5DCmhyfVuQuk58AO5vzNY+dIFVHe2oHY8NX2K+3XmrTmu/yzrFzPbDeU9Cwr71XC4RifEMoksIg+8jnhxmfQ==", - "dependencies": { - "@rdfjs/sink": "^2.0.0", - "jsonld": "^8.1.0", - "readable-stream": "^4.3.0", - "stream-chunks": "^1.0.0" - } - }, - "node_modules/@rdfjs/sink": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/sink/-/sink-2.0.0.tgz", - "integrity": "sha512-EDM6BjdVZdTHa6L3XWnXCDDu7h2tD/UAczc8WSG+Aw3m9yYkUUHypExNhlkA67sNRORC9Q/9hyHkAZBOVNRI6A==" - }, - "node_modules/@rdfjs/sink-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/sink-map/-/sink-map-2.0.0.tgz", - "integrity": "sha512-5Ahs1Ky6fglsqewpo89K7CFxD4EvFvAHdI/E5HJTu0L4tCUlvnZsmyKem4iYPDWdwsKplmUdORonUz75qPgd1g==" - }, - "node_modules/@rdfjs/term-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/term-map/-/term-map-2.0.0.tgz", - "integrity": "sha512-z0K8AgLsJGTrh+dGkXNl/oT9vBdMei4xq1MIeGN360oimA81Q+ruQUKFCbYNRRZS03tVHPBzqXUal/DezFGPEA==", - "dependencies": { - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "node_modules/@rdfjs/term-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/term-set/-/term-set-2.0.1.tgz", - "integrity": "sha512-ZD8IwSY7tPpevs2iaQEsesAu8c7TO4GKHQHObbehUE4odKa9BuhuimdNuYwBoyVprTtHARaW6VW+0Jsu7ehD+Q==", - "dependencies": { - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "node_modules/@rdfjs/to-ntriples": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/to-ntriples/-/to-ntriples-2.0.0.tgz", - "integrity": "sha512-nDhpfhx6W6HKsy4HjyLp3H1nbrX1CiUCWhWQwKcYZX1s9GOjcoQTwY7GUUbVec0hzdJDQBR6gnjxtENBDt482Q==" - }, - "node_modules/@rdfjs/traverser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/traverser/-/traverser-0.1.1.tgz", - "integrity": "sha512-zyVuur2dS5cceUPjIh0TNS7GsmvEHaSqb5Sw5yxS4mDOun1X35FObNEezksbGpc2KzcDTJJV8V2SLr397lAGug==" - }, - "node_modules/@rdfjs/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.1.0.tgz", - "integrity": "sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", - "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/clownface": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/clownface/-/clownface-1.5.2.tgz", - "integrity": "sha512-c/BLyUFSuzgmbQ0kBlxNf9HEkDdCk4tMxUxWjtGSpvLMXM3t5KrJabcGkDStmfzA+bHFHwHHikyWsZYVC1TuWw==", - "dev": true, - "dependencies": { - "rdf-js": "^4.0.2" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-link-header": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/http-link-header/-/http-link-header-1.0.3.tgz", - "integrity": "sha512-y8HkoD/vyid+5MrJ3aas0FvU3/BVBGcyG9kgxL0Zn4JwstA8CglFPnrR0RuzOjRCXwqzL5uxWC2IO7Ub0rMU2A==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" + "node": ">=10" } }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" } }, - "node_modules/@types/jsonld": { - "version": "1.5.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.14.2", - "license": "MIT" - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, - "node_modules/@types/rdf-ext": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@types/rdf-ext/-/rdf-ext-2.2.0.tgz", - "integrity": "sha512-qsBlTThL2lUiqlNkX3dgG5WJtlnm/1S4BaU4oLnNa2t3hHWTDvB6UTYOfUPxb0wMaH4SF2wSR2LuL7BSayTb7g==", - "dev": true, - "license": "MIT", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "@rdfjs/types": "*", - "@types/clownface": "*", - "@types/rdfjs__data-model": "*", - "@types/rdfjs__dataset": "*", - "@types/rdfjs__environment": "*", - "@types/rdfjs__fetch-lite": "*", - "@types/rdfjs__namespace": "*", - "@types/rdfjs__prefix-map": "*", - "@types/rdfjs__score": "*", - "@types/rdfjs__term-map": "*", - "@types/rdfjs__term-set": "*", - "@types/rdfjs__traverser": "*" + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/@types/rdfjs__data-model": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__data-model/-/rdfjs__data-model-2.0.2.tgz", - "integrity": "sha512-7apA0UMstUgjAlY13nhbsp9N6mH1EqL9GvTJqC79cbpDglH/ILjzaQZVlW/M3S/0hMHsMN/lZfgXsk8DN8YiKA==", - "dev": true, + "node_modules/n3": { + "version": "1.17.2", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.17.2.tgz", + "integrity": "sha512-BxSM52wYFqXrbQQT5WUEzKUn6qpYV+2L4XZLfn3Gblz2kwZ09S+QxC33WNdVEQy2djenFL8SNkrjejEKlvI6+Q==", "dependencies": { - "@rdfjs/types": "^1.0.1" + "queue-microtask": "^1.1.2", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">=12.0" } }, - "node_modules/@types/rdfjs__dataset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/rdfjs__dataset/-/rdfjs__dataset-2.0.1.tgz", - "integrity": "sha512-/of63Bxu2mwDFEMz79vEJ7Co5A2FbYRd2x9WMyoUigYnbM8paaGgKLqcdCcuZGXXBGeeKWFMXQR8uPT7w118jw==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" } }, - "node_modules/@types/rdfjs__environment": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__environment/-/rdfjs__environment-0.1.0.tgz", - "integrity": "sha512-a3oWa6TLy2axXAsw0nFk8ilDlpXvP7OZGnMRL1cnhz6RNLwzULgCEMdu8CShuRPb6rE08624QyDQ2PqFfnEjbw==", - "dev": true, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { - "@rdfjs/types": "*", - "@types/rdfjs__namespace": "*", - "@types/rdfjs__term-map": "*", - "@types/rdfjs__term-set": "*" - } - }, - "node_modules/@types/rdfjs__fetch-lite": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/rdfjs__fetch-lite/-/rdfjs__fetch-lite-3.0.1.tgz", - "integrity": "sha512-LEKTnIXlMlL88HwgNRKa0P4rl5LccSj9wKwSe8Rz8Dq4cKOlSuL7kt/YwaeaTPk5YGgYtjE79fRBTa3gGSk9Aw==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*", - "@types/rdfjs__formats-common": "*" - } - }, - "node_modules/@types/rdfjs__formats-common": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__formats-common/-/rdfjs__formats-common-2.0.2.tgz", - "integrity": "sha512-2h3Db8iaOZjJIc26R8fz0LzdX3arGwQf2MzsRd6slW0Lq3B01LIN3eMS/EcCftf+yYAB+qdpOxGkwKI4e3C0Bg==", - "dev": true, - "dependencies": { - "@types/rdfjs__sink-map": "*", - "rdf-js": "^4.0.2" - } - }, - "node_modules/@types/rdfjs__namespace": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__namespace/-/rdfjs__namespace-2.0.2.tgz", - "integrity": "sha512-0pta7R3+MMRX7KpWQFTpxbUUX3weFyYaUEEgLYrrYbPK94wVklpaag24WrQg/9Xdseliye6YkkFUhR5KfwxwCw==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__prefix-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__prefix-map/-/rdfjs__prefix-map-0.1.0.tgz", - "integrity": "sha512-TWmylm6GefyAFSJLWvzbvFA9h7A2XCJRmWG/2P+fex1AvceBUlW6IY/d0nTsj+pYfcXyf4Ackd2XkNtvEZtPgQ==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__score": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__score/-/rdfjs__score-0.1.0.tgz", - "integrity": "sha512-hYFa0NCjElzxoDKEIClZ6mti8SEZFt8nbbtqg2+zq1hmMFTnxxuTWDiH44DwurU5y5VWCKE8J1mtO7dZfrL/qw==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__serializer-jsonld-ext": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-jsonld-ext/-/rdfjs__serializer-jsonld-ext-2.0.5.tgz", - "integrity": "sha512-+Tmrw3M+lH7okHfGvUEpbNhfPg59y+RQSpbAHJKKcCW29a2AzMzjux46JyZvuFo8uVy8TI41hW8PwfbbTZG+Vg==", - "dev": true, - "dependencies": { - "@types/jsonld": "*", - "rdf-js": "^4.0.2" - } - }, - "node_modules/@types/rdfjs__sink-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__sink-map/-/rdfjs__sink-map-2.0.0.tgz", - "integrity": "sha512-zn8Kvsn4xfCEJPKDYnhOmYqgcxv7cLpq6n0KdIZI8XAwnh7sZi+SjPoT6s0yaB+/eahlIwkwZYtIuvsVPz+FLg==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__term-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__term-map/-/rdfjs__term-map-2.0.2.tgz", - "integrity": "sha512-UkMN5rdo4j2JsFxoiE0eeWo7RUjr6l2SFBjoNz6DbW6j8ZMd5Fiy7a3j851yV2TebUUOXx78UWMa63ACihOCHg==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__term-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__term-set/-/rdfjs__term-set-2.0.2.tgz", - "integrity": "sha512-B+emhIPEl+5+AjmjP92cI23Xo3FEMKnrPsv20exIe9S3hHShPZOZzO/55gsYQjizW1r9VWsLdH5AcaoM4C+AFA==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/rdfjs__traverser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__traverser/-/rdfjs__traverser-0.1.0.tgz", - "integrity": "sha512-RJJj2/a6PYojpPhbR2dhUoMlvTECnq4sGE6PBQhc8qVxkfe1lwg1+tpfgDzI4NNXL4Kizs44UjHMMXb9Xh1tMA==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "dependencies": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@types/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "node_modules/@virtual-assembly/semantizer": { - "version": "1.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/@virtual-assembly/semantizer/-/semantizer-1.0.0-alpha.2.tgz", - "integrity": "sha512-sK8LcpiLH/UTFNGCrgf4qLXDMMHg8mvMx/kuGQ31FnL+KuwNgtN+eUt18GBVdHfSyfJSfym0gsKUXsALhFJLDA==", - "dependencies": { - "rdf-ext": "^2.2.0" - } - }, - "node_modules/abort-controller": { - "version": "3.0.0", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/babel-jest": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.1.tgz", - "integrity": "sha512-qu+3bdPEQC6KZSPz+4Fyjbga5OODNcp49j6GKzG1EKbkfyJBxEYGVUmVGpwCSeGouG52R4EgYMLb6p9YeEEQ4A==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.6.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.5.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", - "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", - "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.5.0", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/busboy": { - "version": "1.6.0", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001514", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001514.tgz", - "integrity": "sha512-ENcIpYBmwAAOm/V2cXgM7rZUrKKaqisZl4ZAI520FIkqGXUxJjmaIssbRW5HVVR5tyV6ygTLIm15aU8LUmQSaQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/canonicalize": { - "version": "1.0.8", - "license": "Apache-2.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clownface": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/clownface/-/clownface-1.5.1.tgz", - "integrity": "sha512-Ko8N/UFsnhEGmPlyE1bUFhbRhVgDbxqlIjcqxtLysc4dWaY0A7iCdg3savhAxs7Lheb7FCygIyRh7ADYZWVIng==", - "dependencies": { - "@rdfjs/data-model": "^1.1.0", - "@rdfjs/namespace": "^1.0.0" - } - }, - "node_modules/clownface/node_modules/@rdfjs/data-model": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.3.4.tgz", - "integrity": "sha512-iKzNcKvJotgbFDdti7GTQDCYmL7GsGldkYStiP0K8EYtN7deJu5t7U11rKTz+nR7RtesUggT+lriZ7BakFv8QQ==", - "dependencies": { - "@rdfjs/types": ">=1.0.1" - }, - "bin": { - "rdfjs-data-model-test": "bin/test.js" - } - }, - "node_modules/clownface/node_modules/@rdfjs/namespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rdfjs/namespace/-/namespace-1.1.0.tgz", - "integrity": "sha512-utO5rtaOKxk8B90qzaQ0N+J5WrCI28DtfAY/zExCmXE7cOfC5uRI/oMKbLaVEPj2P7uArekt/T4IPATtj7Tjug==", - "dependencies": { - "@rdfjs/data-model": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dependencies": { - "node-fetch": "2.6.7" - } - }, - "node_modules/cross-fetch/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", - "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.454", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.454.tgz", - "integrity": "sha512-pmf1rbAStw8UEQ0sr2cdJtWl48ZMuPD9Sto8HVQOq9vx9j2WgDEN6lYoaqFvqEHYOmGA9oRGn7LqWI9ta0YugQ==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.1.tgz", - "integrity": "sha512-XEdDLonERCU1n9uR56/Stx9OqojaLAQtZf9PrCHH9Hl8YXiEIka3H4NXJ3NOIBmQJTg7+j7buh34PMHfJujc8g==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.6.1", - "@types/node": "*", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/http-link-header": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.0.tgz", - "integrity": "sha512-pj6N1yxOz/ANO8HHsWGg/OoIL1kmRYvQnXQ7PIRpgp+15AnEsRH8fmIJE6D1OdWG2Bov+BJHVla1fFXxg1JbbA==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.1.tgz", - "integrity": "sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.6.1", - "@jest/types": "^29.6.1", - "import-local": "^3.0.2", - "jest-cli": "^29.6.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", - "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.1.tgz", - "integrity": "sha512-tPbYLEiBU4MYAL2XoZme/bgfUeotpDBd81lgHLCbDZZFaGmECk0b+/xejPFtmiBP87GgP/y4jplcRpbH+fgCzQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.1", - "@jest/expect": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.6.1", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "p-limit": "^3.1.0", - "pretty-format": "^29.6.1", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.1.tgz", - "integrity": "sha512-607dSgTA4ODIN6go9w6xY3EYkyPFGicx51a69H7yfvt7lN53xNswEVLovq+E77VsTRi5fWprLH0yl4DJgE8Ing==", - "dev": true, - "dependencies": { - "@jest/core": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.1.tgz", - "integrity": "sha512-XdjYV2fy2xYixUiV2Wc54t3Z4oxYPAELUzWnV6+mcbq0rh742X2p52pii5A3oeRzYjLnQxCsZmp0qpI6klE2cQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.6.1", - "@jest/types": "^29.6.1", - "babel-jest": "^29.6.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.6.1", - "jest-environment-node": "^29.6.1", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-runner": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.1.tgz", - "integrity": "sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", - "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.1.tgz", - "integrity": "sha512-n5eoj5eiTHpKQCAVcNTT7DRqeUmJ01hsAL0Q1SMiBHcBcvTKDELixQOGMCpqhbIuTcfC4kMfSnpmDqRgRJcLNQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.6.1", - "pretty-format": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.1.tgz", - "integrity": "sha512-ZNIfAiE+foBog24W+2caIldl4Irh8Lx1PUhg/GZ0odM1d/h2qORAsejiFc7zb+SEmYPn1yDZzEDSU5PmDkmVLQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.1", - "@jest/fake-timers": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.1", - "jest-util": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", - "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.1.tgz", - "integrity": "sha512-0m7f9PZXxOCk1gRACiVgX85knUKPKLPg4oRCjLoqIm9brTHXaorMA0JpmtmVkQiT8nmXyIVoZd/nnH1cfC33ig==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.1", - "jest-worker": "^29.6.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.1.tgz", - "integrity": "sha512-OrxMNyZirpOEwkF3UHnIkAiZbtkBWiye+hhBweCHkVbCgyEy71Mwbb5zgeTNYWJBi1qgDVfPC1IwO9dVEeTLwQ==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.1.tgz", - "integrity": "sha512-SLaztw9d2mfQQKHmJXKM0HCbl2PPVld/t9Xa6P9sgiExijviSp7TnZZpw2Fpt+OI3nwUO/slJbOfzfUMKKC5QA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.6.1", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.1.tgz", - "integrity": "sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.1.tgz", - "integrity": "sha512-brovyV9HBkjXAEdRooaTQK42n8usKoSRR3gihzUpYeV/vwqgSoNfrksO7UfSACnPmxasO/8TmHM3w9Hp3G1dgw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-util": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", - "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.1.tgz", - "integrity": "sha512-AeRkyS8g37UyJiP9w3mmI/VXU/q8l/IH52vj/cDAyScDcemRbSBhfX/NMYIGilQgSVwsjxrCHf3XJu4f+lxCMg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.1.tgz", - "integrity": "sha512-BbFvxLXtcldaFOhNMXmHRWx1nXQO5LoXiKSGQcA1LxxirYceZT6ch8KTE1bK3X31TNG/JbkI7OkS/ABexVahiw==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.1.tgz", - "integrity": "sha512-tw0wb2Q9yhjAQ2w8rHRDxteryyIck7gIzQE4Reu3JuOBpGp96xWgF0nY8MDdejzrLCZKDcp8JlZrBN/EtkQvPQ==", - "dev": true, - "dependencies": { - "@jest/console": "^29.6.1", - "@jest/environment": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.6.1", - "jest-haste-map": "^29.6.1", - "jest-leak-detector": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-resolve": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-util": "^29.6.1", - "jest-watcher": "^29.6.1", - "jest-worker": "^29.6.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.1.tgz", - "integrity": "sha512-D6/AYOA+Lhs5e5il8+5pSLemjtJezUr+8zx+Sn8xlmOux3XOqx4d8l/2udBea8CRPqqrzhsKUsN/gBDE/IcaPQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.1", - "@jest/fake-timers": "^29.6.1", - "@jest/globals": "^29.6.1", - "@jest/source-map": "^29.6.0", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-mock": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.1.tgz", - "integrity": "sha512-G4UQE1QQ6OaCgfY+A0uR1W2AY0tGXUPQpoUClhWHq1Xdnx1H6JOrC2nH5lqnOEqaDgbHFgIwZ7bNq24HpB180A==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.6.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.6.1", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "natural-compare": "^1.4.0", - "pretty-format": "^29.6.1", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/jest-util": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.1.tgz", - "integrity": "sha512-NRFCcjc+/uO3ijUVyNOQJluf8PtGCe/W6cix36+M3cTFgiYqFOOW5MgN4JOOcvbUhcKTYVd1CvHz/LWi8d16Mg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.1.tgz", - "integrity": "sha512-r3Ds69/0KCN4vx4sYAbGL1EVpZ7MSS0vLmd3gV78O+NAx3PDQQukRU5hNHPXlyqCgFY8XUk7EuTMLugh0KzahA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "leven": "^3.1.0", - "pretty-format": "^29.6.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.1.tgz", - "integrity": "sha512-d4wpjWTS7HEZPaaj8m36QiaP856JthRZkrgcIY/7ISoUWPIillrXM23WPboZVLbiwZBt4/qn2Jke84Sla6JhFA==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.6.1", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.1.tgz", - "integrity": "sha512-U+Wrbca7S8ZAxAe9L6nb6g8kPdia5hj32Puu5iOqBCMTMWFHXuK6dOV2IFrpedbTV8fjMFLdWNttQTBL6u2MRA==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.6.1", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonld": { - "version": "8.1.1", - "license": "BSD-3-Clause", - "dependencies": { - "@digitalbazaar/http-client": "^3.2.0", - "canonicalize": "^1.0.1", - "lru-cache": "^6.0.0", - "rdf-canonize": "^3.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/jsonld-context-parser": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.3.0.tgz", - "integrity": "sha512-c6w2GE57O26eWFjcPX6k6G86ootsIfpuVwhZKjCll0bVoDGBxr1P4OuU+yvgfnh1GJhAGErolfC7W1BklLjWMg==", - "dependencies": { - "@types/http-link-header": "^1.0.1", - "@types/node": "^18.0.0", - "canonicalize": "^1.0.1", - "cross-fetch": "^3.0.6", - "http-link-header": "^1.0.2", - "relative-to-absolute-iri": "^1.0.5" - }, - "bin": { - "jsonld-context-parse": "bin/jsonld-context-parse.js" - } - }, - "node_modules/jsonld-streaming-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-3.2.0.tgz", - "integrity": "sha512-lJR1SCT364PGpFrOQaY+ZQ7qDWqqiT3IMK+AvZ83fo0LvltFn8/UyXvIFc3RO7YcaEjLahAF0otCi8vOq21NtQ==", - "dependencies": { - "@bergos/jsonparse": "^1.4.0", - "@rdfjs/types": "*", - "@types/http-link-header": "^1.0.1", - "@types/readable-stream": "^2.3.13", - "buffer": "^6.0.3", - "canonicalize": "^1.0.1", - "http-link-header": "^1.0.2", - "jsonld-context-parser": "^2.3.0", - "rdf-data-factory": "^1.1.0", - "readable-stream": "^4.0.0" - } - }, - "node_modules/jsonld/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jsonld/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ky": { - "version": "0.33.2", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky?sponsor=1" - } - }, - "node_modules/ky-universal": { - "version": "0.11.0", - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "node-fetch": "^3.2.10" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky-universal?sponsor=1" - }, - "peerDependencies": { - "ky": ">=0.31.4", - "web-streams-polyfill": ">=3.2.1" - }, - "peerDependenciesMeta": { - "web-streams-polyfill": { - "optional": true - } - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.0", - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, - "node_modules/nodeify-fetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nodeify-fetch/-/nodeify-fetch-3.1.0.tgz", - "integrity": "sha512-ZV81vM//sEgTgXwVZlOONzcOCdTGQ53mV65FVSNXgPQHa8oCwRLtLbnGxL/1S/Yw90bcXUDKMz00jEnaeazo+A==", - "dependencies": { - "lodash": "^4.17.21", - "node-fetch": "^3.2.10", - "readable-stream": "^4.2.0", - "stream-chunks": "^1.0.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.1.tgz", - "integrity": "sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pure-rand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", - "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/rdf-canonize": { - "version": "3.3.0", - "license": "BSD-3-Clause", - "dependencies": { - "setimmediate": "^1.0.5" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/rdf-data-factory": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.1.1.tgz", - "integrity": "sha512-0HoLx7lbBlNd2YTmNKin0txgiYmAV56eVU823at8cG2+iD0Ia5kcRNDpzZy6I/HCtFTymHvTfdhHTzm3ak3Jpw==", - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/rdf-ext": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/rdf-ext/-/rdf-ext-2.2.0.tgz", - "integrity": "sha512-/6Z1VK+OdL4SQnxhzdN1CJJY7pmtTzh0BHLRgKQG9MPIN2SnYr/eymHxqcygcZ/YHqXAV7kl2aOFbn6u9P4Wgw==", - "dependencies": { - "@rdfjs/data-model": "^2.0.1", - "@rdfjs/dataset": "^2.0.1", - "@rdfjs/environment": "^0.1.2", - "@rdfjs/fetch-lite": "^3.2.1", - "@rdfjs/namespace": "^2.0.0", - "@rdfjs/normalize": "^2.0.0", - "@rdfjs/prefix-map": "^0.1.1", - "@rdfjs/score": "^0.1.1", - "@rdfjs/term-map": "^2.0.0", - "@rdfjs/term-set": "^2.0.1", - "@rdfjs/to-ntriples": "^2.0.0", - "@rdfjs/traverser": "^0.1.1", - "clownface": "^1.5.1", - "readable-stream": "^4.3.0" - } - }, - "node_modules/rdf-js": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rdf-js/-/rdf-js-4.0.2.tgz", - "integrity": "sha512-ApvlFa/WsQh8LpPK/6hctQwG06Z9ztQQGWVtrcrf9L6+sejHNXLPOqL+w7q3hF+iL0C4sv3AX1PUtGkLNzyZ0Q==", - "dev": true, - "dependencies": { - "@rdfjs/types": "*" - } - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/readable-stream": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz", - "integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/relative-to-absolute-iri": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.7.tgz", - "integrity": "sha512-Xjyl4HmIzg2jzK/Un2gELqbcE8Fxy85A/aLSHE6PE/3+OGsFwmKVA1vRyGaz6vLWSqLDMHA+5rjD/xbibSQN1Q==" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "license": "MIT" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stream-chunks": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-chunks/-/stream-chunks-1.0.0.tgz", - "integrity": "sha512-/G+kinLx3pKXChtuko82taA4gZo56zFG2b2BbhmugmS0TUPBL40c5b2vjonS+gAHYK/cSKM9m0WTvAJYgDUeNw==", - "dependencies": { - "buffer": "^6.0.3", - "string_decoder": "^1.3.0" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/undici": { - "version": "5.20.0", - "license": "MIT", - "dependencies": { - "busboy": "^1.6.0" - }, - "engines": { - "node": ">=12.18" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.5" - } - }, - "@babel/compat-data": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.6.tgz", - "integrity": "sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg==", - "dev": true - }, - "@babel/core": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.8.tgz", - "integrity": "sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-compilation-targets": "^7.22.6", - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helpers": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.8", - "@babel/types": "^7.22.5", - "@nicolo-ribaudo/semver-v6": "^6.3.3", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2" - }, - "dependencies": { - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.7.tgz", - "integrity": "sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz", - "integrity": "sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-validator-option": "^7.22.5", - "@nicolo-ribaudo/semver-v6": "^6.3.3", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, - "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-module-transforms": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", - "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.5", - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", - "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", - "dev": true, - "requires": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.6", - "@babel/types": "^7.22.5" - } - }, - "@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.22.5" - } - }, - "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - } - }, - "@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", - "globals": "^11.1.0" - } - }, - "@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@bergos/jsonparse": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@bergos/jsonparse/-/jsonparse-1.4.1.tgz", - "integrity": "sha512-vXIT0nzZGX/+yMD5bx2VhTzc92H55tPoehh1BW/FZHOndWGFddrH3MAfdx39FRc7irABirW6EQaGxIJYV6CGuA==", - "requires": { - "buffer": "^6.0.3" - } - }, - "@digitalbazaar/http-client": { - "version": "3.3.0", - "requires": { - "ky": "^0.33.2", - "ky-universal": "^0.11.0", - "undici": "^5.15.0" - } - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.1.tgz", - "integrity": "sha512-Aj772AYgwTSr5w8qnyoJ0eDYvN6bMsH3ORH1ivMotrInHLKdUz6BDlaEXHdM6kODaBIkNIyQGzsMvRdOv7VG7Q==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.1.tgz", - "integrity": "sha512-CcowHypRSm5oYQ1obz1wfvkjZZ2qoQlrKKvlfPwh5jUXVU12TWr2qMeH8chLMuTFzHh5a1g2yaqlqDICbr+ukQ==", - "dev": true, - "requires": { - "@jest/console": "^29.6.1", - "@jest/reporters": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.6.1", - "jest-haste-map": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-resolve-dependencies": "^29.6.1", - "jest-runner": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "jest-watcher": "^29.6.1", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.1.tgz", - "integrity": "sha512-RMMXx4ws+Gbvw3DfLSuo2cfQlK7IwGbpuEWXCqyYDcqYTI+9Ju3a5hDnXaxjNsa6uKh9PQF2v+qg+RLe63tz5A==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.1" - } - }, - "@jest/expect": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.1.tgz", - "integrity": "sha512-N5xlPrAYaRNyFgVf2s9Uyyvr795jnB6rObuPx4QFvNJz8aAjpZUDfO4bh5G/xuplMID8PrnuF1+SfSyDxhsgYg==", - "dev": true, - "requires": { - "expect": "^29.6.1", - "jest-snapshot": "^29.6.1" - } - }, - "@jest/expect-utils": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.1.tgz", - "integrity": "sha512-o319vIf5pEMx0LmzSxxkYYxo4wrRLKHq9dP1yJU7FoPTB0LfAKSz8SWD6D/6U3v/O52t9cF5t+MeJiRsfk7zMw==", - "dev": true, - "requires": { - "jest-get-type": "^29.4.3" - } - }, - "@jest/fake-timers": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.1.tgz", - "integrity": "sha512-RdgHgbXyosCDMVYmj7lLpUwXA4c69vcNzhrt69dJJdf8azUrpRh3ckFCaTPNjsEeRi27Cig0oKDGxy5j7hOgHg==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.6.1", - "jest-mock": "^29.6.1", - "jest-util": "^29.6.1" - } - }, - "@jest/globals": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.1.tgz", - "integrity": "sha512-2VjpaGy78JY9n9370H8zGRCFbYVWwjY6RdDMhoJHa1sYfwe6XM/azGN0SjY8kk7BOZApIejQ1BFPyH7FPG0w3A==", - "dev": true, - "requires": { - "@jest/environment": "^29.6.1", - "@jest/expect": "^29.6.1", - "@jest/types": "^29.6.1", - "jest-mock": "^29.6.1" - } - }, - "@jest/reporters": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.1.tgz", - "integrity": "sha512-9zuaI9QKr9JnoZtFQlw4GREQbxgmNYXU6QuWtmuODvk5nvPUeBYapVR/VYMyi2WSx3jXTLJTJji8rN6+Cm4+FA==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "jest-worker": "^29.6.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - } - }, - "@jest/schemas": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", - "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.27.8" - } - }, - "@jest/source-map": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", - "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.1.tgz", - "integrity": "sha512-Ynr13ZRcpX6INak0TPUukU8GWRfm/vAytE3JbJNGAvINySWYdfE7dGZMbk36oVuK4CigpbhMn8eg1dixZ7ZJOw==", - "dev": true, - "requires": { - "@jest/console": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.1.tgz", - "integrity": "sha512-oBkC36PCDf/wb6dWeQIhaviU0l5u6VCsXa119yqdUosYAt7/FbQU2M2UoziO3igj/HBDEgp57ONQ3fm0v9uyyg==", - "dev": true, - "requires": { - "@jest/test-result": "^29.6.1", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.1.tgz", - "integrity": "sha512-URnTneIU3ZjRSaf906cvf6Hpox3hIeJXRnz3VDSw5/X93gR8ycdfSIEy19FlVx8NFmpN7fe3Gb1xF+NjXaQLWg==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.1", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - } - }, - "@jest/types": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", - "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", - "dev": true, - "requires": { - "@jest/schemas": "^29.6.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - }, - "dependencies": { - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - } - } - }, - "@nicolo-ribaudo/semver-v6": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", - "integrity": "sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg==", - "dev": true - }, - "@rdfjs/data-model": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-2.0.1.tgz", - "integrity": "sha512-oRDYpy7/fJ9NNjS+M7m+dbnhi4lOWYGbBiM/A+u9bBExnN6ifXUF5mUsFxwZaQulmwTDaMhKERdV6iKTBUMgtw==" - }, - "@rdfjs/dataset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/dataset/-/dataset-2.0.1.tgz", - "integrity": "sha512-hDIaXpUmU/ZdofX/BMFDAchkhN/AjmP5dMCOuVL2VCqWuFjeQxd2KV84E4+7S2Biw8tjEFhPBeQZP7KW+ARV7Q==" - }, - "@rdfjs/environment": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@rdfjs/environment/-/environment-0.1.2.tgz", - "integrity": "sha512-R4N73kaoaOt3XvgLy2Cb98bJUgMJv/wRsUPGDxeogbtalkENPmo3X5to/rKQEwOjnj+jw+ILzN2webUHb8pvEw==", - "requires": { - "@rdfjs/data-model": "^2.0.1", - "@rdfjs/dataset": "^2.0.1", - "@rdfjs/fetch-lite": "^3.2.1", - "@rdfjs/namespace": "^2.0.0", - "@rdfjs/sink-map": "^2.0.0", - "@rdfjs/term-map": "^2.0.0", - "@rdfjs/term-set": "^2.0.1" - } - }, - "@rdfjs/fetch-lite": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@rdfjs/fetch-lite/-/fetch-lite-3.2.1.tgz", - "integrity": "sha512-cnCuSkEpMGsSbkd3+bIKheCKTDE4iBSGG6l/Inp0qg4y5WMLtcffKtSUzWhq09cAajm0dWs+5W3EGPNBqF5A4w==", - "requires": { - "is-stream": "^3.0.0", - "nodeify-fetch": "^3.1.0", - "readable-stream": "^4.2.0" - }, - "dependencies": { - "is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==" - } - } - }, - "@rdfjs/namespace": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/namespace/-/namespace-2.0.0.tgz", - "integrity": "sha512-cBBvNrlSOah4z7u2vS74Lxng/ivELy6tNPjx+G/Ag14up8z5xmX8njn+U/mJ+nlcXO7nDGK4rgaAq7jtl9S3CQ==", - "requires": { - "@rdfjs/data-model": "^2.0.0" - } - }, - "@rdfjs/normalize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/normalize/-/normalize-2.0.0.tgz", - "integrity": "sha512-jOSdIKz9r/oPI9nuWXMTYzFaCbrFQj9qEOPdqs1/7oAR1JTvqpS69HVZPkVqbH+WhL52PJbBXyA5QadoyNLgpQ==", - "requires": { - "rdf-canonize": "^3.0.0" - } - }, - "@rdfjs/prefix-map": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.1.tgz", - "integrity": "sha512-w9VrJ/YfMyvdcpuKG0XEzgbH6AXtUSugvgL1U1IvbTYdL2rfIifaYkSyp86lEhD2hHeYUYAGZTKkpDErtXCMxQ==", - "requires": { - "readable-stream": "^4.3.0" - } - }, - "@rdfjs/score": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/score/-/score-0.1.1.tgz", - "integrity": "sha512-+t9Sf5nFUJTvH8X2Xy7H+egLKIyVCwlDzCGrWThSrSCmIENcC9n3+GkMMImnsmYDeSXaWi3awcI1f1TmA84FIQ==", - "requires": { - "@rdfjs/data-model": "^2.0.1", - "@rdfjs/term-map": "^2.0.0", - "@rdfjs/term-set": "^2.0.1", - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "@rdfjs/serializer-jsonld-ext": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/serializer-jsonld-ext/-/serializer-jsonld-ext-4.0.0.tgz", - "integrity": "sha512-HP5DCmhyfVuQuk58AO5vzNY+dIFVHe2oHY8NX2K+3XmrTmu/yzrFzPbDeU9Cwr71XC4RifEMoksIg+8jnhxmfQ==", - "requires": { - "@rdfjs/sink": "^2.0.0", - "jsonld": "^8.1.0", - "readable-stream": "^4.3.0", - "stream-chunks": "^1.0.0" - } - }, - "@rdfjs/sink": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/sink/-/sink-2.0.0.tgz", - "integrity": "sha512-EDM6BjdVZdTHa6L3XWnXCDDu7h2tD/UAczc8WSG+Aw3m9yYkUUHypExNhlkA67sNRORC9Q/9hyHkAZBOVNRI6A==" - }, - "@rdfjs/sink-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/sink-map/-/sink-map-2.0.0.tgz", - "integrity": "sha512-5Ahs1Ky6fglsqewpo89K7CFxD4EvFvAHdI/E5HJTu0L4tCUlvnZsmyKem4iYPDWdwsKplmUdORonUz75qPgd1g==" - }, - "@rdfjs/term-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/term-map/-/term-map-2.0.0.tgz", - "integrity": "sha512-z0K8AgLsJGTrh+dGkXNl/oT9vBdMei4xq1MIeGN360oimA81Q+ruQUKFCbYNRRZS03tVHPBzqXUal/DezFGPEA==", - "requires": { - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "@rdfjs/term-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/term-set/-/term-set-2.0.1.tgz", - "integrity": "sha512-ZD8IwSY7tPpevs2iaQEsesAu8c7TO4GKHQHObbehUE4odKa9BuhuimdNuYwBoyVprTtHARaW6VW+0Jsu7ehD+Q==", - "requires": { - "@rdfjs/to-ntriples": "^2.0.0" - } - }, - "@rdfjs/to-ntriples": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rdfjs/to-ntriples/-/to-ntriples-2.0.0.tgz", - "integrity": "sha512-nDhpfhx6W6HKsy4HjyLp3H1nbrX1CiUCWhWQwKcYZX1s9GOjcoQTwY7GUUbVec0hzdJDQBR6gnjxtENBDt482Q==" - }, - "@rdfjs/traverser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@rdfjs/traverser/-/traverser-0.1.1.tgz", - "integrity": "sha512-zyVuur2dS5cceUPjIh0TNS7GsmvEHaSqb5Sw5yxS4mDOun1X35FObNEezksbGpc2KzcDTJJV8V2SLr397lAGug==" - }, - "@rdfjs/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.1.0.tgz", - "integrity": "sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw==", - "requires": { - "@types/node": "*" - } - }, - "@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.0" - } - }, - "@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", - "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", - "dev": true, - "requires": { - "@babel/types": "^7.20.7" - } - }, - "@types/clownface": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/clownface/-/clownface-1.5.2.tgz", - "integrity": "sha512-c/BLyUFSuzgmbQ0kBlxNf9HEkDdCk4tMxUxWjtGSpvLMXM3t5KrJabcGkDStmfzA+bHFHwHHikyWsZYVC1TuWw==", - "dev": true, - "requires": { - "rdf-js": "^4.0.2" - } - }, - "@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/http-link-header": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/http-link-header/-/http-link-header-1.0.3.tgz", - "integrity": "sha512-y8HkoD/vyid+5MrJ3aas0FvU3/BVBGcyG9kgxL0Zn4JwstA8CglFPnrR0RuzOjRCXwqzL5uxWC2IO7Ub0rMU2A==", - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/jsonld": { - "version": "1.5.8", - "dev": true - }, - "@types/node": { - "version": "18.14.2" - }, - "@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, - "@types/rdf-ext": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@types/rdf-ext/-/rdf-ext-2.2.0.tgz", - "integrity": "sha512-qsBlTThL2lUiqlNkX3dgG5WJtlnm/1S4BaU4oLnNa2t3hHWTDvB6UTYOfUPxb0wMaH4SF2wSR2LuL7BSayTb7g==", - "dev": true, - "requires": { - "@rdfjs/types": "*", - "@types/clownface": "*", - "@types/rdfjs__data-model": "*", - "@types/rdfjs__dataset": "*", - "@types/rdfjs__environment": "*", - "@types/rdfjs__fetch-lite": "*", - "@types/rdfjs__namespace": "*", - "@types/rdfjs__prefix-map": "*", - "@types/rdfjs__score": "*", - "@types/rdfjs__term-map": "*", - "@types/rdfjs__term-set": "*", - "@types/rdfjs__traverser": "*" - } - }, - "@types/rdfjs__data-model": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__data-model/-/rdfjs__data-model-2.0.2.tgz", - "integrity": "sha512-7apA0UMstUgjAlY13nhbsp9N6mH1EqL9GvTJqC79cbpDglH/ILjzaQZVlW/M3S/0hMHsMN/lZfgXsk8DN8YiKA==", - "dev": true, - "requires": { - "@rdfjs/types": "^1.0.1" - } - }, - "@types/rdfjs__dataset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/rdfjs__dataset/-/rdfjs__dataset-2.0.1.tgz", - "integrity": "sha512-/of63Bxu2mwDFEMz79vEJ7Co5A2FbYRd2x9WMyoUigYnbM8paaGgKLqcdCcuZGXXBGeeKWFMXQR8uPT7w118jw==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__environment": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__environment/-/rdfjs__environment-0.1.0.tgz", - "integrity": "sha512-a3oWa6TLy2axXAsw0nFk8ilDlpXvP7OZGnMRL1cnhz6RNLwzULgCEMdu8CShuRPb6rE08624QyDQ2PqFfnEjbw==", - "dev": true, - "requires": { - "@rdfjs/types": "*", - "@types/rdfjs__namespace": "*", - "@types/rdfjs__term-map": "*", - "@types/rdfjs__term-set": "*" - } - }, - "@types/rdfjs__fetch-lite": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/rdfjs__fetch-lite/-/rdfjs__fetch-lite-3.0.1.tgz", - "integrity": "sha512-LEKTnIXlMlL88HwgNRKa0P4rl5LccSj9wKwSe8Rz8Dq4cKOlSuL7kt/YwaeaTPk5YGgYtjE79fRBTa3gGSk9Aw==", - "dev": true, - "requires": { - "@rdfjs/types": "*", - "@types/rdfjs__formats-common": "*" - } - }, - "@types/rdfjs__formats-common": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__formats-common/-/rdfjs__formats-common-2.0.2.tgz", - "integrity": "sha512-2h3Db8iaOZjJIc26R8fz0LzdX3arGwQf2MzsRd6slW0Lq3B01LIN3eMS/EcCftf+yYAB+qdpOxGkwKI4e3C0Bg==", - "dev": true, - "requires": { - "@types/rdfjs__sink-map": "*", - "rdf-js": "^4.0.2" - } - }, - "@types/rdfjs__namespace": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__namespace/-/rdfjs__namespace-2.0.2.tgz", - "integrity": "sha512-0pta7R3+MMRX7KpWQFTpxbUUX3weFyYaUEEgLYrrYbPK94wVklpaag24WrQg/9Xdseliye6YkkFUhR5KfwxwCw==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__prefix-map": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__prefix-map/-/rdfjs__prefix-map-0.1.0.tgz", - "integrity": "sha512-TWmylm6GefyAFSJLWvzbvFA9h7A2XCJRmWG/2P+fex1AvceBUlW6IY/d0nTsj+pYfcXyf4Ackd2XkNtvEZtPgQ==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__score": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__score/-/rdfjs__score-0.1.0.tgz", - "integrity": "sha512-hYFa0NCjElzxoDKEIClZ6mti8SEZFt8nbbtqg2+zq1hmMFTnxxuTWDiH44DwurU5y5VWCKE8J1mtO7dZfrL/qw==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__serializer-jsonld-ext": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/rdfjs__serializer-jsonld-ext/-/rdfjs__serializer-jsonld-ext-2.0.5.tgz", - "integrity": "sha512-+Tmrw3M+lH7okHfGvUEpbNhfPg59y+RQSpbAHJKKcCW29a2AzMzjux46JyZvuFo8uVy8TI41hW8PwfbbTZG+Vg==", - "dev": true, - "requires": { - "@types/jsonld": "*", - "rdf-js": "^4.0.2" - } - }, - "@types/rdfjs__sink-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__sink-map/-/rdfjs__sink-map-2.0.0.tgz", - "integrity": "sha512-zn8Kvsn4xfCEJPKDYnhOmYqgcxv7cLpq6n0KdIZI8XAwnh7sZi+SjPoT6s0yaB+/eahlIwkwZYtIuvsVPz+FLg==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__term-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__term-map/-/rdfjs__term-map-2.0.2.tgz", - "integrity": "sha512-UkMN5rdo4j2JsFxoiE0eeWo7RUjr6l2SFBjoNz6DbW6j8ZMd5Fiy7a3j851yV2TebUUOXx78UWMa63ACihOCHg==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__term-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/rdfjs__term-set/-/rdfjs__term-set-2.0.2.tgz", - "integrity": "sha512-B+emhIPEl+5+AjmjP92cI23Xo3FEMKnrPsv20exIe9S3hHShPZOZzO/55gsYQjizW1r9VWsLdH5AcaoM4C+AFA==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/rdfjs__traverser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@types/rdfjs__traverser/-/rdfjs__traverser-0.1.0.tgz", - "integrity": "sha512-RJJj2/a6PYojpPhbR2dhUoMlvTECnq4sGE6PBQhc8qVxkfe1lwg1+tpfgDzI4NNXL4Kizs44UjHMMXb9Xh1tMA==", - "dev": true, - "requires": { - "@rdfjs/types": "*" - } - }, - "@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "requires": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "@virtual-assembly/semantizer": { - "version": "1.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/@virtual-assembly/semantizer/-/semantizer-1.0.0-alpha.2.tgz", - "integrity": "sha512-sK8LcpiLH/UTFNGCrgf4qLXDMMHg8mvMx/kuGQ31FnL+KuwNgtN+eUt18GBVdHfSyfJSfym0gsKUXsALhFJLDA==", - "requires": { - "rdf-ext": "^2.2.0" - } - }, - "abort-controller": { - "version": "3.0.0", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "babel-jest": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.1.tgz", - "integrity": "sha512-qu+3bdPEQC6KZSPz+4Fyjbga5OODNcp49j6GKzG1EKbkfyJBxEYGVUmVGpwCSeGouG52R4EgYMLb6p9YeEEQ4A==", - "dev": true, - "requires": { - "@jest/transform": "^29.6.1", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.5.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", - "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", - "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^29.5.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "busboy": { - "version": "1.6.0", - "requires": { - "streamsearch": "^1.1.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001514", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001514.tgz", - "integrity": "sha512-ENcIpYBmwAAOm/V2cXgM7rZUrKKaqisZl4ZAI520FIkqGXUxJjmaIssbRW5HVVR5tyV6ygTLIm15aU8LUmQSaQ==", - "dev": true - }, - "canonicalize": { - "version": "1.0.8" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true - }, - "ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true - }, - "cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "clownface": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/clownface/-/clownface-1.5.1.tgz", - "integrity": "sha512-Ko8N/UFsnhEGmPlyE1bUFhbRhVgDbxqlIjcqxtLysc4dWaY0A7iCdg3savhAxs7Lheb7FCygIyRh7ADYZWVIng==", - "requires": { - "@rdfjs/data-model": "^1.1.0", - "@rdfjs/namespace": "^1.0.0" - }, - "dependencies": { - "@rdfjs/data-model": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.3.4.tgz", - "integrity": "sha512-iKzNcKvJotgbFDdti7GTQDCYmL7GsGldkYStiP0K8EYtN7deJu5t7U11rKTz+nR7RtesUggT+lriZ7BakFv8QQ==", - "requires": { - "@rdfjs/types": ">=1.0.1" - } - }, - "@rdfjs/namespace": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rdfjs/namespace/-/namespace-1.1.0.tgz", - "integrity": "sha512-utO5rtaOKxk8B90qzaQ0N+J5WrCI28DtfAY/zExCmXE7cOfC5uRI/oMKbLaVEPj2P7uArekt/T4IPATtj7Tjug==", - "requires": { - "@rdfjs/data-model": "^1.1.0" - } - } - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "requires": { - "node-fetch": "2.6.7" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "data-uri-to-buffer": { - "version": "4.0.1" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true - }, - "diff-sequences": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", - "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.454", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.454.tgz", - "integrity": "sha512-pmf1rbAStw8UEQ0sr2cdJtWl48ZMuPD9Sto8HVQOq9vx9j2WgDEN6lYoaqFvqEHYOmGA9oRGn7LqWI9ta0YugQ==", - "dev": true - }, - "emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "event-target-shim": { - "version": "5.0.1" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expect": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.1.tgz", - "integrity": "sha512-XEdDLonERCU1n9uR56/Stx9OqojaLAQtZf9PrCHH9Hl8YXiEIka3H4NXJ3NOIBmQJTg7+j7buh34PMHfJujc8g==", - "dev": true, - "requires": { - "@jest/expect-utils": "^29.6.1", - "@types/node": "*", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "fetch-blob": { - "version": "3.2.0", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "formdata-polyfill": { - "version": "4.0.10", - "requires": { - "fetch-blob": "^3.1.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "http-link-header": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.0.tgz", - "integrity": "sha512-pj6N1yxOz/ANO8HHsWGg/OoIL1kmRYvQnXQ7PIRpgp+15AnEsRH8fmIJE6D1OdWG2Bov+BJHVla1fFXxg1JbbA==" - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.1.tgz", - "integrity": "sha512-Nirw5B4nn69rVUZtemCQhwxOBhm0nsp3hmtF4rzCeWD7BkjAXRIji7xWQfnTNbz9g0aVsBX6aZK3n+23LM6uDw==", - "dev": true, - "requires": { - "@jest/core": "^29.6.1", - "@jest/types": "^29.6.1", - "import-local": "^3.0.2", - "jest-cli": "^29.6.1" - } - }, - "jest-changed-files": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", - "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", - "dev": true, - "requires": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - } - }, - "jest-circus": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.1.tgz", - "integrity": "sha512-tPbYLEiBU4MYAL2XoZme/bgfUeotpDBd81lgHLCbDZZFaGmECk0b+/xejPFtmiBP87GgP/y4jplcRpbH+fgCzQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.6.1", - "@jest/expect": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.6.1", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "p-limit": "^3.1.0", - "pretty-format": "^29.6.1", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-cli": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.1.tgz", - "integrity": "sha512-607dSgTA4ODIN6go9w6xY3EYkyPFGicx51a69H7yfvt7lN53xNswEVLovq+E77VsTRi5fWprLH0yl4DJgE8Ing==", - "dev": true, - "requires": { - "@jest/core": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.1.tgz", - "integrity": "sha512-XdjYV2fy2xYixUiV2Wc54t3Z4oxYPAELUzWnV6+mcbq0rh742X2p52pii5A3oeRzYjLnQxCsZmp0qpI6klE2cQ==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.6.1", - "@jest/types": "^29.6.1", - "babel-jest": "^29.6.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.6.1", - "jest-environment-node": "^29.6.1", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-runner": "^29.6.1", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - } - }, - "jest-diff": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.1.tgz", - "integrity": "sha512-FsNCvinvl8oVxpNLttNQX7FAq7vR+gMDGj90tiP7siWw1UdakWUGqrylpsYrpvj908IYckm5Y0Q7azNAozU1Kg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - } - }, - "jest-docblock": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", - "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.1.tgz", - "integrity": "sha512-n5eoj5eiTHpKQCAVcNTT7DRqeUmJ01hsAL0Q1SMiBHcBcvTKDELixQOGMCpqhbIuTcfC4kMfSnpmDqRgRJcLNQ==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.6.1", - "pretty-format": "^29.6.1" - } - }, - "jest-environment-node": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.1.tgz", - "integrity": "sha512-ZNIfAiE+foBog24W+2caIldl4Irh8Lx1PUhg/GZ0odM1d/h2qORAsejiFc7zb+SEmYPn1yDZzEDSU5PmDkmVLQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.6.1", - "@jest/fake-timers": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.1", - "jest-util": "^29.6.1" - } - }, - "jest-get-type": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", - "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", - "dev": true - }, - "jest-haste-map": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.1.tgz", - "integrity": "sha512-0m7f9PZXxOCk1gRACiVgX85knUKPKLPg4oRCjLoqIm9brTHXaorMA0JpmtmVkQiT8nmXyIVoZd/nnH1cfC33ig==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.1", - "jest-worker": "^29.6.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - } - }, - "jest-leak-detector": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.1.tgz", - "integrity": "sha512-OrxMNyZirpOEwkF3UHnIkAiZbtkBWiye+hhBweCHkVbCgyEy71Mwbb5zgeTNYWJBi1qgDVfPC1IwO9dVEeTLwQ==", - "dev": true, - "requires": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - } - }, - "jest-matcher-utils": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.1.tgz", - "integrity": "sha512-SLaztw9d2mfQQKHmJXKM0HCbl2PPVld/t9Xa6P9sgiExijviSp7TnZZpw2Fpt+OI3nwUO/slJbOfzfUMKKC5QA==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^29.6.1", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.1" - } - }, - "jest-message-util": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.1.tgz", - "integrity": "sha512-KoAW2zAmNSd3Gk88uJ56qXUWbFk787QKmjjJVOjtGFmmGSZgDBrlIL4AfQw1xyMYPNVD7dNInfIbur9B2rd/wQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-mock": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.1.tgz", - "integrity": "sha512-brovyV9HBkjXAEdRooaTQK42n8usKoSRR3gihzUpYeV/vwqgSoNfrksO7UfSACnPmxasO/8TmHM3w9Hp3G1dgw==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-util": "^29.6.1" - } - }, - "jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", - "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", - "dev": true - }, - "jest-resolve": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.1.tgz", - "integrity": "sha512-AeRkyS8g37UyJiP9w3mmI/VXU/q8l/IH52vj/cDAyScDcemRbSBhfX/NMYIGilQgSVwsjxrCHf3XJu4f+lxCMg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.6.1", - "jest-validate": "^29.6.1", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.1.tgz", - "integrity": "sha512-BbFvxLXtcldaFOhNMXmHRWx1nXQO5LoXiKSGQcA1LxxirYceZT6ch8KTE1bK3X31TNG/JbkI7OkS/ABexVahiw==", - "dev": true, - "requires": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.6.1" - } - }, - "jest-runner": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.1.tgz", - "integrity": "sha512-tw0wb2Q9yhjAQ2w8rHRDxteryyIck7gIzQE4Reu3JuOBpGp96xWgF0nY8MDdejzrLCZKDcp8JlZrBN/EtkQvPQ==", - "dev": true, - "requires": { - "@jest/console": "^29.6.1", - "@jest/environment": "^29.6.1", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.6.1", - "jest-haste-map": "^29.6.1", - "jest-leak-detector": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-resolve": "^29.6.1", - "jest-runtime": "^29.6.1", - "jest-util": "^29.6.1", - "jest-watcher": "^29.6.1", - "jest-worker": "^29.6.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - } - }, - "jest-runtime": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.1.tgz", - "integrity": "sha512-D6/AYOA+Lhs5e5il8+5pSLemjtJezUr+8zx+Sn8xlmOux3XOqx4d8l/2udBea8CRPqqrzhsKUsN/gBDE/IcaPQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.6.1", - "@jest/fake-timers": "^29.6.1", - "@jest/globals": "^29.6.1", - "@jest/source-map": "^29.6.0", - "@jest/test-result": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-mock": "^29.6.1", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.1", - "jest-snapshot": "^29.6.1", - "jest-util": "^29.6.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.1.tgz", - "integrity": "sha512-G4UQE1QQ6OaCgfY+A0uR1W2AY0tGXUPQpoUClhWHq1Xdnx1H6JOrC2nH5lqnOEqaDgbHFgIwZ7bNq24HpB180A==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.6.1", - "@jest/transform": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.6.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.6.1", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.1", - "jest-message-util": "^29.6.1", - "jest-util": "^29.6.1", - "natural-compare": "^1.4.0", - "pretty-format": "^29.6.1", - "semver": "^7.5.3" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "jest-util": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.1.tgz", - "integrity": "sha512-NRFCcjc+/uO3ijUVyNOQJluf8PtGCe/W6cix36+M3cTFgiYqFOOW5MgN4JOOcvbUhcKTYVd1CvHz/LWi8d16Mg==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.1.tgz", - "integrity": "sha512-r3Ds69/0KCN4vx4sYAbGL1EVpZ7MSS0vLmd3gV78O+NAx3PDQQukRU5hNHPXlyqCgFY8XUk7EuTMLugh0KzahA==", - "dev": true, - "requires": { - "@jest/types": "^29.6.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "leven": "^3.1.0", - "pretty-format": "^29.6.1" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - } - } - }, - "jest-watcher": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.1.tgz", - "integrity": "sha512-d4wpjWTS7HEZPaaj8m36QiaP856JthRZkrgcIY/7ISoUWPIillrXM23WPboZVLbiwZBt4/qn2Jke84Sla6JhFA==", - "dev": true, - "requires": { - "@jest/test-result": "^29.6.1", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.6.1", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.1.tgz", - "integrity": "sha512-U+Wrbca7S8ZAxAe9L6nb6g8kPdia5hj32Puu5iOqBCMTMWFHXuK6dOV2IFrpedbTV8fjMFLdWNttQTBL6u2MRA==", - "dev": true, - "requires": { - "@types/node": "*", - "jest-util": "^29.6.1", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "jsonld": { - "version": "8.1.1", - "requires": { - "@digitalbazaar/http-client": "^3.2.0", - "canonicalize": "^1.0.1", - "lru-cache": "^6.0.0", - "rdf-canonize": "^3.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0" - } - } - }, - "jsonld-context-parser": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/jsonld-context-parser/-/jsonld-context-parser-2.3.0.tgz", - "integrity": "sha512-c6w2GE57O26eWFjcPX6k6G86ootsIfpuVwhZKjCll0bVoDGBxr1P4OuU+yvgfnh1GJhAGErolfC7W1BklLjWMg==", - "requires": { - "@types/http-link-header": "^1.0.1", - "@types/node": "^18.0.0", - "canonicalize": "^1.0.1", - "cross-fetch": "^3.0.6", - "http-link-header": "^1.0.2", - "relative-to-absolute-iri": "^1.0.5" - } - }, - "jsonld-streaming-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-3.2.0.tgz", - "integrity": "sha512-lJR1SCT364PGpFrOQaY+ZQ7qDWqqiT3IMK+AvZ83fo0LvltFn8/UyXvIFc3RO7YcaEjLahAF0otCi8vOq21NtQ==", - "requires": { - "@bergos/jsonparse": "^1.4.0", - "@rdfjs/types": "*", - "@types/http-link-header": "^1.0.1", - "@types/readable-stream": "^2.3.13", - "buffer": "^6.0.3", - "canonicalize": "^1.0.1", - "http-link-header": "^1.0.2", - "jsonld-context-parser": "^2.3.0", - "rdf-data-factory": "^1.1.0", - "readable-stream": "^4.0.0" - } - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "ky": { - "version": "0.33.2" - }, - "ky-universal": { - "version": "0.11.0", - "requires": { - "abort-controller": "^3.0.0", - "node-fetch": "^3.2.10" - } - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "requires": { - "tmpl": "1.0.5" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node-domexception": { - "version": "1.0.0" - }, - "node-fetch": { - "version": "3.3.0", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, - "nodeify-fetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nodeify-fetch/-/nodeify-fetch-3.1.0.tgz", - "integrity": "sha512-ZV81vM//sEgTgXwVZlOONzcOCdTGQ53mV65FVSNXgPQHa8oCwRLtLbnGxL/1S/Yw90bcXUDKMz00jEnaeazo+A==", - "requires": { - "lodash": "^4.17.21", - "node-fetch": "^3.2.10", - "readable-stream": "^4.2.0", - "stream-chunks": "^1.0.0" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" + "whatwg-url": "^5.0.0" }, - "dependencies": { - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - } - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" + "node_modules/nodeify-fetch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodeify-fetch/-/nodeify-fetch-3.1.0.tgz", + "integrity": "sha512-ZV81vM//sEgTgXwVZlOONzcOCdTGQ53mV65FVSNXgPQHa8oCwRLtLbnGxL/1S/Yw90bcXUDKMz00jEnaeazo+A==", + "dependencies": { + "lodash": "^4.17.21", + "node-fetch": "^3.2.10", + "readable-stream": "^4.2.0", + "stream-chunks": "^1.0.0" } }, - "pretty-format": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.1.tgz", - "integrity": "sha512-7jRj+yXO0W7e4/tSJKoR7HRIHLPPjtNaUGG2xxKQnGvPNRkgWcQ0AZX6P4KBRJN4FcTBWb3sa7DVUJmocYuoog==", - "dev": true, - "requires": { - "@jest/schemas": "^29.6.0", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, + "node_modules/nodeify-fetch/node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "process": { + "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" - }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" } }, - "pure-rand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", - "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", - "dev": true + "node_modules/proto-fetch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proto-fetch/-/proto-fetch-2.0.0.tgz", + "integrity": "sha512-QuhQVYN9WxCbJmfp/s3HLofEaDr/Jkq873++mo126XB2h+TFcKIGCIxeORH5ww9MOi2uP1SfWy4EgQH5PuBfdQ==" }, - "rdf-canonize": { - "version": "3.3.0", - "requires": { + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/rdf-canonize": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-3.4.0.tgz", + "integrity": "sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==", + "dependencies": { "setimmediate": "^1.0.5" + }, + "engines": { + "node": ">=12" } }, - "rdf-data-factory": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.1.1.tgz", - "integrity": "sha512-0HoLx7lbBlNd2YTmNKin0txgiYmAV56eVU823at8cG2+iD0Ia5kcRNDpzZy6I/HCtFTymHvTfdhHTzm3ak3Jpw==", - "requires": { + "node_modules/rdf-data-factory": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rdf-data-factory/-/rdf-data-factory-1.1.2.tgz", + "integrity": "sha512-TfQD63Lokabd09ES1jAtKK8AA6rkr9rwyUBGo6olOt1CE0Um36CUQIqytyf0am2ouBPR0l7SaHxCiMcPGHkt1A==", + "dependencies": { "@rdfjs/types": "*" } }, - "rdf-ext": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/rdf-ext/-/rdf-ext-2.2.0.tgz", - "integrity": "sha512-/6Z1VK+OdL4SQnxhzdN1CJJY7pmtTzh0BHLRgKQG9MPIN2SnYr/eymHxqcygcZ/YHqXAV7kl2aOFbn6u9P4Wgw==", - "requires": { + "node_modules/rdf-ext": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/rdf-ext/-/rdf-ext-2.5.1.tgz", + "integrity": "sha512-5vpufBzbsjebcyRiS1tcnwhI12au2crufprrGJ6QNmx8A2n4ThiadayhG4GzzdJSq9I0dYuRMoXdZTjDemCINQ==", + "dependencies": { "@rdfjs/data-model": "^2.0.1", "@rdfjs/dataset": "^2.0.1", - "@rdfjs/environment": "^0.1.2", + "@rdfjs/environment": "^1.0.0", "@rdfjs/fetch-lite": "^3.2.1", + "@rdfjs/formats": "^4.0.0", + "@rdfjs/io": "^1.0.0", "@rdfjs/namespace": "^2.0.0", "@rdfjs/normalize": "^2.0.0", "@rdfjs/prefix-map": "^0.1.1", @@ -7178,428 +1005,164 @@ "@rdfjs/term-set": "^2.0.1", "@rdfjs/to-ntriples": "^2.0.0", "@rdfjs/traverser": "^0.1.1", - "clownface": "^1.5.1", + "file-fetch": "^2.0.0", + "grapoi": "^1.0.2", + "nodeify-fetch": "^3.1.0", + "proto-fetch": "^2.0.0", "readable-stream": "^4.3.0" } }, - "rdf-js": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/rdf-js/-/rdf-js-4.0.2.tgz", - "integrity": "sha512-ApvlFa/WsQh8LpPK/6hctQwG06Z9ztQQGWVtrcrf9L6+sejHNXLPOqL+w7q3hF+iL0C4sv3AX1PUtGkLNzyZ0Q==", - "dev": true, - "requires": { - "@rdfjs/types": "*" + "node_modules/rdfxml-streaming-parser": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/rdfxml-streaming-parser/-/rdfxml-streaming-parser-2.4.0.tgz", + "integrity": "sha512-f+tdI1wxOiPzMbFWRtOwinwPsqac0WIN80668yFKcVdFCSTGOWTM70ucQGUSdDZZo7pce/UvZgV0C3LDj0P7tg==", + "dependencies": { + "@rdfjs/types": "*", + "@rubensworks/saxes": "^6.0.1", + "@types/readable-stream": "^2.3.13", + "buffer": "^6.0.3", + "rdf-data-factory": "^1.1.0", + "readable-stream": "^4.4.2", + "relative-to-absolute-iri": "^1.0.0", + "validate-iri": "^1.0.0" } }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "readable-stream": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz", - "integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==", - "requires": { + "node_modules/readable-stream": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", + "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", - "process": "^0.11.10" + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "relative-to-absolute-iri": { + "node_modules/relative-to-absolute-iri": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/relative-to-absolute-iri/-/relative-to-absolute-iri-1.0.7.tgz", "integrity": "sha512-Xjyl4HmIzg2jzK/Un2gELqbcE8Fxy85A/aLSHE6PE/3+OGsFwmKVA1vRyGaz6vLWSqLDMHA+5rjD/xbibSQN1Q==" }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.5" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "sisteransi": { + "node_modules/setimmediate": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - } - }, - "stream-chunks": { + "node_modules/stream-chunks": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stream-chunks/-/stream-chunks-1.0.0.tgz", "integrity": "sha512-/G+kinLx3pKXChtuko82taA4gZo56zFG2b2BbhmugmS0TUPBL40c5b2vjonS+gAHYK/cSKM9m0WTvAJYgDUeNw==", - "requires": { + "dependencies": { "buffer": "^6.0.3", "string_decoder": "^1.3.0" } }, - "streamsearch": { - "version": "1.1.0" - }, - "string_decoder": { + "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { + "dependencies": { "safe-buffer": "~5.2.0" } }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "tr46": { + "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - }, - "typescript": { + "node_modules/typescript": { "version": "4.9.5", - "dev": true - }, - "undici": { - "version": "5.20.0", - "requires": { - "busboy": "^1.6.0" - } - }, - "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, - "v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, + "node_modules/undici": { + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dependencies": { - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - } + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" } }, - "walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "requires": { - "makeerror": "1.0.12" - } + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/validate-iri": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/validate-iri/-/validate-iri-1.0.1.tgz", + "integrity": "sha512-gLXi7351CoyVVQw8XE5sgpYawRKatxE7kj/xmCxXOZS1kMdtcqC0ILIqLuVEVnAUQSL/evOGG3eQ+8VgbdnstA==" }, - "web-streams-polyfill": { - "version": "3.2.1" + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "engines": { + "node": ">= 8" + } }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, - "whatwg-url": { + "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { + "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/package.json b/package.json index 4633d41..3f3f6ed 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "@datafoodconsortium/connector", - "description": "", + "description": "The Data Food Consortium (DFC) Connector is a tool to help you to integrate the DFC standard within you application.", "author": "Maxime Lecoq", "license": "MIT", "type": "module", - "version": "1.0.0-alpha.8", + "version": "1.0.0-alpha.9", "repository": { "type": "git", "url": "https://github.com/datafoodconsortium/connector-typescript.git", @@ -12,21 +12,20 @@ }, "scripts": { "build": "tsc -p .", - "test": "NODE_OPTIONS=--experimental-vm-modules npx jest" + "test": "node --test test" }, "dependencies": { "@rdfjs/serializer-jsonld-ext": "^4.0.0", - "@virtual-assembly/semantizer": "^1.0.0-alpha.2", + "@virtual-assembly/semantizer": "github:assemblee-virtuelle/semantizer-typescript#alpha.3", "jsonld": "^8.1.0", "jsonld-streaming-parser": "^3.2.0", - "rdf-ext": "^2.2.0", + "rdf-ext": "^2.5.1", "readable-stream": "^4.3.0" }, "devDependencies": { "@types/jsonld": "^1.5.7", - "@types/rdf-ext": "^2.2.0", + "@types/rdf-ext": "^2.5.0", "@types/rdfjs__serializer-jsonld-ext": "^2.0.5", - "jest": "^29.5.0", "typescript": "^4.5" }, "main": "lib/index.js", diff --git a/src/Address.ts b/src/Address.ts index 48abcf1..ac8412a 100644 --- a/src/Address.ts +++ b/src/Address.ts @@ -21,84 +21,139 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - import IAddress from "./IAddress.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const ADDRESS_SEM_TYPE: string = "dfc-b:Address"; export default class Address extends SemanticObject implements IAddress { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, street?: string, postalCode?: string, city?: string, country?: string, doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Address"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + street?: string, + postalCode?: string, + city?: string, + country?: string, + latitude?: number, + longitude?: number, + region?: string, + doNotStore?: boolean, + }) { + + const type: string = ADDRESS_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.street) this.setStreet(parameters.street); - if (parameters.postalCode) this.setPostalCode(parameters.postalCode); - if (parameters.city) this.setCity(parameters.city); - if (parameters.country) this.setCountry(parameters.country); + } + if (parameters.street) { + this.setStreet(parameters.street); + } + + if (parameters.postalCode) { + this.setPostalCode(parameters.postalCode); + } + + if (parameters.city) { + this.setCity(parameters.city); + } + + if (parameters.country) { + this.setCountry(parameters.country); + } + + if (parameters.latitude || parameters.latitude === 0) { + this.setLatitude(parameters.latitude); + } + + if (parameters.longitude || parameters.longitude === 0) { + this.setLongitude(parameters.longitude); + } + + if (parameters.region) { + this.setRegion(parameters.region); + } + } - public setCountry(country: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCountry"; - this.setSemanticPropertyLiteral(property, country); + public getCountry(): string | undefined { + return this.getSemanticProperty("dfc-b:hasCountry"); } - - public setStreet(street: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasStreet"; - this.setSemanticPropertyLiteral(property, street); + public getCity(): string | undefined { + return this.getSemanticProperty("dfc-b:hasCity"); } - - public setCity(city: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCity"; - this.setSemanticPropertyLiteral(property, city); + public setLatitude(latitude: number): void { + this.setSemanticPropertyLiteral("dfc-b:latitude", latitude); } - - public getCountry(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCountry"); + public getStreet(): string | undefined { + return this.getSemanticProperty("dfc-b:hasStreet"); } - public setPostalCode(postalCode: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPostalCode"; - this.setSemanticPropertyLiteral(property, postalCode); + this.setSemanticPropertyLiteral("dfc-b:hasPostalCode", postalCode); + } + + public getLongitude(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:longitude")); + } + + public getRegion(): string | undefined { + return this.getSemanticProperty("dfc-b:region"); + } + + public setCountry(country: string): void { + this.setSemanticPropertyLiteral("dfc-b:hasCountry", country); } - - public getPostalCode(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPostalCode"); + public getLatitude(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:latitude")); + } + + public setStreet(street: string): void { + this.setSemanticPropertyLiteral("dfc-b:hasStreet", street); } - - public getCity(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCity"); + public setLongitude(longitude: number): void { + this.setSemanticPropertyLiteral("dfc-b:longitude", longitude); } - - public getStreet(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasStreet"); + public getPostalCode(): string | undefined { + return this.getSemanticProperty("dfc-b:hasPostalCode"); } - + public setRegion(region: string): void { + this.setSemanticPropertyLiteral("dfc-b:region", region); + } + + public setCity(city: string): void { + this.setSemanticPropertyLiteral("dfc-b:hasCity", city); + } } diff --git a/src/AddressOwner.ts b/src/AddressOwner.ts new file mode 100644 index 0000000..60da9f1 --- /dev/null +++ b/src/AddressOwner.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IAddress from "./IAddress.js" +import ContactableByAddress from "./ContactableByAddress.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface AddressOwner extends ContactableByAddress { + + addLocalization(localization: IAddress): void; + + removeLocalization(localization: IAddress): void; + +} diff --git a/src/Affiliable.ts b/src/Affiliable.ts index 7ca46ca..bea28f9 100644 --- a/src/Affiliable.ts +++ b/src/Affiliable.ts @@ -1,12 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IEnterprise from "./IEnterprise.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Affiliable { - getAffiliatedOrganizations(): Promise> - ; + getAffiliatedOrganizations(): Promise; + affiliateTo(organization: IEnterprise): void; + leaveAffiliatedOrganization(organization: IEnterprise): void; } diff --git a/src/Agent.ts b/src/Agent.ts index 8fb72d5..badcb6e 100644 --- a/src/Agent.ts +++ b/src/Agent.ts @@ -21,55 +21,177 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +import ISocialMedia from "./ISocialMedia.js" +import IPhoneNumber from "./IPhoneNumber.js" import IAddress from "./IAddress.js" import IAgent from "./IAgent.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; export default abstract class Agent extends SemanticObject implements IAgent { - + protected connector: IConnector; - protected constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, localizations?: IAddress[]}) { - if (parameters.other) super({ semanticId: parameters.semanticId!, other: parameters.other }) - else super({ semanticId: parameters.semanticId!, semanticType: parameters.semanticType! }); + protected constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + localizations?: IAddress[], + phoneNumbers?: IPhoneNumber[], + emails?: string[], + websites?: string[], + socialMedias?: ISocialMedia[], + logo?: string, + doNotStore?: boolean, + }) { + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + } else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: parameters.semanticType!, + + }); + } this.connector = parameters.connector; - if (parameters.localizations) parameters.localizations.forEach(e => this.addLocalization(e)); + if (parameters.localizations) { + parameters.localizations.forEach(e => this.addLocalization(e)); + } + + if (parameters.phoneNumbers) { + parameters.phoneNumbers.forEach(e => this.addPhoneNumber(e)); + } + + if (parameters.emails) { + parameters.emails.forEach(e => this.addEmailAddress(e)); + } + + if (parameters.websites) { + parameters.websites.forEach(e => this.addWebsite(e)); + } + + if (parameters.socialMedias) { + parameters.socialMedias.forEach(e => this.addSocialMedia(e)); + } + + if (parameters.logo) { + this.setLogo(parameters.logo); + } + + } + + public removePhoneNumber(phoneNumber: IPhoneNumber): void { + throw new Error("Not yet implemented."); + } + + public getWebsites(): string[] { + return this.getSemanticPropertyAll("dfc-b:websitePage"); + } + + public addWebsite(website: string): void { + this.addSemanticPropertyLiteral("dfc-b:websitePage", website); + } + + public removeWebsite(website: string): void { + throw new Error("Not yet implemented."); + } + + public getLogo(): string | undefined { + return this.getSemanticProperty("dfc-b:logo"); + } + + public setLogo(logo: string): void { + this.setSemanticPropertyLiteral("dfc-b:logo", logo); + } + + public removeEmailAddress(emailAddress: string): void { + throw new Error("Not yet implemented."); } public addLocalization(localization: IAddress): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAddress"; if (localization.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, localization); + this.addSemanticPropertyAnonymous("dfc-b:hasAddress", localization); } else { this.connector.store(localization); - this.addSemanticPropertyReference(property, localization); + this.addSemanticPropertyReference("dfc-b:hasAddress", localization); + } + } + + public removeSocialMedia(socialMedia: ISocialMedia): void { + throw new Error("Not yet implemented."); + } + + public addPhoneNumber(phoneNumber: IPhoneNumber): void { + if (phoneNumber.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPhoneNumber", phoneNumber); + } + else { + this.connector.store(phoneNumber); + this.addSemanticPropertyReference("dfc-b:hasPhoneNumber", phoneNumber); + } + } + + public getEmails(): string[] { + return this.getSemanticPropertyAll("dfc-b:email"); + } + + public async getPhoneNumbers(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasPhoneNumber"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; + } + + public addSocialMedia(socialMedia: ISocialMedia): void { + if (socialMedia.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasSocialMedia", socialMedia); + } + else { + this.connector.store(socialMedia); + this.addSemanticPropertyReference("dfc-b:hasSocialMedia", socialMedia); } } - public removeLocalization(localization: IAddress): void { throw new Error("Not yet implemented."); } - - public async getLocalizations(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAddress"); + public async getSocialMedias(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasSocialMedia"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - + public addEmailAddress(emailAddress: string): void { + this.addSemanticPropertyLiteral("dfc-b:email", emailAddress); + } + + public async getLocalizations(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasAddress"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; + } } diff --git a/src/AllergenCharacteristic.ts b/src/AllergenCharacteristic.ts index 13b9b0e..6d70fb2 100644 --- a/src/AllergenCharacteristic.ts +++ b/src/AllergenCharacteristic.ts @@ -21,55 +21,68 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import ICharacteristicDimension from "./ICharacteristicDimension.js" +import ISKOSConcept from "./ISKOSConcept.js" import IAllergenCharacteristic from "./IAllergenCharacteristic.js" -import IAllergenDimension from "./IAllergenDimension.js" import Characteristic from "./Characteristic.js" -import IUnit from "./IUnit.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const ALLERGEN_CHARACTERISTIC_SEM_TYPE: string = "dfc-b:AllergenCharacteristic"; export default class AllergenCharacteristic extends Characteristic implements IAllergenCharacteristic { - - public constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}) { - const type: string = parameters.semanticType? parameters.semanticType: "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#AllergenCharacteristic"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + allergenDimension?: ISKOSConcept, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : ALLERGEN_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + unit: parameters.unit, + value: parameters.value + }); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, unit: parameters.unit, value: parameters.value }); - + if (parameters.allergenDimension) { + this.setQuantityDimension(parameters.allergenDimension); + } - if (parameters.allergenDimension) this.setQuantityDimension(parameters.allergenDimension); } - public async getQuantityDimension(options?: IGetterOptions): Promise - { - let result: ICharacteristicDimension | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenDimension"); + public async getQuantityDimension(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasAllergenDimension"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - - public setQuantityDimension(quantityDimension: ICharacteristicDimension): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + public setQuantityDimension(quantityDimension: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasAllergenDimension", quantityDimension); + this.connector.store(quantityDimension); } - - - } diff --git a/src/Browsable.ts b/src/Browsable.ts index bb7d44f..e0d20b5 100644 --- a/src/Browsable.ts +++ b/src/Browsable.ts @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalogItem from "./ICatalogItem.js" import IEnterprise from "./IEnterprise.js" @@ -5,12 +28,14 @@ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Browsable { - getMaintainers(): Promise> - ; - getItems(): Promise> - ; + getMaintainers(): Promise; + + getItems(): Promise; + removeItem(item: ICatalogItem): void; + addItem(item: ICatalogItem): void; + addMaintainer(maintainer: IEnterprise): void; } diff --git a/src/Buyable.ts b/src/Buyable.ts index 7144594..7c1ad6b 100644 --- a/src/Buyable.ts +++ b/src/Buyable.ts @@ -1,10 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Marketable from "./Marketable.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Buyable { - getBuyableOffer(): Promise - ; + getBuyableOffer(): Promise; } diff --git a/src/Catalog.ts b/src/Catalog.ts index 52718e0..5ec3214 100644 --- a/src/Catalog.ts +++ b/src/Catalog.ts @@ -21,90 +21,104 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IEnterprise from "./IEnterprise.js" -import ICatalog from "./ICatalog.js" -import Catalogable from "./Catalogable.js" import ICatalogItem from "./ICatalogItem.js" +import ICatalog from "./ICatalog.js" +import IEnterprise from "./IEnterprise.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const CATALOG_SEM_TYPE: string = "dfc-b:Catalog"; export default class Catalog extends SemanticObject implements ICatalog { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, maintainers?: IEnterprise[], items?: ICatalogItem[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Catalog"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + maintainers?: IEnterprise[], + items?: ICatalogItem[], + doNotStore?: boolean, + }) { + + const type: string = CATALOG_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.maintainers) parameters.maintainers.forEach(e => this.addMaintainer(e)); - if (parameters.items) parameters.items.forEach(e => this.addItem(e)); + } + if (parameters.maintainers) { + parameters.maintainers.forEach(e => this.addMaintainer(e)); + } + + if (parameters.items) { + parameters.items.forEach(e => this.addItem(e)); + } + } - public async getItems(options?: IGetterOptions): Promise> - { + public async getItems(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"); + const properties = this.getSemanticPropertyAll("dfc-b:lists"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - public addMaintainer(maintainer: IEnterprise): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintainedBy"; if (maintainer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, maintainer); + this.addSemanticPropertyAnonymous("dfc-b:maintainedBy", maintainer); } else { this.connector.store(maintainer); - this.addSemanticPropertyReference(property, maintainer); + this.addSemanticPropertyReference("dfc-b:maintainedBy", maintainer); + } + } + + public addItem(item: ICatalogItem): void { + if (item.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:lists", item); + } + else { + this.connector.store(item); + this.addSemanticPropertyReference("dfc-b:lists", item); } } - public removeItem(item: ICatalogItem): void { throw new Error("Not yet implemented."); } - - public async getMaintainers(options?: IGetterOptions): Promise> - { + public async getMaintainers(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintainedBy"); + const properties = this.getSemanticPropertyAll("dfc-b:maintainedBy"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - - public addItem(item: ICatalogItem): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"; - if (item.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, item); - } - else { - this.connector.store(item); - this.addSemanticPropertyReference(property, item); - } - } - - } diff --git a/src/CatalogItem.ts b/src/CatalogItem.ts index b149b28..725ad76 100644 --- a/src/CatalogItem.ts +++ b/src/CatalogItem.ts @@ -21,129 +21,148 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +import ICatalogItem from "./ICatalogItem.js" +import IDefinedProduct from "./IDefinedProduct.js" import ICatalog from "./ICatalog.js" import IOffer from "./IOffer.js" -import IDefinedProduct from "./IDefinedProduct.js" -import ICatalogItem from "./ICatalogItem.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const CATALOG_ITEM_SEM_TYPE: string = "dfc-b:CatalogItem"; export default class CatalogItem extends SemanticObject implements ICatalogItem { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, product?: IDefinedProduct, sku?: string, stockLimitation?: number, offers?: IOffer[], catalogs?: ICatalog[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CatalogItem"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + product?: IDefinedProduct, + sku?: string, + stockLimitation?: number, + offers?: IOffer[], + catalogs?: ICatalog[], + doNotStore?: boolean, + }) { + + const type: string = CATALOG_ITEM_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.product) this.setOfferedProduct(parameters.product); - if (parameters.sku) this.setSku(parameters.sku); - if (parameters.stockLimitation || parameters.stockLimitation === 0) this.setStockLimitation(parameters.stockLimitation); - if (parameters.offers) parameters.offers.forEach(e => this.addOffer(e)); - if (parameters.catalogs) parameters.catalogs.forEach(e => this.registerInCatalog(e)); - } - - public registerInCatalog(repository: ICatalog): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#listedIn"; - if (repository.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, repository); } - else { - this.connector.store(repository); - this.addSemanticPropertyReference(property, repository); + if (parameters.product) { + this.setOfferedProduct(parameters.product); } - } - - - public async getCatalogs(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#listedIn"); - for await (const semanticId of properties) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + + if (parameters.sku) { + this.setSku(parameters.sku); } - return results; - } - - public setOfferedProduct(offeredProduct: IDefinedProduct): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#references"; - this.setSemanticPropertyReference(property, offeredProduct); - this.connector.store(offeredProduct); - } - - - public async getOfferers(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredThrough"); - for await (const semanticId of properties) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + + if (parameters.stockLimitation || parameters.stockLimitation === 0) { + this.setStockLimitation(parameters.stockLimitation); } - return results; + + if (parameters.offers) { + parameters.offers.forEach(e => this.addOffer(e)); + } + + if (parameters.catalogs) { + parameters.catalogs.forEach(e => this.registerInCatalog(e)); + } + } - - public async getOfferedProduct(options?: IGetterOptions): Promise - { + public async getOfferedProduct(options?: IGetterOptions): Promise { let result: IDefinedProduct | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#references"); + const semanticId = this.getSemanticProperty("dfc-b:references"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - + + public getSku(): string | undefined { + return this.getSemanticProperty("dfc-b:sku"); + } public addOffer(offer: IOffer): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredThrough"; if (offer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, offer); + this.addSemanticPropertyAnonymous("dfc-b:offeredThrough", offer); } else { this.connector.store(offer); - this.addSemanticPropertyReference(property, offer); + this.addSemanticPropertyReference("dfc-b:offeredThrough", offer); } } - - public setStockLimitation(stockLimitation: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation"; - this.setSemanticPropertyLiteral(property, stockLimitation); + + public registerInCatalog(repository: ICatalog): void { + if (repository.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:listedIn", repository); + } + else { + this.connector.store(repository); + this.addSemanticPropertyReference("dfc-b:listedIn", repository); + } } - - public getStockLimitation(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation")); + public async getCatalogs(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:listedIn"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; } - - public getSku(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#sku"); + + public getStockLimitation(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:stockLimitation")); } - public setSku(sku: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#sku"; - this.setSemanticPropertyLiteral(property, sku); + this.setSemanticPropertyLiteral("dfc-b:sku", sku); } - + public setStockLimitation(stockLimitation: number): void { + this.setSemanticPropertyLiteral("dfc-b:stockLimitation", stockLimitation); + } + + public async getOfferers(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:offeredThrough"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; + } + + public setOfferedProduct(offeredProduct: IDefinedProduct): void { + this.setSemanticPropertyReference("dfc-b:references", offeredProduct); + + this.connector.store(offeredProduct); + } } diff --git a/src/CatalogItemManager.ts b/src/CatalogItemManager.ts index f699184..05d63d6 100644 --- a/src/CatalogItemManager.ts +++ b/src/CatalogItemManager.ts @@ -1,12 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalogItem from "./ICatalogItem.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface CatalogItemManager { - getManagedCatalogItems(): Promise> - ; + getManagedCatalogItems(): Promise; + manageCatalogItem(catalogItem: ICatalogItem): void; + unmanageCatalogItem(catalogItem: ICatalogItem): void; } diff --git a/src/CatalogMaintainer.ts b/src/CatalogMaintainer.ts index 88c2e88..a40c3c9 100644 --- a/src/CatalogMaintainer.ts +++ b/src/CatalogMaintainer.ts @@ -1,12 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalog from "./ICatalog.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface CatalogMaintainer { - getMaintainedCatalogs(): Promise> - ; + getMaintainedCatalogs(): Promise; + maintainCatalog(catalog: ICatalog): void; + unmaintainCatalog(catalog: ICatalog): void; } diff --git a/src/Catalogable.ts b/src/Catalogable.ts index 790eca7..3a9a301 100644 --- a/src/Catalogable.ts +++ b/src/Catalogable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalog from "./ICatalog.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Catalogable { - getCatalogs(): Promise> - ; + getCatalogs(): Promise; + registerInCatalog(repository: ICatalog): void; } diff --git a/src/Certifiable.ts b/src/Certifiable.ts index e981a9e..5c02a44 100644 --- a/src/Certifiable.ts +++ b/src/Certifiable.ts @@ -1,12 +1,36 @@ -import ICertification from "./ICertification.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Certifiable { - addCertification(certification: ICertification): void; - getCertifications(): Promise> - ; - removeCertification(certification: ICertification): void; + addCertification(certification: ISKOSConcept): void; + + getCertifications(): Promise; + + removeCertification(certification: ISKOSConcept): void; } diff --git a/src/Characteristic.ts b/src/Characteristic.ts index 69598d0..2481a3d 100644 --- a/src/Characteristic.ts +++ b/src/Characteristic.ts @@ -21,31 +21,46 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +import ISKOSConcept from "./ISKOSConcept.js" import ICharacteristic from "./ICharacteristic.js" -import ICharacteristicDimension from "./ICharacteristicDimension.js" -import IUnit from "./IUnit.js" import QuantitativeValue from "./QuantitativeValue.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; export default abstract class Characteristic extends QuantitativeValue implements ICharacteristic { - - protected constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, unit?: IUnit, value?: number}) { - if (parameters.other) super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }) - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: parameters.semanticType!, unit: parameters.unit, value: parameters.value }); - + protected constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + }) { + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); + } else { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + semanticType: parameters.semanticType!, + unit: parameters.unit, + value: parameters.value + }); + } } - abstract getQuantityDimension(): Promise; - abstract setQuantityDimension(quantityDimension: ICharacteristicDimension): void - + abstract getQuantityDimension(options?: IGetterOptions): Promise + abstract setQuantityDimension(quantityDimension: ISKOSConcept): void } diff --git a/src/Claimable.ts b/src/Claimable.ts index dae5576..c8e2f04 100644 --- a/src/Claimable.ts +++ b/src/Claimable.ts @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" diff --git a/src/Classable.ts b/src/Classable.ts index 348d60c..394edf2 100644 --- a/src/Classable.ts +++ b/src/Classable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Classable { - getType(): string - ; + getType(): string | undefined; + setType(type: string): void; } diff --git a/src/Connector.ts b/src/Connector.ts index a1e131c..7066f4e 100644 --- a/src/Connector.ts +++ b/src/Connector.ts @@ -1,26 +1,31 @@ -import { Semanticable } from "@virtual-assembly/semantizer" +// Exernal +import { ISemantizer, Semanticable, Semantizer } from "@virtual-assembly/semantizer" import DatasetExt from "rdf-ext/lib/Dataset"; + +// Static import ConnectorExporterJsonldStream from "./ConnectorExporterJsonldStream.js"; +import ConnectorFactory from "./ConnectorFactory.js"; import ConnectorImporterJsonldStream from "./ConnectorImporterJsonldStream.js"; import ConnectorStoreMap from "./ConnectorStoreMap.js"; +import context from "./context.js"; +import IConnector from "./IConnector.js"; import IConnectorExporter from "./IConnectorExporter"; +import IConnectorExportOptions from "./IConnectorExportOptions.js"; import IConnectorFactory from "./IConnectorFactory.js"; import IConnectorImporter from "./IConnectorImporter"; +import IConnectorImportOptions from "./IConnectorImportOptions.js"; import IConnectorStore from "./IConnectorStore"; import IGetterOptions from "./IGetterOptions.js"; -import ISKOSConcept from "./ISKOSConcept"; -import context from "./context.js"; -import IConnectorImportOptions from "./IConnectorImportOptions.js"; -import IConnectorExportOptions from "./IConnectorExportOptions.js"; -import ConnectorFactory from "./ConnectorFactory.js"; -import IConnector from "./IConnector.js"; + +// Generated Code import IAddress from "./IAddress.js"; +import IAgent from "./IAgent.js"; +import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import ICatalog from "./ICatalog.js"; import ICatalogItem from "./ICatalogItem.js"; import ICustomerCategory from "./ICustomerCategory.js"; import IEnterprise from "./IEnterprise.js"; import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import IOffer from "./IOffer.js"; import IOrder from "./IOrder.js"; import IOrderLine from "./IOrderLine.js"; @@ -29,25 +34,21 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; import IPrice from "./IPrice.js"; import IQuantity from "./IQuantity.js"; import ISaleSession from "./ISaleSession.js"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct.js"; -import IAllergenDimension from "./IAllergenDimension.js"; -import IUnit from "./IUnit.js"; -import INutrientDimension from "./INutrientDimension.js"; -import IAgent from "./IAgent.js"; -import IPhysicalDimension from "./IPhysicalDimension.js"; -import IPartOrigin from "./IPartOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; -import ICertification from "./ICertification.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; -import IClaim from "./IClaim.js"; -import IProductType from "./IProductType.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default class Connector implements IConnector { public FACETS?: ISKOSConcept; public MEASURES?: ISKOSConcept; public PRODUCT_TYPES?: ISKOSConcept; + public VOCABULARY?: ISKOSConcept; + private semantizer: ISemantizer; private fetchFunction: (semanticId: string) => Promise; private factory: IConnectorFactory; private importer: IConnectorImporter; @@ -55,6 +56,7 @@ export default class Connector implements IConnector { private storeObject: IConnectorStore; public constructor() { + this.semantizer = new Semantizer(context); this.storeObject = new ConnectorStoreMap(); this.fetchFunction = async (semanticId: string) => (await fetch(semanticId)); this.factory = new ConnectorFactory(this); @@ -69,9 +71,9 @@ export default class Connector implements IConnector { return this.factory.createAddress(parameters); } - public createAllergenCharacteristic(parameters: {unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}): IAllergenCharacteristic + public createAllergenCharacteristic(parameters: {unit?: ISKOSConcept, value?: number, allergenDimension?: ISKOSConcept}): IAllergenCharacteristic public createAllergenCharacteristic(parameters: {other: IAllergenCharacteristic}): IAllergenCharacteristic; - public createAllergenCharacteristic(parameters: {other?: IAllergenCharacteristic, unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}): IAllergenCharacteristic { + public createAllergenCharacteristic(parameters: {other?: IAllergenCharacteristic, unit?: ISKOSConcept, value?: number, allergenDimension?: ISKOSConcept}): IAllergenCharacteristic { return this.factory.createAllergenCharacteristic(parameters); } @@ -99,9 +101,9 @@ export default class Connector implements IConnector { return this.factory.createEnterprise(parameters); } - public createNutrientCharacteristic(parameters: {unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}): INutrientCharacteristic + public createNutrientCharacteristic(parameters: {unit?: ISKOSConcept, value?: number, nutrientDimension?: ISKOSConcept}): INutrientCharacteristic public createNutrientCharacteristic(parameters: {other: INutrientCharacteristic, doNotStore?: boolean}): INutrientCharacteristic - public createNutrientCharacteristic(parameters: {other?: INutrientCharacteristic, unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}): INutrientCharacteristic { + public createNutrientCharacteristic(parameters: {other?: INutrientCharacteristic, unit?: ISKOSConcept, value?: number, nutrientDimension?: ISKOSConcept}): INutrientCharacteristic { return this.factory.createNutrientCharacteristic(parameters); } @@ -129,21 +131,21 @@ export default class Connector implements IConnector { return this.factory.createPerson(parameters); } - public createPhysicalCharacteristic(parameters: {unit: IUnit, value?: number, physicalDimension?: IPhysicalDimension}): IPhysicalCharacteristic + public createPhysicalCharacteristic(parameters: {unit: ISKOSConcept, value?: number, physicalDimension?: ISKOSConcept}): IPhysicalCharacteristic public createPhysicalCharacteristic(parameters: {other: IPhysicalCharacteristic, doNotStore?: boolean}): IPhysicalCharacteristic - public createPhysicalCharacteristic(parameters: {other?: IPhysicalCharacteristic, unit?: IUnit, value?: number, physicalDimension?: IPhysicalDimension}): IPhysicalCharacteristic { + public createPhysicalCharacteristic(parameters: {other?: IPhysicalCharacteristic, unit?: ISKOSConcept, value?: number, physicalDimension?: ISKOSConcept}): IPhysicalCharacteristic { return this.factory.createPhysicalCharacteristic(parameters); } - public createPrice(parameters: {value?: number, vatRate?: number, unit?: IUnit}): IPrice + public createPrice(parameters: {value?: number, vatRate?: number, unit?: ISKOSConcept}): IPrice public createPrice(parameters: {other: IPrice, doNotStore?: boolean}): IPrice - public createPrice(parameters: {other?: IPrice, value?: number, vatRate?: number, unit?: IUnit}): IPrice { + public createPrice(parameters: {other?: IPrice, value?: number, vatRate?: number, unit?: ISKOSConcept}): IPrice { return this.factory.createPrice(parameters); } - public createQuantity(parameters: {unit?: IUnit, value?: number}): IQuantity + public createQuantity(parameters: {unit?: ISKOSConcept, value?: number}): IQuantity public createQuantity(parameters: {other: IQuantity, doNotStore?: boolean}): IQuantity - public createQuantity(parameters: {other?: IQuantity, unit?: IUnit, value?: number}): IQuantity { + public createQuantity(parameters: {other?: IQuantity, unit?: ISKOSConcept, value?: number}): IQuantity { return this.factory.createQuantity(parameters); } @@ -153,12 +155,30 @@ export default class Connector implements IConnector { return this.factory.createSaleSession(parameters); } - public createSuppliedProduct(parameters: {semanticId: string, 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}): ISuppliedProduct + public createSuppliedProduct(parameters: {semanticId: string, name?: string, description?: string, productType?: ISKOSConcept, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: ISKOSConcept[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: ISKOSConcept, catalogItems?: ICatalogItem[], certifications?: ISKOSConcept[], natureOrigin?: ISKOSConcept[], partOrigin?: ISKOSConcept[], totalTheoreticalStock?: number, doNotStore?: boolean}): ISuppliedProduct public createSuppliedProduct(parameters: {other: ISuppliedProduct, doNotStore?: boolean}): ISuppliedProduct - public createSuppliedProduct(parameters: {doNotStore?: boolean, semanticId?: string, other?: ISuppliedProduct, 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}): ISuppliedProduct { + public createSuppliedProduct(parameters: {doNotStore?: boolean, semanticId?: string, other?: ISuppliedProduct, name?: string, description?: string, productType?: ISKOSConcept, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: ISKOSConcept[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: ISKOSConcept, catalogItems?: ICatalogItem[], certifications?: ISKOSConcept[], natureOrigin?: ISKOSConcept[], partOrigin?: ISKOSConcept[], totalTheoreticalStock?: number}): ISuppliedProduct { return this.factory.createSuppliedProduct(parameters); } + public createPlannedTransformation(parameters: {doNotStore?: boolean, semanticId: string, transformationType?: ISKOSConcept, consumptionFlow?: IPlannedConsumptionFlow, productionFlow?: IPlannedProductionFlow}): IPlannedTransformation; + public createPlannedTransformation(parameters: {doNotStore?: boolean, other: IPlannedTransformation}): IPlannedTransformation; + public createPlannedTransformation(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, transformationType?: ISKOSConcept, consumptionFlow?: IPlannedConsumptionFlow, productionFlow?: IPlannedProductionFlow}): IPlannedTransformation { + return this.factory.createPlannedTransformation(parameters); + } + + public createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, semanticId: string, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: IDefinedProduct}): IPlannedConsumptionFlow; + public createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, other: IPlannedConsumptionFlow}): IPlannedConsumptionFlow; + public createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: IDefinedProduct}): IPlannedConsumptionFlow { + return this.factory.createPlannedConsumptionFlow(parameters); + } + + public createPlannedProductionFlow(parameters: {doNotStore?: boolean, semanticId: string, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: ISuppliedProduct}): IPlannedProductionFlow; + public createPlannedProductionFlow(parameters: {doNotStore?: boolean, other: IPlannedProductionFlow}): IPlannedProductionFlow; + public createPlannedProductionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: ISuppliedProduct}): IPlannedProductionFlow { + return this.factory.createPlannedProductionFlow(parameters); + } + public async export(objects: Array, options?: IConnectorExportOptions): Promise { const exporter = options?.exporter? options.exporter : this.exporter; return exporter.export(objects, { @@ -167,6 +187,10 @@ export default class Connector implements IConnector { }); } + public getSemantizer(): ISemantizer { + return this.semantizer; + } + public getDefaultFactory(): IConnectorFactory { return this.factory; } @@ -242,8 +266,9 @@ export default class Connector implements IConnector { const narrowers = parent.getSemanticPropertyAll(skosNarrower); narrowers.forEach((narrower: string) => { - const name: string = narrower.split(prefix)[1].replace('-', '_').toUpperCase(); - const concept: Semanticable | undefined = concepts.get(narrower); + const expandedNarrower = this.getSemantizer().expand(narrower); + const name: string = expandedNarrower.split(prefix)[1].replace('-', '_').toUpperCase(); + const concept: Semanticable | undefined = concepts.get(expandedNarrower); if (concept) { // @ts-ignore parent[name] = concept; @@ -254,8 +279,10 @@ export default class Connector implements IConnector { // @ts-ignore: if the conceptScheme does not exist, an exception should have be already throwned conceptScheme.getSemanticPropertyAll(skosHasTopConcept).forEach((topConcept: any) => { - const name: string = topConcept.split(prefix)[1].replace('-', '_').toUpperCase(); - const concept: Semanticable | undefined = concepts.get(topConcept); + const expandedTopConcept = this.getSemantizer().expand(topConcept); + //const name: string = topConcept.split(prefix)[1].replace('-', '_').toUpperCase(); + const name: string = expandedTopConcept.split(prefix)[1].replace('-', '_').toUpperCase(); + const concept: Semanticable | undefined = concepts.get(expandedTopConcept); if (!concept) throw new Error("The thesaurus top concept " + topConcept + " was not found."); // @ts-ignore @@ -281,8 +308,14 @@ export default class Connector implements IConnector { this.PRODUCT_TYPES = await this.importThesaurus(productTypes, prefix); } - public async fetch(semanticObjectId: string, options?: IGetterOptions): Promise { + public async loadVocabulary(vocabulary: any): Promise { + const prefix: string = "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#"; + this.VOCABULARY = await this.importThesaurus(vocabulary, prefix); + } + + public async fetch(semanticObject: string, options?: IGetterOptions): Promise { const store: IConnectorStore = options?.store? options.store : this.storeObject; + const semanticObjectId = this.getSemantizer().expand(semanticObject); if (!store.has(semanticObjectId)) { const fetchFunction = options?.fetch? options.fetch : this.fetchFunction; diff --git a/src/ConnectorExporterJsonldStream.ts b/src/ConnectorExporterJsonldStream.ts index fb1de7d..f963080 100644 --- a/src/ConnectorExporterJsonldStream.ts +++ b/src/ConnectorExporterJsonldStream.ts @@ -1,8 +1,9 @@ import { Semanticable } from "@virtual-assembly/semantizer"; -import IConnectorExporter from "./IConnectorExporter"; import SerializerJsonld from '@rdfjs/serializer-jsonld-ext'; import { ContextDefinition } from "jsonld"; import { Readable } from 'readable-stream'; + +import IConnectorExporter from "./IConnectorExporter"; import IConnectorExporterOptions from "./IConnectorExporterOptions"; export default class ConnectorExporterJsonldStream implements IConnectorExporter { diff --git a/src/ConnectorFactory.ts b/src/ConnectorFactory.ts index 198d089..bec2129 100644 --- a/src/ConnectorFactory.ts +++ b/src/ConnectorFactory.ts @@ -1,52 +1,57 @@ +// External import { Semanticable } from "@virtual-assembly/semantizer"; +import DatasetExt from "rdf-ext/lib/Dataset.js"; +import { DatasetCore } from '@rdfjs/types'; + +// Static +import IConnector from "./IConnector.js"; +import IConnectorFactory from "./IConnectorFactory.js"; + +// Generated Classes import Address from "./Address.js"; -import Catalog from "./Catalog.js"; -import SaleSession from "./SaleSession.js"; -import Order from "./Order.js"; -import OrderLine from "./OrderLine.js"; import AllergenCharacteristic from "./AllergenCharacteristic.js"; +import Catalog from "./Catalog.js"; import CatalogItem from "./CatalogItem.js"; import CustomerCategory from "./CustomerCategory.js"; import Enterprise from "./Enterprise.js"; -import IConnectorFactory from "./IConnectorFactory.js"; import NutrientCharacteristic from "./NutrientCharacteristic.js"; import Offer from "./Offer.js"; +import Order from "./Order.js"; +import OrderLine from "./OrderLine.js"; import Person from "./Person.js"; import PhysicalCharacteristic from "./PhysicalCharacteristic.js"; import Price from "./Price.js"; import QuantitativeValue from "./QuantitativeValue.js"; +import SaleSession from "./SaleSession.js"; import SKOSConcept from "./SKOSConcept.js"; import SuppliedProduct from "./SuppliedProduct.js"; +import PlannedTransformation from "./PlannedTransformation.js"; +import PlannedConsumptionFlow from "./PlannedConsumptionFlow.js"; +import PlannedProductionFlow from "./PlannedProductionFlow.js"; + +// Generated Interfaces +import IAgent from "./IAgent.js"; import IAddress from "./IAddress.js"; -import IConnector from "./IConnector.js"; -import DatasetExt from "rdf-ext/lib/Dataset.js"; -import { DatasetCore } from '@rdfjs/types'; -import IAllergenDimension from "./IAllergenDimension.js"; -import IUnit from "./IUnit.js"; -import ICatalogItem from "./ICatalogItem.js"; -import IEnterprise from "./IEnterprise.js"; +import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; import ICatalog from "./ICatalog.js"; -import IOffer from "./IOffer.js"; -import ISuppliedProduct from "./ISuppliedProduct.js"; +import ICatalogItem from "./ICatalogItem.js"; import ICustomerCategory from "./ICustomerCategory.js"; -import INutrientDimension from "./INutrientDimension.js"; +import IEnterprise from "./IEnterprise.js"; import IPrice from "./IPrice.js"; -import IOrderLine from "./IOrderLine.js"; -import IAgent from "./IAgent.js"; -import ISaleSession from "./ISaleSession.js"; +import ISuppliedProduct from "./ISuppliedProduct.js"; +import INutrientCharacteristic from "./INutrientCharacteristic.js"; +import IOffer from "./IOffer.js"; import IOrder from "./IOrder.js"; -import IPhysicalDimension from "./IPhysicalDimension.js"; -import IPartOrigin from "./IPartOrigin.js"; -import INatureOrigin from "./INatureOrigin.js"; -import ICertification from "./ICertification.js"; -import IGeographicalOrigin from "./IGeographicalOrigin.js"; +import IOrderLine from "./IOrderLine.js"; +import IPerson from "./IPerson.js"; import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js"; -import INutrientCharacteristic from "./INutrientCharacteristic.js"; -import IAllergenCharacteristic from "./IAllergenCharacteristic.js"; -import IClaim from "./IClaim.js"; import IQuantity from "./IQuantity.js"; -import IProductType from "./IProductType.js"; -import IPerson from "./IPerson.js"; +import ISaleSession from "./ISaleSession.js"; +import ISKOSConcept from "./ISKOSConcept.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default class ConnectorFactory implements IConnectorFactory { @@ -66,7 +71,7 @@ export default class ConnectorFactory implements IConnectorFactory { return new Address({ connector: this.connector, ...parameters }); } - public createAllergenCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}): IAllergenCharacteristic { + public createAllergenCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, allergenDimension?: ISKOSConcept}): IAllergenCharacteristic { return new AllergenCharacteristic({ connector: this.connector, ...parameters }); } @@ -86,7 +91,7 @@ export default class ConnectorFactory implements IConnectorFactory { return new Enterprise({ connector: this.connector, ...parameters }); } - public createNutrientCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}): INutrientCharacteristic { + public createNutrientCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, nutrientDimension?: ISKOSConcept}): INutrientCharacteristic { return new NutrientCharacteristic({ connector: this.connector, ...parameters }); } @@ -106,15 +111,15 @@ export default class ConnectorFactory implements IConnectorFactory { return new Person({ connector: this.connector, ...parameters }); } - public createPhysicalCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, physicalDimension?: IPhysicalDimension}): IPhysicalCharacteristic { + public createPhysicalCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, physicalDimension?: ISKOSConcept }): IPhysicalCharacteristic { return new PhysicalCharacteristic({ connector: this.connector, ...parameters }); } - public createPrice(parameters: {other?: Semanticable, value?: number, vatRate?: number, unit?: IUnit}): IPrice { + public createPrice(parameters: {other?: Semanticable, value?: number, vatRate?: number, unit?: ISKOSConcept}): IPrice { return new Price({ connector: this.connector, ...parameters }); } - public createQuantity(parameters: {other?: Semanticable, unit?: IUnit, value?: number}): IQuantity { + public createQuantity(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number}): IQuantity { return new QuantitativeValue({ connector: this.connector, ...parameters }); } @@ -122,10 +127,22 @@ export default class ConnectorFactory implements IConnectorFactory { return new SaleSession({ connector: this.connector, ...parameters }); } - public createSuppliedProduct(parameters: {doNotStore?: boolean, 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}): ISuppliedProduct { + public createSuppliedProduct(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, name?: string, description?: string, productType?: ISKOSConcept, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: ISKOSConcept[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: ISKOSConcept, catalogItems?: ICatalogItem[], certifications?: ISKOSConcept[], natureOrigin?: ISKOSConcept[], partOrigin?: ISKOSConcept[], totalTheoreticalStock?: number}): ISuppliedProduct { return new SuppliedProduct({ connector: this.connector, ...parameters }); } + public createPlannedTransformation(parameters: {doNotStore?: boolean, semanticId?: string,other?: Semanticable, transformationType?: ISKOSConcept, consumptionFlow?: IPlannedConsumptionFlow, productionFlow?: IPlannedProductionFlow}): IPlannedTransformation { + return new PlannedTransformation({ connector: this.connector, ...parameters }); + } + + public createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: IDefinedProduct}): IPlannedConsumptionFlow { + return new PlannedConsumptionFlow({ connector: this.connector, ...parameters }); + } + + public createPlannedProductionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: ISuppliedProduct}): IPlannedProductionFlow { + return new PlannedProductionFlow({ connector: this.connector, ...parameters }); + } + public createFromType(type: string): Semanticable | undefined { let result: Semanticable | undefined = undefined; const prefix: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#"; @@ -190,6 +207,18 @@ export default class ConnectorFactory implements IConnectorFactory { result = this.createOrderLine({ semanticId: "" }); break; + case prefix + "AsPlannedTransformation": + result = this.createPlannedTransformation({ semanticId: "" }); + break; + + case prefix + "AsPlannedConsumptionFlow": + result = this.createPlannedConsumptionFlow({ semanticId: "" }); + break; + + case prefix + "AsPlannedProductionFlow": + result = this.createPlannedProductionFlow({ semanticId: "" }); + break; + case prefix + "SaleSession": result = this.createSaleSession({ semanticId: "" }); break; @@ -207,7 +236,7 @@ export default class ConnectorFactory implements IConnectorFactory { default: throw new Error(`Unknown type "${type}"`); } - + return result; } diff --git a/src/ConnectorImporterJsonldStream.ts b/src/ConnectorImporterJsonldStream.ts index c26724e..48e7201 100644 --- a/src/ConnectorImporterJsonldStream.ts +++ b/src/ConnectorImporterJsonldStream.ts @@ -1,9 +1,10 @@ import { JsonLdParser } from "jsonld-streaming-parser"; -import IConnectorImporter from "./IConnectorImporter"; import { Readable } from 'readable-stream'; import DatasetExt from "rdf-ext/lib/Dataset"; import datasetFactory from 'rdf-ext'; import QuadExt from "rdf-ext/lib/Quad"; + +import IConnectorImporter from "./IConnectorImporter"; import IConnectorImporterOptions from "./IConnectorImporterOptions"; export default class ConnectorImporterJsonldStream implements IConnectorImporter { @@ -108,7 +109,7 @@ export default class ConnectorImporterJsonldStream implements IConnectorImporter // If we are just importing one blank node, // we have to add it to the result set. if (datasets.length === 0 && blankNodes.length === 1) { - datasets.push(blankNodes[0]) + datasets.push(blankNodes[0]); } resolve(datasets); diff --git a/src/ConnectorStoreMap.ts b/src/ConnectorStoreMap.ts index 908e01e..95262de 100644 --- a/src/ConnectorStoreMap.ts +++ b/src/ConnectorStoreMap.ts @@ -1,4 +1,3 @@ - import { Semanticable } from "@virtual-assembly/semantizer" import IConnectorStore from "./IConnectorStore"; diff --git a/src/ContactableByAddress.ts b/src/ContactableByAddress.ts new file mode 100644 index 0000000..38bb11e --- /dev/null +++ b/src/ContactableByAddress.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IAddress from "./IAddress.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ContactableByAddress { + + /* Returns the different localizations of the subject. */getLocalizations(): Promise; + +} diff --git a/src/ContactableByEmail.ts b/src/ContactableByEmail.ts new file mode 100644 index 0000000..4a7b9bf --- /dev/null +++ b/src/ContactableByEmail.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ + + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ContactableByEmail { + + getEmails(): string[]; + +} diff --git a/src/ContactableByPhone.ts b/src/ContactableByPhone.ts new file mode 100644 index 0000000..5ef2619 --- /dev/null +++ b/src/ContactableByPhone.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPhoneNumber from "./IPhoneNumber.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ContactableByPhone { + + getPhoneNumbers(): Promise; + +} diff --git a/src/ContactableBySocialMedia.ts b/src/ContactableBySocialMedia.ts new file mode 100644 index 0000000..bc0e39a --- /dev/null +++ b/src/ContactableBySocialMedia.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISocialMedia from "./ISocialMedia.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ContactableBySocialMedia { + + getSocialMedias(): Promise; + +} diff --git a/src/ContactableByWebsite.ts b/src/ContactableByWebsite.ts new file mode 100644 index 0000000..926bf34 --- /dev/null +++ b/src/ContactableByWebsite.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ + + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ContactableByWebsite { + + getWebsites(): string[]; + +} diff --git a/src/CustomerCategory.ts b/src/CustomerCategory.ts index 474e031..44f778c 100644 --- a/src/CustomerCategory.ts +++ b/src/CustomerCategory.ts @@ -21,45 +21,61 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - import ICustomerCategory from "./ICustomerCategory.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const CUSTOMER_CATEGORY_SEM_TYPE: string = "dfc-b:CustomerCategory"; export default class CustomerCategory extends SemanticObject implements ICustomerCategory { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, description?: string, doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#CustomerCategory"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + description?: string, + doNotStore?: boolean, + }) { + + const type: string = CUSTOMER_CATEGORY_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.description) this.setDescription(parameters.description); + } + if (parameters.description) { + this.setDescription(parameters.description); + } + } public setDescription(description: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); + this.setSemanticPropertyLiteral("dfc-b:description", description); } - - public getDescription(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); + public getDescription(): string | undefined { + return this.getSemanticProperty("dfc-b:description"); } - - } diff --git a/src/DefinedProduct.ts b/src/DefinedProduct.ts index 80e583b..f9b046c 100644 --- a/src/DefinedProduct.ts +++ b/src/DefinedProduct.ts @@ -21,393 +21,413 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IProductType from "./IProductType.js" import ICatalogItem from "./ICatalogItem.js" -import IGeographicalOrigin from "./IGeographicalOrigin.js" -import ICertification from "./ICertification.js" -import INatureOrigin from "./INatureOrigin.js" -import IQuantity from "./IQuantity.js" +import IDefinedProduct from "./IDefinedProduct.js" +import ISKOSConcept from "./ISKOSConcept.js" import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" import INutrientCharacteristic from "./INutrientCharacteristic.js" -import IDefinedProduct from "./IDefinedProduct.js" +import IQuantity from "./IQuantity.js" import IAllergenCharacteristic from "./IAllergenCharacteristic.js" -import IClaim from "./IClaim.js" -import IPartOrigin from "./IPartOrigin.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; export default abstract class DefinedProduct extends SemanticObject implements IDefinedProduct { - + protected connector: IConnector; - 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! }); + protected constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + name?: string, + description?: string, + productType?: ISKOSConcept, + quantity?: IQuantity, + alcoholPercentage?: number, + lifetime?: string, + claims?: ISKOSConcept[], + usageOrStorageConditions?: string, + allergenCharacteristics?: IAllergenCharacteristic[], + nutrientCharacteristics?: INutrientCharacteristic[], + physicalCharacteristics?: IPhysicalCharacteristic[], + geographicalOrigin?: ISKOSConcept, + catalogItems?: ICatalogItem[], + certifications?: ISKOSConcept[], + natureOrigin?: ISKOSConcept[], + partOrigin?: ISKOSConcept[], + images?: string[], + doNotStore?: boolean, + }) { + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + } else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: parameters.semanticType!, + + }); + } this.connector = parameters.connector; - 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); - if (parameters.lifetime) this.setLifetime(parameters.lifetime); - if (parameters.claims) parameters.claims.forEach(e => this.addClaim(e)); - if (parameters.usageOrStorageConditions) this.setUsageOrStorageConditions(parameters.usageOrStorageConditions); - if (parameters.allergenCharacteristics) parameters.allergenCharacteristics.forEach(e => this.addAllergenCharacteristic(e)); - if (parameters.nutrientCharacteristics) parameters.nutrientCharacteristics.forEach(e => this.addNutrientCharacteristic(e)); - if (parameters.physicalCharacteristics) parameters.physicalCharacteristics.forEach(e => this.addPhysicalCharacteristic(e)); - if (parameters.geographicalOrigin) this.setGeographicalOrigin(parameters.geographicalOrigin); - if (parameters.catalogItems) parameters.catalogItems.forEach(e => this.addCatalogItem(e)); - if (parameters.certifications) parameters.certifications.forEach(e => this.addCertification(e)); - if (parameters.natureOrigin) parameters.natureOrigin.forEach(e => this.addNatureOrigin(e)); - if (parameters.partOrigin) parameters.partOrigin.forEach(e => this.addPartOrigin(e)); + if (parameters.name) { + this.setName(parameters.name); + } + + if (parameters.description) { + this.setDescription(parameters.description); + } + + if (parameters.productType) { + this.setProductType(parameters.productType); + } + + if (parameters.quantity) { + this.setQuantity(parameters.quantity); + } + + if (parameters.alcoholPercentage || parameters.alcoholPercentage === 0) { + this.setAlcoholPercentage(parameters.alcoholPercentage); + } + + if (parameters.lifetime) { + this.setLifetime(parameters.lifetime); + } + + if (parameters.claims) { + parameters.claims.forEach(e => this.addClaim(e)); + } + + if (parameters.usageOrStorageConditions) { + this.setUsageOrStorageConditions(parameters.usageOrStorageConditions); + } + + if (parameters.allergenCharacteristics) { + parameters.allergenCharacteristics.forEach(e => this.addAllergenCharacteristic(e)); + } + + if (parameters.nutrientCharacteristics) { + parameters.nutrientCharacteristics.forEach(e => this.addNutrientCharacteristic(e)); + } + + if (parameters.physicalCharacteristics) { + parameters.physicalCharacteristics.forEach(e => this.addPhysicalCharacteristic(e)); + } + + if (parameters.geographicalOrigin) { + this.setGeographicalOrigin(parameters.geographicalOrigin); + } + + if (parameters.catalogItems) { + parameters.catalogItems.forEach(e => this.addCatalogItem(e)); + } + + if (parameters.certifications) { + parameters.certifications.forEach(e => this.addCertification(e)); + } + + if (parameters.natureOrigin) { + parameters.natureOrigin.forEach(e => this.addNatureOrigin(e)); + } + + if (parameters.partOrigin) { + parameters.partOrigin.forEach(e => this.addPartOrigin(e)); + } + + if (parameters.images) { + parameters.images.forEach(e => this.addImage(e)); + } + } - public setName(name: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#name"; - this.setSemanticPropertyLiteral(property, name); + public setQuantity(quantity: IQuantity): void { + this.setSemanticPropertyAnonymous("dfc-b:hasQuantity", quantity); + } - - public getName(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#name"); + public setName(name: string): void { + this.setSemanticPropertyLiteral("dfc-b:name", name); } - - public async getPartOrigin(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPartOrigin"); - for await (const semanticId of properties) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + + public addPartOrigin(partOrigin: ISKOSConcept): void { + if (partOrigin.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPartOrigin", partOrigin); + } + else { + this.connector.store(partOrigin); + this.addSemanticPropertyReference("dfc-b:hasPartOrigin", partOrigin); } - return results; } - + + public getDescription(): string | undefined { + return this.getSemanticProperty("dfc-b:description"); + } + + public setAlcoholPercentage(alcoholPercentage: number): void { + this.setSemanticPropertyLiteral("dfc-b:alcoholPercentage", alcoholPercentage); + } public addNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientCharacteristic"; if (nutrientCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, nutrientCharacteristic); + this.addSemanticPropertyAnonymous("dfc-b:hasNutrientCharacteristic", nutrientCharacteristic); } else { this.connector.store(nutrientCharacteristic); - this.addSemanticPropertyReference(property, nutrientCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasNutrientCharacteristic", nutrientCharacteristic); } } - - public getUsageOrStorageConditions(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#usageOrStorageCondition"); + public removeCertification(certification: ISKOSConcept): void { + throw new Error("Not yet implemented."); } - - public async getGeographicalOrigin(options?: IGetterOptions): Promise - { - let result: IGeographicalOrigin | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasGeographicalOrigin"); - if (semanticId) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; - } - return result; - + public addImage(image: string): void { + this.addSemanticPropertyLiteral("dfc-b:image", image); } - - public getAlcoholPercentage(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#alcoholPercentage")); + public removeClaim(claim: ISKOSConcept): void { + throw new Error("Not yet implemented."); } - - public removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void { - throw new Error("Not yet implemented."); + public getUsageOrStorageConditions(): string | undefined { + return this.getSemanticProperty("dfc-b:usageOrStorageCondition"); } - - public async getNutrientCharacteristics(options?: IGetterOptions): Promise> - { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - });return results; + public removeNatureOrigin(natureOrigin: ISKOSConcept): void { + throw new Error("Not yet implemented."); } - - public async getPhysicalCharacteristics(options?: IGetterOptions): Promise> - { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - });return results; + public addCatalogItem(catalogItem: ICatalogItem): void { + if (catalogItem.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:referencedBy", catalogItem); + } + else { + this.connector.store(catalogItem); + this.addSemanticPropertyReference("dfc-b:referencedBy", catalogItem); + } } - - public removeNatureOrigin(natureOrigin: INatureOrigin): void { - throw new Error("Not yet implemented."); + public getAlcoholPercentage(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:alcoholPercentage")); } - - public async getNatureOrigin(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNatureOrigin"); + public async getNatureOrigin(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasNatureOrigin"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - - public addPartOrigin(partOrigin: IPartOrigin): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPartOrigin"; - if (partOrigin.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, partOrigin); - } - else { - this.connector.store(partOrigin); - this.addSemanticPropertyReference(property, partOrigin); - } - } - - public removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void { - throw new Error("Not yet implemented."); + public getLifetime(): string | undefined { + return this.getSemanticProperty("dfc-b:lifetime"); } - - public setLifetime(lifetime: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lifetime"; - this.setSemanticPropertyLiteral(property, lifetime); + public setUsageOrStorageConditions(usageOrStorageConditions: string): void { + this.setSemanticPropertyLiteral("dfc-b:usageOrStorageCondition", usageOrStorageConditions); } - - public setAlcoholPercentage(alcoholPercentage: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#alcoholPercentage"; - this.setSemanticPropertyLiteral(property, alcoholPercentage); + public getQuantity(): IQuantity | undefined { + const blankNode: any = this.getSemanticPropertyAnonymous("dfc-b:hasQuantity"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); } - - public addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalCharacteristic"; - if (physicalCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, physicalCharacteristic); - } - else { - this.connector.store(physicalCharacteristic); - this.addSemanticPropertyReference(property, physicalCharacteristic); - } + public setLifetime(lifetime: string): void { + this.setSemanticPropertyLiteral("dfc-b:lifetime", lifetime); } - - public async getAllergenCharacteristics(options?: IGetterOptions): Promise> - { - const results = new Array(); - const blankNodesId = this.getSemanticPropertyAnonymousAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenCharacteristic"); - blankNodesId.forEach(blankNodeId => { - const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); - results.push(blankNode); - });return results; + public getImages(): string[] { + return this.getSemanticPropertyAll("dfc-b:image"); } - - public getLifetime(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lifetime"); + public async getCatalogItems(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:referencedBy"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; } - - public addNatureOrigin(natureOrigin: INatureOrigin): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNatureOrigin"; + public addNatureOrigin(natureOrigin: ISKOSConcept): void { if (natureOrigin.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, natureOrigin); + this.addSemanticPropertyAnonymous("dfc-b:hasNatureOrigin", natureOrigin); } else { this.connector.store(natureOrigin); - this.addSemanticPropertyReference(property, natureOrigin); + this.addSemanticPropertyReference("dfc-b:hasNatureOrigin", natureOrigin); } } - - public addAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasAllergenCharacteristic"; - if (allergenCharacteristic.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, allergenCharacteristic); + public addClaim(claim: ISKOSConcept): void { + if (claim.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasClaim", claim); } else { - this.connector.store(allergenCharacteristic); - this.addSemanticPropertyReference(property, allergenCharacteristic); + this.connector.store(claim); + this.addSemanticPropertyReference("dfc-b:hasClaim", claim); } } - - public removePhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void { + public removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void { throw new Error("Not yet implemented."); } - - public removePartOrigin(partOrigin: IPartOrigin): void { - throw new Error("Not yet implemented."); + public setDescription(description: string): void { + this.setSemanticPropertyLiteral("dfc-b:description", description); } - - public setUsageOrStorageConditions(usageOrStorageConditions: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#usageOrStorageCondition"; - this.setSemanticPropertyLiteral(property, usageOrStorageConditions); + public addAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void { + if (allergenCharacteristic.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasAllergenCharacteristic", allergenCharacteristic); + } + else { + this.connector.store(allergenCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasAllergenCharacteristic", allergenCharacteristic); + } } - - public setGeographicalOrigin(geographicalOrigin: IGeographicalOrigin): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasGeographicalOrigin"; - this.setSemanticPropertyReference(property, geographicalOrigin); - this.connector.store(geographicalOrigin); - } - - public setDescription(description: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); + public removePhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void { + throw new Error("Not yet implemented."); } - - public getDescription(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); - } - - public removeCertification(certification: ICertification): void { - throw new Error("Not yet implemented."); + public async getProductType(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasType"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; } - - public async getCertifications(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCertification"); + public async getPartOrigin(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasPartOrigin"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public addCertification(certification: ICertification): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasCertification"; - if (certification.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, certification); + public addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void { + if (physicalCharacteristic.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPhysicalCharacteristic", physicalCharacteristic); } else { - this.connector.store(certification); - this.addSemanticPropertyReference(property, certification); + this.connector.store(physicalCharacteristic); + this.addSemanticPropertyReference("dfc-b:hasPhysicalCharacteristic", physicalCharacteristic); } } - - public async getQuantity(options?: IGetterOptions): Promise - { - const blankNode: any = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasQuantity"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); - } - - public async getProductType(options?: IGetterOptions): Promise - { - let result: IProductType | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasType"); - if (semanticId) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; - } - return result; + public setProductType(productType: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasType", productType); + this.connector.store(productType); } - - public removeClaim(claim: IClaim): void { - throw new Error("Not yet implemented."); + public getName(): string | undefined { + return this.getSemanticProperty("dfc-b:name"); } - - public async getClaims(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasClaim"); + public async getClaims(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasClaim"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public addClaim(claim: IClaim): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasClaim"; - if (claim.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, claim); + public async getNutrientCharacteristics(options?: IGetterOptions): Promise { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasNutrientCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; + } + + public async getPhysicalCharacteristics(options?: IGetterOptions): Promise { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasPhysicalCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; + } + + public addCertification(certification: ISKOSConcept): void { + if (certification.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasCertification", certification); } else { - this.connector.store(claim); - this.addSemanticPropertyReference(property, claim); + this.connector.store(certification); + this.addSemanticPropertyReference("dfc-b:hasCertification", certification); } } - - public setProductType(productType: IProductType): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasType"; - this.setSemanticPropertyReference(property, productType); - this.connector.store(productType); + public removeImage(image: string): void { + throw new Error("Not yet implemented."); } - - public setQuantity(quantity: IQuantity): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasQuantity"; - this.setSemanticPropertyAnonymous(property, quantity); + public removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void { + throw new Error("Not yet implemented."); } - - public addCatalogItem(catalogItem: ICatalogItem): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#referencedBy"; - if (catalogItem.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalogItem); - } - else { - this.connector.store(catalogItem); - this.addSemanticPropertyReference(property, catalogItem); + + public removePartOrigin(partOrigin: ISKOSConcept): void { + throw new Error("Not yet implemented."); + } + + public async getGeographicalOrigin(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasGeographicalOrigin"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; } + return result; } - - public async getCatalogItems(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#referencedBy"); + public async getCertifications(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasCertification"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } 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 async getAllergenCharacteristics(options?: IGetterOptions): Promise { + const results = new Array(); + const blankNodesId = this.getSemanticPropertyAnonymousAll("dfc-b:hasAllergenCharacteristic"); + blankNodesId.forEach(blankNodeId => { + const blankNode = this.connector.getDefaultFactory().createFromRdfDataset(blankNodeId); + results.push(blankNode); + }); + return results; } - public getImages(): string[] { - return this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#image"); + public setGeographicalOrigin(geographicalOrigin: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasGeographicalOrigin", geographicalOrigin); + + this.connector.store(geographicalOrigin); } - - } diff --git a/src/Describable.ts b/src/Describable.ts index 23963cb..722da1b 100644 --- a/src/Describable.ts +++ b/src/Describable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Describable { - getDescription(): string - ; + getDescription(): string | undefined; + setDescription(description: string): void; } diff --git a/src/Dialable.ts b/src/Dialable.ts index 8533361..187fece 100644 --- a/src/Dialable.ts +++ b/src/Dialable.ts @@ -1,14 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Dialable { - getNumber(): number - ; - getCountryCode(): number - ; - setNumber(number: number): void; + getNumber(): string | undefined; + + getCountryCode(): number | undefined; + + setNumber(number: string): void; + setCountryCode(countryCode: number): void; } diff --git a/src/Ellapsable.ts b/src/Ellapsable.ts index 2ce5903..ef3fb5c 100644 --- a/src/Ellapsable.ts +++ b/src/Ellapsable.ts @@ -1,14 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Ellapsable { - getBeginDate(): string - ; - getEndDate(): string - ; + getBeginDate(): string | undefined; + + getEndDate(): string | undefined; + setBeginDate(beginDate: string): void; + setEndDate(endDate: string): void; } diff --git a/src/EmailOwner.ts b/src/EmailOwner.ts new file mode 100644 index 0000000..9ff7516 --- /dev/null +++ b/src/EmailOwner.ts @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ContactableByEmail from "./ContactableByEmail.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface EmailOwner extends ContactableByEmail { + + addEmailAddress(emailAddress: string): void; + + removeEmailAddress(emailAddress: string): void; + +} diff --git a/src/Enterprise.ts b/src/Enterprise.ts index f5ba218..ada6fe8 100644 --- a/src/Enterprise.ts +++ b/src/Enterprise.ts @@ -21,205 +21,260 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import ISuppliedProduct from "./ISuppliedProduct.js" import ICatalogItem from "./ICatalogItem.js" -import IEnterprise from "./IEnterprise.js" -import ICatalog from "./ICatalog.js" -import Agent from "./Agent.js" +import ManagedByMainContact from "./ManagedByMainContact.js" import ICustomerCategory from "./ICustomerCategory.js" +import ISuppliedProduct from "./ISuppliedProduct.js" +import IAddress from "./IAddress.js" +import ProductSupplier from "./ProductSupplier.js" +import ICatalog from "./ICatalog.js" import Onboardable from "./Onboardable.js" +import IEnterprise from "./IEnterprise.js" import ITechnicalProduct from "./ITechnicalProduct.js" -import ProductSupplier from "./ProductSupplier.js" -import IAddress from "./IAddress.js" +import IPerson from "./IPerson.js" +import Agent from "./Agent.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const ENTERPRISE_SEM_TYPE: string = "dfc-b:Enterprise"; -export default class Enterprise extends Agent implements Onboardable, ProductSupplier, IEnterprise { - +export default class Enterprise extends Agent implements ProductSupplier, Onboardable, IEnterprise, ManagedByMainContact { - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, localizations?: IAddress[], description?: string, vatNumber?: string, customerCategories?: ICustomerCategory[], catalogs?: ICatalog[], catalogItems?: ICatalogItem[], suppliedProducts?: ISuppliedProduct[], technicalProducts?: ITechnicalProduct[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Enterprise"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + name?: string, + localizations?: IAddress[], + description?: string, + vatNumber?: string, + customerCategories?: ICustomerCategory[], + catalogs?: ICatalog[], + catalogItems?: ICatalogItem[], + suppliedProducts?: ISuppliedProduct[], + technicalProducts?: ITechnicalProduct[], + mainContact?: IPerson, + logo?: string, + doNotStore?: boolean, + }) { + + const type: string = ENTERPRISE_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + localizations: parameters.localizations, + logo: parameters.logo + }); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, localizations: parameters.localizations }); + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.name) { + this.setName(parameters.name); + } + if (parameters.description) { + this.setDescription(parameters.description); + } - if (!parameters.doNotStore) - this.connector.store(this); - if (parameters.description) this.setDescription(parameters.description); - if (parameters.vatNumber) this.setVatNumber(parameters.vatNumber); - if (parameters.customerCategories) parameters.customerCategories.forEach(e => this.addCustomerCategory(e)); - if (parameters.catalogs) parameters.catalogs.forEach(e => this.maintainCatalog(e)); - if (parameters.catalogItems) parameters.catalogItems.forEach(e => this.manageCatalogItem(e)); - if (parameters.suppliedProducts) parameters.suppliedProducts.forEach(e => this.supplyProduct(e)); - if (parameters.technicalProducts) parameters.technicalProducts.forEach(e => this.proposeTechnicalProducts(e)); - } - - public manageCatalogItem(catalogItem: ICatalogItem): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#manages"; - if (catalogItem.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalogItem); + if (parameters.vatNumber) { + this.setVatNumber(parameters.vatNumber); } - else { - this.connector.store(catalogItem); - this.addSemanticPropertyReference(property, catalogItem); + + if (parameters.customerCategories) { + parameters.customerCategories.forEach(e => this.addCustomerCategory(e)); } + + if (parameters.catalogs) { + parameters.catalogs.forEach(e => this.maintainCatalog(e)); + } + + if (parameters.catalogItems) { + parameters.catalogItems.forEach(e => this.manageCatalogItem(e)); + } + + if (parameters.suppliedProducts) { + parameters.suppliedProducts.forEach(e => this.supplyProduct(e)); + } + + if (parameters.technicalProducts) { + parameters.technicalProducts.forEach(e => this.proposeTechnicalProducts(e)); + } + + if (parameters.mainContact) { + this.setMainContact(parameters.mainContact); + } + } - - public async getManagedCatalogItems(options?: IGetterOptions): Promise> - { + public async getManagedCatalogItems(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#manages"); + const properties = this.getSemanticPropertyAll("dfc-b:manages"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public unmanageCatalogItem(catalogItem: ICatalogItem): void { + public addCustomerCategory(customerCategory: ICustomerCategory): void { + if (customerCategory.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:defines", customerCategory); + } + else { + this.connector.store(customerCategory); + this.addSemanticPropertyReference("dfc-b:defines", customerCategory); + } + } + + public unmaintainCatalog(catalog: ICatalog): void { throw new Error("Not yet implemented."); } - + + public setVatNumber(vatNumber: string): void { + this.setSemanticPropertyLiteral("dfc-b:VATnumber", vatNumber); + } + + public setDescription(description: string): void { + this.setSemanticPropertyLiteral("dfc-b:hasDescription", description); + } + + public setName(name: string): void { + this.setSemanticPropertyLiteral("dfc-b:name", name); + } + public maintainCatalog(catalog: ICatalog): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintains"; if (catalog.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, catalog); + this.addSemanticPropertyAnonymous("dfc-b:maintains", catalog); } else { this.connector.store(catalog); - this.addSemanticPropertyReference(property, catalog); - } - } - - - public async getMaintainedCatalogs(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#maintains"); - for await (const semanticId of properties) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + this.addSemanticPropertyReference("dfc-b:maintains", catalog); } - return results; } - - public unmaintainCatalog(catalog: ICatalog): void { - throw new Error("Not yet implemented."); + public getDescription(): string | undefined { + return this.getSemanticProperty("dfc-b:hasDescription"); } - - public unsupplyProduct(suppliedProduct: ISuppliedProduct): void { - throw new Error("Not yet implemented."); - } - public supplyProduct(suppliedProduct: ISuppliedProduct): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#supplies"; if (suppliedProduct.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, suppliedProduct); + this.addSemanticPropertyAnonymous("dfc-b:supplies", suppliedProduct); } else { this.connector.store(suppliedProduct); - this.addSemanticPropertyReference(property, suppliedProduct); + this.addSemanticPropertyReference("dfc-b:supplies", suppliedProduct); } } - - public async getSuppliedProducts(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#supplies"); + public getName(): string | undefined { + return this.getSemanticProperty("dfc-b:name"); + } + + public async getProposedTechnicalProducts(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:proposes"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - + + public unmanageCatalogItem(catalogItem: ICatalogItem): void { + throw new Error("Not yet implemented."); + } + public unproposeTechnicalProducts(technicalProducts: ITechnicalProduct): void { throw new Error("Not yet implemented."); } - - public proposeTechnicalProducts(technicalProducts: ITechnicalProduct): void { - const property: string = ""; - if (technicalProducts.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, technicalProducts); - } - else { - this.connector.store(technicalProducts); - this.addSemanticPropertyReference(property, technicalProducts); + public async getMaintainedCatalogs(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:maintains"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); } + return results; } - - public async getProposedTechnicalProducts(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll(""); + public setMainContact(mainContact: IPerson): void { + this.setSemanticPropertyReference("dfc-b:hasMainContact", mainContact); + + this.connector.store(mainContact); + } + + public unsupplyProduct(suppliedProduct: ISuppliedProduct): void { + throw new Error("Not yet implemented."); + } + + public async getCustomerCategories(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:defines"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public setDescription(description: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasDescription"; - this.setSemanticPropertyLiteral(property, description); - } - - public getDescription(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasDescription"); + public async getMainContact(options?: IGetterOptions): Promise { + let result: IPerson | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasMainContact"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; } - - public setVatNumber(vatNumber: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATnumber"; - this.setSemanticPropertyLiteral(property, vatNumber); + + public proposeTechnicalProducts(technicalProducts: ITechnicalProduct): void { + if (technicalProducts.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:proposes", technicalProducts); + } + else { + this.connector.store(technicalProducts); + this.addSemanticPropertyReference("dfc-b:proposes", technicalProducts); + } } - - public getVatNumber(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATnumber"); + public getVatNumber(): string | undefined { + return this.getSemanticProperty("dfc-b:VATnumber"); } - - public async getCustomerCategories(options?: IGetterOptions): Promise> - { - const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#defines"); + + public async getSuppliedProducts(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:supplies"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public addCustomerCategory(customerCategory: ICustomerCategory): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#defines"; - if (customerCategory.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, customerCategory); + public manageCatalogItem(catalogItem: ICatalogItem): void { + if (catalogItem.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:manages", catalogItem); } else { - this.connector.store(customerCategory); - this.addSemanticPropertyReference(property, customerCategory); + this.connector.store(catalogItem); + this.addSemanticPropertyReference("dfc-b:manages", catalogItem); } } - - } diff --git a/src/Exhibitable.ts b/src/Exhibitable.ts index e13af06..baacc6b 100644 --- a/src/Exhibitable.ts +++ b/src/Exhibitable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Exhibitable { - getImage(): string - ; + getImage(): string | undefined; + setImage(image: string): void; } diff --git a/src/Flow.ts b/src/Flow.ts new file mode 100644 index 0000000..000553b --- /dev/null +++ b/src/Flow.ts @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IFlow from "./IFlow.js" +import IQuantity from "./IQuantity.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +export default abstract class Flow extends SemanticObject implements IFlow { + + protected connector: IConnector; + + protected constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + quantity?: IQuantity, + doNotStore?: boolean, + }) { + + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + } else { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: parameters.semanticType!, + + }); + } + this.connector = parameters.connector; + + + if (parameters.quantity) { + this.setQuantity(parameters.quantity); + } + + } + + public setQuantity(quantity: IQuantity): void { + this.setSemanticPropertyAnonymous("dfc-b:hasQuantity", quantity); + + } + + public getQuantity(): IQuantity | undefined { + const blankNode: any = this.getSemanticPropertyAnonymous("dfc-b:hasQuantity"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + } +} diff --git a/src/Geolocalizable.ts b/src/Geolocalizable.ts index ff2f585..2ceedb4 100644 --- a/src/Geolocalizable.ts +++ b/src/Geolocalizable.ts @@ -1,14 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Geolocalizable { - getLatitude(): number - ; - getLongitude(): number - ; + getLatitude(): number | undefined; + + getLongitude(): number | undefined; + setLatitude(latitude: number): void; + setLongitude(longitude: number): void; } diff --git a/src/Groupable.ts b/src/Groupable.ts index c38bbca..ba868af 100644 --- a/src/Groupable.ts +++ b/src/Groupable.ts @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" diff --git a/src/IAddress.ts b/src/IAddress.ts index a3c97b4..50270cf 100644 --- a/src/IAddress.ts +++ b/src/IAddress.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Localizable from "./Localizable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IAddress extends Semanticable, Localizable{ +export default interface IAddress extends Semanticable, Localizable { } diff --git a/src/IAgent.ts b/src/IAgent.ts index 6549492..c7c51b5 100644 --- a/src/IAgent.ts +++ b/src/IAgent.ts @@ -1,8 +1,38 @@ -import Identifiable from "./Identifiable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import WebsiteOwner from "./WebsiteOwner.js" +import PhoneNumberOwner from "./PhoneNumberOwner.js" +import SocialMediaOwner from "./SocialMediaOwner.js" +import AddressOwner from "./AddressOwner.js" +import EmailOwner from "./EmailOwner.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IAgent extends Semanticable, Identifiable{ +export default interface IAgent extends Semanticable, PhoneNumberOwner, SocialMediaOwner, EmailOwner, AddressOwner, WebsiteOwner { + getLogo(): string | undefined; + + setLogo(logo: string): void; } diff --git a/src/IAllergenCharacteristic.ts b/src/IAllergenCharacteristic.ts index fd7a999..f5fb802 100644 --- a/src/IAllergenCharacteristic.ts +++ b/src/IAllergenCharacteristic.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICharacteristic from "./ICharacteristic.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IAllergenCharacteristic extends ICharacteristic{ +export default interface IAllergenCharacteristic extends ICharacteristic { } diff --git a/src/ICatalog.ts b/src/ICatalog.ts index 0cd5f5f..cc779fb 100644 --- a/src/ICatalog.ts +++ b/src/ICatalog.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Browsable from "./Browsable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ICatalog extends Semanticable, Browsable{ +export default interface ICatalog extends Semanticable, Browsable { } diff --git a/src/ICatalogItem.ts b/src/ICatalogItem.ts index 1a1df08..fab1613 100644 --- a/src/ICatalogItem.ts +++ b/src/ICatalogItem.ts @@ -1,13 +1,36 @@ -import Catalogable from "./Catalogable.js" -import Offerable from "./Offerable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Stockable from "./Stockable.js" +import Offerable from "./Offerable.js" +import Catalogable from "./Catalogable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ICatalogItem extends Semanticable, Catalogable, Stockable, Offerable{ +export default interface ICatalogItem extends Semanticable, Catalogable, Offerable, Stockable { + + getSku(): string | undefined; - getSku(): string - ; setSku(sku: string): void; } diff --git a/src/ICharacteristic.ts b/src/ICharacteristic.ts index b52eb92..48f373d 100644 --- a/src/ICharacteristic.ts +++ b/src/ICharacteristic.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Measurable from "./Measurable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ICharacteristic extends Semanticable, Measurable{ +export default interface ICharacteristic extends Semanticable, Measurable { } diff --git a/src/IConnector.ts b/src/IConnector.ts index 1f24dd6..7d49779 100644 --- a/src/IConnector.ts +++ b/src/IConnector.ts @@ -1,7 +1,15 @@ -import { Semanticable } from "@virtual-assembly/semantizer"; +// External +import { ISemantizer, Semanticable } from "@virtual-assembly/semantizer"; + +// Static import IConnectorFactory from "./IConnectorFactory.js"; import IGetterOptions from "./IGetterOptions.js"; +import IConnectorExportOptions from "./IConnectorExportOptions.js"; +import IConnectorImportOptions from "./IConnectorImportOptions.js"; + +// Generated Code import IAddress from "./IAddress"; +import IAgent from "./IAgent"; import IAllergenCharacteristic from "./IAllergenCharacteristic"; import ICatalog from "./ICatalog"; import ICatalogItem from "./ICatalogItem"; @@ -16,43 +24,40 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic"; import IPrice from "./IPrice"; import IQuantity from "./IQuantity"; import ISaleSession from "./ISaleSession"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct"; -import IUnit from "./IUnit"; -import IAllergenDimension from "./IAllergenDimension"; -import INutrientDimension from "./INutrientDimension"; -import IAgent from "./IAgent"; -import IPhysicalDimension from "./IPhysicalDimension"; -import IPartOrigin from "./IPartOrigin"; -import INatureOrigin from "./INatureOrigin"; -import ICertification from "./ICertification"; -import IGeographicalOrigin from "./IGeographicalOrigin"; -import IClaim from "./IClaim"; -import IProductType from "./IProductType"; -import IConnectorExportOptions from "./IConnectorExportOptions.js"; -import IConnectorImportOptions from "./IConnectorImportOptions.js"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js"; +import IPlannedProductionFlow from "./IPlannedProductionFlow.js"; +import IPlannedTransformation from "./IPlannedTransformation.js"; +import IDefinedProduct from "./IDefinedProduct.js"; export default interface IConnector { - createAddress(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, street?: string, postalCode?: string, city?: string, country?: string}): IAddress; - createAllergenCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}): IAllergenCharacteristic; - createCatalog(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, maintainers?: IEnterprise[], items?: ICatalogItem[]}): ICatalog; - createCatalogItem(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, product?: ISuppliedProduct, sku?: string, stockLimitation?: number, offers?: IOffer[], catalogs?: ICatalog[]}): ICatalogItem; - createCustomerCategory(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, description?: string}): ICustomerCategory; - createEnterprise(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, localizations?: IAddress[], description?: string, vatNumber?: string, customerCategories?: ICustomerCategory[], catalogs?: ICatalog[], catalogItems?: ICatalogItem[], suppliedProducts?: ISuppliedProduct[]}): IEnterprise; - createNutrientCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}): INutrientCharacteristic; - createOffer(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, offeredItem?: ICatalogItem, offeredTo?: ICustomerCategory, price?: IPrice, stockLimitation?: number}): IOffer; - createOrder(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, number?: string, date?: string, saleSession?: ISaleSession, client?: IAgent, lines?: IOrderLine[]}): IOrder; - createOrderLine(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: number, price?: IPrice, offer?: IOffer, order?: IOrder}): IOrderLine; - createPerson(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, firstName?: string, lastName?: string, localizations?: IAddress[], organizations?: IEnterprise[]}): IPerson; - createPhysicalCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, physicalDimension?: IPhysicalDimension}): IPhysicalCharacteristic; - createPrice(parameters: {other?: Semanticable, value?: number, vatRate?: number, unit?: IUnit}): IPrice; - createQuantity(parameters: {other?: Semanticable, unit?: IUnit, value?: number}): IQuantity; - createSaleSession(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, beginDate?: string, endDate?: string, quantity?: number, offers?: IOffer[]}): ISaleSession; - createSuppliedProduct(parameters: {doNotStore?: boolean, 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}): ISuppliedProduct; + createAddress(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, street?: string, postalCode?: string, city?: string, country?: string }): IAddress; + createAllergenCharacteristic(parameters: { other?: Semanticable, unit?: ISKOSConcept, value?: number, allergenDimension?: ISKOSConcept }): IAllergenCharacteristic; + createCatalog(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, maintainers?: IEnterprise[], items?: ICatalogItem[] }): ICatalog; + createCatalogItem(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, product?: ISuppliedProduct, sku?: string, stockLimitation?: number, offers?: IOffer[], catalogs?: ICatalog[] }): ICatalogItem; + createCustomerCategory(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, description?: string }): ICustomerCategory; + createEnterprise(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, localizations?: IAddress[], description?: string, vatNumber?: string, customerCategories?: ICustomerCategory[], catalogs?: ICatalog[], catalogItems?: ICatalogItem[], suppliedProducts?: ISuppliedProduct[] }): IEnterprise; + createNutrientCharacteristic(parameters: { other?: Semanticable, unit?: ISKOSConcept, value?: number, nutrientDimension?: ISKOSConcept }): INutrientCharacteristic; + createOffer(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, offeredItem?: ICatalogItem, offeredTo?: ICustomerCategory, price?: IPrice, stockLimitation?: number }): IOffer; + createOrder(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, number?: string, date?: string, saleSession?: ISaleSession, client?: IAgent, lines?: IOrderLine[] }): IOrder; + createOrderLine(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: number, price?: IPrice, offer?: IOffer, order?: IOrder }): IOrderLine; + createPerson(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, firstName?: string, lastName?: string, localizations?: IAddress[], organizations?: IEnterprise[] }): IPerson; + createPhysicalCharacteristic(parameters: { other?: Semanticable, unit?: ISKOSConcept, value?: number, physicalDimension?: ISKOSConcept }): IPhysicalCharacteristic; + createPrice(parameters: { other?: Semanticable, value?: number, vatRate?: number, unit?: ISKOSConcept }): IPrice; + createQuantity(parameters: { other?: Semanticable, unit?: ISKOSConcept, value?: number }): IQuantity; + createSaleSession(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, beginDate?: string, endDate?: string, quantity?: number, offers?: IOffer[] }): ISaleSession; + createSuppliedProduct(parameters: { doNotStore?: boolean, semanticId?: string, other?: Semanticable, name?: string, description?: string, productType?: ISKOSConcept, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: ISKOSConcept[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: ISKOSConcept, catalogItems?: ICatalogItem[], certifications?: ISKOSConcept[], natureOrigin?: ISKOSConcept[], partOrigin?: ISKOSConcept[], totalTheoreticalStock?: number }): ISuppliedProduct; + createPlannedTransformation(parameters: {doNotStore?: boolean, semanticId?: string,other?: Semanticable, transformationType?: ISKOSConcept, consumptionFlow?: IPlannedConsumptionFlow, productionFlow?: IPlannedProductionFlow}): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: IDefinedProduct}): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: ISuppliedProduct}): IPlannedProductionFlow; export(objects: Array, options?: IConnectorExportOptions): Promise; fetch(semanticObjectId: string, options?: IGetterOptions): Promise; + getSemantizer(): ISemantizer; + // TODO: remove getDefaultFactory(): IConnectorFactory; diff --git a/src/IConnectorFactory.ts b/src/IConnectorFactory.ts index 766b854..1c333c8 100644 --- a/src/IConnectorFactory.ts +++ b/src/IConnectorFactory.ts @@ -1,7 +1,11 @@ +// External import { Semanticable } from "@virtual-assembly/semantizer"; import DatasetExt from "rdf-ext/lib/Dataset"; import { DatasetCore } from '@rdfjs/types'; + +// Generated Interfaces import IAddress from "./IAddress"; +import IAgent from "./IAgent"; import IAllergenCharacteristic from "./IAllergenCharacteristic"; import ICatalog from "./ICatalog"; import ICatalogItem from "./ICatalogItem"; @@ -16,18 +20,12 @@ import IPhysicalCharacteristic from "./IPhysicalCharacteristic"; import IPrice from "./IPrice"; import IQuantity from "./IQuantity"; import ISaleSession from "./ISaleSession"; +import ISKOSConcept from "./ISKOSConcept"; import ISuppliedProduct from "./ISuppliedProduct"; -import IUnit from "./IUnit"; -import IAllergenDimension from "./IAllergenDimension"; -import INutrientDimension from "./INutrientDimension"; -import IAgent from "./IAgent"; -import IPhysicalDimension from "./IPhysicalDimension"; -import IPartOrigin from "./IPartOrigin"; -import INatureOrigin from "./INatureOrigin"; -import ICertification from "./ICertification"; -import IGeographicalOrigin from "./IGeographicalOrigin"; -import IClaim from "./IClaim"; -import IProductType from "./IProductType"; +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow"; +import IPlannedProductionFlow from "./IPlannedProductionFlow"; +import IPlannedTransformation from "./IPlannedTransformation"; +import IDefinedProduct from "./IDefinedProduct"; export default interface IConnectorFactory { @@ -35,20 +33,23 @@ export default interface IConnectorFactory { createFromRdfDatasetCore(dataset: DatasetCore): Semanticable | undefined; createFromType(type: string): Semanticable | undefined; createAddress(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, street?: string, postalCode?: string, city?: string, country?: string}): IAddress; - createAllergenCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, allergenDimension?: IAllergenDimension}): IAllergenCharacteristic; + createAllergenCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, allergenDimension?: ISKOSConcept}): IAllergenCharacteristic; createCatalog(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, maintainers?: IEnterprise[], items?: ICatalogItem[]}): ICatalog; createCatalogItem(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, product?: ISuppliedProduct, sku?: string, stockLimitation?: number, offers?: IOffer[], catalogs?: ICatalog[]}): ICatalogItem; createCustomerCategory(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, description?: string}): ICustomerCategory; createEnterprise(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, localizations?: IAddress[], description?: string, vatNumber?: string, customerCategories?: ICustomerCategory[], catalogs?: ICatalog[], catalogItems?: ICatalogItem[], suppliedProducts?: ISuppliedProduct[]}): IEnterprise; - createNutrientCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}): INutrientCharacteristic; + createNutrientCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, nutrientDimension?: ISKOSConcept}): INutrientCharacteristic; createOffer(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, offeredItem?: ICatalogItem, offeredTo?: ICustomerCategory, price?: IPrice, stockLimitation?: number}): IOffer; createOrder(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, number?: string, date?: string, saleSession?: ISaleSession, client?: IAgent, lines?: IOrderLine[]}): IOrder; createOrderLine(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: number, price?: IPrice, offer?: IOffer, order?: IOrder}): IOrderLine; createPerson(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, firstName?: string, lastName?: string, localizations?: IAddress[], organizations?: IEnterprise[]}): IPerson; - createPhysicalCharacteristic(parameters: {other?: Semanticable, unit?: IUnit, value?: number, physicalDimension?: IPhysicalDimension}): IPhysicalCharacteristic; - createPrice(parameters: {other?: Semanticable, value?: number, vatRate?: number, unit?: IUnit}): IPrice; - createQuantity(parameters: {other?: Semanticable, unit?: IUnit, value?: number}): IQuantity; + createPhysicalCharacteristic(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number, physicalDimension?: ISKOSConcept}): IPhysicalCharacteristic; + createPrice(parameters: {other?: Semanticable, value?: number, vatRate?: number, unit?: ISKOSConcept}): IPrice; + createQuantity(parameters: {other?: Semanticable, unit?: ISKOSConcept, value?: number}): IQuantity; createSaleSession(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, beginDate?: string, endDate?: string, quantity?: number, offers?: IOffer[]}): ISaleSession; - createSuppliedProduct(parameters: {doNotStore?: boolean, 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}): ISuppliedProduct; + createSuppliedProduct(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, name?: string, description?: string, productType?: ISKOSConcept, quantity?: IQuantity, alcoholPercentage?: number, lifetime?: string, claims?: ISKOSConcept[], usageOrStorageConditions?: string, allergenCharacteristics?: IAllergenCharacteristic[], nutrientCharacteristics?: INutrientCharacteristic[], physicalCharacteristics?: IPhysicalCharacteristic[], geographicalOrigin?: ISKOSConcept, catalogItems?: ICatalogItem[], certifications?: ISKOSConcept[], natureOrigin?: ISKOSConcept[], partOrigin?: ISKOSConcept[], totalTheoreticalStock?: number}): ISuppliedProduct; + createPlannedTransformation(parameters: {doNotStore?: boolean, semanticId?: string,other?: Semanticable, transformationType?: ISKOSConcept, consumptionFlow?: IPlannedConsumptionFlow, productionFlow?: IPlannedProductionFlow}): IPlannedTransformation; + createPlannedConsumptionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: IDefinedProduct}): IPlannedConsumptionFlow; + createPlannedProductionFlow(parameters: {doNotStore?: boolean, semanticId?: string, other?: Semanticable, quantity?: IQuantity, transformation?: IPlannedTransformation, product?: ISuppliedProduct}): IPlannedProductionFlow; } \ No newline at end of file diff --git a/src/ICustomerCategory.ts b/src/ICustomerCategory.ts index 5c258de..942446e 100644 --- a/src/ICustomerCategory.ts +++ b/src/ICustomerCategory.ts @@ -1,9 +1,32 @@ -import Describable from "./Describable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Groupable from "./Groupable.js" +import Describable from "./Describable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ICustomerCategory extends Semanticable, Describable, Groupable{ +export default interface ICustomerCategory extends Semanticable, Describable, Groupable { } diff --git a/src/IDefinedProduct.ts b/src/IDefinedProduct.ts index 537a6c6..fc3b415 100644 --- a/src/IDefinedProduct.ts +++ b/src/IDefinedProduct.ts @@ -1,28 +1,56 @@ -import IProductType from "./IProductType.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Certifiable from "./Certifiable.js" -import Manufacturable from "./Manufacturable.js" +import ISKOSConcept from "./ISKOSConcept.js" import Proposable from "./Proposable.js" -import Nameable from "./Nameable.js" import Describable from "./Describable.js" +import Nameable from "./Nameable.js" import IQuantity from "./IQuantity.js" -import IClaim from "./IClaim.js" +import Manufacturable from "./Manufacturable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IDefinedProduct extends Semanticable, Proposable, Describable, Certifiable, Manufacturable, Nameable{ +export default interface IDefinedProduct extends Semanticable, Describable, Certifiable, Proposable, Nameable, Manufacturable { + + addClaim(claim: ISKOSConcept): void; + + getQuantity(): IQuantity | undefined; - addClaim(claim: IClaim): void; - getQuantity(): Promise - ; setQuantity(quantity: IQuantity): void; - getClaims(): Promise> - ; - getProductType(): Promise - ; - setProductType(productType: IProductType): void; - removeClaim(claim: IClaim): void; - - addImage(url: string): void; + + getClaims(): Promise; + + getProductType(): Promise; + + setProductType(productType: ISKOSConcept): void; + + removeClaim(claim: ISKOSConcept): void; + + addImage(image: string): void; + + removeImage(image: string): void; + getImages(): string[]; } diff --git a/src/IEnterprise.ts b/src/IEnterprise.ts index aec40ea..0a196d2 100644 --- a/src/IEnterprise.ts +++ b/src/IEnterprise.ts @@ -1,14 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import TechnicalProductProposer from "./TechnicalProductProposer.js" +import MainContactOwner from "./MainContactOwner.js" import ProductSupplier from "./ProductSupplier.js" +import CatalogMaintainer from "./CatalogMaintainer.js" import CatalogItemManager from "./CatalogItemManager.js" -import Onboardable from "./Onboardable.js" import Taxable from "./Taxable.js" -import CatalogMaintainer from "./CatalogMaintainer.js" import Describable from "./Describable.js" -import TechnicalProductProposer from "./TechnicalProductProposer.js" +import Onboardable from "./Onboardable.js" +import Nameable from "./Nameable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IEnterprise extends Semanticable, ProductSupplier, Taxable, TechnicalProductProposer, CatalogMaintainer, CatalogItemManager, Describable, Onboardable{ +export default interface IEnterprise extends Semanticable, MainContactOwner, CatalogItemManager, Onboardable, Describable, ProductSupplier, Nameable, TechnicalProductProposer, CatalogMaintainer, Taxable { } diff --git a/src/IFlow.ts b/src/IFlow.ts new file mode 100644 index 0000000..99786c1 --- /dev/null +++ b/src/IFlow.ts @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IQuantity from "./IQuantity.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IFlow extends Semanticable{ + + getQuantity(): IQuantity | undefined; + + setQuantity(quantity: IQuantity): void; + +} diff --git a/src/INutrientCharacteristic.ts b/src/INutrientCharacteristic.ts index b48302e..df4a8d7 100644 --- a/src/INutrientCharacteristic.ts +++ b/src/INutrientCharacteristic.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICharacteristic from "./ICharacteristic.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface INutrientCharacteristic extends ICharacteristic{ +export default interface INutrientCharacteristic extends ICharacteristic { } diff --git a/src/IOffer.ts b/src/IOffer.ts index b21af13..ba16f7a 100644 --- a/src/IOffer.ts +++ b/src/IOffer.ts @@ -1,10 +1,33 @@ -import Stockable from "./Stockable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Marketable from "./Marketable.js" +import Stockable from "./Stockable.js" import Payable from "./Payable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IOffer extends Semanticable, Payable, Stockable, Marketable{ +export default interface IOffer extends Semanticable, Marketable, Payable, Stockable { } diff --git a/src/IOrder.ts b/src/IOrder.ts index aa79940..d977268 100644 --- a/src/IOrder.ts +++ b/src/IOrder.ts @@ -1,25 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IOrderLine from "./IOrderLine.js" +import ISKOSConcept from "./ISKOSConcept.js" import ISaleSession from "./ISaleSession.js" import IAgent from "./IAgent.js" -import IOrderLine from "./IOrderLine.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface IOrder extends Semanticable{ - getNumber(): string - ; - getDate(): string - ; - getSaleSession(): Promise - ; - getClient(): Promise - ; - getLines(): Promise> - ; + getNumber(): string | undefined; + + getDate(): string | undefined; + + getSaleSession(): Promise; + + getClient(): Promise; + + getLines(): Promise; + setNumber(number: string): void; + setDate(date: string): void; + setSaleSession(saleSession: ISaleSession): void; + setClient(client: IAgent): void; + addLine(line: IOrderLine): void; + getFulfilmentStatus(): Promise; + + setFulfilmentStatus(fulfilmentState: ISKOSConcept): void; + + getOrderStatus(): Promise; + + setOrderStatus(orderState: ISKOSConcept): void; + + getPaymentStatus(): Promise; + + setPaymentStatus(paymentState: ISKOSConcept): void; + } diff --git a/src/IOrderLine.ts b/src/IOrderLine.ts index d8c891e..92b2e7e 100644 --- a/src/IOrderLine.ts +++ b/src/IOrderLine.ts @@ -1,23 +1,49 @@ -import IPrice from "./IPrice.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IOrder from "./IOrder.js" +import IPrice from "./IPrice.js" import Describable from "./Describable.js" import IOffer from "./IOffer.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IOrderLine extends Semanticable, Describable{ +export default interface IOrderLine extends Semanticable, Describable { + + getQuantity(): number | undefined; + + getPrice(): IPrice | undefined; + + getOffer(): Promise; + + getOrder(): Promise; - getQuantity(): number - ; - getPrice(): Promise - ; - getOffer(): Promise - ; - getOrder(): Promise - ; setQuantity(quantity: number): void; + setPrice(price: IPrice): void; + setOffer(offer: IOffer): void; + setOrder(order: IOrder): void; } diff --git a/src/IPerson.ts b/src/IPerson.ts index 8bd787e..9495500 100644 --- a/src/IPerson.ts +++ b/src/IPerson.ts @@ -1,9 +1,32 @@ -import Personable from "./Personable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Affiliable from "./Affiliable.js" +import Personable from "./Personable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IPerson extends Semanticable, Affiliable, Personable{ +export default interface IPerson extends Semanticable, Affiliable, Personable { } diff --git a/src/IPhoneNumber.ts b/src/IPhoneNumber.ts new file mode 100644 index 0000000..e761b2f --- /dev/null +++ b/src/IPhoneNumber.ts @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import Dialable from "./Dialable.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IPhoneNumber extends Semanticable, Dialable { + + +} diff --git a/src/IPhysicalCharacteristic.ts b/src/IPhysicalCharacteristic.ts index 94755b8..b7ab8a4 100644 --- a/src/IPhysicalCharacteristic.ts +++ b/src/IPhysicalCharacteristic.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICharacteristic from "./ICharacteristic.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IPhysicalCharacteristic extends ICharacteristic{ +export default interface IPhysicalCharacteristic extends ICharacteristic { } diff --git a/src/IPlannedConsumptionFlow.ts b/src/IPlannedConsumptionFlow.ts new file mode 100644 index 0000000..9380c9c --- /dev/null +++ b/src/IPlannedConsumptionFlow.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IDefinedProduct from "./IDefinedProduct.js" +import IPlannedFlow from "./IPlannedFlow.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IPlannedConsumptionFlow extends IPlannedFlow { + + getConsumedProduct(): Promise; + + setConsumedProduct(consumedProduct: IDefinedProduct): void; + +} diff --git a/src/IPlannedFlow.ts b/src/IPlannedFlow.ts new file mode 100644 index 0000000..2cbb5c5 --- /dev/null +++ b/src/IPlannedFlow.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPlannedTransformation from "./IPlannedTransformation.js" +import IFlow from "./IFlow.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IPlannedFlow extends IFlow { + + getPlannedTransformation(): Promise; + + setPlannedTransformation(plannedTransformation: IPlannedTransformation): void; + +} diff --git a/src/IPlannedProductionFlow.ts b/src/IPlannedProductionFlow.ts new file mode 100644 index 0000000..405887a --- /dev/null +++ b/src/IPlannedProductionFlow.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISuppliedProduct from "./ISuppliedProduct.js" +import IPlannedFlow from "./IPlannedFlow.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IPlannedProductionFlow extends IPlannedFlow { + + getProducedProduct(): Promise; + + setProducedProduct(producedProduct: ISuppliedProduct): void; + +} diff --git a/src/IPlannedTransformation.ts b/src/IPlannedTransformation.ts new file mode 100644 index 0000000..eca5ba2 --- /dev/null +++ b/src/IPlannedTransformation.ts @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" +import IPlannedProductionFlow from "./IPlannedProductionFlow.js" +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface IPlannedTransformation extends Semanticable{ + + getTransformationType(): Promise; + + setTransformationType(transformationType: ISKOSConcept): void; + + getPlannedConsumptionFlows(): Promise; + + setPlannedConsumptionFlows(plannedConsumptionFlows: IPlannedConsumptionFlow[]): void; + + getPlannedProductionFlows(): Promise; + + setPlannedProductionFlows(plannedProductionFlows: IPlannedProductionFlow[]): void; + + addPlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + + removePlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void; + + addPlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; + + removePlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void; + +} diff --git a/src/IPrice.ts b/src/IPrice.ts index 0f15622..8b63a8d 100644 --- a/src/IPrice.ts +++ b/src/IPrice.ts @@ -1,17 +1,34 @@ -import IUnit from "./IUnit.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import Quantifiable from "./Quantifiable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IPrice extends Semanticable{ +export default interface IPrice extends Semanticable, Quantifiable { + + getVatRate(): number | undefined; - getValue(): number - ; - getVatRate(): number - ; - getUnit(): Promise - ; - setValue(value: number): void; setVatRate(vatRate: number): void; - setUnit(unit: IUnit): void; } diff --git a/src/IQuantity.ts b/src/IQuantity.ts index 6289dbb..567e438 100644 --- a/src/IQuantity.ts +++ b/src/IQuantity.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Quantifiable from "./Quantifiable.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface IQuantity extends Semanticable, Quantifiable{ +export default interface IQuantity extends Semanticable, Quantifiable { } diff --git a/src/ISKOSConcept.ts b/src/ISKOSConcept.ts index f36580b..18c03f8 100644 --- a/src/ISKOSConcept.ts +++ b/src/ISKOSConcept.ts @@ -1,25 +1,55 @@ -import ISKOSLabel from "./ISKOSLabel.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ISKOSConceptScheme from "./ISKOSConceptScheme.js" +import ISKOSLabel from "./ISKOSLabel.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface ISKOSConcept extends Semanticable{ addBroader(broader: ISKOSConcept): void; + addScheme(scheme: ISKOSConceptScheme): void; + addNarrower(narrower: ISKOSConcept): void; + addPrefLabel(prefLabel: ISKOSLabel): void; - getBroader(): Promise> - ; - getScheme(): Promise> - ; - getNarrower(): Promise> - ; - getPrefLabel(): Promise> - ; + + getBroader(): Promise; + + getScheme(): Promise; + + getNarrower(): Promise; + + getPrefLabel(): Promise; + removeBroader(broader: ISKOSConcept): void; + removeScheme(scheme: ISKOSConceptScheme): void; + removeNarrower(narrower: ISKOSConcept): void; + removePrefLabel(prefLabel: ISKOSLabel): void; } diff --git a/src/ISKOSConceptScheme.ts b/src/ISKOSConceptScheme.ts index 2d70a1d..7633ea1 100644 --- a/src/ISKOSConceptScheme.ts +++ b/src/ISKOSConceptScheme.ts @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" diff --git a/src/ISKOSLabel.ts b/src/ISKOSLabel.ts index 6ddced5..eb3de61 100644 --- a/src/ISKOSLabel.ts +++ b/src/ISKOSLabel.ts @@ -1,12 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface ISKOSLabel extends Semanticable{ - getLanguage(): string - ; - getValue(): string - ; + getLanguage(): string | undefined; + + getValue(): string | undefined; } diff --git a/src/ISaleSession.ts b/src/ISaleSession.ts index 3792c60..a7aabdc 100644 --- a/src/ISaleSession.ts +++ b/src/ISaleSession.ts @@ -1,15 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Ellapsable from "./Ellapsable.js" import IOffer from "./IOffer.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ISaleSession extends Semanticable, Ellapsable{ +export default interface ISaleSession extends Semanticable, Ellapsable { + + getQuantity(): number | undefined; - getQuantity(): number - ; setQuantity(quantity: number): void; - getOffers(): Promise> - ; + + getOffers(): Promise; + addOffer(offer: IOffer): void; } diff --git a/src/ISocialMedia.ts b/src/ISocialMedia.ts new file mode 100644 index 0000000..b1a373b --- /dev/null +++ b/src/ISocialMedia.ts @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import Nameable from "./Nameable.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ISocialMedia extends Semanticable, Nameable { + + getUrl(): string | undefined; + + setUrl(url: string): void; + +} diff --git a/src/ISuppliedProduct.ts b/src/ISuppliedProduct.ts index e25752e..6051b69 100644 --- a/src/ISuppliedProduct.ts +++ b/src/ISuppliedProduct.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IDefinedProduct from "./IDefinedProduct.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ISuppliedProduct extends IDefinedProduct{ +export default interface ISuppliedProduct extends IDefinedProduct { } diff --git a/src/ITechnicalProduct.ts b/src/ITechnicalProduct.ts index 2cbd85c..16301e4 100644 --- a/src/ITechnicalProduct.ts +++ b/src/ITechnicalProduct.ts @@ -1,8 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IDefinedProduct from "./IDefinedProduct.js" import { Semanticable } from "@virtual-assembly/semantizer" -export default interface ITechnicalProduct extends IDefinedProduct{ +export default interface ITechnicalProduct extends IDefinedProduct { } diff --git a/src/Invoiceable.ts b/src/Invoiceable.ts index e2a944f..df83422 100644 --- a/src/Invoiceable.ts +++ b/src/Invoiceable.ts @@ -1,10 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Orderable from "./Orderable.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Invoiceable { - getOrders(): Promise> - ; + getOrders(): Promise; } diff --git a/src/Localizable.ts b/src/Localizable.ts index 5aec1fa..5a3f65c 100644 --- a/src/Localizable.ts +++ b/src/Localizable.ts @@ -1,20 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Localizable { - getStreet(): string - ; - getPostalCode(): string - ; - getCity(): string - ; - getCountry(): string - ; + getStreet(): string | undefined; + + getPostalCode(): string | undefined; + + getCity(): string | undefined; + + getCountry(): string | undefined; + setStreet(street: string): void; + setPostalCode(postalCode: string): void; + setCity(city: string): void; + setCountry(country: string): void; + getLatitude(): number | undefined; + + setLatitude(latitude: number): void; + + getLongitude(): number | undefined; + + setLongitude(longitude: number): void; + + getRegion(): string | undefined; + + setRegion(region: string): void; + } diff --git a/src/MainContactOwner.ts b/src/MainContactOwner.ts new file mode 100644 index 0000000..3679590 --- /dev/null +++ b/src/MainContactOwner.ts @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ManagedByMainContact from "./ManagedByMainContact.js" +import IPerson from "./IPerson.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface MainContactOwner extends ManagedByMainContact { + + setMainContact(mainContact: IPerson): void; + +} diff --git a/src/ManagedByMainContact.ts b/src/ManagedByMainContact.ts new file mode 100644 index 0000000..568ab29 --- /dev/null +++ b/src/ManagedByMainContact.ts @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPerson from "./IPerson.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface ManagedByMainContact { + + getMainContact(): Promise; + +} diff --git a/src/Manufacturable.ts b/src/Manufacturable.ts index 0dd6958..d25e702 100644 --- a/src/Manufacturable.ts +++ b/src/Manufacturable.ts @@ -1,45 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" import INutrientCharacteristic from "./INutrientCharacteristic.js" -import IPartOrigin from "./IPartOrigin.js" import IAllergenCharacteristic from "./IAllergenCharacteristic.js" -import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" -import IGeographicalOrigin from "./IGeographicalOrigin.js" -import INatureOrigin from "./INatureOrigin.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Manufacturable { - getAlcoholPercentage(): number - ; - getLifetime(): string - ; - getUsageOrStorageConditions(): string - ; - getAllergenCharacteristics(): Promise> - ; - getNutrientCharacteristics(): Promise> - ; - getPhysicalCharacteristics(): Promise> - ; - getGeographicalOrigin(): Promise - ; - getNatureOrigin(): Promise> - ; - getPartOrigin(): Promise> - ; - setGeographicalOrigin(geographicalOrigin: IGeographicalOrigin): void; + getAlcoholPercentage(): number | undefined; + + getLifetime(): string | undefined; + + getUsageOrStorageConditions(): string | undefined; + + getAllergenCharacteristics(): Promise; + + getNutrientCharacteristics(): Promise; + + getPhysicalCharacteristics(): Promise; + + getGeographicalOrigin(): Promise; + + getNatureOrigin(): Promise; + + getPartOrigin(): Promise; + + setGeographicalOrigin(geographicalOrigin: ISKOSConcept): void; + setAlcoholPercentage(alcoholPercentage: number): void; + setLifetime(lifetime: string): void; + setUsageOrStorageConditions(usageOrStorageConditions: string): void; + addAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; + addNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; + addPhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - addNatureOrigin(natureOrigin: INatureOrigin): void; - addPartOrigin(partOrigin: IPartOrigin): void; + + addNatureOrigin(natureOrigin: ISKOSConcept): void; + + addPartOrigin(partOrigin: ISKOSConcept): void; + removeAllergenCharacteristic(allergenCharacteristic: IAllergenCharacteristic): void; + removeNutrientCharacteristic(nutrientCharacteristic: INutrientCharacteristic): void; + removePhysicalCharacteristic(physicalCharacteristic: IPhysicalCharacteristic): void; - removeNatureOrigin(natureOrigin: INatureOrigin): void; - removePartOrigin(partOrigin: IPartOrigin): void; + + removeNatureOrigin(natureOrigin: ISKOSConcept): void; + + removePartOrigin(partOrigin: ISKOSConcept): void; } diff --git a/src/Marketable.ts b/src/Marketable.ts index 7de29b4..c683654 100644 --- a/src/Marketable.ts +++ b/src/Marketable.ts @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalogItem from "./ICatalogItem.js" import ICustomerCategory from "./ICustomerCategory.js" @@ -5,11 +28,12 @@ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Marketable { - getOfferedItem(): Promise - ; - getCustomerCategory(): Promise - ; + getOfferedItem(): Promise; + + getCustomerCategory(): Promise; + setOfferedItem(offeredItem: ICatalogItem): void; + setCustomerCategory(customerCategory: ICustomerCategory): void; } diff --git a/src/Measurable.ts b/src/Measurable.ts index 0cc8313..ef3fba3 100644 --- a/src/Measurable.ts +++ b/src/Measurable.ts @@ -1,12 +1,34 @@ -import ICharacteristicDimension from "./ICharacteristicDimension.js" -import Quantifiable from "./Quantifiable.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Measurable { - getQuantityDimension(): Promise - ; - setQuantityDimension(quantityDimension: ICharacteristicDimension): void; + getQuantityDimension(): Promise; + + setQuantityDimension(quantityDimension: ISKOSConcept): void; } diff --git a/src/Nameable.ts b/src/Nameable.ts index 96c5d83..cb4635c 100644 --- a/src/Nameable.ts +++ b/src/Nameable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Nameable { - getName(): string - ; + getName(): string | undefined; + setName(name: string): void; } diff --git a/src/NutrientCharacteristic.ts b/src/NutrientCharacteristic.ts index 9d5259e..6303ef7 100644 --- a/src/NutrientCharacteristic.ts +++ b/src/NutrientCharacteristic.ts @@ -21,55 +21,68 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import ICharacteristicDimension from "./ICharacteristicDimension.js" -import Characteristic from "./Characteristic.js" +import ISKOSConcept from "./ISKOSConcept.js" import INutrientCharacteristic from "./INutrientCharacteristic.js" -import IUnit from "./IUnit.js" -import INutrientDimension from "./INutrientDimension.js" +import Characteristic from "./Characteristic.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const NUTRIENT_CHARACTERISTIC_SEM_TYPE: string = "dfc-b:NutrientCharacteristic"; export default class NutrientCharacteristic extends Characteristic implements INutrientCharacteristic { - - public constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, unit?: IUnit, value?: number, nutrientDimension?: INutrientDimension}) { - const type: string = parameters.semanticType? parameters.semanticType: "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#NutrientCharacteristic"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + nutrientDimension?: ISKOSConcept, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : NUTRIENT_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + unit: parameters.unit, + value: parameters.value + }); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, unit: parameters.unit, value: parameters.value }); - + if (parameters.nutrientDimension) { + this.setQuantityDimension(parameters.nutrientDimension); + } - if (parameters.nutrientDimension) this.setQuantityDimension(parameters.nutrientDimension); } - public async getQuantityDimension(options?: IGetterOptions): Promise - { - let result: ICharacteristicDimension | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientDimension"); + public async getQuantityDimension(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasNutrientDimension"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - - public setQuantityDimension(quantityDimension: ICharacteristicDimension): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasNutrientDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + public setQuantityDimension(quantityDimension: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasNutrientDimension", quantityDimension); + this.connector.store(quantityDimension); } - - - } diff --git a/src/Offer.ts b/src/Offer.ts index 6526b42..f1fcff7 100644 --- a/src/Offer.ts +++ b/src/Offer.ts @@ -21,102 +21,121 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IOffer from "./IOffer.js" +import ICatalogItem from "./ICatalogItem.js" import ICustomerCategory from "./ICustomerCategory.js" import IPrice from "./IPrice.js" -import ICatalogItem from "./ICatalogItem.js" +import IOffer from "./IOffer.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const OFFER_SEM_TYPE: string = "dfc-b:Offer"; export default class Offer extends SemanticObject implements IOffer { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, offeredItem?: ICatalogItem, offeredTo?: ICustomerCategory, price?: IPrice, stockLimitation?: number, doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Offer"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + offeredItem?: ICatalogItem, + offeredTo?: ICustomerCategory, + price?: IPrice, + stockLimitation?: number, + doNotStore?: boolean, + }) { + + const type: string = OFFER_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.offeredItem) this.setOfferedItem(parameters.offeredItem); - if (parameters.offeredTo) this.setCustomerCategory(parameters.offeredTo); - if (parameters.price) this.setPrice(parameters.price); - if (parameters.stockLimitation || parameters.stockLimitation === 0) this.setStockLimitation(parameters.stockLimitation); - } - - public setPrice(price: IPrice): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"; - this.setSemanticPropertyAnonymous(property, price); + } + if (parameters.offeredItem) { + this.setOfferedItem(parameters.offeredItem); + } + + if (parameters.offeredTo) { + this.setCustomerCategory(parameters.offeredTo); + } + + if (parameters.price) { + this.setPrice(parameters.price); + } + + if (parameters.stockLimitation || parameters.stockLimitation === 0) { + this.setStockLimitation(parameters.stockLimitation); + } + } - - public async getPrice(options?: IGetterOptions): Promise - { - const blankNode: any = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); - } - - public async getOfferedItem(options?: IGetterOptions): Promise - { + public async getOfferedItem(options?: IGetterOptions): Promise { let result: ICatalogItem | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredItem"); + const semanticId = this.getSemanticProperty("dfc-b:offeredItem"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - public setCustomerCategory(customerCategory: ICustomerCategory): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredTo"; - this.setSemanticPropertyReference(property, customerCategory); + this.setSemanticPropertyReference("dfc-b:offeredTo", customerCategory); + this.connector.store(customerCategory); } - - public async getCustomerCategory(options?: IGetterOptions): Promise - { + public async getCustomerCategory(options?: IGetterOptions): Promise { let result: ICustomerCategory | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredTo"); + const semanticId = this.getSemanticProperty("dfc-b:offeredTo"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; + } + + public getPrice(): IPrice | undefined { + const blankNode: any = this.getSemanticPropertyAnonymous("dfc-b:hasPrice"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + } + + public setPrice(price: IPrice): void { + this.setSemanticPropertyAnonymous("dfc-b:hasPrice", price); } - - public setOfferedItem(offeredItem: ICatalogItem): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#offeredItem"; - this.setSemanticPropertyReference(property, offeredItem); - this.connector.store(offeredItem); + public getStockLimitation(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:stockLimitation")); } - + public setStockLimitation(stockLimitation: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation"; - this.setSemanticPropertyLiteral(property, stockLimitation); + this.setSemanticPropertyLiteral("dfc-b:stockLimitation", stockLimitation); } - - public getStockLimitation(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#stockLimitation")); + public setOfferedItem(offeredItem: ICatalogItem): void { + this.setSemanticPropertyReference("dfc-b:offeredItem", offeredItem); + + this.connector.store(offeredItem); } - - } diff --git a/src/Offerable.ts b/src/Offerable.ts index af06963..656df3d 100644 --- a/src/Offerable.ts +++ b/src/Offerable.ts @@ -1,15 +1,39 @@ -import IOffer from "./IOffer.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IDefinedProduct from "./IDefinedProduct.js" +import IOffer from "./IOffer.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Offerable { - getOfferers(): Promise> - ; - getOfferedProduct(): Promise - ; + getOfferers(): Promise; + + getOfferedProduct(): Promise; + addOffer(offer: IOffer): void; + setOfferedProduct(offeredProduct: IDefinedProduct): void; } diff --git a/src/Onboardable.ts b/src/Onboardable.ts index 4392a6e..7634c4a 100644 --- a/src/Onboardable.ts +++ b/src/Onboardable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICustomerCategory from "./ICustomerCategory.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Onboardable { - getCustomerCategories(): Promise> - ; + getCustomerCategories(): Promise; + addCustomerCategory(customerCategory: ICustomerCategory): void; } diff --git a/src/Order.ts b/src/Order.ts index 5cf95a4..91626ea 100644 --- a/src/Order.ts +++ b/src/Order.ts @@ -21,128 +21,208 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IOrder from "./IOrder.js" -import ISaleSession from "./ISaleSession.js" import IOrderLine from "./IOrderLine.js" +import ISKOSConcept from "./ISKOSConcept.js" +import ISaleSession from "./ISaleSession.js" +import IOrder from "./IOrder.js" import IAgent from "./IAgent.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const ORDER_SEM_TYPE: string = "dfc-b:Order"; export default class Order extends SemanticObject implements IOrder { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, number?: string, date?: string, saleSession?: ISaleSession, client?: IAgent, lines?: IOrderLine[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Order"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + number?: string, + date?: string, + saleSession?: ISaleSession, + client?: IAgent, + lines?: IOrderLine[], + fulfilmentStatus?: ISKOSConcept, + orderStatus?: ISKOSConcept, + paymentStatus?: ISKOSConcept, + doNotStore?: boolean, + }) { + + const type: string = ORDER_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.number) this.setNumber(parameters.number); - if (parameters.date) this.setDate(parameters.date); - if (parameters.saleSession) this.setSaleSession(parameters.saleSession); - if (parameters.client) this.setClient(parameters.client); - if (parameters.lines) parameters.lines.forEach(e => this.addLine(e)); + } + if (parameters.number) { + this.setNumber(parameters.number); + } + + if (parameters.date) { + this.setDate(parameters.date); + } + + if (parameters.saleSession) { + this.setSaleSession(parameters.saleSession); + } + + if (parameters.client) { + this.setClient(parameters.client); + } + + if (parameters.lines) { + parameters.lines.forEach(e => this.addLine(e)); + } + + if (parameters.fulfilmentStatus) { + this.setFulfilmentStatus(parameters.fulfilmentStatus); + } + + if (parameters.orderStatus) { + this.setOrderStatus(parameters.orderStatus); + } + + if (parameters.paymentStatus) { + this.setPaymentStatus(parameters.paymentStatus); + } + + } + + public setPaymentStatus(paymentState: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasPaymentStatus", paymentState); + + this.connector.store(paymentState); + } + + public async getFulfilmentStatus(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasFulfilmentStatus"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; } public setDate(date: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#date"; - this.setSemanticPropertyLiteral(property, date); + this.setSemanticPropertyLiteral("dfc-b:date", date); } - - public getNumber(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderNumber"); + public getDate(): string | undefined { + return this.getSemanticProperty("dfc-b:date"); } - - public getDate(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#date"); + public getNumber(): string | undefined { + return this.getSemanticProperty("dfc-b:orderNumber"); } - - public addLine(line: IOrderLine): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPart"; - if (line.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, line); - } - else { - this.connector.store(line); - this.addSemanticPropertyReference(property, line); + public async getOrderStatus(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasOrderStatus"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; } + return result; } - - public async getClient(options?: IGetterOptions): Promise - { - let result: IAgent | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderedBy"); + public async getPaymentStatus(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasPaymentStatus"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; + } + + public setFulfilmentStatus(fulfilmentState: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasFulfilmentStatus", fulfilmentState); + this.connector.store(fulfilmentState); } - - public async getSaleSession(options?: IGetterOptions): Promise - { - let result: ISaleSession | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#belongsTo"); + public async getClient(options?: IGetterOptions): Promise { + let result: IAgent | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:orderedBy"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; + } + + public setSaleSession(saleSession: ISaleSession): void { + this.setSemanticPropertyReference("dfc-b:belongsTo", saleSession); + this.connector.store(saleSession); } - public setClient(client: IAgent): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderedBy"; - this.setSemanticPropertyReference(property, client); + this.setSemanticPropertyReference("dfc-b:orderedBy", client); + this.connector.store(client); } - - public async getLines(options?: IGetterOptions): Promise> - { + public async getSaleSession(options?: IGetterOptions): Promise { + let result: ISaleSession | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:belongsTo"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public addLine(line: IOrderLine): void { + if (line.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasPart", line); + } + else { + this.connector.store(line); + this.addSemanticPropertyReference("dfc-b:hasPart", line); + } + } + + public async getLines(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPart"); + const properties = this.getSemanticPropertyAll("dfc-b:hasPart"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - public setNumber(number: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#orderNumber"; - this.setSemanticPropertyLiteral(property, number); + this.setSemanticPropertyLiteral("dfc-b:orderNumber", number); } - - public setSaleSession(saleSession: ISaleSession): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#belongsTo"; - this.setSemanticPropertyReference(property, saleSession); - this.connector.store(saleSession); + public setOrderStatus(orderState: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasOrderStatus", orderState); + + this.connector.store(orderState); } - - } diff --git a/src/OrderLine.ts b/src/OrderLine.ts index 96cb3e7..e5e33db 100644 --- a/src/OrderLine.ts +++ b/src/OrderLine.ts @@ -21,115 +21,129 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IPrice from "./IPrice.js" -import IOffer from "./IOffer.js" import IOrderLine from "./IOrderLine.js" import IOrder from "./IOrder.js" +import IPrice from "./IPrice.js" +import IOffer from "./IOffer.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const ORDER_LINE_SEM_TYPE: string = "dfc-b:OrderLine"; export default class OrderLine extends SemanticObject implements IOrderLine { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, quantity?: number, price?: IPrice, offer?: IOffer, order?: IOrder, doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#OrderLine"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + quantity?: number, + price?: IPrice, + offer?: IOffer, + order?: IOrder, + doNotStore?: boolean, + }) { + + const type: string = ORDER_LINE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.quantity || parameters.quantity === 0) this.setQuantity(parameters.quantity); - if (parameters.price) this.setPrice(parameters.price); - if (parameters.offer) this.setOffer(parameters.offer); - if (parameters.order) this.setOrder(parameters.order); + } + if (parameters.quantity || parameters.quantity === 0) { + this.setQuantity(parameters.quantity); + } + + if (parameters.price) { + this.setPrice(parameters.price); + } + + if (parameters.offer) { + this.setOffer(parameters.offer); + } + + if (parameters.order) { + this.setOrder(parameters.order); + } + } public setOffer(offer: IOffer): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#concerns"; - this.setSemanticPropertyReference(property, offer); + this.setSemanticPropertyReference("dfc-b:concerns", offer); + this.connector.store(offer); } - - public setQuantity(quantity: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity"; - this.setSemanticPropertyLiteral(property, quantity); + public getQuantity(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:quantity")); } - - public async getPrice(options?: IGetterOptions): Promise - { - const blankNode: any = this.getSemanticPropertyAnonymous("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"); - return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + public setDescription(description: string): void { + this.setSemanticPropertyLiteral("dfc-b:description", description); } - public setOrder(order: IOrder): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#partOf"; - this.setSemanticPropertyReference(property, order); + this.setSemanticPropertyReference("dfc-b:partOf", order); + this.connector.store(order); } - - public async getOffer(options?: IGetterOptions): Promise - { - let result: IOffer | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#concerns"); + public getDescription(): string | undefined { + return this.getSemanticProperty("dfc-b:description"); + } + + public getPrice(): IPrice | undefined { + const blankNode: any = this.getSemanticPropertyAnonymous("dfc-b:hasPrice"); + return this.connector.getDefaultFactory().createFromRdfDataset(blankNode); + } + + public async getOrder(options?: IGetterOptions): Promise { + let result: IOrder | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:partOf"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - - public async getOrder(options?: IGetterOptions): Promise - { - let result: IOrder | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#partOf"); + public async getOffer(options?: IGetterOptions): Promise { + let result: IOffer | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:concerns"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - - public getQuantity(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity")); + public setQuantity(quantity: number): void { + this.setSemanticPropertyLiteral("dfc-b:quantity", quantity); } - public setPrice(price: IPrice): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPrice"; - this.setSemanticPropertyAnonymous(property, price); - } - - public setDescription(description: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"; - this.setSemanticPropertyLiteral(property, description); - } - - - public getDescription(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#description"); + this.setSemanticPropertyAnonymous("dfc-b:hasPrice", price); + } - - } diff --git a/src/Orderable.ts b/src/Orderable.ts index b280d39..c8f4467 100644 --- a/src/Orderable.ts +++ b/src/Orderable.ts @@ -1,10 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import Invoiceable from "./Invoiceable.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Orderable { - getCustomer(): Promise - ; + getCustomer(): Promise; } diff --git a/src/Payable.ts b/src/Payable.ts index 43141b1..c0a752a 100644 --- a/src/Payable.ts +++ b/src/Payable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import IPrice from "./IPrice.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Payable { - getPrice(): Promise - ; + getPrice(): IPrice | undefined; + setPrice(price: IPrice): void; } diff --git a/src/Person.ts b/src/Person.ts index 2bd04a3..87442ac 100644 --- a/src/Person.ts +++ b/src/Person.ts @@ -21,89 +21,106 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IPerson from "./IPerson.js" -import Agent from "./Agent.js" import IAddress from "./IAddress.js" import IEnterprise from "./IEnterprise.js" +import IPerson from "./IPerson.js" +import Agent from "./Agent.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const PERSON_SEM_TYPE: string = "dfc-b:Person"; export default class Person extends Agent implements IPerson { - - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, firstName?: string, lastName?: string, localizations?: IAddress[], organizations?: IEnterprise[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Person"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + firstName?: string, + lastName?: string, + localizations?: IAddress[], + organizations?: IEnterprise[], + logo?: string, + doNotStore?: boolean, + }) { + + const type: string = PERSON_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + localizations: parameters.localizations, + logo: parameters.logo + }); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, localizations: parameters.localizations }); + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.firstName) { + this.setFirstName(parameters.firstName); + } + if (parameters.lastName) { + this.setLastName(parameters.lastName); + } + + if (parameters.organizations) { + parameters.organizations.forEach(e => this.affiliateTo(e)); + } - if (!parameters.doNotStore) - this.connector.store(this); - if (parameters.firstName) this.setFirstName(parameters.firstName); - if (parameters.lastName) this.setLastName(parameters.lastName); - if (parameters.organizations) parameters.organizations.forEach(e => this.affiliateTo(e)); } - public getLastName(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#familyName"); + public getFirstName(): string | undefined { + return this.getSemanticProperty("dfc-b:firstName"); } - - public getFirstName(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#firstName"); + public getLastName(): string | undefined { + return this.getSemanticProperty("dfc-b:familyName"); } - public setLastName(lastName: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#familyName"; - this.setSemanticPropertyLiteral(property, lastName); + this.setSemanticPropertyLiteral("dfc-b:familyName", lastName); + } + + public leaveAffiliatedOrganization(organization: IEnterprise): void { + throw new Error("Not yet implemented."); } - public setFirstName(firstName: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#firstName"; - this.setSemanticPropertyLiteral(property, firstName); + this.setSemanticPropertyLiteral("dfc-b:firstName", firstName); } - + public affiliateTo(organization: IEnterprise): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#affiliates"; if (organization.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, organization); + this.addSemanticPropertyAnonymous("dfc-b:affiliates", organization); } else { this.connector.store(organization); - this.addSemanticPropertyReference(property, organization); + this.addSemanticPropertyReference("dfc-b:affiliates", organization); } } - - - public leaveAffiliatedOrganization(organization: IEnterprise): void { - throw new Error("Not yet implemented."); - } - - public async getAffiliatedOrganizations(options?: IGetterOptions): Promise> - { + public async getAffiliatedOrganizations(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#affiliates"); + const properties = this.getSemanticPropertyAll("dfc-b:affiliates"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - } diff --git a/src/Personable.ts b/src/Personable.ts index 7577106..904edbf 100644 --- a/src/Personable.ts +++ b/src/Personable.ts @@ -1,14 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Personable { - getFirstName(): string - ; - getLastName(): string - ; + getFirstName(): string | undefined; + + getLastName(): string | undefined; + setFirstName(firstName: string): void; + setLastName(lastName: string): void; } diff --git a/src/PhoneNumber.ts b/src/PhoneNumber.ts new file mode 100644 index 0000000..c539ebd --- /dev/null +++ b/src/PhoneNumber.ts @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPhoneNumber from "./IPhoneNumber.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const PHONE_NUMBER_SEM_TYPE: string = "dfc-b:PhoneNumber"; + +export default class PhoneNumber extends SemanticObject implements IPhoneNumber { + + protected connector: IConnector; + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + countryCode?: number, + phoneNumber?: string, + doNotStore?: boolean, + }) { + + const type: string = PHONE_NUMBER_SEM_TYPE; + + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); + } + this.connector = parameters.connector; + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.countryCode || parameters.countryCode === 0) { + this.setCountryCode(parameters.countryCode); + } + + if (parameters.phoneNumber) { + this.setNumber(parameters.phoneNumber); + } + + } + + public setNumber(number: string): void { + this.setSemanticPropertyLiteral("dfc-b:phoneNumber", number); + } + + public setCountryCode(countryCode: number): void { + this.setSemanticPropertyLiteral("dfc-b:countryCode", countryCode); + } + + public getNumber(): string | undefined { + return this.getSemanticProperty("dfc-b:phoneNumber"); + } + + public getCountryCode(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:countryCode")); + } +} diff --git a/src/PhoneNumberOwner.ts b/src/PhoneNumberOwner.ts new file mode 100644 index 0000000..42ced4d --- /dev/null +++ b/src/PhoneNumberOwner.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPhoneNumber from "./IPhoneNumber.js" +import ContactableByPhone from "./ContactableByPhone.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface PhoneNumberOwner extends ContactableByPhone { + + addPhoneNumber(phoneNumber: IPhoneNumber): void; + + removePhoneNumber(phoneNumber: IPhoneNumber): void; + +} diff --git a/src/PhysicalCharacteristic.ts b/src/PhysicalCharacteristic.ts index 0ad825c..3d730d9 100644 --- a/src/PhysicalCharacteristic.ts +++ b/src/PhysicalCharacteristic.ts @@ -21,55 +21,68 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import Characteristic from "./Characteristic.js" -import IPhysicalDimension from "./IPhysicalDimension.js" -import IUnit from "./IUnit.js" -import ICharacteristicDimension from "./ICharacteristicDimension.js" +import ISKOSConcept from "./ISKOSConcept.js" import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" +import Characteristic from "./Characteristic.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const PHYSICAL_CHARACTERISTIC_SEM_TYPE: string = "dfc-b:PhysicalCharacteristic"; export default class PhysicalCharacteristic extends Characteristic implements IPhysicalCharacteristic { - - public constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, unit?: IUnit, value?: number, physicalDimension?: IPhysicalDimension}) { - const type: string = parameters.semanticType? parameters.semanticType: "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#PhysicalCharacteristic"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + physicalDimension?: ISKOSConcept, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : PHYSICAL_CHARACTERISTIC_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + unit: parameters.unit, + value: parameters.value + }); } - else super({ connector: parameters.connector, semanticId: parameters.semanticId!, semanticType: type, unit: parameters.unit, value: parameters.value }); - + if (parameters.physicalDimension) { + this.setQuantityDimension(parameters.physicalDimension); + } - if (parameters.physicalDimension) this.setQuantityDimension(parameters.physicalDimension); } - public async getQuantityDimension(options?: IGetterOptions): Promise - { - let result: ICharacteristicDimension | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalDimension"); + public async getQuantityDimension(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasPhysicalDimension"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - - public setQuantityDimension(quantityDimension: ICharacteristicDimension): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasPhysicalDimension"; - this.setSemanticPropertyReference(property, quantityDimension); + public setQuantityDimension(quantityDimension: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasPhysicalDimension", quantityDimension); + this.connector.store(quantityDimension); } - - - } diff --git a/src/PlannedConsumptionFlow.ts b/src/PlannedConsumptionFlow.ts new file mode 100644 index 0000000..19f624c --- /dev/null +++ b/src/PlannedConsumptionFlow.ts @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPlannedTransformation from "./IPlannedTransformation.js" +import IDefinedProduct from "./IDefinedProduct.js" +import Flow from "./Flow.js" +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js" +import IQuantity from "./IQuantity.js" +import IPlannedFlow from "./IPlannedFlow.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const PLANNED_CONSUMPTION_FLOW_SEM_TYPE: string = "dfc-b:AsPlannedConsumptionFlow"; + +export default class PlannedConsumptionFlow extends Flow implements IPlannedConsumptionFlow, IPlannedFlow { + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + quantity?: IQuantity, + transformation?: IPlannedTransformation, + product?: IDefinedProduct, + doNotStore?: boolean, + }) { + + const type: string = PLANNED_CONSUMPTION_FLOW_SEM_TYPE; + + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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, + quantity: parameters.quantity + }); + } + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformation) { + this.setPlannedTransformation(parameters.transformation); + } + + if (parameters.product) { + this.setConsumedProduct(parameters.product); + } + + } + + public setConsumedProduct(consumedProduct: IDefinedProduct): void { + this.setSemanticPropertyReference("dfc-b:consumes", consumedProduct); + + this.connector.store(consumedProduct); + } + + public async getConsumedProduct(options?: IGetterOptions): Promise { + let result: IDefinedProduct | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:consumes"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public async getPlannedTransformation(options?: IGetterOptions): Promise { + let result: IPlannedTransformation | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:incomeOf"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public setPlannedTransformation(plannedTransformation: IPlannedTransformation): void { + this.setSemanticPropertyReference("dfc-b:incomeOf", plannedTransformation); + + this.connector.store(plannedTransformation); + } +} diff --git a/src/PlannedProductionFlow.ts b/src/PlannedProductionFlow.ts new file mode 100644 index 0000000..36c2174 --- /dev/null +++ b/src/PlannedProductionFlow.ts @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPlannedTransformation from "./IPlannedTransformation.js" +import ISuppliedProduct from "./ISuppliedProduct.js" +import Flow from "./Flow.js" +import IPlannedProductionFlow from "./IPlannedProductionFlow.js" +import IQuantity from "./IQuantity.js" +import IPlannedFlow from "./IPlannedFlow.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const PLANNED_PRODUCTION_FLOW_SEM_TYPE: string = "dfc-b:AsPlannedProductionFlow"; + +export default class PlannedProductionFlow extends Flow implements IPlannedProductionFlow, IPlannedFlow { + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + quantity?: IQuantity, + transformation?: IPlannedTransformation, + product?: ISuppliedProduct, + doNotStore?: boolean, + }) { + + const type: string = PLANNED_PRODUCTION_FLOW_SEM_TYPE; + + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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, + quantity: parameters.quantity + }); + } + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformation) { + this.setPlannedTransformation(parameters.transformation); + } + + if (parameters.product) { + this.setProducedProduct(parameters.product); + } + + } + + public async getProducedProduct(options?: IGetterOptions): Promise { + let result: ISuppliedProduct | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:produces"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public async getPlannedTransformation(options?: IGetterOptions): Promise { + let result: IPlannedTransformation | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:outcomeOf"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public setPlannedTransformation(plannedTransformation: IPlannedTransformation): void { + this.setSemanticPropertyReference("dfc-b:outcomeOf", plannedTransformation); + + this.connector.store(plannedTransformation); + } + + public setProducedProduct(producedProduct: ISuppliedProduct): void { + this.setSemanticPropertyReference("dfc-b:produces", producedProduct); + + this.connector.store(producedProduct); + } +} diff --git a/src/PlannedTransformation.ts b/src/PlannedTransformation.ts new file mode 100644 index 0000000..8832d87 --- /dev/null +++ b/src/PlannedTransformation.ts @@ -0,0 +1,158 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import IPlannedTransformation from "./IPlannedTransformation.js" +import ISKOSConcept from "./ISKOSConcept.js" +import IPlannedProductionFlow from "./IPlannedProductionFlow.js" +import IPlannedConsumptionFlow from "./IPlannedConsumptionFlow.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const PLANNED_TRANSFORMATION_SEM_TYPE: string = "dfc-b:AsPlannedTransformation"; + +export default class PlannedTransformation extends SemanticObject implements IPlannedTransformation { + + protected connector: IConnector; + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + transformationType?: ISKOSConcept, + consumptionFlows?: IPlannedConsumptionFlow[], + productionFlows?: IPlannedProductionFlow[], + doNotStore?: boolean, + }) { + + const type: string = PLANNED_TRANSFORMATION_SEM_TYPE; + + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); + } + this.connector = parameters.connector; + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.transformationType) { + this.setTransformationType(parameters.transformationType); + } + + if (parameters.consumptionFlows) { + parameters.consumptionFlows.forEach(e => this.addPlannedConsumptionFlow(e)); + } + + if (parameters.productionFlows) { + parameters.productionFlows.forEach(e => this.addPlannedProductionFlow(e)); + } + + } + + public setPlannedProductionFlows(plannedProductionFlows: IPlannedProductionFlow[]): void { + + } + + public removePlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void { + throw new Error("Not yet implemented."); + } + + public addPlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void { + if (plannedProductionFlow.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasOutcome", plannedProductionFlow); + } + else { + this.connector.store(plannedProductionFlow); + this.addSemanticPropertyReference("dfc-b:hasOutcome", plannedProductionFlow); + } + } + + public async getTransformationType(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasTransformationType"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public async getPlannedConsumptionFlows(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasIncome"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; + } + + public setTransformationType(transformationType: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasTransformationType", transformationType); + + this.connector.store(transformationType); + } + + public setPlannedConsumptionFlows(plannedConsumptionFlows: IPlannedConsumptionFlow[]): void { + + } + + public async getPlannedProductionFlows(options?: IGetterOptions): Promise { + const results = new Array(); + const properties = this.getSemanticPropertyAll("dfc-b:hasOutcome"); + for await (const semanticId of properties) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) results.push(semanticObject); + } + return results; + } + + public addPlannedConsumptionFlow(plannedConsumptionFlow: IPlannedConsumptionFlow): void { + if (plannedConsumptionFlow.isSemanticObjectAnonymous()) { + this.addSemanticPropertyAnonymous("dfc-b:hasIncome", plannedConsumptionFlow); + } + else { + this.connector.store(plannedConsumptionFlow); + this.addSemanticPropertyReference("dfc-b:hasIncome", plannedConsumptionFlow); + } + } + + public removePlannedProductionFlow(plannedProductionFlow: IPlannedProductionFlow): void { + throw new Error("Not yet implemented."); + } +} diff --git a/src/Price.ts b/src/Price.ts index bab0671..0e0a6ad 100644 --- a/src/Price.ts +++ b/src/Price.ts @@ -21,78 +21,93 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - +import ISKOSConcept from "./ISKOSConcept.js" import IPrice from "./IPrice.js" -import IUnit from "./IUnit.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const PRICE_SEM_TYPE: string = "dfc-b:Price"; export default class Price extends SemanticObjectAnonymous implements IPrice { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, value?: number, vatRate?: number, unit?: IUnit}) { - const type: string = parameters.semanticType? parameters.semanticType: "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#Price"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + value?: number, + vatRate?: number, + unit?: ISKOSConcept, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : PRICE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (parameters.value || parameters.value === 0) this.setValue(parameters.value); - if (parameters.vatRate || parameters.vatRate === 0) this.setVatRate(parameters.vatRate); - if (parameters.unit) this.setUnit(parameters.unit); - } - - public async getUnit(options?: IGetterOptions): Promise - { - let result: IUnit | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"); - if (semanticId) { - const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (parameters.value || parameters.value === 0) { + this.setQuantityValue(parameters.value); + } + + if (parameters.vatRate || parameters.vatRate === 0) { + this.setVatRate(parameters.vatRate); + } + + if (parameters.unit) { + this.setQuantityUnit(parameters.unit); } - return result; } - - public setValue(value: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value"; - this.setSemanticPropertyLiteral(property, value); + public getQuantityValue(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:value")); } - - public getValue(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value")); + public getVatRate(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:VATrate")); } - - public setUnit(unit: IUnit): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"; - this.setSemanticPropertyReference(property, unit); - this.connector.store(unit); + public setVatRate(vatRate: number): void { + this.setSemanticPropertyLiteral("dfc-b:VATrate", vatRate); } - - public getVatRate(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATrate")); + public setQuantityUnit(quantityUnit: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); + + this.connector.store(quantityUnit); } - - public setVatRate(vatRate: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#VATrate"; - this.setSemanticPropertyLiteral(property, vatRate); + public async getQuantityUnit(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; } - + public setQuantityValue(quantityValue: number): void { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); + } } diff --git a/src/ProductSupplier.ts b/src/ProductSupplier.ts index 28de55b..c53c9e6 100644 --- a/src/ProductSupplier.ts +++ b/src/ProductSupplier.ts @@ -1,13 +1,36 @@ -import ICatalogItem from "./ICatalogItem.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ISuppliedProduct from "./ISuppliedProduct.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface ProductSupplier { - getSuppliedProducts(): Promise> - ; + getSuppliedProducts(): Promise; + supplyProduct(suppliedProduct: ISuppliedProduct): void; + unsupplyProduct(suppliedProduct: ISuppliedProduct): void; } diff --git a/src/Proposable.ts b/src/Proposable.ts index 1915d1d..c4dbc6d 100644 --- a/src/Proposable.ts +++ b/src/Proposable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ICatalogItem from "./ICatalogItem.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Proposable { - getCatalogItems(): Promise> - ; + getCatalogItems(): Promise; + addCatalogItem(catalogItem: ICatalogItem): void; } diff --git a/src/Quantifiable.ts b/src/Quantifiable.ts index f8eed63..9478c6d 100644 --- a/src/Quantifiable.ts +++ b/src/Quantifiable.ts @@ -1,14 +1,38 @@ -import IUnit from "./IUnit.js" +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface Quantifiable { - getQuantityUnit(): Promise - ; - getQuantityValue(): number - ; - setQuantityUnit(quantityUnit: IUnit): void; + getQuantityUnit(): Promise; + + getQuantityValue(): number | undefined; + + setQuantityUnit(quantityUnit: ISKOSConcept): void; + setQuantityValue(quantityValue: number): void; } diff --git a/src/QuantitativeValue.ts b/src/QuantitativeValue.ts index f3ea1c8..28c0263 100644 --- a/src/QuantitativeValue.ts +++ b/src/QuantitativeValue.ts @@ -21,65 +21,80 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IUnit from "./IUnit.js" -import IQuantity from "./IQuantity.js" +import Quantifiable from "./Quantifiable.js" +import ISKOSConcept from "./ISKOSConcept.js" import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const QUANTITATIVE_VALUE_SEM_TYPE: string = "dfc-b:QuantitativeValue"; + +export default class QuantitativeValue extends SemanticObjectAnonymous implements Quantifiable { -export default class QuantitativeValue extends SemanticObjectAnonymous implements IQuantity { - protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, semanticType?: string, other?: Semanticable, unit?: IUnit, value?: number}) { - const type: string = parameters.semanticType? parameters.semanticType: "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#QuantitativeValue"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : QUANTITATIVE_VALUE_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (parameters.unit) this.setQuantityUnit(parameters.unit); - if (parameters.value || parameters.value === 0) this.setQuantityValue(parameters.value); + if (parameters.unit) { + this.setQuantityUnit(parameters.unit); + } + + if (parameters.value || parameters.value === 0) { + this.setQuantityValue(parameters.value); + } + } - public getQuantityValue(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value")); + public getQuantityValue(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:value")); } - - public setQuantityUnit(quantityUnit: IUnit): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"; - this.setSemanticPropertyReference(property, quantityUnit); + public setQuantityUnit(quantityUnit: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); + this.connector.store(quantityUnit); } - - - public setQuantityValue(quantityValue: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#value"; - this.setSemanticPropertyLiteral(property, quantityValue); - } - - public async getQuantityUnit(options?: IGetterOptions): Promise - { - let result: IUnit | undefined = undefined; - const semanticId = this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#hasUnit"); + public async getQuantityUnit(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); if (semanticId) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) result = semanticObject; + if (semanticObject) result = semanticObject; } return result; - } - + public setQuantityValue(quantityValue: number): void { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); + } } diff --git a/src/Quantity.ts b/src/Quantity.ts new file mode 100644 index 0000000..ba6e6ab --- /dev/null +++ b/src/Quantity.ts @@ -0,0 +1,100 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISKOSConcept from "./ISKOSConcept.js" +import IQuantity from "./IQuantity.js" +import { SemanticObjectAnonymous } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const QUANTITY_SEM_TYPE: string = "dfc-b:Quantity"; + +export default class Quantity extends SemanticObjectAnonymous implements IQuantity { + + protected connector: IConnector; + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + semanticType?: string, + other?: Semanticable, + unit?: ISKOSConcept, + value?: number, + }) { + + const type: string = parameters.semanticType ? parameters.semanticType : QUANTITY_SEM_TYPE; + + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); + } + this.connector = parameters.connector; + + + if (parameters.unit) { + this.setQuantityUnit(parameters.unit); + } + + if (parameters.value || parameters.value === 0) { + this.setQuantityValue(parameters.value); + } + + } + + public getQuantityValue(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:value")); + } + + public setQuantityUnit(quantityUnit: ISKOSConcept): void { + this.setSemanticPropertyReference("dfc-b:hasUnit", quantityUnit); + + this.connector.store(quantityUnit); + } + + public async getQuantityUnit(options?: IGetterOptions): Promise { + let result: ISKOSConcept | undefined = undefined; + const semanticId = this.getSemanticProperty("dfc-b:hasUnit"); + if (semanticId) { + const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); + if (semanticObject) result = semanticObject; + } + return result; + } + + public setQuantityValue(quantityValue: number): void { + this.setSemanticPropertyLiteral("dfc-b:value", quantityValue); + } +} diff --git a/src/SKOSConcept.ts b/src/SKOSConcept.ts index 2ca9b38..1b4b8ba 100644 --- a/src/SKOSConcept.ts +++ b/src/SKOSConcept.ts @@ -38,11 +38,11 @@ export default class SKOSConcept extends SemanticObject implements ISKOSConcept const type: string = "http://www.w3.org/2004/02/skos/core#Concept"; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ semantizer: parameters.connector.getSemantizer(), semanticId: parameters.semanticId!, other: parameters.other }); 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({ semanticId: parameters.semanticId!, semanticType: type }); + else super({ semantizer: parameters.connector.getSemantizer(), semanticId: parameters.semanticId!, semanticType: type }); this.connector = parameters.connector; diff --git a/src/SaleSession.ts b/src/SaleSession.ts index f5870cf..ae5c0a9 100644 --- a/src/SaleSession.ts +++ b/src/SaleSession.ts @@ -21,96 +21,113 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IOffer from "./IOffer.js" import ISaleSession from "./ISaleSession.js" +import IOffer from "./IOffer.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const SALE_SESSION_SEM_TYPE: string = "dfc-b:SaleSession"; export default class SaleSession extends SemanticObject implements ISaleSession { - + protected connector: IConnector; - public constructor(parameters: {connector: IConnector, semanticId?: string, other?: Semanticable, beginDate?: string, endDate?: string, quantity?: number, offers?: IOffer[], doNotStore?: boolean}) { - const type: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#SaleSession"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + beginDate?: string, + endDate?: string, + quantity?: number, + offers?: IOffer[], + doNotStore?: boolean, + }) { + + const type: string = SALE_SESSION_SEM_TYPE; if (parameters.other) { - super({ semanticId: parameters.semanticId!, other: parameters.other }); + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); } - else super({ semanticId: parameters.semanticId!, semanticType: type }); - this.connector = parameters.connector; - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.beginDate) this.setBeginDate(parameters.beginDate); - if (parameters.endDate) this.setEndDate(parameters.endDate); - if (parameters.quantity || parameters.quantity === 0) this.setQuantity(parameters.quantity); - if (parameters.offers) parameters.offers.forEach(e => this.addOffer(e)); - } - - public getBeginDate(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#beginDate"); - } - - - public getEndDate(): string - { - return this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#endDate"); - } - - - public setBeginDate(beginDate: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#beginDate"; - this.setSemanticPropertyLiteral(property, beginDate); + } + if (parameters.beginDate) { + this.setBeginDate(parameters.beginDate); + } + + if (parameters.endDate) { + this.setEndDate(parameters.endDate); + } + + if (parameters.quantity || parameters.quantity === 0) { + this.setQuantity(parameters.quantity); + } + + if (parameters.offers) { + parameters.offers.forEach(e => this.addOffer(e)); + } + } - - public setEndDate(endDate: string): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#endDate"; - this.setSemanticPropertyLiteral(property, endDate); - } - - public setQuantity(quantity: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity"; - this.setSemanticPropertyLiteral(property, quantity); + public getBeginDate(): string | undefined { + return this.getSemanticProperty("dfc-b:beginDate"); } - public addOffer(offer: IOffer): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"; if (offer.isSemanticObjectAnonymous()) { - this.addSemanticPropertyAnonymous(property, offer); + this.addSemanticPropertyAnonymous("dfc-b:lists", offer); } else { this.connector.store(offer); - this.addSemanticPropertyReference(property, offer); + this.addSemanticPropertyReference("dfc-b:lists", offer); } } - - public async getOffers(options?: IGetterOptions): Promise> - { + public setEndDate(endDate: string): void { + this.setSemanticPropertyLiteral("dfc-b:endDate", endDate); + } + + public setQuantity(quantity: number): void { + this.setSemanticPropertyLiteral("dfc-b:quantity", quantity); + } + + public async getOffers(options?: IGetterOptions): Promise { const results = new Array(); - const properties = this.getSemanticPropertyAll("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#lists"); + const properties = this.getSemanticPropertyAll("dfc-b:lists"); for await (const semanticId of properties) { const semanticObject: Semanticable | undefined = await this.connector.fetch(semanticId, options); - if (semanticObject) results.push( semanticObject); + if (semanticObject) results.push(semanticObject); } return results; } - - public getQuantity(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#quantity")); + public getQuantity(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:quantity")); } - + public getEndDate(): string | undefined { + return this.getSemanticProperty("dfc-b:endDate"); + } + + public setBeginDate(beginDate: string): void { + this.setSemanticPropertyLiteral("dfc-b:beginDate", beginDate); + } } diff --git a/src/SocialMedia.ts b/src/SocialMedia.ts new file mode 100644 index 0000000..76fa7a5 --- /dev/null +++ b/src/SocialMedia.ts @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISocialMedia from "./ISocialMedia.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const SOCIAL_MEDIA_SEM_TYPE: string = "dfc-b:SocialMedia"; + +export default class SocialMedia extends SemanticObject implements ISocialMedia { + + protected connector: IConnector; + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + name?: string, + url?: string, + doNotStore?: boolean, + }) { + + const type: string = SOCIAL_MEDIA_SEM_TYPE; + + if (parameters.other) { + super({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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({ + semantizer: parameters.connector.getSemantizer(), + semanticId: parameters.semanticId!, + semanticType: type, + + }); + } + this.connector = parameters.connector; + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + if (parameters.name) { + this.setName(parameters.name); + } + + if (parameters.url) { + this.setUrl(parameters.url); + } + + } + + public setName(name: string): void { + this.setSemanticPropertyLiteral("dfc-b:name", name); + } + + public setUrl(url: string): void { + this.setSemanticPropertyLiteral("dfc-b:URL", url); + } + + public getName(): string | undefined { + return this.getSemanticProperty("dfc-b:name"); + } + + public getUrl(): string | undefined { + return this.getSemanticProperty("dfc-b:URL"); + } +} diff --git a/src/SocialMediaOwner.ts b/src/SocialMediaOwner.ts new file mode 100644 index 0000000..a634086 --- /dev/null +++ b/src/SocialMediaOwner.ts @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ISocialMedia from "./ISocialMedia.js" +import ContactableBySocialMedia from "./ContactableBySocialMedia.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface SocialMediaOwner extends ContactableBySocialMedia { + + addSocialMedia(socialMedia: ISocialMedia): void; + + removeSocialMedia(socialMedia: ISocialMedia): void; + +} diff --git a/src/Stockable.ts b/src/Stockable.ts index 516efab..9b46249 100644 --- a/src/Stockable.ts +++ b/src/Stockable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Stockable { - getStockLimitation(): number - ; + getStockLimitation(): number | undefined; + setStockLimitation(stockLimitation: number): void; } diff --git a/src/SuppliedProduct.ts b/src/SuppliedProduct.ts index 48069e9..739382b 100644 --- a/src/SuppliedProduct.ts +++ b/src/SuppliedProduct.ts @@ -21,56 +21,98 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - -import IClaim from "./IClaim.js" -import INutrientCharacteristic from "./INutrientCharacteristic.js" -import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" -import IPartOrigin from "./IPartOrigin.js" -import INatureOrigin from "./INatureOrigin.js" -import ICertification from "./ICertification.js" -import IQuantity from "./IQuantity.js" -import IProductType from "./IProductType.js" +import ICatalogItem from "./ICatalogItem.js" import ISuppliedProduct from "./ISuppliedProduct.js" +import ISKOSConcept from "./ISKOSConcept.js" +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" import DefinedProduct from "./DefinedProduct.js" -import ICatalogItem from "./ICatalogItem.js" +import INutrientCharacteristic from "./INutrientCharacteristic.js" +import IQuantity from "./IQuantity.js" import IAllergenCharacteristic from "./IAllergenCharacteristic.js" -import IGeographicalOrigin from "./IGeographicalOrigin.js" import { SemanticObject } from "@virtual-assembly/semantizer" import { Semanticable } from "@virtual-assembly/semantizer" import IConnector from "./IConnector.js"; -import IGetterOptions from "./IGetterOptions.js" +import IGetterOptions from "./IGetterOptions.js"; + +const SUPPLIED_PRODUCT_SEM_TYPE: string = "dfc-b:SuppliedProduct"; export default class SuppliedProduct extends DefinedProduct implements ISuppliedProduct { - - public getTotalTheoreticalStock(): number - { - return Number(this.getSemanticProperty("https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#totalTheoreticalStock")); + public getTotalTheoreticalStock(): number | undefined { + return Number(this.getSemanticProperty("dfc-b:totalTheoreticalStock")); } - public setTotalTheoreticalStock(totalTheoreticalStock: number): void { - const property: string = "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#totalTheoreticalStock"; - this.setSemanticPropertyLiteral(property, totalTheoreticalStock); + this.setSemanticPropertyLiteral("dfc-b:totalTheoreticalStock", totalTheoreticalStock); } - - 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"; + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + name?: string, + description?: string, + productType?: ISKOSConcept, + quantity?: IQuantity, + alcoholPercentage?: number, + lifetime?: string, + claims?: ISKOSConcept[], + usageOrStorageConditions?: string, + allergenCharacteristics?: IAllergenCharacteristic[], + nutrientCharacteristics?: INutrientCharacteristic[], + physicalCharacteristics?: IPhysicalCharacteristic[], + geographicalOrigin?: ISKOSConcept, + catalogItems?: ICatalogItem[], + certifications?: ISKOSConcept[], + natureOrigin?: ISKOSConcept[], + partOrigin?: ISKOSConcept[], + totalTheoreticalStock?: number, + images?: string[], + doNotStore?: boolean, + }) { + + const type: string = SUPPLIED_PRODUCT_SEM_TYPE; if (parameters.other) { - super({ connector: parameters.connector, semanticId: parameters.semanticId!, other: parameters.other }); + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); 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, + images: parameters.images + }); } - 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 }); - - - if (!parameters.doNotStore) + if (!parameters.doNotStore) { this.connector.store(this); - if (parameters.totalTheoreticalStock || parameters.totalTheoreticalStock === 0) this.setTotalTheoreticalStock(parameters.totalTheoreticalStock); + } + if (parameters.totalTheoreticalStock || parameters.totalTheoreticalStock === 0) { + this.setTotalTheoreticalStock(parameters.totalTheoreticalStock); + } + } - } diff --git a/src/Taxable.ts b/src/Taxable.ts index e48f5b8..f3d335f 100644 --- a/src/Taxable.ts +++ b/src/Taxable.ts @@ -1,11 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import { Semanticable } from "@virtual-assembly/semantizer" export default interface Taxable { - getVatNumber(): string - ; + getVatNumber(): string | undefined; + setVatNumber(vatNumber: string): void; } diff --git a/src/TechnicalProduct.ts b/src/TechnicalProduct.ts new file mode 100644 index 0000000..64c807b --- /dev/null +++ b/src/TechnicalProduct.ts @@ -0,0 +1,104 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ICatalogItem from "./ICatalogItem.js" +import ISKOSConcept from "./ISKOSConcept.js" +import IPhysicalCharacteristic from "./IPhysicalCharacteristic.js" +import DefinedProduct from "./DefinedProduct.js" +import INutrientCharacteristic from "./INutrientCharacteristic.js" +import IQuantity from "./IQuantity.js" +import ITechnicalProduct from "./ITechnicalProduct.js" +import IAllergenCharacteristic from "./IAllergenCharacteristic.js" +import { SemanticObject } from "@virtual-assembly/semantizer" +import { Semanticable } from "@virtual-assembly/semantizer" +import IConnector from "./IConnector.js"; +import IGetterOptions from "./IGetterOptions.js"; + +const TECHNICAL_PRODUCT_SEM_TYPE: string = "dfc-b:TechnicalProduct"; + +export default class TechnicalProduct extends DefinedProduct implements ITechnicalProduct { + + public constructor(parameters: { + connector: IConnector, + semanticId?: string, + other?: Semanticable, + name?: string, + description?: string, + productType?: ISKOSConcept, + quantity?: IQuantity, + alcoholPercentage?: number, + lifetime?: string, + claims?: ISKOSConcept[], + usageOrStorageConditions?: string, + allergenCharacteristics?: IAllergenCharacteristic[], + nutrientCharacteristics?: INutrientCharacteristic[], + physicalCharacteristics?: IPhysicalCharacteristic[], + geographicalOrigin?: ISKOSConcept, + catalogItems?: ICatalogItem[], + certifications?: ISKOSConcept[], + natureOrigin?: ISKOSConcept[], + partOrigin?: ISKOSConcept[], + doNotStore?: boolean, + }) { + + const type: string = TECHNICAL_PRODUCT_SEM_TYPE; + + if (parameters.other) { + super({ + connector: parameters.connector, + semanticId: parameters.semanticId!, + other: parameters.other, + }); + 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 + }); + } + + + if (!parameters.doNotStore) { + this.connector.store(this); + } + + } +} diff --git a/src/TechnicalProductProposer.ts b/src/TechnicalProductProposer.ts index bb0c8b5..a36314b 100644 --- a/src/TechnicalProductProposer.ts +++ b/src/TechnicalProductProposer.ts @@ -1,12 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ import ITechnicalProduct from "./ITechnicalProduct.js" import { Semanticable } from "@virtual-assembly/semantizer" export default interface TechnicalProductProposer { - getProposedTechnicalProducts(): Promise> - ; + getProposedTechnicalProducts(): Promise; + proposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; + unproposeTechnicalProducts(technicalProducts: ITechnicalProduct): void; } diff --git a/src/WebsiteOwner.ts b/src/WebsiteOwner.ts new file mode 100644 index 0000000..18039c0 --- /dev/null +++ b/src/WebsiteOwner.ts @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 Maxime Lecoq + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. +*/ +import ContactableByWebsite from "./ContactableByWebsite.js" + +import { Semanticable } from "@virtual-assembly/semantizer" + +export default interface WebsiteOwner extends ContactableByWebsite { + + addWebsite(website: string): void; + + removeWebsite(website: string): void; + +} diff --git a/src/context.ts b/src/context.ts index 48b1fa7..5471bc2 100644 --- a/src/context.ts +++ b/src/context.ts @@ -1,74 +1,94 @@ -const context = { - "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "skos" : "http://www.w3.org/2004/02/skos/core#", - "dc": "http://purl.org/dc/elements/1.1/#", - "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", - "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", - "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", - "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", - "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", - "dfc-b:hasUnit":{ - "@type":"@id" - }, - "dfc-b:hasQuantity":{ - "@type":"@id" - }, - "dfc-b:hasType":{ - "@type":"@id" - }, - "dfc-b:references":{ - "@type":"@id" - }, - "dfc-b:referencedBy":{ - "@type":"@id" - }, - "dfc-b:offeres":{ - "@type":"@id" - }, - "dfc-b:supplies":{ - "@type":"@id" - }, - "dfc-b:defines":{ - "@type":"@id" - }, - "dfc-b:affiliates":{ - "@type":"@id" - }, - "dfc-b:manages":{ - "@type":"@id" - }, - "dfc-b:offeredThrough":{ - "@type":"@id" - }, - "dfc-b:hasBrand":{ - "@type":"@id" - }, - "dfc-b:hasGeographicalOrigin":{ - "@type":"@id" - }, - "dfc-b:hasClaim":{ - "@type":"@id" - }, - "dfc-b:hasAllergenDimension":{ - "@type":"@id" - }, - "dfc-b:hasNutrimentDimension":{ - "@type":"@id" - }, - "dfc-b:hasPhysicalDimension":{ - "@type":"@id" - }, - "dfc:owner":{ - "@type":"@id" - }, - "dfc-t:hostedBy":{ - "@type":"@id" - }, - "dfc-t:hasPivot":{ - "@type":"@id" - }, - "dfc-t:represent":{ - "@type":"@id" - } +export default { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "skos" : "http://www.w3.org/2004/02/skos/core#", + "dfc": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_FullModel.owl#", + "dc": "http://purl.org/dc/elements/1.1/#", + "dfc-b": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_BusinessOntology.owl#", + "dfc-p": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_ProductOntology.owl#", + "dfc-t": "https://github.com/datafoodconsortium/ontology/releases/latest/download/DFC_TechnicalOntology.owl#", + "dfc-m": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/measures.rdf#", + "dfc-pt": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#", + "dfc-f": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/facets.rdf#", + "dfc-v": "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#", + "dfc-b:hasUnit":{ + "@type":"@id" + }, + "dfc-b:consumes":{ + "@type":"@id" + }, + "dfc-b:produces":{ + "@type":"@id" + }, + "dfc-b:hasIncome":{ + "@type":"@id" + }, + "dfc-b:hasOutcome":{ + "@type":"@id" + }, + "dfc-b:hasTransformationType":{ + "@type":"@id" + }, + "dfc-b:hasQuantity":{ + "@type":"@id" + }, + "dfc-p:hasType":{ + "@type":"@id" + }, + "dfc-b:hasType":{ + "@type":"@id" + }, + "dfc-b:references":{ + "@type":"@id" + }, + "dfc-b:referencedBy":{ + "@type":"@id" + }, + "dfc-b:offeres":{ + "@type":"@id" + }, + "dfc-b:supplies":{ + "@type":"@id" + }, + "dfc-b:defines":{ + "@type":"@id" + }, + "dfc-b:affiliates":{ + "@type":"@id" + }, + "dfc-b:manages":{ + "@type":"@id" + }, + "dfc-b:offeredThrough":{ + "@type":"@id" + }, + "dfc-b:hasBrand":{ + "@type":"@id" + }, + "dfc-b:hasGeographicalOrigin":{ + "@type":"@id" + }, + "dfc-b:hasClaim":{ + "@type":"@id" + }, + "dfc-b:hasAllergenDimension":{ + "@type":"@id" + }, + "dfc-b:hasNutrientDimension":{ + "@type":"@id" + }, + "dfc-b:hasPhysicalDimension":{ + "@type":"@id" + }, + "dfc:owner":{ + "@type":"@id" + }, + "dfc-t:hostedBy":{ + "@type":"@id" + }, + "dfc-t:hasPivot":{ + "@type":"@id" + }, + "dfc-t:represent":{ + "@type":"@id" } -export default context; \ No newline at end of file +} diff --git a/test/Address.test.js b/test/Address.test.js index a4a5ef8..ae47a30 100644 --- a/test/Address.test.js +++ b/test/Address.test.js @@ -1,10 +1,10 @@ -import Address from '../lib/Address.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); -const address = new Address({ - connector: connector, +const address = connector.createAddress({ semanticId: "http://myplatform.com/address/address1", street: "1, place or Europe", postalCode: "00001", @@ -12,56 +12,56 @@ const address = new Address({ country: "Belgium", }); -const data = '{"@context":"https://www.datafoodconsortium.org","@id":"http://myplatform.com/address/address1","@type":"dfc-b:Address","dfc-b:hasCity":"Brussels","dfc-b:hasCountry":"Belgium","dfc-b:hasPostalCode":"00001","dfc-b:hasStreet":"1, place or Europe"}'; +const json = '{"@context":"https://www.datafoodconsortium.org","@id":"http://myplatform.com/address/address1","@type":"dfc-b:Address","dfc-b:hasCity":"Brussels","dfc-b:hasCountry":"Belgium","dfc-b:hasPostalCode":"00001","dfc-b:hasStreet":"1, place or Europe"}'; test('Address:import', async () => { - const imported = await connector.import(data); + const imported = await connector.import(json); const expected = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(expected.equals(address)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(expected.equals(address), true); }); -test('Address:export', async () => { +test('Address:export', async () => { const serialized = await connector.export([address]); - expect(serialized).toStrictEqual(data); + expect.strictEqual(serialized, json); }); -test('Address:getSemanticId', async () => { - expect(address.getSemanticId()).toStrictEqual("http://myplatform.com/address/address1"); +test('Address:getSemanticId', () => { + expect.strictEqual(address.getSemanticId(), "http://myplatform.com/address/address1"); }); -test('Address:getStreet', async () => { - expect(address.getStreet()).toStrictEqual("1, place or Europe"); +test('Address:getStreet', () => { + expect.strictEqual(address.getStreet(), "1, place or Europe"); }); -test('Address:getPostalCode', async () => { - expect(address.getPostalCode()).toStrictEqual("00001"); +test('Address:getPostalCode', () => { + expect.strictEqual(address.getPostalCode(), "00001"); }); -test('Address:getCity', async () => { - expect(address.getCity()).toStrictEqual("Brussels"); +test('Address:getCity', () => { + expect.strictEqual(address.getCity(), "Brussels"); }); -test('Address:getCountry', async () => { - expect(address.getCountry()).toStrictEqual("Belgium"); +test('Address:getCountry', () => { + expect.strictEqual(address.getCountry(), "Belgium"); }); -test('Address:setStreet', async () => { +test('Address:setStreet', () => { address.setStreet("21, place or Europe"); - expect(address.getStreet()).toStrictEqual("21, place or Europe"); + expect.strictEqual(address.getStreet(), "21, place or Europe"); }); -test('Address:setPostalCode', async () => { +test('Address:setPostalCode', () => { address.setPostalCode("00002"); - expect(address.getPostalCode()).toStrictEqual("00002"); + expect.strictEqual(address.getPostalCode(), "00002"); }); -test('Address:setCity', async () => { +test('Address:setCity', () => { address.setCity("Paris"); - expect(address.getCity()).toStrictEqual("Paris"); + expect.strictEqual(address.getCity(), "Paris"); }); -test('Address:setCountry', async () => { +test('Address:setCountry', () => { address.setCountry("France"); - expect(address.getCountry()).toStrictEqual("France"); -}); \ No newline at end of file + expect.strictEqual(address.getCountry(), "France"); +}); diff --git a/test/AllergenCharacteristic.test.js b/test/AllergenCharacteristic.test.js index ec15f38..82095f3 100644 --- a/test/AllergenCharacteristic.test.js +++ b/test/AllergenCharacteristic.test.js @@ -1,6 +1,8 @@ -import AllergenCharacteristic from '../lib/AllergenCharacteristic.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadMeasures(JSON.stringify(measures)); @@ -8,10 +10,9 @@ await connector.loadMeasures(JSON.stringify(measures)); const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; const allergenDimension = connector.MEASURES.DIMENSION.ALLERGENDIMENSION.PEANUTS; -const allergenCharacteristic = new AllergenCharacteristic({ - connector: connector, - value: 1, - unit: kilogram, +const allergenCharacteristic = connector.createAllergenCharacteristic({ + value: 1, + unit: kilogram, allergenDimension: allergenDimension }); @@ -20,27 +21,27 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@ty test('AllergenCharacteristic:import', async () => { const imported = await connector.import(json); const importedAllergenCharacteristic = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedAllergenCharacteristic.equals(allergenCharacteristic)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedAllergenCharacteristic.equals(allergenCharacteristic), true); }); test('AllergenCharacteristic:export', async () => { const serialized = await connector.export([allergenCharacteristic]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('AllergenCharacteristic:getSemanticId', async () => { - expect(allergenCharacteristic.getSemanticId()).toStrictEqual(undefined); +test('AllergenCharacteristic:getSemanticId', () => { + expect.strictEqual(allergenCharacteristic.getSemanticId(), undefined); }); -test('AllergenCharacteristic:getQuantityValue', async () => { - expect(allergenCharacteristic.getQuantityValue()).toStrictEqual(1); +test('AllergenCharacteristic:getQuantityValue', () => { + expect.strictEqual(allergenCharacteristic.getQuantityValue(), 1); }); test('AllergenCharacteristic:getQuantityUnit', async () => { - expect(await allergenCharacteristic.getQuantityUnit()).toStrictEqual(kilogram); + expect.strictEqual(await allergenCharacteristic.getQuantityUnit(), kilogram); }); test('AllergenCharacteristic:getQuantityDimension', async () => { - expect(await allergenCharacteristic.getQuantityDimension()).toStrictEqual(allergenDimension); + expect.strictEqual(await allergenCharacteristic.getQuantityDimension(), allergenDimension); }); \ No newline at end of file diff --git a/test/Catalog.test.js b/test/Catalog.test.js index ea3c5be..afea2f4 100644 --- a/test/Catalog.test.js +++ b/test/Catalog.test.js @@ -1,34 +1,28 @@ -import Catalog from '../lib/Catalog.js'; -import CatalogItem from '../lib/CatalogItem.js'; -import Enterprise from '../lib/Enterprise.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myplatform.com/catalog1","@type":"dfc-b:Catalog","dfc-b:lists":{"@id":"http://myplatform.com/catalogItem1"},"dfc-b:maintainedBy":{"@id":"http://myplatform.com/enterprise1"}}`; -const enterprise = new Enterprise({ - connector: connector, +const enterprise = connector.createEnterprise({ semanticId: "http://myplatform.com/enterprise1" }); -const enterprise2 = new Enterprise({ - connector: connector, +const enterprise2 = connector.createEnterprise({ semanticId: "http://myplatform.com/enterprise2" }); -const catalogItem = new CatalogItem({ - connector: connector, +const catalogItem = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem1" }); -const catalogItem2 = new CatalogItem({ - connector: connector, +const catalogItem2 = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem2" }); -const catalog = new Catalog({ - connector: connector, +const catalog = connector.createCatalog({ semanticId: "http://myplatform.com/catalog1", maintainers: [enterprise], items: [catalogItem] @@ -37,59 +31,58 @@ const catalog = new Catalog({ test('Catalog:import', async () => { const imported = await connector.import(json); const importedCatalog = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedCatalog.equals(catalog)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedCatalog.equals(catalog), true); }); test('Catalog:export', async () => { const serialized = await connector.export([catalog]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Catalog:getSemanticId', async () => { - expect(catalog.getSemanticId()).toStrictEqual("http://myplatform.com/catalog1"); +test('Catalog:getSemanticId', () => { + expect.strictEqual(catalog.getSemanticId(), "http://myplatform.com/catalog1"); }); test('Catalog:getMaintainers', async () => { const maintainers = await catalog.getMaintainers(); - expect(maintainers.length).toStrictEqual(1); - expect(maintainers[0].equals(enterprise)).toStrictEqual(true); + expect.strictEqual(maintainers.length, 1); + expect.strictEqual(maintainers[0].equals(enterprise), true); }); test('Catalog:getItems', async () => { const items = await catalog.getItems(); - expect(items.length).toStrictEqual(1); - expect(items[0].equals(catalogItem)).toStrictEqual(true); + expect.strictEqual(items.length, 1); + expect.strictEqual(items[0].equals(catalogItem), true); }); test('Catalog:addMaintainer', async () => { catalog.addMaintainer(enterprise2); const maintainers = await catalog.getMaintainers(); - expect(maintainers.length).toStrictEqual(2); - expect(maintainers[0].equals(enterprise)).toStrictEqual(true); - expect(maintainers[1].equals(enterprise2)).toStrictEqual(true); + expect.strictEqual(maintainers.length, 2); + expect.strictEqual(maintainers[0].equals(enterprise), true); + expect.strictEqual(maintainers[1].equals(enterprise2), true); }); test('Catalog:addItem', async () => { catalog.addItem(catalogItem2); const items = await catalog.getItems(); - expect(items.length).toStrictEqual(2); - expect(items[0].equals(catalogItem)).toStrictEqual(true); - expect(items[1].equals(catalogItem2)).toStrictEqual(true); + expect.strictEqual(items.length, 2); + expect.strictEqual(items[0].equals(catalogItem), true); + expect.strictEqual(items[1].equals(catalogItem2), true); }); +/* test('Catalog:removeMaintainer', async () => { - expect(() => catalog.removeMaintainer(enterprise)).toThrow(); - // catalog.removeMaintainer(enterprise); - // const maintainers = await catalog.getMaintainers(); - // expect(maintainers.length).toStrictEqual(1); - // expect(maintainers[0].equals(enterprise2)).toStrictEqual(true); + catalog.removeMaintainer(enterprise); + const maintainers = await catalog.getMaintainers(); + expect.strictEqual(maintainers.length, 1); + expect.strictEqual(maintainers[0].equals(enterprise2), true); }); test('Catalog:removeItem', async () => { - expect(() => catalog.removeItem(catalogItem)).toThrow(); - // catalog.removeItem(catalogItem); - // const items = await catalog.getItems(); - // expect(items.length).toStrictEqual(1); - // expect(items[0].equals(catalogItem2)).toStrictEqual(true); -}); \ No newline at end of file + catalog.removeItem(catalogItem); + const items = await catalog.getItems(); + expect.strictEqual(items.length, 1); + expect.strictEqual(items[0].equals(catalogItem2), true); +});*/ \ No newline at end of file diff --git a/test/CatalogItem.test.js b/test/CatalogItem.test.js index ef4e14f..35095aa 100644 --- a/test/CatalogItem.test.js +++ b/test/CatalogItem.test.js @@ -1,45 +1,36 @@ -import CatalogItem from '../lib/CatalogItem.js'; -import Catalog from '../lib/Catalog.js'; -import SuppliedProduct from '../lib/SuppliedProduct.js'; -import Offer from '../lib/Offer.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myplatform.com/catalogItem1","@type":"dfc-b:CatalogItem","dfc-b:listedIn":{"@id":"http://myplatform.com/catalog1"},"dfc-b:offeredThrough":"http://myplatform.com/offer1","dfc-b:references":"http://myplatform.com/suppliedProduct1","dfc-b:sku":"sku","dfc-b:stockLimitation":"6.32"}`; -const suppliedProduct = new SuppliedProduct({ - connector: connector, +const suppliedProduct = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProduct1" }); -const suppliedProduct2 = new SuppliedProduct({ - connector: connector, +const suppliedProduct2 = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProduct2" }); -const offer1 = new Offer({ - connector: connector, +const offer1 = connector.createOffer({ semanticId: "http://myplatform.com/offer1" }); -const offer2 = new Offer({ - connector: connector, +const offer2 = connector.createOffer({ semanticId: "http://myplatform.com/offer2" }); -const catalog = new Catalog({ - connector: connector, +const catalog = connector.createCatalog({ semanticId: "http://myplatform.com/catalog1" }); -const catalog2 = new Catalog({ - connector: connector, +const catalog2 = connector.createCatalog({ semanticId: "http://myplatform.com/catalog2" }); -const catalogItem = new CatalogItem({ - connector: connector, +const catalogItem = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem1", catalogs: [catalog], offers: [offer1], @@ -51,72 +42,72 @@ const catalogItem = new CatalogItem({ test('CatalogItem:import', async () => { const imported = await connector.import(json); const importedCatalogItem = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedCatalogItem.equals(catalogItem)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedCatalogItem.equals(catalogItem), true); }); test('CatalogItem:export', async () => { const serialized = await connector.export([catalogItem]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('CatalogItem:getSemanticId', async () => { - expect(catalogItem.getSemanticId()).toStrictEqual("http://myplatform.com/catalogItem1"); +test('CatalogItem:getSemanticId', () => { + expect.strictEqual(catalogItem.getSemanticId(), "http://myplatform.com/catalogItem1"); }); test('CatalogItem:getCatalogs', async () => { const catalogs = await catalogItem.getCatalogs(); - expect(catalogs.length).toStrictEqual(1); - expect(catalogs[0].equals(catalog)).toStrictEqual(true); + expect.strictEqual(catalogs.length, 1); + expect.strictEqual(catalogs[0].equals(catalog), true); }); test('CatalogItem:getOfferers', async () => { const offers = await catalogItem.getOfferers(); - expect(offers.length).toStrictEqual(1); - expect(offers[0].equals(offer1)).toStrictEqual(true); + expect.strictEqual(offers.length, 1); + expect.strictEqual(offers[0].equals(offer1), true); }); test('CatalogItem:getOfferedProduct', async () => { const offeredProduct = await catalogItem.getOfferedProduct(); - expect(offeredProduct.equals(suppliedProduct)).toStrictEqual(true); + expect.strictEqual(offeredProduct.equals(suppliedProduct), true); }); -test('CatalogItem:getSku', async () => { - expect(catalogItem.getSku()).toStrictEqual("sku"); +test('CatalogItem:getSku', () => { + expect.strictEqual(catalogItem.getSku(), "sku"); }); -test('CatalogItem:getStockLimitation', async () => { - expect(catalogItem.getStockLimitation()).toStrictEqual(6.32); +test('CatalogItem:getStockLimitation', () => { + expect.strictEqual(catalogItem.getStockLimitation(), 6.32); }); test('CatalogItem:registerInCatalog', async () => { catalogItem.registerInCatalog(catalog2); const catalogs = await catalogItem.getCatalogs(); - expect(catalogs.length).toStrictEqual(2); - expect(catalogs[0].equals(catalog)).toStrictEqual(true); - expect(catalogs[1].equals(catalog2)).toStrictEqual(true); + expect.strictEqual(catalogs.length, 2); + expect.strictEqual(catalogs[0].equals(catalog), true); + expect.strictEqual(catalogs[1].equals(catalog2), true); }); -test('CatalogItem:setSku', async () => { +test('CatalogItem:setSku', () => { catalogItem.setSku("sku2"); - expect(catalogItem.getSku()).toStrictEqual("sku2"); + expect.strictEqual(catalogItem.getSku(), "sku2"); }); -test('CatalogItem:setStockLimitation', async () => { +test('CatalogItem:setStockLimitation', () => { catalogItem.setStockLimitation(5); - expect(catalogItem.getStockLimitation()).toStrictEqual(5); + expect.strictEqual(catalogItem.getStockLimitation(), 5); }); test('CatalogItem:setOfferedProduct', async () => { catalogItem.setOfferedProduct(suppliedProduct2); const offeredProduct = await catalogItem.getOfferedProduct(); - expect(offeredProduct.equals(suppliedProduct2)).toStrictEqual(true); + expect.strictEqual(offeredProduct.equals(suppliedProduct2), true); }); test('CatalogItem:addOffer', async () => { catalogItem.addOffer(offer2); const offers = await catalogItem.getOfferers(); - expect(offers.length).toStrictEqual(2); - expect(offers[0].equals(offer1)).toStrictEqual(true); - expect(offers[1].equals(offer2)).toStrictEqual(true); + expect.strictEqual(offers.length, 2); + expect.strictEqual(offers[0].equals(offer1), true); + expect.strictEqual(offers[1].equals(offer2), true); }); \ No newline at end of file diff --git a/test/Connector.test.js b/test/Connector.test.js new file mode 100644 index 0000000..db72d54 --- /dev/null +++ b/test/Connector.test.js @@ -0,0 +1,25 @@ +import expect from 'node:assert'; +import { test } from 'node:test'; +import Connector from "../lib/Connector.js"; +import ConnectorImporterJsonldStream from "../lib/ConnectorImporterJsonldStream.js"; +import context from "../lib/context.js"; + +const connector = new Connector(); + +class Loader { + async load(url) { + return { + "@context": context + } + } +} +const importer = new ConnectorImporterJsonldStream({ documentLoader: new Loader() }); + +const data = `{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id":"_:b1","@type":"dfc-b:Price","dfc-b:VATrate":"8","dfc-b:hasUnit":"dfc-m:Euro","dfc-b:value":"2.54"},{"@id":"http://myplatform.com/offer1","@type":"dfc-b:Offer","dfc-b:offeredItem":{"@id":"http://myplatform.com/suppliedProduct1"},"dfc-b:offeredTo":{"@id":"http://myplatform.com/customerCategory1"},"dfc-b:price":{"@id":"_:b1"},"dfc-b:stockLimitation":"4.21"}]}`; + +test('Connector:test', async () => { + expect.ok('Connector is OK', connector); + const imported = await connector.import(data, { importer: importer }); + const expected = imported[0]; + expect.ok('Imported value at index 0 is OK', expected); +}); diff --git a/test/CustomerCategory.test.js b/test/CustomerCategory.test.js index 9b0b5df..d23cf31 100644 --- a/test/CustomerCategory.test.js +++ b/test/CustomerCategory.test.js @@ -1,10 +1,10 @@ -import CustomerCategory from '../lib/CustomerCategory.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); -const customerCategory = new CustomerCategory({ - connector: connector, +const customerCategory = connector.createCustomerCategory({ semanticId: "http://myplatform.com/customerCategory1", description: "description" }) @@ -14,24 +14,24 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myp test('CustomerCategory:import', async () => { const imported = await connector.import(json); const importedCustomerCategory = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedCustomerCategory.equals(customerCategory)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedCustomerCategory.equals(customerCategory), true); }); test('CustomerCategory:export', async () => { const serialized = await connector.export([customerCategory]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('CustomerCategory:getSemanticId', async () => { - expect(customerCategory.getSemanticId()).toStrictEqual("http://myplatform.com/customerCategory1"); +test('CustomerCategory:getSemanticId', () => { + expect.strictEqual(customerCategory.getSemanticId(), "http://myplatform.com/customerCategory1"); }); -test('CustomerCategory:getDescription', async () => { - expect(customerCategory.getDescription()).toStrictEqual("description"); +test('CustomerCategory:getDescription', () => { + expect.strictEqual(customerCategory.getDescription(), "description"); }); test('CustomerCategory:setDescription', async () => { customerCategory.setDescription("description2"); - expect(customerCategory.getDescription()).toStrictEqual("description2"); + expect.strictEqual(customerCategory.getDescription(), "description2"); }); \ No newline at end of file diff --git a/test/Enterprise.test.js b/test/Enterprise.test.js index 8a8f607..c1dc398 100644 --- a/test/Enterprise.test.js +++ b/test/Enterprise.test.js @@ -1,66 +1,51 @@ -import Enterprise from '../lib/Enterprise.js'; -import Address from '../lib/Address.js'; -import CustomerCategory from '../lib/CustomerCategory.js'; -import SuppliedProduct from '../lib/SuppliedProduct.js'; -import Catalog from '../lib/Catalog.js'; -import CatalogItem from '../lib/CatalogItem.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); -const address = new Address({ - connector: connector, +const address = connector.createAddress({ semanticId: "http://myplatform.com/address1", city: "Briouze" }); -const address2 = new Address({ - connector: connector, +const address2 = connector.createAddress({ semanticId: "http://myplatform.com/address2", }); -const customerCategory = new CustomerCategory({ - connector: connector, +const customerCategory = connector.createCustomerCategory({ semanticId: "http://myplatform.com/customerCategory1" }); -const customerCategory2 = new CustomerCategory({ - connector: connector, +const customerCategory2 = connector.createCustomerCategory({ semanticId: "http://myplatform.com/customerCategory2" }); -const suppliedProduct = new SuppliedProduct({ - connector: connector, +const suppliedProduct = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProduct1" }); -const suppliedProduct2 = new SuppliedProduct({ - connector: connector, +const suppliedProduct2 = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProduct2" }); -const catalog = new Catalog({ - connector: connector, +const catalog = connector.createCatalog({ semanticId: "http://myplatform.com/catalog1" }); -const catalog2 = new Catalog({ - connector: connector, +const catalog2 = connector.createCatalog({ semanticId: "http://myplatform.com/catalog2" }); -const catalogItem = new CatalogItem({ - connector: connector, +const catalogItem = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem1" }); -const catalogItem2 = new CatalogItem({ - connector: connector, +const catalogItem2 = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem2" }); -const enterprise = new Enterprise({ - connector: connector, +const enterprise = connector.createEnterprise({ semanticId: "http://myplatform.com/enterprise1", description: "description", localizations: [address], @@ -77,123 +62,123 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myp test('Enterprise:import', async () => { const imported = await connector.import(json); const importedEnterprise = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedEnterprise.equals(enterprise)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedEnterprise.equals(enterprise), true); }); test('Enterprise:export', async () => { const serialized = await connector.export([enterprise]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Enterprise:getSemanticId', async () => { - expect(enterprise.getSemanticId()).toStrictEqual("http://myplatform.com/enterprise1"); +test('Enterprise:getSemanticId', () => { + expect.strictEqual(enterprise.getSemanticId(), "http://myplatform.com/enterprise1"); }); -test('Enterprise:getDescription', async () => { - expect(enterprise.getDescription()).toStrictEqual("description"); +test('Enterprise:getDescription', () => { + expect.strictEqual(enterprise.getDescription(), "description"); }); test('Enterprise:getLocalizations', async () => { const localizations = await enterprise.getLocalizations(); - expect(localizations.length).toStrictEqual(1); - expect(localizations[0].equals(address)).toStrictEqual(true); + expect.strictEqual(localizations.length, 1); + expect.strictEqual(localizations[0].equals(address), true); }); -test('Enterprise:getVatNumber', async () => { - expect(enterprise.getVatNumber()).toStrictEqual("vatNumber"); +test('Enterprise:getVatNumber', () => { + expect.strictEqual(enterprise.getVatNumber(), "vatNumber"); }); test('Enterprise:getCustomerCategories', async () => { const customerCategories = await enterprise.getCustomerCategories(); - expect(customerCategories.length).toStrictEqual(1); - expect(customerCategories[0].equals(customerCategory)).toStrictEqual(true); + expect.strictEqual(customerCategories.length, 1); + expect.strictEqual(customerCategories[0].equals(customerCategory), true); }); test('Enterprise:getSuppliedProducts', async () => { const suppliedProducts = await enterprise.getSuppliedProducts(); - expect(suppliedProducts.length).toStrictEqual(1); - expect(suppliedProducts[0].equals(suppliedProduct)).toStrictEqual(true); + expect.strictEqual(suppliedProducts.length, 1); + expect.strictEqual(suppliedProducts[0].equals(suppliedProduct), true); }); test('Enterprise:getMaintainedCatalogs', async () => { const catalogs = await enterprise.getMaintainedCatalogs(); - expect(catalogs.length).toStrictEqual(1); - expect(catalogs[0].equals(catalog)).toStrictEqual(true); + expect.strictEqual(catalogs.length, 1); + expect.strictEqual(catalogs[0].equals(catalog), true); }); test('Enterprise:getManagedCatalogItems', async () => { const catalogItems = await enterprise.getManagedCatalogItems(); - expect(catalogItems.length).toStrictEqual(1); - expect(catalogItems[0].equals(catalogItem)).toStrictEqual(true); + expect.strictEqual(catalogItems.length, 1); + expect.strictEqual(catalogItems[0].equals(catalogItem), true); }); -test('Enterprise:setDescription', async () => { +test('Enterprise:setDescription', () => { enterprise.setDescription("description2"); - expect(enterprise.getDescription()).toStrictEqual("description2"); + expect.strictEqual(enterprise.getDescription(), "description2"); }); test('Enterprise:addLocalization', async () => { enterprise.addLocalization(address2); const localizations = await enterprise.getLocalizations(); - expect(localizations.length).toStrictEqual(2); - expect(localizations[1].equals(address2)).toStrictEqual(true); + expect.strictEqual(localizations.length, 2); + expect.strictEqual(localizations[1].equals(address2), true); }); -test('Enterprise:setVatNumber', async () => { - expect(enterprise.getVatNumber()).toStrictEqual("vatNumber"); +test('Enterprise:setVatNumber', () => { + expect.strictEqual(enterprise.getVatNumber(), "vatNumber"); }); test('Enterprise:addCustomerCategory', async () => { enterprise.addCustomerCategory(customerCategory2); const customerCategories = await enterprise.getCustomerCategories(); - expect(customerCategories.length).toStrictEqual(2); - expect(customerCategories[1].equals(customerCategory2)).toStrictEqual(true); + expect.strictEqual(customerCategories.length, 2); + expect.strictEqual(customerCategories[1].equals(customerCategory2), true); }); test('Enterprise:supplyProduct', async () => { enterprise.supplyProduct(suppliedProduct2); const suppliedProducts = await enterprise.getSuppliedProducts(); - expect(suppliedProducts.length).toStrictEqual(2); - expect(suppliedProducts[0].equals(suppliedProduct)).toStrictEqual(true); - expect(suppliedProducts[1].equals(suppliedProduct2)).toStrictEqual(true); + expect.strictEqual(suppliedProducts.length, 2); + expect.strictEqual(suppliedProducts[0].equals(suppliedProduct), true); + expect.strictEqual(suppliedProducts[1].equals(suppliedProduct2), true); }); +/* test('Enterprise:unsupplyProduct', async () => { - expect(() => enterprise.unsupplyProduct(suppliedProduct)).toThrow(); - // enterprise.unsupplyProduct(suppliedProduct); - // const suppliedProducts = await enterprise.getSuppliedProducts(); - // expect(suppliedProducts.length).toStrictEqual(1); - // expect(suppliedProducts[0].equals(suppliedProduct2)).toStrictEqual(true); -}); + enterprise.unsupplyProduct(suppliedProduct); + const suppliedProducts = await enterprise.getSuppliedProducts(); + expect.strictEqual(suppliedProducts.length, 1); + expect.strictEqual(suppliedProducts[0].equals(suppliedProduct2), true); +});*/ test('Enterprise:maintainCatalog', async () => { enterprise.maintainCatalog(catalog2); const catalogs = await enterprise.getMaintainedCatalogs(); - expect(catalogs.length).toStrictEqual(2); - expect(catalogs[0].equals(catalog)).toStrictEqual(true); - expect(catalogs[1].equals(catalog2)).toStrictEqual(true); + expect.strictEqual(catalogs.length, 2); + expect.strictEqual(catalogs[0].equals(catalog), true); + expect.strictEqual(catalogs[1].equals(catalog2), true); }); +/* test('Enterprise:unmaintainCatalog', async () => { - expect(() => enterprise.unmaintainCatalog(catalog)).toThrow(); - // enterprise.unmaintainCatalog(catalog); - // const catalogs = await enterprise.getMaintainedCatalogs(); - // expect(catalogs.length).toStrictEqual(); - // expect(catalogs[0].equals(catalog2)).toStrictEqual(true); -}); + enterprise.unmaintainCatalog(catalog); + const catalogs = await enterprise.getMaintainedCatalogs(); + expect(catalogs.length).strictEqual(); + expect.strictEqual(catalogs[0].equals(catalog2), true); +});*/ test('Enterprise:manageCatalogItem', async () => { enterprise.manageCatalogItem(catalogItem2); const catalogItems = await enterprise.getManagedCatalogItems(); - expect(catalogItems.length).toStrictEqual(2); - expect(catalogItems[1].equals(catalogItem2)).toStrictEqual(true); + expect.strictEqual(catalogItems.length, 2); + expect.strictEqual(catalogItems[1].equals(catalogItem2), true); }); +/* test('Enterprise:unmanageCatalogItem', async () => { - expect(() => enterprise.unmanageCatalogItem(catalogItem)).toThrow(); - // enterprise.unmanageCatalogItem(catalogItem); - // const catalogItems = await enterprise.getManagedCatalogItems(); - // expect(catalogItems.length).toStrictEqual(1); - // expect(catalogItems[0].equals(catalogItem2)).toStrictEqual(true); -}); \ No newline at end of file + enterprise.unmanageCatalogItem(catalogItem); + const catalogItems = await enterprise.getManagedCatalogItems(); + expect.strictEqual(catalogItems.length, 1); + expect.strictEqual(catalogItems[0].equals(catalogItem2), true); +});*/ \ No newline at end of file diff --git a/test/NutrientCharacteristic.test.js b/test/NutrientCharacteristic.test.js index fb8ec0e..ac92fc3 100644 --- a/test/NutrientCharacteristic.test.js +++ b/test/NutrientCharacteristic.test.js @@ -1,7 +1,9 @@ -import NutrientCharacteristic from '../lib/NutrientCharacteristic.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import facets from '../test/thesaurus/facets.json' assert { type: 'json' }; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const facets = JSON.parse(fs.readFileSync('./test/thesaurus/facets.json')); +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadFacets(JSON.stringify(facets)); @@ -12,54 +14,53 @@ const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; const nutrientDimension = connector.MEASURES.DIMENSION.NUTRIENTDIMENSION.CALCIUM; const nutrientDimension2 = connector.MEASURES.DIMENSION.NUTRIENTDIMENSION.FAT; -const nutrientCharacteristic = new NutrientCharacteristic({ - connector: connector, +const nutrientCharacteristic = connector.createNutrientCharacteristic({ value: 10, unit: kilogram, nutrientDimension: nutrientDimension }); -const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@type":"dfc-b:NutrientCharacteristic","dfc-b:hasNutrientDimension":{"@id":"dfc-m:Calcium"},"dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"10"}`; +const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@type":"dfc-b:NutrientCharacteristic","dfc-b:hasNutrientDimension":"dfc-m:Calcium","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"10"}`; test('NutrientCharacteristic:import', async () => { const imported = await connector.import(json); const importedNutrientCharacteristic = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedNutrientCharacteristic.equals(nutrientCharacteristic)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedNutrientCharacteristic.equals(nutrientCharacteristic), true); }); test('NutrientCharacteristic:export', async () => { const serialized = await connector.export([nutrientCharacteristic]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('NutrientCharacteristic:getSemanticId', async () => { - expect(nutrientCharacteristic.getSemanticId()).toStrictEqual(undefined); +test('NutrientCharacteristic:getSemanticId', () => { + expect.strictEqual(nutrientCharacteristic.getSemanticId(), undefined); }); -test('NutrientCharacteristic:getQuantityValue', async () => { - expect(nutrientCharacteristic.getQuantityValue()).toStrictEqual(10); +test('NutrientCharacteristic:getQuantityValue', () => { + expect.strictEqual(nutrientCharacteristic.getQuantityValue(), 10); }); test('NutrientCharacteristic:getQuantityUnit', async () => { - expect(await nutrientCharacteristic.getQuantityUnit()).toStrictEqual(kilogram); + expect.strictEqual(await nutrientCharacteristic.getQuantityUnit(), kilogram); }); test('NutrientCharacteristic:getQuantityDimension', async () => { - expect(await nutrientCharacteristic.getQuantityDimension()).toStrictEqual(nutrientDimension); + expect.strictEqual(await nutrientCharacteristic.getQuantityDimension(), nutrientDimension); }); -test('NutrientCharacteristic:setQuantityValue', async () => { +test('NutrientCharacteristic:setQuantityValue', () => { nutrientCharacteristic.setQuantityValue(6.35); - expect(nutrientCharacteristic.getQuantityValue()).toStrictEqual(6.35); + expect.strictEqual(nutrientCharacteristic.getQuantityValue(), 6.35); }); test('NutrientCharacteristic:setQuantityUnit', async () => { nutrientCharacteristic.setQuantityUnit(gram); - expect(await nutrientCharacteristic.getQuantityUnit()).toStrictEqual(gram); + expect.strictEqual(await nutrientCharacteristic.getQuantityUnit(), gram); }); test('NutrientCharacteristic:setQuantityDimension', async () => { nutrientCharacteristic.setQuantityDimension(nutrientDimension2); - expect(await nutrientCharacteristic.getQuantityDimension()).toStrictEqual(nutrientDimension2); + expect.strictEqual(await nutrientCharacteristic.getQuantityDimension(), nutrientDimension2); }); \ No newline at end of file diff --git a/test/Offer.test.js b/test/Offer.test.js index a9352a9..8d1fd28 100644 --- a/test/Offer.test.js +++ b/test/Offer.test.js @@ -1,32 +1,27 @@ -import Offer from '../lib/Offer.js'; -import Price from '../lib/Price.js'; -import CustomerCategory from '../lib/CustomerCategory.js'; -import SuppliedProduct from '../lib/SuppliedProduct.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadMeasures(JSON.stringify(measures)); -const customerCategory = new CustomerCategory({ - connector: connector, +const customerCategory = connector.createCustomerCategory({ semanticId: "http://myplatform.com/customerCategory1" }); -const suppliedProduct = new SuppliedProduct({ - connector: connector, +const suppliedProduct = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProduct1" }); -const price = new Price({ - connector: connector, +const price = connector.createPrice({ value: 2.54, vatRate: 8.0, unit: connector.MEASURES.UNIT.CURRENCYUNIT.EURO }); -const offer = new Offer({ - connector: connector, +const offer = connector.createOffer({ semanticId: "http://myplatform.com/offer1", offeredItem: suppliedProduct, offeredTo: customerCategory, @@ -39,65 +34,62 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id": test('Offer:import', async () => { const imported = await connector.import(json); const importedOffer = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedOffer.equals(offer)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedOffer.equals(offer), true); }); test('Offer:export', async () => { const serialized = await connector.export([offer]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Offer:getSemanticId', async () => { - expect(offer.getSemanticId()).toStrictEqual("http://myplatform.com/offer1"); +test('Offer:getSemanticId', () => { + expect.strictEqual(offer.getSemanticId(), "http://myplatform.com/offer1"); }); test('Offer:getOfferedItem', async () => { const expected = await offer.getOfferedItem(); - expect(expected.equals(suppliedProduct)).toStrictEqual(true); + expect.strictEqual(expected.equals(suppliedProduct), true); }); test('Offer:getOfferedTo', async () => { const expected = await offer.getCustomerCategory(); - expect(expected.equals(customerCategory)).toStrictEqual(true); + expect.strictEqual(expected.equals(customerCategory), true); }); test('Offer:getPrice', async () => { const expected = await offer.getPrice(); - expect(expected.equals(price)).toStrictEqual(true); + expect.strictEqual(expected.equals(price), true); }); -test('Offer:getStockLimitation', async () => { - expect(offer.getStockLimitation()).toStrictEqual(4.21); +test('Offer:getStockLimitation', () => { + expect.strictEqual(offer.getStockLimitation(), 4.21); }); test('Offer:setOfferedItem', async () => { - const expected = new SuppliedProduct({ - connector: connector, + const expected = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/suppliedProductSet" }); offer.setOfferedItem(expected); const received = await offer.getOfferedItem(); - expect(received.equals(expected)).toStrictEqual(true); + expect.strictEqual(received.equals(expected), true); }); test('Offer:setOfferedTo', async () => { - const expected = new CustomerCategory({ - connector: connector, + const expected = connector.createCustomerCategory({ semanticId: "http://myplatform.com/customerCategory1" }); offer.setCustomerCategory(expected); const received = await offer.getCustomerCategory(); - expect(received.equals(expected)).toStrictEqual(true); + expect.strictEqual(received.equals(expected), true); }); test('Offer:setPrice', async () => { - const expected = new Price({ - connector: connector, + const expected = connector.createPrice({ value: 3, vatRate: 19.0, unit: connector.MEASURES.UNIT.CURRENCYUNIT.EURO @@ -106,10 +98,10 @@ test('Offer:setPrice', async () => { offer.setPrice(expected); const received = await offer.getPrice(); - expect(received.equals(expected)).toStrictEqual(true); + expect.strictEqual(received.equals(expected), true); }); test('Offer:setStockLimitation', async () => { offer.setStockLimitation(5); - expect(offer.getStockLimitation()).toStrictEqual(5); + expect.strictEqual(offer.getStockLimitation(), 5); }); \ No newline at end of file diff --git a/test/Order.test.js b/test/Order.test.js index fe771ea..98d9cef 100644 --- a/test/Order.test.js +++ b/test/Order.test.js @@ -1,43 +1,34 @@ -import Order from '../lib/Order.js'; -import OrderLine from '../lib/OrderLine.js'; -import Person from '../lib/Person.js'; -import SaleSession from '../lib/SaleSession.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); -const customer = new Person({ - connector: connector, +const customer = connector.createPerson({ semanticId: "http://myplatform.com/person1", }); -const customer2 = new Person({ - connector: connector, +const customer2 = connector.createPerson({ semanticId: "http://myplatform.com/person12", }); -const saleSession = new SaleSession({ - connector: connector, +const saleSession = connector.createSaleSession({ semanticId: "http://myplatform.com/saleSession1" }); -const saleSession2 = new SaleSession({ - connector: connector, +const saleSession2 = connector.createSaleSession({ semanticId: "http://myplatform.com/saleSession2" }); -const orderLine = new OrderLine({ - connector: connector, +const orderLine = connector.createOrderLine({ semanticId: "http://myplatform.com/orderLine1" }); -const orderLine2 = new OrderLine({ - connector: connector, +const orderLine2 = connector.createOrderLine({ semanticId: "http://myplatform.com/orderLine2" }); -const order = new Order({ - connector: connector, +const order = connector.createOrder({ semanticId: "http://myplatform.com/order1", number: "0001", date: "date", @@ -51,77 +42,77 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myp test('Order:import', async () => { const imported = await connector.import(json); const importedOrder = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedOrder.equals(order)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedOrder.equals(order), true); }); test('Order:export', async () => { const serialized = await connector.export([order]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Order:getSemanticId', async () => { - expect(order.getSemanticId()).toStrictEqual("http://myplatform.com/order1"); +test('Order:getSemanticId', () => { + expect.strictEqual(order.getSemanticId(), "http://myplatform.com/order1"); }); -test('Order:getNumber', async () => { - expect(order.getNumber()).toStrictEqual("0001"); +test('Order:getNumber', () => { + expect.strictEqual(order.getNumber(), "0001"); }); -test('Order:getDate', async () => { - expect(order.getDate()).toStrictEqual("date"); +test('Order:getDate', () => { + expect.strictEqual(order.getDate(), "date"); }); test('Order:getSaleSession', async () => { const expected = await order.getSaleSession(); - expect(expected.equals(saleSession)).toStrictEqual(true); + expect.strictEqual(expected.equals(saleSession), true); }); test('Order:getLines', async () => { const expected = await order.getLines(); - expect(expected.length).toStrictEqual(1); - expect(expected[0].equals(orderLine)).toStrictEqual(true); + expect.strictEqual(expected.length, 1); + expect.strictEqual(expected[0].equals(orderLine), true); }); test('Order:getClient', async () => { const expected = await order.getClient(); - expect(expected.equals(customer)).toStrictEqual(true); + expect.strictEqual(expected.equals(customer), true); }); -test('Order:setNumber', async () => { +test('Order:setNumber', () => { order.setNumber("0002"); - expect(order.getNumber()).toStrictEqual("0002"); + expect.strictEqual(order.getNumber(), "0002"); }); -test('Order:setDate', async () => { +test('Order:setDate', () => { order.setDate("date2"); - expect(order.getDate()).toStrictEqual("date2"); + expect.strictEqual(order.getDate(), "date2"); }); test('Order:setSaleSession', async () => { order.setSaleSession(saleSession2); const expected = await order.getSaleSession(); - expect(expected.equals(saleSession2)).toStrictEqual(true); + expect.strictEqual(expected.equals(saleSession2), true); }); test('Order:setClient', async () => { order.setClient(customer2); const expected = await order.getClient(); - expect(expected.equals(customer2)).toStrictEqual(true); + expect.strictEqual(expected.equals(customer2), true); }); test('Order:addLine', async () => { order.addLine(orderLine2); const expected = await order.getLines(); - expect(expected.length).toStrictEqual(2); - expect(expected[0].equals(orderLine)).toStrictEqual(true); - expect(expected[1].equals(orderLine2)).toStrictEqual(true); + expect.strictEqual(expected.length, 2); + expect.strictEqual(expected[0].equals(orderLine), true); + expect.strictEqual(expected[1].equals(orderLine2), true); }); +/* test('Order:removeLine', async () => { - expect(() => order.removeLine(orderLine)).toThrow(); - // order.removeLine(orderLine); - // const expected = await order.getLines(); - // expect(expected.length).toStrictEqual(); - // expect(expected[0].equals(orderLine2)).toStrictEqual(true); -}); \ No newline at end of file + order.removeLine(orderLine); + const expected = await order.getLines(); + expect(expected.length).strictEqual(); + expect.strictEqual(expected[0].equals(orderLine2), true); +});*/ \ No newline at end of file diff --git a/test/OrderLine.test.js b/test/OrderLine.test.js index 5222e52..070752c 100644 --- a/test/OrderLine.test.js +++ b/test/OrderLine.test.js @@ -1,32 +1,27 @@ -import Offer from '../lib/Offer.js'; -import Order from '../lib/Order.js'; -import Price from '../lib/Price.js'; -import OrderLine from '../lib/OrderLine.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadMeasures(JSON.stringify(measures)); -const offer = new Offer({ - connector: connector, +const offer = connector.createOffer({ semanticId: "http://myplatform.com/offer1" }); -const order = new Order({ - connector: connector, +const order = connector.createOrder({ semanticId: "http://myplatform.com/order1" }); -const price = new Price({ - connector: connector, +const price = connector.createPrice({ value: 5.42, vatRate: 19.9, unit: connector.MEASURES.UNIT.CURRENCYUNIT.EURO }); -const orderLine = new OrderLine({ - connector: connector, +const orderLine = connector.createOrderLine({ semanticId: "http://myplatform.com/orderLine1", order: order, offer: offer, @@ -39,71 +34,68 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id": test('OrderLine:import', async () => { const imported = await connector.import(json); const importedOrderLine = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedOrderLine.equals(orderLine)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedOrderLine.equals(orderLine), true); }); test('OrderLine:export', async () => { const serialized = await connector.export([orderLine]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('OrderLine:getSemanticId', async () => { - expect(orderLine.getSemanticId()).toStrictEqual("http://myplatform.com/orderLine1"); +test('OrderLine:getSemanticId', () => { + expect.strictEqual(orderLine.getSemanticId(), "http://myplatform.com/orderLine1"); }); test('OrderLine:getOrder', async () => { const expected = await orderLine.getOrder(); - expect(expected.equals(order)).toStrictEqual(true); + expect.strictEqual(expected.equals(order), true); }); test('OrderLine:getOffer', async () => { const expected = await orderLine.getOffer(); - expect(expected.equals(offer)).toStrictEqual(true); + expect.strictEqual(expected.equals(offer), true); }); test('OrderLine:getPrice', async () => { const expected = await orderLine.getPrice(); - expect(expected.equals(price)).toStrictEqual(true); + expect.strictEqual(expected.equals(price), true); }); -test('OrderLine:getQuantity', async () => { - expect(orderLine.getQuantity()).toStrictEqual(2); +test('OrderLine:getQuantity', () => { + expect.strictEqual(orderLine.getQuantity(), 2); }); test('OrderLine:setOrder', async () => { - const order2 = new Order({ - connector: connector, + const order2 = connector.createOrder({ semanticId: "http://myplatform.com/order2" }); orderLine.setOrder(order2); const expected = await orderLine.getOrder(); - expect(expected.equals(order2)).toStrictEqual(true); + expect.strictEqual(expected.equals(order2), true); }); test('OrderLine:setOffer', async () => { - const offer2 = new Offer({ - connector: connector, + const offer2 = connector.createOffer({ semanticId: "http://myplatform.com/offer2" }); orderLine.setOffer(offer2); const expected = await orderLine.getOffer(); - expect(expected.equals(offer2)).toStrictEqual(true); + expect.strictEqual(expected.equals(offer2), true); }); test('OrderLine:setPrice', async () => { - const price2 = new Price({ - connector: connector, + const price2 = connector.createPrice({ value: 2.8, vatRate: 7, unit: connector.MEASURES.UNIT.CURRENCYUNIT.EURO }); orderLine.setPrice(price2); const expected = await orderLine.getPrice(); - expect(expected.equals(price2)).toStrictEqual(true); + expect.strictEqual(expected.equals(price2), true); }); test('OrderLine:setQuantity', async () => { orderLine.setQuantity(3.3); - expect(orderLine.getQuantity()).toStrictEqual(3.3); + expect.strictEqual(orderLine.getQuantity(), 3.3); }); \ No newline at end of file diff --git a/test/Person.test.js b/test/Person.test.js index 9ab5fa4..a5dda42 100644 --- a/test/Person.test.js +++ b/test/Person.test.js @@ -1,32 +1,26 @@ -import Person from '../lib/Person.js'; -import Address from '../lib/Address.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import Enterprise from '../lib/Enterprise.js'; const connector = new Connector(); -const address = new Address({ - connector: connector, +const address = connector.createAddress({ semanticId: "http://myplatform.com/address/address1" }); -const address2 = new Address({ - connector: connector, +const address2 = connector.createAddress({ semanticId: "http://myplatform.com/address/address2" }); -const enterprise = new Enterprise({ - connector: connector, +const enterprise = connector.createEnterprise({ semanticId: "http://myplatform.com/address/enterprise1" }); -const enterprise2 = new Enterprise({ - connector: connector, +const enterprise2 = connector.createEnterprise({ semanticId: "http://myplatform.com/address/enterprise2" }); -const person = new Person({ - connector: connector, +const person = connector.createPerson({ semanticId: "http://myplatform.com/person1", firstName: "John", lastName: "Smith", @@ -39,77 +33,76 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myp test('Person:import', async () => { const imported = await connector.import(json); const importedPerson = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedPerson.equals(person)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedPerson.equals(person), true); }); test('Person:export', async () => { const serialized = await connector.export([person]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Person:getSemanticId', async () => { - expect(person.getSemanticId()).toStrictEqual("http://myplatform.com/person1"); +test('Person:getSemanticId', () => { + expect.strictEqual(person.getSemanticId(), "http://myplatform.com/person1"); }); -test('Person:getFirstName', async () => { - expect(person.getFirstName()).toStrictEqual("John"); +test('Person:getFirstName', () => { + expect.strictEqual(person.getFirstName(), "John"); }); -test('Person:getLastName', async () => { - expect(person.getLastName()).toStrictEqual("Smith"); +test('Person:getLastName', () => { + expect.strictEqual(person.getLastName(), "Smith"); }); test('Person:getLocalizations', async () => { const localizations = await person.getLocalizations(); - expect(localizations.length).toStrictEqual(1); - expect(localizations[0].equals(address)).toStrictEqual(true); + expect.strictEqual(localizations.length, 1); + expect.strictEqual(localizations[0].equals(address), true); }); test('Person:getAffiliatedOrganizations', async () => { const organizations = await person.getAffiliatedOrganizations(); - expect(organizations.length).toStrictEqual(1); - expect(organizations[0].equals(enterprise)).toStrictEqual(true); + expect.strictEqual(organizations.length, 1); + expect.strictEqual(organizations[0].equals(enterprise), true); }); -test('Person:setFirstName', async () => { +test('Person:setFirstName', () => { person.setFirstName("John2"); - expect(person.getFirstName()).toStrictEqual("John2"); + expect.strictEqual(person.getFirstName(), "John2"); }); -test('Person:setLastName', async () => { +test('Person:setLastName', () => { person.setLastName("Smith2"); - expect(person.getLastName()).toStrictEqual("Smith2"); + expect.strictEqual(person.getLastName(), "Smith2"); }); test('Person:addLocalization', async () => { person.addLocalization(address2); const localizations = await person.getLocalizations(); - expect(localizations.length).toStrictEqual(2); - expect(localizations[0].equals(address)).toStrictEqual(true); - expect(localizations[1].equals(address2)).toStrictEqual(true); + expect.strictEqual(localizations.length, 2); + expect.strictEqual(localizations[0].equals(address), true); + expect.strictEqual(localizations[1].equals(address2), true); }); test('Person:affiliatedTo', async () => { person.affiliateTo(enterprise2); const organizations = await person.getAffiliatedOrganizations(); - expect(organizations.length).toStrictEqual(2); - expect(organizations[0].equals(enterprise)).toStrictEqual(true); - expect(organizations[1].equals(enterprise2)).toStrictEqual(true); + expect.strictEqual(organizations.length, 2); + expect.strictEqual(organizations[0].equals(enterprise), true); + expect.strictEqual(organizations[1].equals(enterprise2), true); }); +/* test('Person:removeLocalization', async () => { - expect(() => person.removeLocalization(address)).toThrow(); - // person.removeLocalization(address); - // const localizations = await person.getLocalizations(); - // expect(localizations.length).toStrictEqual(); - // expect(localizations[0].equals(address2)).toStrictEqual(true); + person.removeLocalization(address); + const localizations = await person.getLocalizations(); + expect(localizations.length).strictEqual(); + expect.strictEqual(localizations[0].equals(address2), true); }); test('Person:leaveAaffiliatedOrganization', async () => { - expect(() => person.leaveAaffiliatedOrganization(enterprise)).toThrow(); - // person.leaveAaffiliatedOrganization(enterprise); - // const organizations = await person.affiliatedOrganizations(); - // expect(organizations.length).toStrictEqual(1); - // expect(organizations[0].equals(enterprise2)).toStrictEqual(true); -}); \ No newline at end of file + person.leaveAaffiliatedOrganization(enterprise); + const organizations = await person.affiliatedOrganizations(); + expect.strictEqual(organizations.length, 1); + expect.strictEqual(organizations[0].equals(enterprise2), true); +});*/ \ No newline at end of file diff --git a/test/PhysicalCharacteristic.test.js b/test/PhysicalCharacteristic.test.js index 8b4289c..56ba9fa 100644 --- a/test/PhysicalCharacteristic.test.js +++ b/test/PhysicalCharacteristic.test.js @@ -1,7 +1,9 @@ -import PhysicalCharacteristic from '../lib/PhysicalCharacteristic.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import facets from '../test/thesaurus/facets.json' assert { type: 'json' }; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const facets = JSON.parse(fs.readFileSync('./test/thesaurus/facets.json')); +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadFacets(JSON.stringify(facets)); @@ -12,8 +14,7 @@ const gram = connector.MEASURES.UNIT.QUANTITYUNIT.GRAM; const physicalDimension = connector.MEASURES.DIMENSION.PHYSICALDIMENSION.WEIGHT; const physicalDimension2 = connector.MEASURES.DIMENSION.PHYSICALDIMENSION.HEIGHT; -const physicalCharacteristic = new PhysicalCharacteristic({ - connector: connector, +const physicalCharacteristic = connector.createPhysicalCharacteristic({ value: 100, unit: kilogram, physicalDimension: physicalDimension @@ -24,42 +25,42 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@ty test('PhysicalCharacteristic:import', async () => { const imported = await connector.import(json); const importedPhysicalCharacteristic = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedPhysicalCharacteristic.equals(physicalCharacteristic)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedPhysicalCharacteristic.equals(physicalCharacteristic), true); }); test('PhysicalCharacteristic:export', async () => { const serialized = await connector.export([physicalCharacteristic]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('PhysicalCharacteristic:getSemanticId', async () => { - expect(physicalCharacteristic.getSemanticId()).toStrictEqual(undefined); +test('PhysicalCharacteristic:getSemanticId', () => { + expect.strictEqual(physicalCharacteristic.getSemanticId(), undefined); }); -test('PhysicalCharacteristic:getQuantityValue', async () => { - expect(physicalCharacteristic.getQuantityValue()).toStrictEqual(100); +test('PhysicalCharacteristic:getQuantityValue', () => { + expect.strictEqual(physicalCharacteristic.getQuantityValue(), 100); }); test('PhysicalCharacteristic:getQuantityUnit', async () => { - expect(await physicalCharacteristic.getQuantityUnit()).toStrictEqual(kilogram); + expect.strictEqual(await physicalCharacteristic.getQuantityUnit(), kilogram); }); test('PhysicalCharacteristic:getQuantityDimension', async () => { - expect(await physicalCharacteristic.getQuantityDimension()).toStrictEqual(physicalDimension); + expect.strictEqual(await physicalCharacteristic.getQuantityDimension(), physicalDimension); }); -test('PhysicalCharacteristic:setQuantityValue', async () => { +test('PhysicalCharacteristic:setQuantityValue', () => { physicalCharacteristic.setQuantityValue(6.35); - expect(physicalCharacteristic.getQuantityValue()).toStrictEqual(6.35); + expect.strictEqual(physicalCharacteristic.getQuantityValue(), 6.35); }); test('PhysicalCharacteristic:setQuantityUnit', async () => { physicalCharacteristic.setQuantityUnit(gram); - expect(await physicalCharacteristic.getQuantityUnit()).toStrictEqual(gram); + expect.strictEqual(await physicalCharacteristic.getQuantityUnit(), gram); }); test('PhysicalCharacteristic:setQuantityDimension', async () => { physicalCharacteristic.setQuantityDimension(physicalDimension2); - expect(await physicalCharacteristic.getQuantityDimension()).toStrictEqual(physicalDimension2); + expect.strictEqual(await physicalCharacteristic.getQuantityDimension(), physicalDimension2); }); \ No newline at end of file diff --git a/test/PlannedTransformationLoop.test.js b/test/PlannedTransformationLoop.test.js new file mode 100644 index 0000000..3aee9e8 --- /dev/null +++ b/test/PlannedTransformationLoop.test.js @@ -0,0 +1,69 @@ +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; +import Connector from "../lib/Connector.js"; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); +const vocabulary = JSON.parse(fs.readFileSync('./test/thesaurus/vocabulary.json')); + +const connector = new Connector(); +await connector.loadMeasures(JSON.stringify(measures)); +await connector.loadVocabulary(JSON.stringify(vocabulary)); + +const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; + +const inputSuppliedProduct = connector.createSuppliedProduct({ + semanticId: "http://myplatform.com/inputProduct", + description: "Awesome product" +}); + +const outputSuppliedProduct = connector.createSuppliedProduct({ + semanticId: "http://myplatform.com/outputProduct", + description: "Modified product" +}); + +const inputQuantity = connector.createQuantity({ + value: 1.2, + unit: kilogram +}); + +const outputQuantity = connector.createQuantity({ + value: 1.0, + unit: kilogram +}); + +const plannedConsumptionFlow = connector.createPlannedConsumptionFlow({ + semanticId: "http://myplatform.com/plannedConsumptionFlow", + quantity: inputQuantity, + product: inputSuppliedProduct +}) + +const plannedProductionFlow = connector.createPlannedProductionFlow({ + semanticId: "http://myplatform.com/plannedProductionFlow", + quantity: outputQuantity, + product: outputSuppliedProduct +}) + +const plannedTransformation = connector.createPlannedTransformation({ + semanticId: "http://myplatform.com/transformation", + transformationType: connector.VOCABULARY.TRANSFORMATIONTYPE.MODIFY, + consumptionFlows: [plannedConsumptionFlow], + productionFlows: [plannedProductionFlow] +}); + +const json = '{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id":"_:b1","@type":"dfc-b:QuantitativeValue","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1.2"},{"@id":"_:b2","@type":"dfc-b:QuantitativeValue","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1"},{"@id":"http://myplatform.com/plannedConsumptionFlow","@type":"dfc-b:AsPlannedConsumptionFlow","dfc-b:consumes":"http://myplatform.com/inputProduct","dfc-b:hasQuantity":"_:b1"},{"@id":"http://myplatform.com/plannedProductionFlow","@type":"dfc-b:AsPlannedProductionFlow","dfc-b:hasQuantity":"_:b2","dfc-b:produces":"http://myplatform.com/outputProduct"},{"@id":"http://myplatform.com/transformation","@type":"dfc-b:AsPlannedTransformation","dfc-b:hasIncome":"http://myplatform.com/plannedConsumptionFlow","dfc-b:hasOutcome":"http://myplatform.com/plannedProductionFlow","dfc-b:hasTransformationType":"dfc-v:modify"}]}'; + +test('PlannedTransformationLoop:import', async () => { + const imported = await connector.import(json); + const expectedPlannedConsumptionFlow = imported[0]; + const expectedPlannedProductionFlow = imported[1]; + const expectedPlannedTransformation = imported[2]; + expect.strictEqual(imported.length, 3); + expect.strictEqual(expectedPlannedTransformation.equals(plannedTransformation), true); + expect.strictEqual(expectedPlannedConsumptionFlow.equals(plannedConsumptionFlow), true); + expect.strictEqual(expectedPlannedProductionFlow.equals(plannedProductionFlow), true); +}); + +test('PlannedTransformationLoop:export', async () => { + const serialized = await connector.export([plannedTransformation, plannedConsumptionFlow, plannedProductionFlow]); + expect.strictEqual(serialized, json); +}); \ No newline at end of file diff --git a/test/Price.test.js b/test/Price.test.js index a33c999..e43051c 100644 --- a/test/Price.test.js +++ b/test/Price.test.js @@ -1,14 +1,15 @@ -import Price from '../lib/Price.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadMeasures(JSON.stringify(measures)); const euro = connector.MEASURES.UNIT.CURRENCYUNIT.EURO; -const price = new Price({ - connector: connector, +const price = connector.createPrice({ value: 2.54, vatRate: 8.0, unit: euro @@ -19,43 +20,43 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@ty test('Price:import', async () => { const imported = await connector.import(json); const importedPrice = imported[0]; - expect(imported.length).toStrictEqual(1); - expect(importedPrice.equals(price)).toStrictEqual(true); + expect.strictEqual(imported.length, 1); + expect.strictEqual(importedPrice.equals(price), true); }); test('Price:export', async () => { const serialized = await connector.export([price]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('Price:getSemanticId', async () => { - expect(price.getSemanticId()).toStrictEqual(undefined); +test('Price:getSemanticId', () => { + expect.strictEqual(price.getSemanticId(), undefined); }); -test('Price:getValue', async () => { - expect(price.getValue()).toStrictEqual(2.54); +test('Price:getQuantityValue', () => { + expect.strictEqual(price.getQuantityValue(), 2.54); }); -test('Price:getVatRate', async () => { - expect(price.getVatRate()).toStrictEqual(8); +test('Price:getVatRate', () => { + expect.strictEqual(price.getVatRate(), 8); }); -test('Price:getUnit', async () => { - expect(await price.getUnit()).toStrictEqual(euro); +test('Price:getQuantityUnit', async () => { + expect.strictEqual(await price.getQuantityUnit(), euro); }); -test('Price:setValue', async () => { - price.setValue(3); - expect(price.getValue()).toStrictEqual(3); +test('Price:setQuantityValue', () => { + price.setQuantityValue(3); + expect.strictEqual(price.getQuantityValue(), 3); }); -test('Price:setVatRate', async () => { +test('Price:setVatRate', () => { price.setVatRate(19); - expect(price.getVatRate()).toStrictEqual(19); + expect.strictEqual(price.getVatRate(), 19); }); -test('Price:setUnit', async () => { +test('Price:setQuantityUnit', async () => { const dollar = connector.MEASURES.UNIT.CURRENCYUNIT.USDOLLAR; - price.setUnit(dollar); - expect(await price.getUnit()).toStrictEqual(dollar); + price.setQuantityUnit(dollar); + expect.strictEqual(await price.getQuantityUnit(), dollar); }); \ No newline at end of file diff --git a/test/QuantitativeValue.test.js b/test/QuantitativeValue.test.js index a35457b..4c41735 100644 --- a/test/QuantitativeValue.test.js +++ b/test/QuantitativeValue.test.js @@ -1,14 +1,15 @@ -import QuantitativeValue from '../lib/QuantitativeValue.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); const connector = new Connector(); await connector.loadMeasures(JSON.stringify(measures)); const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; -const quantitativeValue = new QuantitativeValue({ - connector: connector, +const quantitativeValue = connector.createQuantity({ value: 1, unit: kilogram }); @@ -18,36 +19,36 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"_:b1","@ty test('QuantitativeValue:import', async () => { const importedAll = await connector.import(json); const imported = importedAll[0]; - expect(importedAll.length).toStrictEqual(1); - expect(imported.equals(quantitativeValue)).toStrictEqual(true); + expect.strictEqual(importedAll.length, 1); + expect.strictEqual(imported.equals(quantitativeValue), true); }); test('QuantitativeValue:export', async () => { const serialized = await connector.export([quantitativeValue]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('QuantitativeValue:getSemanticId', async () => { - expect(quantitativeValue.getSemanticId()).toStrictEqual(undefined); +test('QuantitativeValue:getSemanticId', () => { + expect.strictEqual(quantitativeValue.getSemanticId(), undefined); }); test('QuantitativeValue:getQuantityUnit', async () => { const expected = await quantitativeValue.getQuantityUnit(); - expect(expected.equals(kilogram)).toStrictEqual(true); + expect.strictEqual(expected.equals(kilogram), true); }); -test('QuantitativeValue:getQuantityValue', async () => { - expect(quantitativeValue.getQuantityValue()).toStrictEqual(1); +test('QuantitativeValue:getQuantityValue', () => { + expect.strictEqual(quantitativeValue.getQuantityValue(), 1); }); test('QuantitativeValue:setQuantityUnit', async () => { const gram = connector.MEASURES.UNIT.QUANTITYUNIT.GRAM; quantitativeValue.setQuantityUnit(gram); const expected = await quantitativeValue.getQuantityUnit(); - expect(expected.equals(gram)).toStrictEqual(true); + expect.strictEqual(expected.equals(gram), true); }); test('QuantitativeValue:setQuantityValue', async () => { quantitativeValue.setQuantityValue(2.5) - expect(quantitativeValue.getQuantityValue()).toStrictEqual(2.5); + expect.strictEqual(quantitativeValue.getQuantityValue(), 2.5); }); \ No newline at end of file diff --git a/test/SaleSession.test.js b/test/SaleSession.test.js index 70f3c73..f2692e4 100644 --- a/test/SaleSession.test.js +++ b/test/SaleSession.test.js @@ -1,21 +1,18 @@ -import Offer from '../lib/Offer.js'; -import SaleSession from '../lib/SaleSession.js'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; const connector = new Connector(); -const offer = new Offer({ - connector: connector, +const offer = connector.createOffer({ semanticId: "http://myplatform.com/offer1" }); -const offer2 = new Offer({ - connector: connector, +const offer2 = connector.createOffer({ semanticId: "http://myplatform.com/offer2" }); -const saleSession = new SaleSession({ - connector: connector, +const saleSession = connector.createSaleSession({ semanticId: "http://myplatform.com/saleSession1", beginDate: "beginDate", endDate: "endDate", @@ -28,64 +25,64 @@ const json = `{"@context":"https://www.datafoodconsortium.org","@id":"http://myp test('SaleSession:import', async () => { const importedAll = await connector.import(json); const imported = importedAll[0]; - expect(importedAll.length).toStrictEqual(1); - expect(imported.equals(saleSession)).toStrictEqual(true); + expect.strictEqual(importedAll.length, 1); + expect.strictEqual(imported.equals(saleSession), true); }); test('SaleSession:export', async () => { const serialized = await connector.export([saleSession]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('SaleSession:getSemanticId', async () => { - expect(saleSession.getSemanticId()).toStrictEqual("http://myplatform.com/saleSession1"); +test('SaleSession:getSemanticId', () => { + expect.strictEqual(saleSession.getSemanticId(), "http://myplatform.com/saleSession1"); }); -test('SaleSession:getBeginDate', async () => { - expect(saleSession.getBeginDate()).toStrictEqual("beginDate"); +test('SaleSession:getBeginDate', () => { + expect.strictEqual(saleSession.getBeginDate(), "beginDate"); }); -test('SaleSession:getEndDate', async () => { - expect(saleSession.getEndDate()).toStrictEqual("endDate"); +test('SaleSession:getEndDate', () => { + expect.strictEqual(saleSession.getEndDate(), "endDate"); }); -test('SaleSession:getQuantity', async () => { - expect(saleSession.getQuantity()).toStrictEqual(5); +test('SaleSession:getQuantity', () => { + expect.strictEqual(saleSession.getQuantity(), 5); }); test('SaleSession:getOffers', async () => { const offers = await saleSession.getOffers(); - expect(offers.length).toStrictEqual(1); - expect(offers[0].equals(offer)).toStrictEqual(true); + expect.strictEqual(offers.length, 1); + expect.strictEqual(offers[0].equals(offer), true); }); -test('SaleSession:setBeginDate', async () => { +test('SaleSession:setBeginDate', () => { saleSession.setBeginDate("beginDate2"); - expect(saleSession.getBeginDate()).toStrictEqual("beginDate2"); + expect.strictEqual(saleSession.getBeginDate(), "beginDate2"); }); -test('SaleSession:setEndDate', async () => { +test('SaleSession:setEndDate', () => { saleSession.setEndDate("endDate2"); - expect(saleSession.getEndDate()).toStrictEqual("endDate2"); + expect.strictEqual(saleSession.getEndDate(), "endDate2"); }); -test('SaleSession:setQuantity', async () => { +test('SaleSession:setQuantity', () => { saleSession.setQuantity(2.3); - expect(saleSession.getQuantity()).toStrictEqual(2.3); + expect.strictEqual(saleSession.getQuantity(), 2.3); }); test('SaleSession:addOffer', async () => { saleSession.addOffer(offer2); const offers = await saleSession.getOffers(); - expect(offers.length).toStrictEqual(2); - expect(offers[0].equals(offer)).toStrictEqual(true); - expect(offers[1].equals(offer2)).toStrictEqual(true); + expect.strictEqual(offers.length, 2); + expect.strictEqual(offers[0].equals(offer), true); + expect.strictEqual(offers[1].equals(offer2), true); }); +/* test('SaleSession:removeOffer', async () => { - expect(() => saleSession.removeOffer(offer)).toThrow(); - // saleSession.removeOffer(offer); - // const offers = await saleSession.getOffers(); - // expect(offers.length).toStrictEqual(1); - // expect(offers[0].equals(offer2)).toStrictEqual(true); -}); \ No newline at end of file + saleSession.removeOffer(offer); + const offers = await saleSession.getOffers(); + expect.strictEqual(offers.length, 1); + expect.strictEqual(offers[0].equals(offer2), true); +});*/ \ No newline at end of file diff --git a/test/SuppliedProduct.test.js b/test/SuppliedProduct.test.js index 16c6728..a56bdd7 100644 --- a/test/SuppliedProduct.test.js +++ b/test/SuppliedProduct.test.js @@ -1,13 +1,10 @@ -import CatalogItem from '../lib/CatalogItem.js'; -import SuppliedProduct from '../lib/SuppliedProduct.js'; -import QuantitativeValue from '../lib/QuantitativeValue.js'; -import AllergenCharacteristic from '../lib/AllergenCharacteristic.js'; -import NutrientCharacteristic from '../lib/NutrientCharacteristic.js'; -import PhysicalCharacteristic from '../lib/PhysicalCharacteristic.js'; +import * as fs from 'fs'; +import expect from 'node:assert'; +import { test } from 'node:test'; import Connector from "../lib/Connector.js"; -import facets from '../test/thesaurus/facets.json' assert { type: 'json' }; -import measures from '../test/thesaurus/measures.json' assert { type: 'json' }; -import productTypes from '../test/thesaurus/productTypes.json' assert { type: 'json' }; +const facets = JSON.parse(fs.readFileSync('./test/thesaurus/facets.json')); +const measures = JSON.parse(fs.readFileSync('./test/thesaurus/measures.json')); +const productTypes = JSON.parse(fs.readFileSync('./test/thesaurus/productTypes.json')); const connector = new Connector(); @@ -18,69 +15,59 @@ await connector.loadProductTypes(JSON.stringify(productTypes)); const gram = connector.MEASURES.UNIT.QUANTITYUNIT.GRAM; const kilogram = connector.MEASURES.UNIT.QUANTITYUNIT.KILOGRAM; -const quantity = new QuantitativeValue({ - connector: connector, +const quantity = connector.createQuantity({ value: 1.2, unit: kilogram }); -const allergenCharacteristic = new AllergenCharacteristic({ - connector: connector, +const allergenCharacteristic = connector.createAllergenCharacteristic({ value: 1, unit: kilogram, allergenDimension: connector.MEASURES.DIMENSION.ALLERGENDIMENSION.PEANUTS }); -const allergenCharacteristic2 = new AllergenCharacteristic({ - connector: connector, +const allergenCharacteristic2 = connector.createAllergenCharacteristic({ value: 3.5, unit: gram, allergenDimension: connector.MEASURES.DIMENSION.ALLERGENDIMENSION.EGGS }); -const nutrientCharacteristic = new NutrientCharacteristic({ - connector: connector, +const nutrientCharacteristic = connector.createNutrientCharacteristic({ value: 10, unit: gram, nutrientDimension: connector.MEASURES.DIMENSION.NUTRIENTDIMENSION.CALCIUM }); -const nutrientCharacteristic2 = new NutrientCharacteristic({ - connector: connector, +const nutrientCharacteristic2 = connector.createNutrientCharacteristic({ value: 8, unit: kilogram, nutrientDimension: connector.MEASURES.DIMENSION.NUTRIENTDIMENSION.FIBRE }); -const physicalCharacteristic = new PhysicalCharacteristic({ - connector: connector, +const physicalCharacteristic = connector.createPhysicalCharacteristic({ value: 100, unit: gram, physicalDimension: connector.MEASURES.DIMENSION.PHYSICALDIMENSION.WEIGHT }); -const physicalCharacteristic2 = new PhysicalCharacteristic({ - connector: connector, +const physicalCharacteristic2 = connector.createPhysicalCharacteristic({ value: 32.5, unit: kilogram, physicalDimension: connector.MEASURES.DIMENSION.PHYSICALDIMENSION.HEIGHT }); -const catalogItem = new CatalogItem({ - connector: connector, +const catalogItem = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem" }); -const catalogItem2 = new CatalogItem({ - connector: connector, +const catalogItem2 = connector.createCatalogItem({ semanticId: "http://myplatform.com/catalogItem2" }); -let suppliedProduct = new SuppliedProduct({ - connector: connector, +let suppliedProduct = connector.createSuppliedProduct({ semanticId: "http://myplatform.com/tomato", description: "Awesome tomato", - images: ["http://example.org/image"], + images: ["http://myplatform.com/image1", "http://myplatform.com/image2"], productType: connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO, quantity: quantity, totalTheoreticalStock: 2.23, @@ -98,293 +85,292 @@ let suppliedProduct = new SuppliedProduct({ partOrigin: [connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT] }); -const json = `{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id":"_:b1","@type":"dfc-b:QuantitativeValue","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1.2"},{"@id":"_:b2","@type":"dfc-b:AllergenCharacteristic","dfc-b:hasAllergenDimension":"dfc-m:Peanuts","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1"},{"@id":"_:b4","@type":"dfc-b:NutrientCharacteristic","dfc-b:hasNutrientDimension":{"@id":"dfc-m:Calcium"},"dfc-b:hasUnit":"dfc-m:Gram","dfc-b:value":"10"},{"@id":"_:b6","@type":"dfc-b:PhysicalCharacteristic","dfc-b:hasPhysicalDimension":"dfc-m:Weight","dfc-b:hasUnit":"dfc-m:Gram","dfc-b:value":"100"},{"@id":"http://myplatform.com/tomato","@type":"dfc-b:SuppliedProduct","dfc-b:alcoholPercentage":"0","dfc-b:description":"Awesome tomato","dfc-b:hasAllergenCharacteristic":{"@id":"_:b2"},"dfc-b:hasCertification":[{"@id":"dfc-f:Organic-AB"},{"@id":"dfc-f:Organic-EU"}],"dfc-b:hasClaim":"dfc-f:NoAddedSugars","dfc-b:hasGeographicalOrigin":"dfc-f:CentreValLoire","dfc-b:hasNatureOrigin":{"@id":"dfc-f:PlantOrigin"},"dfc-b:hasNutrientCharacteristic":{"@id":"_:b4"},"dfc-b:hasPartOrigin":{"@id":"dfc-f:Fruit"},"dfc-b:hasPhysicalCharacteristic":{"@id":"_:b6"},"dfc-b:hasQuantity":"_:b1","dfc-b:hasType":"dfc-pt:round-tomato","dfc-b:lifetime":"a week","dfc-b:referencedBy":"http://myplatform.com/catalogItem","dfc-b:totalTheoreticalStock":"2.23","dfc-b:usageOrStorageCondition":"free text"}]}`; +const json = `{"@context":"https://www.datafoodconsortium.org","@graph":[{"@id":"_:b1","@type":"dfc-b:QuantitativeValue","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1.2"},{"@id":"_:b2","@type":"dfc-b:AllergenCharacteristic","dfc-b:hasAllergenDimension":"dfc-m:Peanuts","dfc-b:hasUnit":"dfc-m:Kilogram","dfc-b:value":"1"},{"@id":"_:b4","@type":"dfc-b:NutrientCharacteristic","dfc-b:hasNutrientDimension":"dfc-m:Calcium","dfc-b:hasUnit":"dfc-m:Gram","dfc-b:value":"10"},{"@id":"_:b6","@type":"dfc-b:PhysicalCharacteristic","dfc-b:hasPhysicalDimension":"dfc-m:Weight","dfc-b:hasUnit":"dfc-m:Gram","dfc-b:value":"100"},{"@id":"http://myplatform.com/tomato","@type":"dfc-b:SuppliedProduct","dfc-b:alcoholPercentage":"0","dfc-b:description":"Awesome tomato","dfc-b:hasAllergenCharacteristic":{"@id":"_:b2"},"dfc-b:hasCertification":[{"@id":"dfc-f:Organic-AB"},{"@id":"dfc-f:Organic-EU"}],"dfc-b:hasClaim":"dfc-f:NoAddedSugars","dfc-b:hasGeographicalOrigin":"dfc-f:CentreValLoire","dfc-b:hasNatureOrigin":{"@id":"dfc-f:PlantOrigin"},"dfc-b:hasNutrientCharacteristic":{"@id":"_:b4"},"dfc-b:hasPartOrigin":{"@id":"dfc-f:Fruit"},"dfc-b:hasPhysicalCharacteristic":{"@id":"_:b6"},"dfc-b:hasQuantity":"_:b1","dfc-b:hasType":"dfc-pt:round-tomato","dfc-b:image":["http://myplatform.com/image1","http://myplatform.com/image2"],"dfc-b:lifetime":"a week","dfc-b:referencedBy":"http://myplatform.com/catalogItem","dfc-b:totalTheoreticalStock":"2.23","dfc-b:usageOrStorageCondition":"free text"}]}`; test('SuppliedProduct:import', async () => { const importedAll = await connector.import(json); const imported = importedAll[0]; - expect(importedAll.length).toStrictEqual(1); - expect(imported.equals(suppliedProduct)).toStrictEqual(true); + expect.strictEqual(importedAll.length, 1); + expect.strictEqual(imported.equals(suppliedProduct), true); }); test('SuppliedProduct:export', async () => { const serialized = await connector.export([suppliedProduct]); - expect(serialized).toStrictEqual(json); + expect.strictEqual(serialized, json); }); -test('SuppliedProduct:getSemanticId', async () => { - expect(suppliedProduct.getSemanticId()).toStrictEqual("http://myplatform.com/tomato"); +test('SuppliedProduct:getSemanticId', () => { + expect.strictEqual(suppliedProduct.getSemanticId(), "http://myplatform.com/tomato"); }); -test('SuppliedProduct:getDescription', async () => { - expect(suppliedProduct.getDescription()).toStrictEqual("Awesome tomato"); +test('SuppliedProduct:getDescription', () => { + expect.strictEqual(suppliedProduct.getDescription(), "Awesome tomato"); }); test('SuppliedProduct:getProductType', async () => { const expected = await suppliedProduct.getProductType(); - expect(expected.equals(connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO)).toStrictEqual(true); + expect.strictEqual(expected.equals(connector.PRODUCT_TYPES.VEGETABLE.TOMATO.ROUND_TOMATO), true); }); test('SuppliedProduct:getQuantity', async () => { const expected = await suppliedProduct.getQuantity(); - expect(expected.equals(quantity)).toStrictEqual(true); + expect.strictEqual(expected.equals(quantity), true); }); -test('SuppliedProduct:getTotalTheoreticalStock', async () => { - expect(suppliedProduct.getTotalTheoreticalStock()).toStrictEqual(2.23); +test('SuppliedProduct:getTotalTheoreticalStock', () => { + expect.strictEqual(suppliedProduct.getTotalTheoreticalStock(), 2.23); }); -test('SuppliedProduct:getAlcoholPercentage', async () => { - expect(suppliedProduct.getAlcoholPercentage()).toStrictEqual(0); +test('SuppliedProduct:getAlcoholPercentage', () => { + expect.strictEqual(suppliedProduct.getAlcoholPercentage(), 0); }); -test('SuppliedProduct:getLifetime', async () => { - expect(suppliedProduct.getLifetime()).toStrictEqual("a week"); +test('SuppliedProduct:getLifetime', () => { + expect.strictEqual(suppliedProduct.getLifetime(), "a week"); }); test('SuppliedProduct:getClaims', async () => { const claims = await suppliedProduct.getClaims(); - expect(claims.length).toStrictEqual(1); - expect(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS)).toStrictEqual(true); + expect.strictEqual(claims.length, 1); + expect.strictEqual(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS), true); }); -test('SuppliedProduct:getUsageOrStorageConditions', async () => { - expect(suppliedProduct.getUsageOrStorageConditions()).toStrictEqual("free text"); +test('SuppliedProduct:getUsageOrStorageConditions', () => { + expect.strictEqual(suppliedProduct.getUsageOrStorageConditions(), "free text"); }); test('SuppliedProduct:getAllergenCharacteristics', async () => { const allergenCharacteristics = await suppliedProduct.getAllergenCharacteristics(); - expect(allergenCharacteristics.length).toStrictEqual(1); - expect(allergenCharacteristics[0].equals(allergenCharacteristic)).toStrictEqual(true); + expect.strictEqual(allergenCharacteristics.length, 1); + expect.strictEqual(allergenCharacteristics[0].equals(allergenCharacteristic), true); }); test('SuppliedProduct:getNutrientCharacteristics', async () => { const nutrientCharacteristics = await suppliedProduct.getNutrientCharacteristics(); - expect(nutrientCharacteristics.length).toStrictEqual(1); - expect(nutrientCharacteristics[0].equals(nutrientCharacteristic)).toStrictEqual(true); + expect.strictEqual(nutrientCharacteristics.length, 1); + expect.strictEqual(nutrientCharacteristics[0].equals(nutrientCharacteristic), true); }); test('SuppliedProduct:getPhysicalCharacteristics', async () => { const physicalCharacteristics = await suppliedProduct.getPhysicalCharacteristics(); - expect(physicalCharacteristics.length).toStrictEqual(1); - expect(physicalCharacteristics[0].equals(physicalCharacteristic)).toStrictEqual(true); + expect.strictEqual(physicalCharacteristics.length, 1); + expect.strictEqual(physicalCharacteristics[0].equals(physicalCharacteristic), true); }); test('SuppliedProduct:getGeographicalOrigin', async () => { const expected = await suppliedProduct.getGeographicalOrigin(); - expect(expected.equals(connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.CENTREVALLOIRE)).toStrictEqual(true); + expect.strictEqual(expected.equals(connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.CENTREVALLOIRE), true); }); test('SuppliedProduct:getCatalogItems', async () => { const catalogItems = await suppliedProduct.getCatalogItems(); - expect(catalogItems.length).toStrictEqual(1); - expect(catalogItems[0].equals(catalogItem)).toStrictEqual(true); + expect.strictEqual(catalogItems.length, 1); + expect.strictEqual(catalogItems[0].equals(catalogItem), true); }); test('SuppliedProduct:getCertifications', async () => { const certifications = await suppliedProduct.getCertifications(); - expect(certifications.length).toStrictEqual(2); - expect(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB)).toStrictEqual(true); - expect(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU)).toStrictEqual(true); + expect.strictEqual(certifications.length, 2); + expect.strictEqual(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB), true); + expect.strictEqual(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU), true); }); test('SuppliedProduct:getNatureOrigin', async () => { const natureOrigins = await suppliedProduct.getNatureOrigin(); - expect(natureOrigins.length).toStrictEqual(1); - expect(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.PLANTORIGIN)).toStrictEqual(true); + expect.strictEqual(natureOrigins.length, 1); + expect.strictEqual(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.PLANTORIGIN), true); }); test('SuppliedProduct:getPartOrigin', async () => { const partOrigins = await suppliedProduct.getPartOrigin(); - expect(partOrigins.length).toStrictEqual(1); - expect(partOrigins[0].equals(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT)).toStrictEqual(true); + expect.strictEqual(partOrigins.length, 1); + expect.strictEqual(partOrigins[0].equals(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT), true); }); -test('SuppliedProduct:setDescription', async () => { +test('SuppliedProduct:setDescription', () => { suppliedProduct.setDescription("description2") - expect(suppliedProduct.getDescription()).toStrictEqual("description2"); + expect.strictEqual(suppliedProduct.getDescription(), "description2"); }); test('SuppliedProduct:setProductType', async () => { suppliedProduct.setProductType(connector.PRODUCT_TYPES.VEGETABLE.ARTICHOKE); const expected = await suppliedProduct.getProductType(); - expect(expected.equals(connector.PRODUCT_TYPES.VEGETABLE.ARTICHOKE)).toStrictEqual(true); + expect.strictEqual(expected.equals(connector.PRODUCT_TYPES.VEGETABLE.ARTICHOKE), true); }); test('SuppliedProduct:setQuantity', async () => { - const quantity2 = new QuantitativeValue({ - connector: connector, - quantity: 3, + const quantity2 = connector.createQuantity({ + quantity: 3, unit: kilogram }); suppliedProduct.setQuantity(quantity2); const expected = await suppliedProduct.getQuantity(); - expect(expected.equals(quantity2)).toStrictEqual(true); + expect.strictEqual(expected.equals(quantity2), true); }); -test('SuppliedProduct:setTotalTheoreticalStock', async () => { +test('SuppliedProduct:setTotalTheoreticalStock', () => { suppliedProduct.setTotalTheoreticalStock(5); - expect(suppliedProduct.getTotalTheoreticalStock()).toStrictEqual(5); + expect.strictEqual(suppliedProduct.getTotalTheoreticalStock(), 5); }); -test('SuppliedProduct:setAlcoholPercentage', async () => { +test('SuppliedProduct:setAlcoholPercentage', () => { suppliedProduct.setAlcoholPercentage(5.5); - expect(suppliedProduct.getAlcoholPercentage()).toStrictEqual(5.5); + expect.strictEqual(suppliedProduct.getAlcoholPercentage(), 5.5); }); -test('SuppliedProduct:setLifetime', async () => { +test('SuppliedProduct:setLifetime', () => { suppliedProduct.setLifetime("lifetime2"); - expect(suppliedProduct.getLifetime()).toStrictEqual("lifetime2"); + expect.strictEqual(suppliedProduct.getLifetime(), "lifetime2"); }); test('SuppliedProduct:addClaim', async () => { suppliedProduct.addClaim(connector.FACETS.CLAIM.NUTRITIONALCLAIM.FATFREE); const claims = await suppliedProduct.getClaims(); - expect(claims.length).toStrictEqual(2); - expect(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS)).toStrictEqual(true); - expect(claims[1].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.FATFREE)).toStrictEqual(true); + expect.strictEqual(claims.length, 2); + expect.strictEqual(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS), true); + expect.strictEqual(claims[1].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.FATFREE), true); }); +/* test('SuppliedProduct:removeClaim', async () => { - expect(() => suppliedProduct.removeClaim(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS)).toThrow(); - // suppliedProduct.removeClaim(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS); - // const claims = await suppliedProduct.getClaims(); - // expect(claims.length).toStrictEqual(1); - // expect(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.FATFREE)).toStrictEqual(true); -}); + suppliedProduct.removeClaim(connector.FACETS.CLAIM.NUTRITIONALCLAIM.NOADDEDSUGARS); + const claims = await suppliedProduct.getClaims(); + expect.strictEqual(claims.length, 1); + expect.strictEqual(claims[0].equals(connector.FACETS.CLAIM.NUTRITIONALCLAIM.FATFREE), true); +});*/ -test('SuppliedProduct:setUsageOrStorageConditions', async () => { +test('SuppliedProduct:setUsageOrStorageConditions', () => { suppliedProduct.setUsageOrStorageConditions("free text 2"); - expect(suppliedProduct.getUsageOrStorageConditions()).toStrictEqual("free text 2"); + expect.strictEqual(suppliedProduct.getUsageOrStorageConditions(), "free text 2"); }); test('SuppliedProduct:addAllergenCharacteristics', async () => { suppliedProduct.addAllergenCharacteristic(allergenCharacteristic2); const allergenCharacteristics = await suppliedProduct.getAllergenCharacteristics(); - expect(allergenCharacteristics.length).toStrictEqual(2); - expect(allergenCharacteristics[0].equals(allergenCharacteristic)).toStrictEqual(true); - expect(allergenCharacteristics[1].equals(allergenCharacteristic2)).toStrictEqual(true); + expect.strictEqual(allergenCharacteristics.length, 2); + expect.strictEqual(allergenCharacteristics[0].equals(allergenCharacteristic), true); + expect.strictEqual(allergenCharacteristics[1].equals(allergenCharacteristic2), true); }); +/* test('SuppliedProduct:removeAllergenCharacteristics', async () => { - expect(() => suppliedProduct.removeAllergenCharacteristic(allergenCharacteristic)).toThrow(); - // suppliedProduct.removeAllergenCharacteristic(allergenCharacteristic); - // const allergenCharacteristics = await suppliedProduct.getAllergenCharacteristics(); - // expect(allergenCharacteristics.length).toStrictEqual(1); - // expect(allergenCharacteristics[0].equals(allergenCharacteristic2)).toStrictEqual(true); -}); + suppliedProduct.removeAllergenCharacteristic(allergenCharacteristic); + const allergenCharacteristics = await suppliedProduct.getAllergenCharacteristics(); + expect.strictEqual(allergenCharacteristics.length, 1); + expect.strictEqual(allergenCharacteristics[0].equals(allergenCharacteristic2), true); +});*/ test('SuppliedProduct:addNutrientCharacteristics', async () => { suppliedProduct.addNutrientCharacteristic(nutrientCharacteristic2); const nutrientCharacteristics = await suppliedProduct.getNutrientCharacteristics(); - expect(nutrientCharacteristics.length).toStrictEqual(2); - expect(nutrientCharacteristics[0].equals(nutrientCharacteristic)).toStrictEqual(true); - expect(nutrientCharacteristics[1].equals(nutrientCharacteristic2)).toStrictEqual(true); + expect.strictEqual(nutrientCharacteristics.length, 2); + expect.strictEqual(nutrientCharacteristics[0].equals(nutrientCharacteristic), true); + expect.strictEqual(nutrientCharacteristics[1].equals(nutrientCharacteristic2), true); }); +/* test('SuppliedProduct:removeNutrientCharacteristics', async () => { - expect(() => suppliedProduct.removeNutrientCharacteristic(nutrientCharacteristic)).toThrow(); - // suppliedProduct.removeNutrientCharacteristic(nutrientCharacteristic); - // const nutrientCharacteristics = await suppliedProduct.getNutrientCharacteristics(); - // expect(nutrientCharacteristics.length).toStrictEqual(1); - // expect(nutrientCharacteristics[0].equals(nutrientCharacteristic2)).toStrictEqual(true); -}); + suppliedProduct.removeNutrientCharacteristic(nutrientCharacteristic); + const nutrientCharacteristics = await suppliedProduct.getNutrientCharacteristics(); + expect.strictEqual(nutrientCharacteristics.length, 1); + expect.strictEqual(nutrientCharacteristics[0].equals(nutrientCharacteristic2), true); +});*/ test('SuppliedProduct:getPhysicalCharacteristics', async () => { suppliedProduct.addPhysicalCharacteristic(physicalCharacteristic2); const physicalCharacteristics = await suppliedProduct.getPhysicalCharacteristics(); - expect(physicalCharacteristics.length).toStrictEqual(2); - expect(physicalCharacteristics[0].equals(physicalCharacteristic)).toStrictEqual(true); - expect(physicalCharacteristics[1].equals(physicalCharacteristic2)).toStrictEqual(true); + expect.strictEqual(physicalCharacteristics.length, 2); + expect.strictEqual(physicalCharacteristics[0].equals(physicalCharacteristic), true); + expect.strictEqual(physicalCharacteristics[1].equals(physicalCharacteristic2), true); }); +/* test('SuppliedProduct:removePhysicalCharacteristics', async () => { - expect(() => suppliedProduct.removePhysicalCharacteristic(physicalCharacteristic)).toThrow(); - // suppliedProduct.removePhysicalCharacteristic(physicalCharacteristic); - // const physicalCharacteristics = await suppliedProduct.getPhysicalCharacteristics(); - // expect(physicalCharacteristics.length).toStrictEqual(1); - // expect(physicalCharacteristics[0].equals(physicalCharacteristic2)).toStrictEqual(true); -}); + suppliedProduct.removePhysicalCharacteristic(physicalCharacteristic); + const physicalCharacteristics = await suppliedProduct.getPhysicalCharacteristics(); + expect.strictEqual(physicalCharacteristics.length, 1); + expect.strictEqual(physicalCharacteristics[0].equals(physicalCharacteristic2), true); +});*/ test('SuppliedProduct:setGeographicalOrigin', async () => { suppliedProduct.setGeographicalOrigin(connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.NORMANDY); const expected = await suppliedProduct.getGeographicalOrigin(); - expect(expected.equals(connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.NORMANDY)).toStrictEqual(true); + expect.strictEqual(expected.equals(connector.FACETS.TERRITORIALORIGIN.EUROPE.FRANCE.NORMANDY), true); }); test('SuppliedProduct:addCatalogItem', async () => { suppliedProduct.addCatalogItem(catalogItem2); const catalogItems = await suppliedProduct.getCatalogItems() - expect(catalogItems.length).toStrictEqual(2); - expect(catalogItems[0].equals(catalogItem)).toStrictEqual(true); - expect(catalogItems[1].equals(catalogItem2)).toStrictEqual(true); + expect.strictEqual(catalogItems.length, 2); + expect.strictEqual(catalogItems[0].equals(catalogItem), true); + expect.strictEqual(catalogItems[1].equals(catalogItem2), true); }); +/* test('SuppliedProduct:removeCatalogItem', async () => { - expect(() => suppliedProduct.removeCatalogItem(catalogItem)).toThrow(); - // suppliedProduct.removeCatalogItem(catalogItem); - // const catalogItems = await suppliedProduct.getCatalogItems() - // expect(catalogItems.length).toStrictEqual(1); - // expect(catalogItems[0].equals(catalogItem2)).toStrictEqual(true); -}); + suppliedProduct.removeCatalogItem(catalogItem); + const catalogItems = await suppliedProduct.getCatalogItems() + expect.strictEqual(catalogItems.length, 1); + expect.strictEqual(catalogItems[0].equals(catalogItem2), true); +});*/ test('SuppliedProduct:addCertification', async () => { suppliedProduct.addCertification(connector.FACETS.CERTIFICATION.ORGANICLABEL.NATUREETPROGRES); const certifications = await suppliedProduct.getCertifications(); - expect(certifications.length).toStrictEqual(3); - expect(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB)).toStrictEqual(true); - expect(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU)).toStrictEqual(true); - expect(certifications[2].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.NATUREETPROGRES)).toStrictEqual(true); + expect.strictEqual(certifications.length, 3); + expect.strictEqual(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB), true); + expect.strictEqual(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU), true); + expect.strictEqual(certifications[2].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.NATUREETPROGRES), true); }); +/* test('SuppliedProduct:removeCertification', async () => { - expect(() => suppliedProduct.removeCertification(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU)).toThrow(); - // suppliedProduct.removeCertification(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU); - // const certifications = await suppliedProduct.getCertifications(); - // expect(certifications.length).toStrictEqual(2); - // expect(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB)).toStrictEqual(true); - // expect(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.NATUREETPROGRES)).toStrictEqual(true); -}); + suppliedProduct.removeCertification(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_EU); + const certifications = await suppliedProduct.getCertifications(); + expect.strictEqual(certifications.length, 2); + expect.strictEqual(certifications[0].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.ORGANIC_AB), true); + expect.strictEqual(certifications[1].equals(connector.FACETS.CERTIFICATION.ORGANICLABEL.NATUREETPROGRES), true); +});*/ test('SuppliedProduct:addNatureOrigin', async () => { suppliedProduct.addNatureOrigin(connector.FACETS.NATUREORIGIN.ALGAE); const natureOrigins = await suppliedProduct.getNatureOrigin(); - expect(natureOrigins.length).toStrictEqual(2); - expect(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.PLANTORIGIN)).toStrictEqual(true); - expect(natureOrigins[1].equals(connector.FACETS.NATUREORIGIN.ALGAE)).toStrictEqual(true); + expect.strictEqual(natureOrigins.length, 2); + expect.strictEqual(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.PLANTORIGIN), true); + expect.strictEqual(natureOrigins[1].equals(connector.FACETS.NATUREORIGIN.ALGAE), true); }); +/* test('SuppliedProduct:removeNatureOrigin', async () => { - expect(() => suppliedProduct.removeNatureOrigin(connector.FACETS.NATUREORIGIN.PLANTORIGIN)).toThrow(); - // suppliedProduct.removeNatureOrigin(connector.FACETS.NATUREORIGIN.PLANTORIGIN); - // const natureOrigins = await suppliedProduct.getNatureOrigin(); - // expect(natureOrigins.length).toStrictEqual(1); - // expect(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.ALGAE)).toStrictEqual(true); -}); + suppliedProduct.removeNatureOrigin(connector.FACETS.NATUREORIGIN.PLANTORIGIN); + const natureOrigins = await suppliedProduct.getNatureOrigin(); + expect.strictEqual(natureOrigins.length, 1); + expect.strictEqual(natureOrigins[0].equals(connector.FACETS.NATUREORIGIN.ALGAE), true); +});*/ test('SuppliedProduct:addPartOrigin', async () => { suppliedProduct.addPartOrigin(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW) const partOrigins = await suppliedProduct.getPartOrigin(); - expect(partOrigins.length).toStrictEqual(2); - expect(partOrigins[0].equals(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT)).toStrictEqual(true); - expect(partOrigins[1].equals(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW)).toStrictEqual(true); + expect.strictEqual(partOrigins.length, 2); + expect.strictEqual(partOrigins[0].equals(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT), true); + expect.strictEqual(partOrigins[1].equals(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW), true); }); +/* test('SuppliedProduct:removePartOrigin', async () => { - expect(() => suppliedProduct.removePartOrigin(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT)).toThrow(); - // suppliedProduct.removePartOrigin(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT); - // const partOrigins = await suppliedProduct.getPartOrigin(); - // expect(partOrigins.length).toStrictEqual(1); - // expect(partOrigins[0].equals(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW)).toStrictEqual(true); -}); + suppliedProduct.removePartOrigin(connector.FACETS.PARTORIGIN.PLANTPARTORIGIN.FRUIT) + const partOrigins = await suppliedProduct.getPartOrigin(); + expect.strictEqual(partOrigins.length, 1); + expect.strictEqual(partOrigins[0].equals(connector.FACETS.PARTORIGIN.ANIMALPARTORIGIN.COW), true); +});*/ -test('SuppliedProduct:getImages', async () => { - expect(suppliedProduct.getImages().length).toStrictEqual(1); - expect(suppliedProduct.getImages()).toStrictEqual(["http://example.org/image"]); +test('SuppliedProduct:getImages', () => { + expect.strictEqual(suppliedProduct.getImages().length, 2); + expect.strictEqual(suppliedProduct.getImages().every(e => ["http://myplatform.com/image1", "http://myplatform.com/image2"].includes(e)), true); }); -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"]); +test('SuppliedProduct:addImage', () => { + suppliedProduct.addImage("http://myplatform.com/image3"); + expect.strictEqual(suppliedProduct.getImages().length, 3); + expect.strictEqual(suppliedProduct.getImages().every(e => ["http://myplatform.com/image1", "http://myplatform.com/image2", "http://myplatform.com/image3"].includes(e)), true); }); \ No newline at end of file diff --git a/test/thesaurus/productTypes.json b/test/thesaurus/productTypes.json index e423ba3..25b3cb1 100644 --- a/test/thesaurus/productTypes.json +++ b/test/thesaurus/productTypes.json @@ -340,6 +340,8 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#gooseberry" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#raspberry" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#strawberry" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -641,6 +643,21 @@ "@language" : "fr", "@value" : "légume en conserve" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#cannedGoods", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { + "@id" : "http://www.w3.org/2004/02/skos/core#Concept" + } ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#savory-groceries" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "canned goods" + } ] }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#carrot", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { @@ -1425,6 +1442,8 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#grain" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#seed" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#pulse" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -1564,6 +1583,21 @@ "@language" : "fr", "@value" : "fenouil" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#ferment", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { + "@id" : "http://www.w3.org/2004/02/skos/core#Concept" + } ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#savory-groceries" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "ferment" + } ] }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#festive-poultry", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { @@ -1951,7 +1985,7 @@ }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#quince" }, { - "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#strawberry" + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#medlar" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -2760,6 +2794,8 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#savory-groceries" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#sweet-groceries" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#dried_goods" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -3685,6 +3721,21 @@ "@language" : "fr", "@value" : "pruneau" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#pulse", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { + "@id" : "http://www.w3.org/2004/02/skos/core#Concept" + } ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#dried_goods" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "pulse" + } ] }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#pumpkin", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { @@ -4008,8 +4059,6 @@ } ], "http://www.w3.org/2004/02/skos/core#narrower" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#chicory" - }, { - "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#chewed-up" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#cress" }, { @@ -4026,6 +4075,8 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#salad-mix" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#spinach" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#corn-salad" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -4131,6 +4182,14 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#salt" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#semolina" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#grain" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#cannedGoods" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#snack" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#ferment" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", @@ -4525,6 +4584,21 @@ "@language" : "fr", "@value" : "smoothie" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#snack", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { + "@id" : "http://www.w3.org/2004/02/skos/core#Concept" + } ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#savory-groceries" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "snack" + } ] }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#snails", "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ { @@ -4639,7 +4713,7 @@ "@id" : "http://www.w3.org/2004/02/skos/core#Concept" } ], "http://www.w3.org/2004/02/skos/core#broader" : [ { - "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#fruit" + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#berry" } ], "http://www.w3.org/2004/02/skos/core#inScheme" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf" @@ -4749,10 +4823,10 @@ "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#cherry-tomato" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#cluster-tomato" - }, { - "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#old-variety-tomato" }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#round-tomato" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/productTypes.rdf#hierloom-tomato" } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "fr", diff --git a/test/thesaurus/vocabulary.json b/test/thesaurus/vocabulary.json index a6dcb5e..f14148a 100644 --- a/test/thesaurus/vocabulary.json +++ b/test/thesaurus/vocabulary.json @@ -35,6 +35,11 @@ }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary", "@type" : [ "http://www.w3.org/2004/02/skos/core#ConceptScheme" ], + "http://www.w3.org/2004/02/skos/core#hasTopConcept" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#States" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "DFC_Vocabulary" @@ -74,6 +79,15 @@ "http://www.w3.org/2004/02/skos/core#inScheme" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" } ], + "http://www.w3.org/2004/02/skos/core#narrower" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Cancelled" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Held" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Unfulfilled" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Fulfilled" + } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "Fulfilment state" @@ -102,6 +116,15 @@ "http://www.w3.org/2004/02/skos/core#inScheme" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" } ], + "http://www.w3.org/2004/02/skos/core#narrower" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Cancelled" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Held" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Complete" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Draft" + } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "Order state" @@ -128,6 +151,13 @@ "http://www.w3.org/2004/02/skos/core#inScheme" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" } ], + "http://www.w3.org/2004/02/skos/core#narrower" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Cancelled" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Paid" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#Unpaid" + } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "Payment state" @@ -138,6 +168,13 @@ "http://www.w3.org/2004/02/skos/core#inScheme" : [ { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" } ], + "http://www.w3.org/2004/02/skos/core#narrower" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#OrderState" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#PaymentState" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#FulfilmentState" + } ], "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "States" @@ -171,12 +208,206 @@ "@language" : "en", "@value" : "Unpaid" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#accept", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "accept" + } ] }, { "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#c_734fc709", "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { "@language" : "en", "@value" : "FulfilmentState" } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#combine", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "combine" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#consume", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "consume" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#dropoff", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "dropoff" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#lower", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "lower" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#modify", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "modify" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#move", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "move" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#pickup", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "pickup" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#produce", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "produce" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#raise", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "raise" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#separate", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "separate" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#narrower" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#produce" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#use" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#consume" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#pickup" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#dropoff" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#accept" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#modify" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#combine" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#separate" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#move" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#raise" + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#lower" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "Transformation type" + } ], + "http://www.w3.org/2004/02/skos/core#topConceptOf" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ] + }, { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#use", + "@type" : [ "http://www.w3.org/2004/02/skos/core#Concept" ], + "http://www.w3.org/2004/02/skos/core#broader" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#transformationType" + } ], + "http://www.w3.org/2004/02/skos/core#inScheme" : [ { + "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#DFC_Vocabulary" + } ], + "http://www.w3.org/2004/02/skos/core#prefLabel" : [ { + "@language" : "en", + "@value" : "use" + } ] } ], "@id" : "https://github.com/datafoodconsortium/taxonomies/releases/latest/download/vocabulary.rdf#" } ] \ No newline at end of file