Cookbook/Schema.org

=GoodRelations as part of schema.org =

We are working with the schema.org sponsors, namely Google, Yahoo, Bing, and Yandex, on the integration of GoodRelations into the schema.org core. This will mean that you can use the full expressivity of GoodRelations directly from the schema.org namespace in Microdata syntax soon. On this page, we will provide examples of this usage.

Note: This will be an additional syntactical form of using GoodRelations for your site. GoodRelations will remain an independent vocabulary, and in RDFa and other RDF syntaxes, the original namespace of GoodRelations will remain the primary location.

Links:
 * Mercurial repository with the final change set
 * Public Draft Note:  This is not 100% in sync with the final status of the addition, since we cannot apply all editorial changes from the production systems back to the Google Doc.
 * Entry on the W3C Wiki

Motivation
We were looking for a way of making the rich GoodRelations conceptual model be usable as a direct extension of schema.org so that Webmasters would not have to choose between schema.org and GoodRelations but could instead use both the basic schema.org patterns and the advanced GoodRelations patterns from the same namespace.

There is now a largely agreed proposal on how this can be achieved. We hope this to become officially deployed and supported by the validators and live systems of all major search engines during the the Fall of 2012.

Overview
The basic approach is as follows:


 * All GoodRelations classes and properties that do not yet exist in schema.org are added to schema.org. For example, the GoodRelations class http://purl.org/goodrelations/v1#BusinessFunction becomes also a schema.org class with the identifier http://schema.org/BusinessFunction.
 * GoodRelations will include mapping axioms so that an RDF environment with minimal reasoning support (rdfs:subclassOf, rdfs:subPropertyOf, owl:equivalentClass, owl:equivalentProperty, owl:sameAs) can operate on the data purely from the GoodRelations namespace.
 * Enumerations, i.e. individuals/instances of GoodRelations will be used from the original GoodRelations namespace using the schema.org extension mechanism for external enumerations. This reduces the amount of entries that have to be added to schema.org. A list of the respective GoodRelations elements is here.
 * For a few classes and properties, the local part of the name may differ in the schema.org namespace. This was necessary in order to keep a consistent naming convention in schema.org. The names in GoodRelations remain unchanged to avoid breaking older data and older clients. A list of naming differences will be provided on this page.
 * For legal reasons, schema.org cannot contain elements for modeling licensing conditions, because site-owners may try to use them to express complex licensing terms for the use of their content by search engines, which cannot be properly handled by Web-scale crawlers. Thus, the class gr:License from GoodRelations is not available from the schema.org namespace. If you want to use gr:License, use GoodRelations in its original namespace or use the additionalType property in combination with the full URI http://purl.org/goodrelations/v1#Licenseand the main itemtype http://schema.org/BusinessFunction.
 * The upcoming GoodRelations class gr:PropertyValue and the dependent properties gr:feature, gr:propertyName, gr:propertyValue, and gr:unitText will likely not be included in the first release of the integration.

Offer with Delivery Charges and Business Function
The following example shows how an entity of type http://schema.org/Offer can be augmented using the granular pricing elements of GoodRelations for indicating shipping charges. It also shows the usage of business functions that define the bundle of rights you will obtain on the product.

 Hepp Personal SCSI Controller Card The Hepp Personal SCSI is a 16-bit add-on card that allows attaching up to seven SCSI devices to your computer. 

Price: Euro: 99.99    

Delivery costs to  Germany: Euro: 10.00    (via UPS)

...

Observe the following details:

1. Some property names differ slightly between the GoodRelations namespace and the schema.org namespace: 2. The enumerations, i.e. the instances of the classes like gr:BusinessFunction and gr:DeliveryMethod are used directly from the GoodRelations namespace. Since schema.org does typically not define lists of enumerations, that seems like the favorite way of adding support for those. So instead of http://schema.org/Sell, as one may assume:

 ...  we use http://purl.org/goodrelations/v1#Sell for such enumerations.  

Rent Videos for 30 days
We use http://schema.org/Movie with the business function LeaseOut and the validity of the lease will be encoded using the eligibleDuration property:

  Pirates of the Carribean: On Stranger Tides (2011) Jack Sparrow and Barbossa embark on a quest to find the elusive fountain of youth, only to discover that Blackbeard and his daughter are after it too.  More information on imdb.com</a>

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <link itemprop="businessFunction" href="http://purl.org/goodrelations/LeaseOut" /> Price: <div itemprop="priceSpecification" itemscope itemtype="http://schema.org/UnitPriceSpecification">$ 3.99                               <meta itemprop="priceCurrency" content="USD"> <time itemprop="validThrough" datetime="2012-12-31T23:59:59Z"> Delivery: <link itemprop="availableDeliveryMethod" href="http://purl.org/goodrelations/v1#DirectDownload" /> Download Validity of the lease: <div itemprop="eligibleDuration" itemscope itemtype="http://schema.org/QuantitativeValue"> 30 -                <meta itemprop="unitCode" content="DAY" >days

Classes

 * schema:Offer = gr:Offering
 * schema:IndividualProduct = gr:Individual
 * schema:ParcelService = gr:DeliveryModeParcelService
 * schema:Place = gr:Location
 * schema:ProductModel = gr:ProductOrServiceModel
 * schema:CreditCard = gr:PaymentMethodCreditCard
 * schema:Product = gr:ProductOrService
 * schema:SomeProducts = gr:SomeItems

Object Properties

 * schema:priceSpecification = gr:hasPriceSpecification
 * schema:businessFunction = gr:hasBusinessFunction
 * schema:eligibleCustomerType = gr:eligibleCustomerTypes
 * schema:manufacturer = gr:hasManufacturer
 * schema:warrantyScope = gr:hasWarrantyScope
 * schema:inventoryLevel = gr:hasInventoryLevel
 * schema:dayOfWeek = gr:hasOpeningHoursDayOfWeek
 * schema:brand = gr:hasBrand
 * schema:itemOffered = gr:includes
 * schema:makesOffer = gr:offers
 * schema:availableDeliveryMethod = gr:availableDeliveryMethods
 * schema:openingHoursSpecification = gr:hasOpeningHoursSpecification
 * schema:eligibleQuantity = gr:hasEligibleQuantity
 * schema:warranty = gr:hasWarrantyPromise
 * schema:image = http://xmlns.com/foaf/0.1/depiction
 * schema:acceptedPaymentMethod = gr:acceptedPaymentMethods

A special case is This used to be gr:durationOfWarrantyInMonths in GoodRelations but will be updated to match the new name and range from schema.org shortly.
 * schema:durationOfWarranty

Datatype Properties

 * schema:minPrice = gr:hasMinCurrencyValue
 * schema:unitCode = gr:hasUnitOfMeasurement
 * schema:isicV4 = gr:hasISICv4
 * schema:gtin8 = gr:hasGTIN-8
 * schema:maxPrice = gr:hasMaxCurrencyValue
 * schema:gtin14 = gr:hasGTIN-14
 * schema:maxValue = gr:hasMaxValue
 * schema:mpn = gr:hasMPN
 * schema:value = gr:hasValue
 * schema:model = gr:hasMakeAndModel
 * schema:gtin13 = gr:hasEAN_UCC-13
 * schema:globalLocationNumber = gr:hasGlobalLocationNumber
 * schema:naics = gr:hasNAICS
 * schema:priceCurrency = gr:hasCurrency
 * schema:sku = gr:hasStockKeepingUnit
 * schema:duns = gr:hasDUNS
 * schema:minValue = gr:hasMinValue
 * schema:eligibleRegion = gr:eligibleRegions

Other Differences

 * The offers property has a different meaning in schema.org, since it links from the product to respective offers, while in GoodRelations, it links from a gr:BusinessEntity to its offers.


 * Currently, product identifiers like gr:hasEAN_UCC-13 etc. can be attached both to products (gr:ProductOrServiceModel, gr:ProductOrService, gr:Individual, and gr:SomeItems) and to the offer including the product (gr:Offering). It is currently being discussed to remove those properties from gr:Offering for the sake of cleaner modeling, either only in the schema.org import of GoodRelations, or from GoodRelations in general. This entry is a reminder for us to keep this on the radar.