Permalink
Browse files

Merge branch 'master' of github.com:mhausenblas/schema-org-rdf

  • Loading branch information...
2 parents 9249e17 + f3ed74f commit 0e3d41110290e0f52d5ed3334790771399c7f665 mhausenblas committed Jun 10, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 scrapers/scrape_rdf.py
View
@@ -51,6 +51,12 @@ def turtle_escape(s):
dct:hasFormat <http://schema.rdfs.org/all.rdf>;
dct:hasFormat <http://schema.rdfs.org/all.nt>;
dct:hasFormat <http://schema.rdfs.org/all.json>;
+ dct:hasFormat [
+ dct:hasPart <http://schema.rdfs.org/all-classes.csv>;
+ dct:hasPart <http://schema.rdfs.org/all-properties.csv>;
+ ];
+ dct:source <http://schema.org/>;
+ dct:license <http://schema.org/docs/terms.html>;
.
"""
@@ -79,14 +85,14 @@ def turtle_escape(s):
l = []
for d in p['domains']:
l.append(get_prefixed(d))
- print ' rdfs:domain [ owl:unionOf (' + ' '.join(l) + ') ];'
+ print ' rdfs:domain [ a owl:Class; owl:unionOf (' + ' '.join(l) + ') ];'
if len(p['ranges']) == 1:
print ' rdfs:range ' + get_prefixed(p['ranges'][0]) + ';'
elif len(p['ranges']) > 1:
l = []
for d in p['ranges']:
l.append(get_prefixed(d))
- print ' rdfs:range [ owl:unionOf (' + ' '.join(l) + ') ];'
+ print ' rdfs:range [ a owl:Class; owl:unionOf (' + ' '.join(l) + ') ];'
for d in p['domains']:
print ' rdfs:isDefinedBy <' + types[d]['url'] + '>;'
print ' .'

0 comments on commit 0e3d411

Please sign in to comment.