Cookbook/Vehicles

GoodRelations for Cars, Boats, Bikes - Sales, Rental, or Service

Overview

Manufacturers and dealers of cars can publish all characteristics and features of their vehicles on the Web, which empowers novel recommendation applications to fairly compare a vast amount of vehicle offers.

Car Sales

Scenario: Miller Inc. sells the following car:

  • Make and Model: 2002 Chevrolet Camaro
  • Price: $ 11990
  • VIN: 2G1FP22G522155049
  • Drivetype: RWD
  • Mileage: 42000
  • Stock No: 155049
  • Transmission: 6-Speed Manual
  • Engine: 5.7L V8 OHV 16V
  • Exterior Color: red

Extensions

Turtle

# Car Sales

@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix gr:       <http://purl.org/goodrelations/v1#> .
@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
@prefix dbpedia:  <http://dbpedia.org/resource/> .
@prefix vso:      <http://purl.org/vso/ns#> .
@prefix foo:      <http://example.org/#> .

# Company / Vendor Data (needed only once for all offers)
foo:company a gr:BusinessEntity ;
    gr:legalName "Miller Inc." ;
    foaf:page  <http://www.miller.com/> ;
    gr:offers foo:offer1 .

# Offer: Price, Payment, Conditions
foo:offer1 a gr:Offering ;
    gr:includes foo:car_155049 ;
    gr:hasBusinessFunction gr:Sell ;
    gr:hasPriceSpecification [ a gr:UnitPriceSpecification ;
                                gr:hasCurrency "USD"^^xsd:string ;
                                gr:hasCurrencyValue "11990"^^xsd:float ] ;
    foaf:page  <http://www.agautosalesny.com/details.php?key=71> . # URI of the web page

# Car Specification
foo:car_155049 a vso:Automobile, gr:Individual ; # it' a real car
    gr:hasManufacturer dbpedia:Chevrolet ;
    gr:hasMakeAndModel dbpedia:Chevrolet_Camaro ;
    vso:modelDate "2002-01-01"^^xsd:date ; # year-only data is not possible in xsd:date and also problematic
    vso:VIN "2G1FP22G522155049"^^xsd:string ;
    vso:bodyStyle  <http://dbpedia.org/resource/Coup%C3%A9> ; # Coupé
    vso:color "red"@en ;
    vso:engineDisplacement [ a gr:QuantitativeValueFloat ;
                             gr:hasValueFloat "5.7"^^xsd:float ;
                             gr:hasUnitOfMeasurement "LTR"^^xsd:string ] ;
    vso:engineName "5.7L V8 OHV 16V"@en ;
    vso:mileageFromOdometer [ a gr:QuantitativeValueFloat ;
                             gr:hasValueFloat "42000"^^xsd:float ;
                             gr:hasUnitOfMeasurement "SMI"^^xsd:string ] ;
    gr:hasStockKeepingUnit "155049"^^xsd:string ;
    vso:gearsTotal [ a gr:QuantitativeValueInteger ;
                     gr:hasValueInteger "6"^^xsd:int ;
                     gr:hasUnitOfMeasurement "C62"^^xsd:string ] ;
    vso:transmission dbpedia:Manual_transmission ;
    vso:fuelType dbpedia:Gasoline ;
    vso:rentalUsage "false"^^xsd:boolean ;
    vso:feature dbpedia:Cup_holder,
                dbpedia:Power_window,
                dbpedia:Air_conditioner,
                dbpedia:Anti-lock_braking_system ;  # Add more DBPedia / Wikipedia URIs for additional features
    foaf:depiction  <http://www.agautosalesny.com/super_admin/car_images/71-Photo-01_large.jpg> ; # URI of a photo
    foaf:page  <http://www.agautosalesny.com/details.php?key=71> . # URI of the web page

RDFa

<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ns="http://www.w3.org/1999/xhtml" xmlns:foo="http://example.org/#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:dbpedia="http://dbpedia.org/resource/" xmlns:vso="http://purl.org/vso/ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <div about="http://example.org/#company" typeof="gr:BusinessEntity">
    <div property="gr:legalName" content="Miller Inc."></div>
    <div rel="foaf:page" resource="http://www.miller.com/"></div>
    <div rel="gr:offers">
      <div about="#offer1" typeof="gr:Offering">
        <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#Sell"></div>
        <div rel="gr:hasPriceSpecification">
          <div typeof="gr:UnitPriceSpecification">
            <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div>
            <div property="gr:hasCurrencyValue" content="11990" datatype="xsd:float"></div>
          </div>
        </div>
        <div rel="gr:includes">
          <div about="#car_155049" typeof="vso:Automobile gr:Individual">
            <div property="vso:VIN" content="2G1FP22G522155049" datatype="xsd:string"></div>
            <div rel="vso:bodyStyle" resource="http://dbpedia.org/resource/Coup%C3%A9"></div>
            <div property="vso:color" content="red" xml:lang="en"></div>
            <div rel="foaf:depiction" resource="http://www.agautosalesny.com/super_admin/car_images/71-Photo-01_large.jpg"></div>
            <div rel="vso:engineDisplacement">
              <div typeof="gr:QuantitativeValueFloat">
                <div property="gr:hasUnitOfMeasurement" content="LTR" datatype="xsd:string"></div>
                <div property="gr:hasValueFloat" content="5.7" datatype="xsd:float"></div>
              </div>
            </div>
            <div property="vso:engineName" content="5.7L V8 OHV 16V" xml:lang="en"></div>
            <div rel="vso:feature" resource="http://dbpedia.org/resource/Cup_holder"></div>
            <div rel="vso:feature" resource="http://dbpedia.org/resource/Anti-lock_braking_system"></div>
            <div rel="vso:feature" resource="http://dbpedia.org/resource/Power_window"></div>
            <div rel="vso:feature" resource="http://dbpedia.org/resource/Air_conditioner"></div>
            <div rel="vso:fuelType" resource="http://dbpedia.org/resource/Gasoline"></div>
            <div rel="vso:gearsTotal">
              <div typeof="gr:QuantitativeValueInteger">
                <div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div>
                <div property="gr:hasValueInteger" content="6" datatype="xsd:int"></div>
              </div>
            </div>
            <div rel="gr:hasMakeAndModel" resource="http://dbpedia.org/resource/Chevrolet_Camaro"></div>
            <div rel="gr:hasManufacturer" resource="http://dbpedia.org/resource/Chevrolet"></div>
            <div property="gr:hasStockKeepingUnit" content="155049" datatype="xsd:string"></div>
            <div rel="vso:mileageFromOdometer">
              <div typeof="gr:QuantitativeValueFloat">
                <div property="gr:hasUnitOfMeasurement" content="SMI" datatype="xsd:string"></div>
                <div property="gr:hasValueFloat" content="42000" datatype="xsd:float"></div>
              </div>
            </div>
            <div property="vso:modelDate" content="2002-01-01" datatype="xsd:date"></div>
            <div rel="foaf:page" resource="http://www.agautosalesny.com/details.php?key=71"></div>
            <div property="vso:rentalUsage" content="false" datatype="xsd:boolean"></div>
            <div rel="vso:transmission" resource="http://dbpedia.org/resource/Manual_transmission"></div>
          </div>
        </div>
        <div rel="foaf:page" resource="http://www.agautosalesny.com/details.php?key=71"></div>
      </div>
    </div>
  </div>
</div>

Car Rental

Scenario: Miller Inc. offers the following car class for rent.

  • ACRISS Car Classification Code "ECMN" (a typical code for rental car categories), i.e. an Economy car, 2/4 doors, manual gearbox, no air-conditioning (e.g. Ford Fiesta or Opel Corsa)
  • The price is $ 50 per day.

Extensions

Turtle

# Car Rental

@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix gr:       <http://purl.org/goodrelations/v1#> .
@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
@prefix dbpedia:  <http://dbpedia.org/resource/> .
@prefix vso:      <http://purl.org/vso/ns#> .
@prefix foo:      <http://example.org/#> .

# Company Data (needed only once for all offers)
foo:company a gr:BusinessEntity ;
    gr:legalName "Miller Inc." ;
    foaf:page  <http://www.miller.com/> ;
    gr:offers foo:offer2 .

# Offer: Price, Payment, Conditions
foo:offer2 a gr:Offering ;
    gr:includes foo:cars ;
    gr:hasBusinessFunction gr:LeaseOut ;
    gr:hasPriceSpecification [ a gr:UnitPriceSpecification ;
                                gr:hasCurrency "USD"^^xsd:string ;
                                gr:hasCurrencyValue "50"^^xsd:float ;
                                gr:hasUnitOfMeasurement "DAY"^^xsd:string ] ;
    foaf:page  <http://example.org/economy-car-deal> . # URI of the web page

# Car Specification
foo:cars a vso:Automobile, gr:SomeItems ; # it' a placeholder for multiple cars
    vso:ACRISSCode "ECMN"^^xsd:string ; # Rental car category
    vso:doors [ a gr:QuantitativeValueInteger ;
                gr:hasMinValueInteger "2"^^xsd:int ;
                gr:hasMaxValueInteger "4"^^xsd:int ;
                gr:hasUnitOfMeasurement "C62"^^xsd:string ] ;
    vso:transmission dbpedia:Manual_transmission ;
    vso:fuelType dbpedia:Gasoline ;
    foaf:page  <http://example.org/economy-car-deal> . # URI of the web page

RDFa

<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ns="http://www.w3.org/1999/xhtml" xmlns:foo="http://example.org/#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:dbpedia="http://dbpedia.org/resource/" xmlns:vso="http://purl.org/vso/ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <div about="http://example.org/#company" typeof="gr:BusinessEntity">
    <div property="gr:legalName" content="Miller Inc."></div>
    <div rel="gr:offers" resource="#offer2"></div>
    <div rel="foaf:page" resource="http://www.miller.com/"></div>
  </div>
  <div about="#offer2" typeof="gr:Offering">
    <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#LeaseOut"></div>
    <div rel="gr:hasPriceSpecification">
      <div  typeof="gr:UnitPriceSpecification">
        <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div>
        <div property="gr:hasCurrencyValue" content="50" datatype="xsd:float"></div>
        <div property="gr:hasUnitOfMeasurement" content="DAY" datatype="xsd:string"></div>
      </div>
    </div>
    <div rel="gr:includes">
      <div  about="#cars" typeof="vso:Automobile gr:SomeItems">
        <div property="vso:ACRISSCode" content="ECMN" datatype="xsd:string"></div>
        <div rel="vso:transmission" resource="http://dbpedia.org/resource/Manual_transmission"></div>
        <div rel="vso:doors">
          <div  typeof="gr:QuantitativeValueInteger">
            <div property="gr:hasMaxValueInteger" content="4" datatype="xsd:int"></div>
            <div property="gr:hasMinValueInteger" content="2" datatype="xsd:int"></div>
            <div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div>
          </div>
        </div>
        <div rel="vso:fuelType" resource="http://dbpedia.org/resource/Gasoline"></div>
        <div rel="foaf:page" resource="http://example.org/economy-car-deal"></div>
      </div>
    </div>
    <div rel="foaf:page" resource="http://example.org/economy-car-deal"></div>
  </div>
</div>

Bike Rental

Scenario: Miller Inc. offers bikes for rent. The rate is 10 $ per day.

Extensions

Turtle

# Bike Rental

@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix gr:       <http://purl.org/goodrelations/v1#> .
@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
@prefix dbpedia:  <http://dbpedia.org/resource/> .
@prefix vcard:    <http://www.w3.org/2006/vcard/ns#> .
@prefix vso:      <http://purl.org/vso/ns#> .
@prefix foo:      <http://example.org/#> .

# Company Data (needed only once for all offers)
foo:company a gr:BusinessEntity ;
    gr:legalName "Miller Inc." ;
    foaf:page  <http://www.miller.com/ > ;
    gr:offers foo:offer3 .

# Offer: Price, Payment, Conditions
foo:offer3 a gr:Offering ;
    gr:includes foo:bikes ;
    gr:hasBusinessFunction gr:LeaseOut ;
    gr:hasPriceSpecification [ a gr:UnitPriceSpecification ;
                                gr:hasCurrency "USD"^^xsd:string ;
                                gr:hasCurrencyValue "10"^^xsd:float ;
                                gr:hasUnitOfMeasurement "DAY"^^xsd:string ] ;
    foaf:page  <http://example.org/bike-rental > . # URI of the web page

# Bike Specification
foo:bikes a vso:Bicycle, gr:SomeItems ; # it' a placeholder for multiple bikes
    foaf:page  <http://example.org/bike-rental > . # URI of the web page

RDFa

<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ns="http://www.w3.org/1999/xhtml" xmlns:foo="http://example.org/#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:vso="http://purl.org/vso/ns#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <div about="http://example.org/#company" typeof="gr:BusinessEntity">
    <div property="gr:legalName" content="Miller Inc."></div>
    <div rel="gr:offers">
      <div about="#offer3" typeof="gr:Offering">
        <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#LeaseOut"></div>
        <div rel="gr:hasPriceSpecification">
          <div typeof="gr:UnitPriceSpecification">
            <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div>
            <div property="gr:hasCurrencyValue" content="10" datatype="xsd:float"></div>
            <div property="gr:hasUnitOfMeasurement" content="DAY" datatype="xsd:string"></div>
          </div>
        </div>
        <div rel="gr:includes">
          <div about="#bikes" typeof="vso:Bicycle gr:SomeItems">
            <div rel="foaf:page" resource="http://example.org/bike-rental"></div>
          </div>
        </div>
        <div rel="foaf:page" resource="http://example.org/bike-rental"></div>
      </div>
    </div>
    <div rel="foaf:page" resource="http://www.miller.com/"></div>
  </div>
</div>

Boat Rental

Scenario: Miller Inc. offers canoes for 2 - 3 paddlers for rent. The rate is 10 $ per day.

Extensions

Turtle

# Boat Rental
# Miller Inc. offers canoes for 2 - 3 paddlers for rent. The rate is 10 $ per day.

@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .
@prefix gr:       <http://purl.org/goodrelations/v1#> .
@prefix foaf:     <http://xmlns.com/foaf/0.1/> .
@prefix dbpedia:  <http://dbpedia.org/resource/> .
@prefix vcard:    <http://www.w3.org/2006/vcard/ns#> .
@prefix vso:      <http://purl.org/vso/ns#> .
@prefix foo:      <http://example.org/#> .

# Company Data (needed only once for all offers)
foo:company a gr:BusinessEntity ;
    gr:legalName "Miller Inc." ;
    foaf:page  <http://www.miller.com/ > ;
    gr:offers foo:offer4 .

# Offer: Price, Payment, Conditions
foo:offer4 a gr:Offering ;
    gr:includes foo:canoes ;
    gr:hasBusinessFunction gr:LeaseOut ;
    gr:hasPriceSpecification [ a gr:UnitPriceSpecification ;
                                gr:hasCurrency "USD"^^xsd:string ;
                                gr:hasCurrencyValue "10"^^xsd:float ;
                                gr:hasUnitOfMeasurement "DAY"^^xsd:string ] ;
    foaf:page  <http://example.org/canoe-rental > . # URI of the web page

# Bike Specification
foo:canoes a vso:Canoe, gr:SomeItems ; # it' a placeholder for multiple canoes
    vso:seatingCapacity [ a gr:QuantitativeValueInteger ;
                gr:hasMinValueInteger "2"^^xsd:int ;
                gr:hasMaxValueInteger "3"^^xsd:int ;
                gr:hasUnitOfMeasurement "C62"^^xsd:string ] ;
    foaf:page  <http://example.org/canoe-rental > . # URI of the web page

# Option: Indicate pick-up location
foo:offer4 gr:availableAtOrForm foo:KeyWestStore .

foo:KeyWestStore a gr:LocationOfSalesOrServiceProvisioning ;
     rdfs:label "Rental Location: Key West"@en ;
     vcard:adr
         [ a vcard:Address ;
             vcard:country-name "USA" ;
             vcard:locality "Key West" ;
             vcard:postal-code "1234" ;
             vcard:street-address "1234 Beach Street"
         ] ;
     vcard:geo
         [ vcard:latitude "48.08"^^xsd:float ;
             vcard:longitude "11.64"^^xsd:float
         ] ;
     vcard:tel "+1 408 970-6104" ;
 foaf:page  <http://example.org/canoe-rental/keywestStore > .

RDFa

<div xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ns="http://www.w3.org/1999/xhtml" xmlns:foo="http://example.org/#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:vso="http://purl.org/vso/ns#" xmlns:vcard="http://www.w3.org/2006/vcard/ns#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <div about="http://example.org/#company" typeof="gr:BusinessEntity">
    <div property="gr:legalName" content="Miller Inc."></div>
    <div rel="gr:offers">
      <div about="#offer4" typeof="gr:Offering">
        <div rel="gr:hasBusinessFunction" resource="http://purl.org/goodrelations/v1#LeaseOut"></div>
        <div rel="gr:hasPriceSpecification">
          <div typeof="gr:UnitPriceSpecification">
            <div property="gr:hasCurrency" content="USD" datatype="xsd:string"></div>
            <div property="gr:hasCurrencyValue" content="10" datatype="xsd:float"></div>
            <div property="gr:hasUnitOfMeasurement" content="DAY" datatype="xsd:string"></div>
          </div>
        </div>
        <div rel="gr:includes">
          <div about="#canoes" typeof="gr:SomeItems">
            <div rel="rdf:type" resource="http://purl.org/vso/ns#Canoe"></div>
            <div rel="foaf:page" resource="http://example.org/canoe-rental"></div>
            <div rel="vso:seatingCapacity">
              <div typeof="gr:QuantitativeValueInteger">
                <div property="gr:hasMaxValueInteger" content="3" datatype="xsd:int"></div>
                <div property="gr:hasMinValueInteger" content="2" datatype="xsd:int"></div>
                <div property="gr:hasUnitOfMeasurement" content="C62" datatype="xsd:string"></div>
              </div>
            </div>
          </div>
        </div>
        <div rel="foaf:page" resource="http://example.org/canoe-rental"></div>
      </div>
    </div>
    <div rel="foaf:page" resource="http://www.miller.com/"></div>
  </div>
</div>

Car Model Data Information

Turtle

RDFa

Category:Recipe