Importing Schema Vocabulary?


#1

I’m on an install of Omeka S for a project. I have been trying to import a new vocabulary with Schema, but it is not working. When uploaded, the vocab shows as 0 classes and 0 properties.

I have attempted to grab the RDF from each of these links, but I still have had no luck getting the vocab to stick–

http://schema.org/docs/developers.html#defs

http://schema.org/docs/schema_org_rdfa.html

Any ideas?


#2

What settings are you using for the import? Getting the namespace URL stuff wrong in those settings is a common and easy way to get zero properties out of an import.


#3

I guess that’s part of the problem. Since the RDF is somewhat complicated to get into, I’m not exactly sure which URL namespace to link to. I’ve tried putting all of these links that I posted into that spot, which may hinder the import. Schema is not my favorite at this moment since they make it a lot more difficult to import their vocabulary.


#4

The namespace URL for a schema isn’t usually the same as any of the URLs where the file is located.

In the case of schema.org, I believe the proper URL is just “http://schema.org/


#5

I wouldn’t be surprised if others are running into this problem when trying to import new vocabularies and perhaps an actual working example (values) could be included in the documentation (or here)?

As a test (after several failed attempts so far trying to import VRA Core) I managed to import DC from an old .rdf file I had on my system from an unrelated project. The Vocabulary UI reports I have no classes but 15 properties. Not sure if that’s correct but partial success. perhaps, even though I’m looking to import other vocabularies (AAT, VRA, etc).

Thanks.

Carl


#6

I Carl,
I had no problem importing schema.org vocabulary.
You can take every information you need here: http://lov.okfn.org/dataset/lov/vocabs/schema (you can also use http://lov.okfn.org/dataset/lov/ to retrieve info for the most important ontologies).
You need to set schema as prefix and my suggestion is to use n3 format of this vocabulary that you can download from http://www.w3.org/2012/pyRdfa/extract?uri=http%3A%2F%2Fschema.org%2Fdocs%2Fschema_org_rdfa.html&format=n3 as in isDefinedBy property that you can see in the LOV page.
Please consider that schema.org is really big, so Omeka needs time to load it into vacabularies’ table. In my experience I have found that the load page expires before you can see the vocabulary loaded message. Don’t worry, after a while, re-opening vocabularies config page you should see that schema has been loaded as expected.
The only serious problem I experienced (that’s why I’ve decided not to use schema.org) is that Omeka slow down when many vocabularies are load, especially as big as schema is.

This should be the config page:


#7

Thanks, I’ll give that a try.

I appreciate your help!

Carl


#9

For big vocabulary, you can edit the n3 file, it’s very easy: just keep the properties you really need. It will be easier for authors to use them. Anyway, the Omeka team works on the big vocab issue.


#10

Thanks Everyone.

I’m running Release Candidate 1.

Following Felice’s advice to try http://lov.okfn.org/dataset/lov/vocabs I was able to import schema.org in .n3 format and it loaded very quickly. I didn’t think to try editing the n3 files but will look into that. When I was testing a couple of other vocabularies (e.g. CreativeWork, Getty Vocabulary Program) the .n3 files would timeout during the import and fail.

However, I was able to import these vocabularies after I opened the .n3 files in the Protege ontology editor and saved as RDF/XML.

Just starting to dip my toe into understanding how to work with Vocabularies, RDF, etc., and easy to miss some of the more obvious points.

Thanks, again, for your help.

Carl


#11

Hey @carlj and any others adding vocabularies to Omeka S:

has anyone successfully imported VRA Core, and if so, where have you found a proper RDF file for it, and what settings are you using?

Thanks!


#12

I would second @carlj with regards to timeouts, but for myself, it was with turtle files. 1-10 properties would import fine, quickly, but the parsing time would balloon dramatically with more, resulting in timeouts.

Converting the turtle file to RDF, imported nearly instantly.

-Graham


#13

To fix the rdf issue, there is a patch on Omeka S (an update of an old dependency): https://github.com/omeka/omeka-s/pull/1335. With it, you can import very big ontologies in a few seconds.


#14

Awesome! Good to know, thanks.