Designing my vocabulary

Hello,

I am working on designing a vocabulary and generally liked the approach
taken by schema.org.

The syntax I will be adopting is json-ld.

There is a concept I would like to have in my vocabulary and I am not
precisely sure what the proper design would be. It involves having a
property with a well defined min & max value -- like a percentage which
would take on values of 0 to 100. The idea is that I would like to define a
property which specifies what the acceptable min and max values are for the
value of the property.

I see that schema.org defines QuantitativeValue
<https://schema.org/QuantitativeValue> which has minValue and maxValue
properties. I believe one would start with a subclass of QuantitativeValue,
but I am not certain where to go from there.

To try to answer this question myself, let's define a class which will have
a property which has a min and max value.

*(A)*
    {
      "@id": "http://my-company.org/MyCompanyClass",
      "@type": "rdfs:Class",
      "rdfs:comment": "A class that will change the world",
      "rdfs:label": "MyCompanyClass",
    },

The property of the class would be defined as:

*(B)*
    {
      "@id": "http://my-company.org/chanceOfSuccess",
      "@type": "rdf:Property",
      "http://schema.org/domainIncludes": {
        "@id": "http://my-company.org/MyCompanyClass"
      },
      "http://schema.org/rangeIncludes": {
          "@id": "http://schema.org/QuantitativeValue"
      },
      "rdfs:comment": "The chance of success as expressed as a percentage
between 0 and 100.",
      "rdfs:label": "chanceOfSuccess"
    }

It is at this point that I get a bit confused about how to proceed.

Taking a look at https://schema.org/LoanOrCredit, I might try to do the
following:

*(C)*
{
"@context":"http://my-company.org",
"@type":"MyCompanyClass",
"name":"An attempt I will make",
"chanceOfSuccess": {
    "@type":"QuantitativeValue",
    "name": "the chances",
    "minValue":"0",
    "maxValue":"100"
  }
}

And again, I am stuck and unsure of how to proceed. It seems as if the
minValue & maxValue fields belong in the property defintion.

Why do I think I am stuck?

Because, at this point, I would like to use (C) as a Class or Type and then
write something like:

*(D)*
{
"@context":"http://my-company.org",
"@type":"(C)",
"name":"about my attempt",
"chanceOfSuccess": {
    "@type":"QuantitativeValue",
    "value": "50"
  }
}


Something doesn't feel right about all of this. I am clearly missing some
key concept, but I am not sure what that is at the moment.

Any thoughts, comments, or ideas would be appreciated.

Regards,
James

Received on Wednesday, 11 March 2020 13:27:16 UTC