Cookbook/Seeks

Modeling Wish Lists, Demand, or Tendering Data

Describing your interest in certain offers using GoodRelations

On this page, we explain how the GoodRelations vocabulary can be used to express your interest in certain offers, e.g. wish lists, requests for quotations, or tendering data.

Overview

GoodRelations can be used both for advertising a product or service, or for expressing your interest in buying / consuming a particular good or service.

This is straightforward using the property gr:seeks. You simply link the individual or business expressing the demand (the "agent") with an instance of gr:Offering that describes WHAT you are looking for. The type of business function, e.g. sales, lease, repair, etc. is attached to the offering using gr:hasBusinessFunction as usual.

Example

Assume we are interested in buying one TV set but I am not interested in offers more expensive than 200 euros.

RDFa

Simply paste the following content before the closing

element in your page:

<!-- The individual or legal entity expressing the interest -->
    <div typeof="gr:BusinessEntity" about="#company">
<!-- Important Link from the data element to the Web page -->
      <span rel="foaf:page" resource=""/>
<!-- Name of the buyer -->
      <span property="rdfs:label vcard:fn gr:legalName" content="Hepp Space Ventures Inc."/>
<!-- Address details of the buyer -->
      <span rel="vcard:adr">
        <span typeof="vcard:Address" about="#address">
          <span property="vcard:street-address" content="1234 Hepp Road"/>
          <span property="vcard:postal-code" datatype="xsd:string" content="85577"/>
          <span property="vcard:locality" content="Neubiberg"/>
          <span property="vcard:region" content="Bavaria"/>
          <span property="vcard:country-name" content="Germany"/>
        </span>
      </span>
      <span property="vcard:tel" datatype="xsd:string" content="+49-89-6004-0"/>
<!-- Link to the main Web page -->
      <span rel="vcard:url foaf:page" href="http://www.heppnetz.de/"/>
      <span rel="gr:seeks">
        <span typeof="gr:Offering" about="#mydemand">
<!-- Important Link from the data element to this Web page -->
          <span rel="foaf:page" resource=""/>
<!-- Validity of the demand -->
          <span property="gr:validFrom" datatype="xsd:dateTime" content="2009-07-20T00:00:00Z"/>
          <span property="gr:validThrough" datatype="xsd:dateTime" content="2010-07-20T00:00:00Z"/>
<!-- Business Function: SELL - We want to buy the good -->
          <span rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#Sell"/>
<!-- Price specification -->
          <span rel="gr:hasPriceSpecification">
            <span typeof="gr:UnitPriceSpecification" about="#UnitPriceSpecification">
<!-- Important: use gr:hasMaxCurrencyValue, not gr:hasCurrencyValue -->
              <span property="gr:hasMaxCurrencyValue" datatype="xsd:float" content="200"/>
              <span property="gr:hasCurrency" datatype="xsd:string" content="EUR"/>
            </span>
          </span>
          <span rel="gr:includes">
<!-- Keep in mind that gr:includes is a shortcut for gr:includesObject with quantity=1.0, Unit=C62 -->
            <span typeof="gr:SomeItems">
<!-- Important Link from the data element to this Web page -->
              <span rel="foaf:page" resource=""/>
              <span property="rdfs:label rdfs:comment" content="A TV set with at least 30 CMT screen-size"/>
            </span>
          </span>
        </span>
      </span>
    </div>

Example in RDF/XML

http://www.heppnetz.de/wishlist/wishlist.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html ns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Example of A GoodRelations Wish-List</title>
  </head>
  <body xmlns:gr="http://purl.org/goodrelations/v1#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
    <p>This page is a small example of how one can express interest in a particular product or service on the Web of Linked Data.</p>
    <p>Provided by the E-Business & Web Science Research Group (Prof. Hepp) at Universitaet der Bundeswehr Muenchen,
      <a href="http://www.unibw.de/ebusiness/">www.unibw.de/ebusiness/</a>.
    </p>

<!-- Content for the browser -->
    <div>
      <span>Hepp Space Ventures Inc. is a non-existent corporation made up for the purpose of this example.</span><br/>
      We are looking for: <span>A TV set with at least 30 CMT screen-size</span>
      <br/>
      Offers are to be sent to our main office:
      <span>1234 Hepp Road</span>,
      <span>85577</span>
      <span>Neubiberg</span>,
      <span>Bavaria</span>,
      <span>Germany</span>.
      <span> Phone:+49-89-6004-0</span>
      Web: <a href="http://www.heppnetz.de/">www.heppnetz.de</a>
    </div>
<!-- Content for the Web of Linked Data -->

<!-- The individual or legal entity expressing the interest -->
    <div typeof="gr:BusinessEntity" about="#company">
<!-- Important Link from the data element to the Web page -->
      <span rel="foaf:page" resource=""/>
<!-- Name of the buyer -->
      <span property="rdfs:label vcard:fn gr:legalName" content="Hepp Space Ventures Inc."/>
<!-- Address details of the buyer -->
      <span rel="vcard:adr">
        <span typeof="vcard:Address" about="#address">
          <span property="vcard:street-address" content="1234 Hepp Road"/>
          <span property="vcard:postal-code" datatype="xsd:string" content="85577"/>
          <span property="vcard:locality" content="Neubiberg"/>
          <span property="vcard:region"  content="Bavaria"/>
          <span property="vcard:country-name" content="Germany"/>
        </span>
      </span>
<!-- Yahoo wants vcard:tel to be a literal, vcard2006 wants it to be a resource, so maybe change to span property="vcard:tel" resource="tel:+498960040"/ -->
      <span property="vcard:tel" datatype="xsd:string" content="+49-89-6004-0"/>
<!-- OPTIONAL (but useful): Geo position of the office -->
      <span rel="vcard:geo">
        <span property="vcard:latitude" datatype="xsd:float" content="48.0802626"/>
        <span property="vcard:longitude" datatype="xsd:float" content="11.6407428"/>
      </span>
<!-- Link to the main Web page -->
      <span rel="vcard:url foaf:page" href="http://www.heppnetz.de/"/>
      <span rel="gr:seeks">
        <span typeof="gr:Offering" about="#mydemand">
<!-- Important Link from the data element to this Web page -->
          <span rel="foaf:page" resource=""/>
<!-- Validity of the demand -->
          <span property="gr:validFrom" datatype="xsd:dateTime" content="2009-07-20T00:00:00Z"/>
          <span property="gr:validThrough" datatype="xsd:dateTime" content="2010-07-20T00:00:00Z"/>
<!-- Business Function: SELL - We want to buy the good -->
          <span rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#Sell"/>
<!-- Price specification -->
          <span rel="gr:hasPriceSpecification">
            <span typeof="gr:UnitPriceSpecification" about="#UnitPriceSpecification">
<!-- Important: use gr:hasMaxCurrencyValue, not gr:hasCurrencyValue -->
              <span property="gr:hasMaxCurrencyValue" datatype="xsd:float" content="200"/>
              <span property="gr:hasCurrency" datatype="xsd:string" content="EUR"/>
            </span>
          </span>
          <span rel="gr:includesObject">
            <span typeof="gr:TypeAndQuantityNode" about="#TypeAndQuantityNode">
<!-- We are looking for one ("1.0") piece ("C62") -->
              <span property="gr:amountOfThisGood" datatype="xsd:float" content="1.0"/>
              <span property="gr:hasUnitOfMeasurement" datatype="xsd:string" content="C62"/>
              <span rel="gr:typeOfGood">
                <span typeof="gr:SomeItems">
<!-- Important Link from the data element to this Web page -->
                  <span rel="foaf:page" resource=""/>
                  <span property="rdfs:label rdfs:comment" content="A TV set with at least 30 CMT screen-size"/>
<!-- OPTIONAL: EAN/UPC code - If you already know the EAN/UPC code of the item, you could also attach it
                  <span property="gr:hasEAN_UCC-13" datatype="xsd:string" content="00010363780"/>
-->
<!-- OPTIONAL: Product image - If you want to provide a picture, e.g. when looking for repair or remodeling of the item
                  <span rel="foaf:depiction">
                    <img src="http://www.heppnetz.de/searchmonkey/pscsi.jpg" alt="Product Image"/>
                  </span>
-->
<!-- OPTIONAL: Manufacturer - If you want to restrict the interest to a particular manufacturer (but often too restrictive)
                  <div rel="product:manufacturer gr:hasManufacturer" resource="http://www.sony.com#company"/>
-->
                </span>
              </span>
            </span>
          </span>
        </span>
      </span>
    </div>
  </body>
</html>

Example in Turtle

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xhv: <http://www.w3.org/1999/xhtml/vocab#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


<http://www.heppnetz.de/wishlist/wishlist.html#company> a gr:BusinessEntity ;
  rdfs:label "Hepp Space Ventures Inc."@en ;
  gr:legalName "Hepp Space Ventures Inc."@en ;
  gr:seeks <http://www.heppnetz.de/wishlist/wishlist.html#mydemand> ;
  foaf:page <http://www.heppnetz.de/>, <http://www.heppnetz.de/wishlist/wishlist.html> ;
  vcard:adr <http://www.heppnetz.de/wishlist/wishlist.html#address> ;
  vcard:fn "Hepp Space Ventures Inc."@en ;
  vcard:geo
      [ vcard:latitude "48.0802626"^^xsd:float ;
       vcard:longitude "11.6407428"^^xsd:float
      ] ;
  vcard:tel "+49-89-6004-0"^^xsd:string ;
  vcard:url <http://www.heppnetz.de/> .

<http://www.heppnetz.de/wishlist/wishlist.html#TypeAndQuantityNode> a gr:TypeAndQuantityNode ;
  gr:amountOfThisGood "1.0"^^xsd:float ;
  gr:hasUnitOfMeasurement "C62"^^xsd:string ;
  gr:typeOfGood
      [ a gr:SomeItems ;
       rdfs:label "A TV set with at least 30 CMT screen-size"@en ;
       rdfs:comment "A TV set with at least 30 CMT screen-size"@en ;
       foaf:page <http://www.heppnetz.de/wishlist/wishlist.html>
      ] .

<http://www.heppnetz.de/wishlist/wishlist.html#UnitPriceSpecification> a gr:UnitPriceSpecification ;
  gr:hasCurrency "EUR"^^xsd:string ;
  gr:hasMaxCurrencyValue "200"^^xsd:float .

<http://www.heppnetz.de/wishlist/wishlist.html#address> a vcard:Address ;
  vcard:country-name "Germany"@en ;
  vcard:locality "Neubiberg"@en ;
  vcard:postal-code "85577"^^xsd:string ;
  vcard:region "Bavaria"@en ;
  vcard:street-address "1234 Hepp Road"@en .

<http://www.heppnetz.de/wishlist/wishlist.html#mydemand> a gr:Offering ;
  gr:hasBusinessFunction gr:Sell ;
  gr:hasPriceSpecification <http://www.heppnetz.de/wishlist/wishlist.html#UnitPriceSpecification> ;
  gr:includesObject <http://www.heppnetz.de/wishlist/wishlist.html#TypeAndQuantityNode> ;
  gr:validFrom "2009-07-20T00:00:00Z"^^xsd:dateTime ;
  gr:validThrough "2010-07-20T00:00:00Z"^^xsd:dateTime ;
  foaf:page <http://www.heppnetz.de/wishlist/wishlist.html> .

Additional Information

  • You can attach images to the product; this will make sense when the business function is different from gr:sell (e.g. repair) - "Who can fixed that broken wristwatch?"
  • You can attach EAN/UPC codes to the product if you are looking for a particular make and model.
  • You can be much more specific in describing what you want by using a domain ontology ike eclassOWL or freeClass; this will allow specifying quantitative or qualitative properties of the items you are looking for - "Concrete tubes with 30 centimeters inner diamater and a length of at least 2 meters".
  • You can specify acceptable payment and delivery options same.
  • There is a proposal for a similar type in schema.org: http://dl.dropbox.com/u/1523969/microdata/Demand.html

In a nutshell: Basically, you can use the very same GoodRelations vocabulary for the buy and the sell side of commerce.