Vocabularies/PTO

= The Product Types Ontology Extension for GoodRelations =

Overview
www.productontology.org allows using any Wikipedia URI for defining the types of product or services for schema.org and GoodRelations markup.

It basically provides product class definitions for each lemma ("word") defined in the English Wikipedia.

See for more details
 * http://www.productontology.org/

Resources

 * Ontology Specification: The ontology is highly modularized, i.e., you can retrieve the definitions for each class individually.

Example: Laser_printer
 * Class identifier: http://www.productontology.org/id/Laser_printer
 * HTML document: http://www.productontology.org/id/Laser_printer.html
 * OWL as RDF/XML: http://www.productontology.org/id/Laser_printer.rdf
 * OWL as Turtle: http://www.productontology.org/id/Laser_printer.ttl
 * Dump file: See http://www.productontology.org/#dump
 * Wiki page http://wiki.goodrelations-vocabulary.org/Vocabularies/PTO
 * Community and Feedback
 * See the Ask a question! bar on the left

Quickstart
 We sell a hammer for for $ 19.99  <!DOCTYPE html>   An offer to sell a / some Hammer 

ACME Corp    ... a longer description ...                  .. a short name for the object ...              $                  19.99                     

Turtle Syntax
@prefix foaf: . @prefix xsd: . @prefix pto: . @prefix gr: . @prefix foo: .

foo:myObject a  ; a gr:SomeItems ; gr:name "... a short name for the object ..."@en ; gr:description "... a longer description ..."@en.
 * 1) The object

foo:ACMECorp a gr:BusinessEntity ; gr:legalName "ACME Corp" ; gr:offers foo:Offer. foo:Offer a gr:Offering ; gr:includes foo:myObject; foaf:page <http://URI_of_the_page_containing_the_offer.com>; gr:hasBusinessFunction gr:Sell ; gr:validFrom "2011-01-24T00:00:00+01:00"^^xsd:dateTime ; gr:validThrough "2011-12-24T00:00:00+01:00"^^xsd:dateTime ; gr:hasPriceSpecification [ a gr:UnitPriceSpecification ; gr:hasCurrency "USD"^^xsd:string ; gr:hasCurrencyValue "19.99"^^xsd:float ; gr:validThrough "2011-12-24T00:00:00+01:00"^^xsd:dateTime ].
 * 1) The agent (person or company) who is offering it
 * 1) The offer to sell it

Microdata Syntax / Combination with schema.org
<!DOCTYPE html> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> An offer to sell a / some Hammer <div itemscope itemtype="http://schema.org/Product" itemid="#product"> <link itemprop="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" href="http://www.productontology.org/id/Hammer" /> .. a short name for the object ...    Product description: ... a longer description ...    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" itemid="#offer"> $19.99        <a itemprop="availability" href="http://schema.org/InStock"></a>In stock

RDF/XML
<?xml version="1.0" encoding="UTF-8" ?> <rdf:RDF xmlns:gr="http://purl.org/goodrelations/v1#" xmlns:pto="http://www.productontology.org/id/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:foo="http://example.com/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:about="http://example.com/myObject"> <rdf:type rdf:resource="http://www.productontology.org/id/Hammer"/> <rdf:type rdf:resource="http://purl.org/goodrelations/v1#SomeItems"/> <gr:name xml:lang="en">... a short name for the object ...</gr:name> <gr:description xml:lang="en">... a longer description ...</gr:description> </rdf:Description>

<gr:BusinessEntity rdf:about="http://example.com/ACMECorp"> <gr:legalName>ACME Corp</gr:legalName> <gr:offers rdf:resource="http://example.com/Offer" /> </gr:BusinessEntity> <gr:Offering rdf:about="http://example.com/Offer"> <gr:includes rdf:resource="http://example.com/myObject" /> <foaf:page rdf:resource="http://URI_of_the_page_containing_the_offer"/> <gr:hasBusinessFunction rdf:resource="http://purl.org/goodrelations/v1#Sell"/> <gr:validFrom rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2011-01-24T00:00:00+01:00</gr:validFrom> <gr:validThrough rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2011-12-24T00:00:00+01:00</gr:validThrough> <gr:hasPriceSpecification> <gr:UnitPriceSpecification> <gr:hasCurrency rdf:datatype="http://www.w3.org/2001/XMLSchema#string">USD</gr:hasCurrency> <gr:hasCurrencyValue rdf:datatype="http://www.w3.org/2001/XMLSchema#float">19.99</gr:hasCurrencyValue> <gr:validThrough rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"> 2011-12-24T00:00:00+01:00</gr:validThrough> </gr:UnitPriceSpecification> </gr:hasPriceSpecification> </gr:Offering> </rdf:RDF>

SPARQL Queries
prefix foaf: <http://xmlns.com/foaf/0.1/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix pto: <http://www.productontology.org/id/> prefix gr: <http://purl.org/goodrelations/v1#> prefix foo: <http://example.com/>


 * 1) Find the cheapest offer for a Hammer

SELECT * WHERE{ ?company gr:offers ?offer. ?offer a gr:Offering. ?offer gr:hasBusinessFunction gr:Sell. OPTIONAL {?offer rdfs:label ?label }. OPTIONAL {?offer gr:name ?label }. OPTIONAL {?offer rdfs:comment ?label }. OPTIONAL {?offer gr:description ?label }. ?offer gr:hasPriceSpecification ?p. ?p a gr:UnitPriceSpecification. ?p gr:hasCurrency ?currency. ?p gr:hasCurrencyValue ?price. ?offer gr:includes ?product. ?product a <http://www.productontology.org/id/Hammer>. } ORDER BY (?price) LIMIT 10