zotero/zotero — pull request #216 by aurimasv (2012-12-20 07:44:04+00:00)
Title: Add __exposedProps__ to RDF objects returned to translators.

This is in regards to http://forums.zotero.org/discussion/26863/importing-not-working-on-publication-volume-entries/

Turns out that objects returned from the RDF store did not have __exposedProps__ so the code in RDF translator that tried to access the uri of some of these objects was returning `undefined`. I sidestepped this by using Zotero.RDF.getResourceURI, but it seems to me that if we're going to expose RDF to the translators, we might as well make it possible for them to read the returned objects.

Not sure if this is the most correct way of doing it though. As mentioned in the comments, not all of the values in the __exposedProps__ array are found on every object that is being exposed, but I don't think it hurts, does it?

Also, I'm fairly sure that subject and predicate should always be RDF Literals, so we could just return their `uri` directly. Nevertheless, the way RDF parser is written, I think it is technically possible for subject and predicate to be something else. So I took the safe route.