GoodRelations is a standardized vocabulary for product, price, and company data that can (1) be embedded into existing static and dynamic Web pages and that (2) can be processed by other computers. This increases the visibility of your products and services in the latest generation of search engines, recommender systems, and other novel applications.
Martin Hepp
martin.hepp at ebusiness-unibw.org
Tue May 8 19:29:10 CEST 2012
Dear all: In a private e-mail, I was asked to add a property for the NACE identifiers for GoodRelations so that one could attach those codes to company data: >> http://epp.eurostat.ec.europa.eu/cache/ITY_OFFPUB/KS-RA-07-015/EN/KS-RA-07-015-EN.PDF Here is my reply: First, we always appreciate suggestions to improve GoodRelations, sincerely! However, we usually add new elements to GoodRelations only if there will be significant amounts of actual data based on that. So extensions to the core GoodRelations vocabulary require that at least one of the following conditions hold: - The extension will be used by at least one major adaptor (e.g. a large site). - The extension will be used by many smaller users (e.g. a frequent request or common need). - The extension will expand the application domain of a GoodRelations element, i.e. it will make it more generically usable (e.g. details of payment methods that are needed for hotel prices). - The extension makes GoodRelations more beautiful ;-) The reasons for that is that keeping a vocabulary as small as possible is an important goal for us. Second, keep in mind that you can always extend GoodRelations in your own namespace if you need additional properties. There is no need to wait for us to add new elements if you have more data or more granular data. Simply define the additional elements in your own site, ideally directly in RDFa in a special "vocabulary" page, e.g. http://acme.com/vocabulary/ For instance, for adding a new property "hasNACE" to the gr:BusinessEntity class, it is sufficient to add this block of markup to your http://acme.com/vocabulary/ page: <!-- Example of extending GoodRelations with site-specific properties Step 1: Define a new property; this should be on a central page e.g. http://acme.com/vocabulary/ --> <div typeof="owl:DatatypeProperty" about="http://acme.com/vocabulary/#hasNACE"> <span property="rdfs:label">hasNACE</span> <div rel="rdfs:domain" resource="http://purl.org/goodrelations/v1#BusinessEntity"></div> <div rel="rdfs:range" resource="http://www.w3.org/2001/XMLSchema#string"></div> </div> Then, you can use the property anywhere on your site or even globally. E.g. you could use it in the markup of your main page: <!-- Attach it to a company --> <div xmlns:acme="http://acme.com/vocabulary/#" typeof="gr:BusinessEntity" about="#company"> <span property="gr:legalName">ACME Inc.</span> NACE code: <div property="acme:hasNACE" datatype="xsd:string">0123456</div> </div> If the extensions are new properties or new classes for types of products or services, your modeling pattern should follow the recipe shown here: http://wiki.goodrelations-vocabulary.org/Documentation/Extensions That means that for those properties, you will have to make the properties and classes specializations of the meta-model from GoodRelations, i.e. gr:datatypeProductOrServiceProperty, gr:quantitativeProductOrServiceProperty, gr:qualitativeProductOrServiceProperty, gr:ProductOrService, or gr:QualitativeValue Example: We want to define a new property hasWifi for indicating Wifi support of a product. The range will be a boolean value, so following from the extensions recipe, it must be an owl:DatatypeProperty and an rdfs:subPropertyOf gr:datatypeProductOrServiceProperty. On the vocabulary page, we define a new product property: <div typeof="owl:DatatypeProperty" about="http://acme.com/vocabulary/#hasWifi"> <div rel="rdfs:subPropertyOf" resource="http://purl.org/goodrelations/v1#datatypeProductOrServiceProperty"></div> <span property="rdfs:label">hasWifi</span> <div rel="rdfs:domain" resource="http://purl.org/goodrelations/v1#ProductOrService"></div> <div rel="rdfs:range" resource="http://www.w3.org/2001/XMLSchema#boolean"></div> </div> Then, we can use it on item pages with the full property URI or by defining a namespace prefix for our site: <!-- Attach it to a product datasheet --> <div xmlns:acme="http://acme.com/vocabulary/#" typeof="gr:ProductOrServiceModel" about="#product"> <span property="gr:name">ACME Anvil with Wifi</span> Wifi: <div property="acme:hasWifi" content="true" datatype="xsd:boolean>yes</div> </div> That's it. Best Martin Hepp -------------------------------------------------------- martin hepp e-business & web science research group universitaet der bundeswehr muenchen e-mail: hepp at ebusiness-unibw.org phone: +49-(0)89-6004-4217 fax: +49-(0)89-6004-4620 www: http://www.unibw.de/ebusiness/ (group) http://www.heppnetz.de/ (personal) skype: mfhepp twitter: mfhepp Check out GoodRelations for E-Commerce on the Web of Linked Data! ================================================================= * Project Main Page: http://purl.org/goodrelations/