W3C home > Mailing lists > Public > public-hydra@w3.org > December 2014

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

From: Dietrich Schulten <ds@escalon.de>
Date: Sat, 13 Dec 2014 19:04:59 +0100
Message-ID: <548C7FCB.9090002@escalon.de>
To: "public-hydra@w3.org" <public-hydra@w3.org>
Hash: SHA1


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 :)

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

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

- - 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 Schulten
Escalon System-Entwicklung
Bubenhalde 10
74199 Untergruppenbach
Version: GnuPG v2.0.22 (MingW32)

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:29:44 UTC