Re: plural properties should become singular

On 01/28/2014 06:59 PM, Gregg Kellogg wrote:
>
> On Jan 28, 2014, at 9:31 AM, Ruben Verborgh <ruben.verborgh@ugent.be> wrote:
>
>> Dear all,
>>
>> TL;DR: Since the range of the following properties is not a list, I think they should be singular:
>> - hydra:mappings
>> - hydra:members
>> - hydra:operations
>> - hydra:statusCodes
>> - hydra:supportedClasses
>> - hydra:supportedOperations
>> - hydra:supportedProperties
>> This mail argues why plural properties are not a good idea.
>>
>> In the RDF data model, a property creates a relation between a subject and an object.
>> For instance, :subject :hasP :object means that “subject has object as P".
>> We see examples of that in all popular vocabularies. Examples:
>> RDF – :me rdf:type foaf:Person, foaf:Agent.
>> FOAF – :me foaf:interest, :Web, :Hypermedia.
>> Dublin Core – ;document dc:hasPart :part1, :part2.
>>
>> As you can see, it doesn't matter whether one or multiple properties are expected:
>> multiple objects can be attached to the same subject; but all are different relations.
>> The property is singular because it describes a relation between two (singular) things.
>> The only time we would encounter a plural, is if the object is a list/collection.
>>
>> If we look at Hydra, this is not defined as one would expect:
>>     {
>>       "@id": "hydra:mappings",
>>       "@type": "rdf:Property",
>>       "comment": "The variable-to-property mappings of the IRI template.",
>>       "domain": "hydra:IriTemplate",
>>       "label": "mappings",
>>       "range": "hydra:IriTemplateMapping",
>>       "status": "testing"
>>     },
>>
>> This can lead to situations such as
>>     :Template hydra:template "/issues{?q}" ;
>>         hydra:mappings :q.
>>     :q a hydra:IriTemplateMapping;
>>         hydra:property hydra:freetextQuery;
>>         hydra:required true;
>>         hydra:variable "q" .
>>
>> So the “mappings” of /issues{?q} is actually a single mapping.
>> Or in other words: /issues{?q} has "mappings” :q,
>> but :q is only a single mapping, not a collection of mappings.
>> Let me trim down the example to show this contradiction better:
>>     :Template hydra:mappings :q.
>>     :q a hydra:IriTemplateMapping.
>> Either :q should be hydra:IriTemplateMappings,
>> or the property should be singular: "hydra:mapping".
>>
>> The case of “statusCodes” shows to how much confusion this leads:
>> we have both a “statusCode” and a ”statusCodes” property.
>> The situation would be that a resource can lead to “statusCodes" X, Y, Z,
>> each of which have a “statusCode” 200, 400, 500, respectively.
>> I think the correct way is that “statusCodes” becomes “status”,
>> and that the current statusCode remains the way it is.
>>
>> I would strongly suggest that all of the aforementioned properties are turned into singular;
>> that would align Hydra with the best practices of all other vocabularies.
>> I know that changing this can be a pain, but I think it's important we do this.
>
> +1. IMO, best practice for RDF predicate names is to be singular; schema.org made many mistakes in this area, and now there are typically both plural and singular versions which mean the same thing.
plural ones have in schema.org have deprecation warnings. eg: 
http://schema.org/parents
"A parents of the person (legacy spelling; see singular form, parent)."

+1 to giving some attention to clarify it and possibly changing to 
singular versions!

Received on Tuesday, 28 January 2014 21:16:04 UTC