ISSUE-37: Define/change the range of "supportedProperty"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

playing with the proposal for #37.

The open questions mentioned in the issue are:

> 1. Is "supportedProperty" still needed in this case? 2. Should
> "property" and "propertyPath" be combined? 3. Should this
> information still be bound to a class or should we
introduce a wrapper similar to the current SupportedProperty?

I tried to apply the proposal to the reviewRating case. To see just
how terse we can be, I boldly dropped supportedProperty (1) and
combined property and propertyPath (2) Furthermore, I thought if
hydra:constraint :range :PropertyConstraint, I could leave out
PropertyConstraint, too :)


{
    "@context":
    {
        "@vocab": "http://schema.org/",
        "hydra": "http://www.w3.org/ns/hydra/core#"
    },
    "@type": "Product",
    "name": "Kenmore White 17\" Microwave",
    "review":
    {
        "@id": "http://example.com/products/2/reviews",
        "hydra:operation": [
        {
            "@type": "ReviewAction",
            "hydra:method": "POST",
            "hydra:expects":
            {
                "hydra:constraint": [
                {
                    "hydra:propertyPath": "rdf:type",
                    "hydra:allowedValue": { "@id": "schema:type" },
                    "required": true
                },
                {
                    "hydra:propertyPath": "reviewBody",
                    "required": true
                },
                {
                    "hydra:propertyPath":
                      ["reviewRating", "ratingValue"],
                    "required": true
                }]
            }
        }]
    }
}

My understanding is that the hydra:constraint is really only needed if
there is something to constrain.

Questions:
- - I do not quite understand the purpose of the constraint where the
:allowedValue is a schema:type, for http://schema.org/type turns up
nothing. The constraint seems to mean that the POST must contain an
rdf:type JSON attribute. What should the client add to the request in
order to satisfy the first constraint?

- - What is the meaning of :allowedValue? Why is there no allowedValue
on reviewBody and ratingValue? Could I use it to express e.g. a number
of allowed literals in a request attribute, something like
select-options in HTML?

- - What if a nested property is only required if its parent is present?
In this case: how would we express that the reviewRating is optional?

- - ad 3.) please explain. Which "wrapper similar to the current
SupportedProperty" do you have in mind?

Best regards,
Dietrich



- -- 
Dietrich Schulten
Escalon System-Entwicklung
Bubenhalde 10
74199 Untergruppenbach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iEYEARECAAYFAlSMf8sACgkQuKLNitGfiZOrCQCfZzfNGNLPqkg8yXqDen+Oj/dd
fNUAoJ6SBHOMw7i5oCgMgitW0B5oK5+n
=qPmr
-----END PGP SIGNATURE-----

Received on Saturday, 13 December 2014 18:05:31 UTC