I would love to add RDF mapping API examples to the Examples module.

Since this example module creates a bundle, we could demo the RDF mapping API.

Or we could add a module that just demos the RDF Mapping API itself. Any thoughts?

Comments

rfay’s picture

Title: Add RDF hooks to Node Example module » Add RDF Example

IMO it would be FANTASTIC to just add a module that focuses on communicating about RDF, how it should be used, and what's possible. I think it might get lost in the node example (and might complicate it still more). However if you think it would be better there, I'm open to conversation. But I *really* like the idea of an RDF example.

Anonymous’s picture

Great! I'm going to start with a separate RDF example module. I will need to create some fields in order to demonstrate how module maintainers should map the fields, so I will be duplicating some example content, but I will direct to node_example module for more information.

rfay’s picture

ping? Looking forward to this!

Anonymous’s picture

Thanks for the ping! I'll be working on this ASAP

Anonymous’s picture

So I have a start on this. I still need to add a few things.

  • Change another module's mapping using CRUD API
  • Show how to change datatype
Anonymous’s picture

StatusFileSize
new6.76 KB

Whoops, I was so excited about my list that I forgot to attach my patch. I used git for the patch because I was having trouble adding a new directory with CVS.

ilo’s picture

Component: Node Example » Other
Assigned: linclark » ilo
Category: task » feature
Status: Active » Needs review

linclark, sorry for the lack of answer to the patch comment!, I'll give it a try. Next time mark it as 'needs review' so others may know that there is code here to take a look!

rfay’s picture

Title: Add RDF Example » Add RDF Example to Examples Project

This is way cool. It will also need tests before it goes in.

AlanAtLarge’s picture

Subscribe

Anonymous’s picture

Status: Needs review » Needs work

I was wondering whether it is ok to have non-core dependencies for examples? It would be nice to be able to demonstrate how to use Field Collection with this... it is necessary for a lot of the Google Rich Snippet RDFa formatting. However, that would introduce a dependency on field_collection and on entity.

rfay’s picture

We can't test external dependencies, so it's OK but only if the dependency isn't in the .info file and doesn't break testing.

So if you want to make a .inc file that demonstrates something important and you put

if (module_exists(field_collection)) {
// good docs and code here
}

Then IMO it's OK. Same with the tests. You should probably make the field_collection-related tests get ignored if it's not present.

Anonymous’s picture

StatusFileSize
new9.2 KB

This version now has tests for title, type, and date metadata. It should really test for all field mappings, I will add that in as soon as I have added field collection fields as described by Randy in #11.

rfay’s picture

Version: » 7.x-1.x-dev
Status: Needs work » Needs review

Wow, didn't even realize this was lost here because still in "needs work". Let's get this to completion.

rfay’s picture

Status: Needs review » Fixed

Committed, http://drupalcode.org/project/examples.git/commitdiff/e9e017e

Thanks so much, and sorry it took so VERY long!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.