Re: GoodRelations vs. Google RDFa vs. Open Graph vs. hProduct/hListing: Using GoodRelations in 10 Triples

On 3 May 2010, at 09:38, Martin Hepp (UniBW) wrote:

> Dear all:
> 
> Some people think that the GoodRelations ontology for e-commerce (http://purl.org/goodrelations/) is powerful, but complex.
> [snip]

> Turtle/N3:
> =========
> @prefix foo: <http://www.example.com/xyz#> .
> @prefix gr: <http://purl.org/goodrelations/v1#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> 
> foo:company a gr:BusinessEntity;
>    gr:legalName "Hepp Space Ventures Inc.";
>    gr:offers foo:offering.
> 
> foo:offering a gr:Offering;
>    rdfs:label "Volkswagen Station Wagon, 4WD, 400 $"@en;
>    rdfs:description "I sell my old Volkswagen Station Wagon, 4WD, for 400 $"@en;
>    gr:hasPriceSpecification
>        [ a gr:UnitPriceSpecification;
>            gr:hasCurrencyValue "400"^^xsd:string;
>            gr:hasCurrency "USD"^^xsd:string. ].

Hi Martin, it does not seem to complex to me.
I wonder if the following could make it even simpler though:
First I think, why not make the currency a literal?

foo:offering a gr:Offering;
   rdfs:label "Volkswagen Station Wagon, 4WD, 400 $"@en;
   rdfs:description "I sell my old Volkswagen Station Wagon, 4WD, for 400 $"@en;
   gr:hasPriceSpecification
       [ a gr:UnitPriceSpecification;
           gr:value "400"^^gr:USD;
       ] .

When you have a relation from a string to a value, you have a literal. monetary values are good
examples it seems to me of this. It would remove at least three of your URL usages, as you had
to specify the xsd:string twice, and also the type of the currency.  


Also in your example you could put the company in a different file, and refer to it by 
reference. Then your example would just be

foo:offering a gr:Offering;
   is gr:offers of foo:company;
   rdfs:label "Volkswagen Station Wagon, 4WD, 400 $"@en;
   rdfs:description "I sell my old Volkswagen Station Wagon, 4WD, for 400 $"@en;
   gr:hasPriceSpecification
       [ a gr:UnitPriceSpecification;
           gr:value "400"^^gr:USD;
       ] .

now we are down to 7 relations.

Received on Monday, 3 May 2010 09:02:55 UTC