- From: Nick Evans <nick.evans@theodi.org>
- Date: Tue, 29 Oct 2019 10:39:38 +0000
- To: "schema.org Mailing List" <public-schemaorg@w3.org>
- Cc: Tim Hill <tim.hill@theodi.org>
- Message-ID: <CABCNhnmuJoRZmz6PqO-M6d2dh33w9q7X5sKT88-szM8quf2Jfg@mail.gmail.com>
Hi all, We're currently working on creating PHP and Ruby libraries that port the great work that @RehanSaeed <https://github.com/RehanSaeed/> has done over at https://github.com/RehanSaeed/Schema.NET/, as part of the OpenActive.io <https://www.openactive.io/> project. We've come across an interesting problem in how we map schema.org enumerations to equivalent language constructs in .NET, Ruby and PHP. There are quite a few classes <https://github.com/RehanSaeed/Schema.NET/issues/92#issuecomment-546991622> that appear to be *both* a class and an enumeration: - https://schema.org/PaymentCard inherits from *both* Enumeration and Service: - Thing > Intangible > Enumeration > PaymentMethod > PaymentCard - Thing > Intangible > Service > FinancialProduct > PaymentCard - https://schema.org/DrugClass inherits from *just* Enumeration, but has a property ("drug"), so appears to be treated like a class - http://schema.org/BedType and other subclasses of QualitativeValue <https://schema.org/QualitativeValue> and MedicalEnumeration <https://schema.org/MedicalEnumeration> display properties in the schema.org GUI, so appear to be available as a class? Discussing <https://github.com/RehanSaeed/Schema.NET/issues/92> with @RehanSaeed, we're unsure what logic should be applied for determining whether an rdfs:Class from the JSON-LD <https://schema.org/version/4.0/schema.jsonld> representation should appear in the library as an enum vs as a class with properties. Our current assumption is that anything that subclasses https://schema.org/Enumeration should be strictly an enum (which is how Schema.NET works at present). <https://github.com/RehanSaeed/Schema.NET/issues/92>See further details here: https://github.com/RehanSaeed/Schema.NET/issues/92 Any hints greatly appreciated? Many thanks, Nick
Received on Tuesday, 29 October 2019 10:39:52 UTC