Tim's Weblog
Tim Strehle’s links and thoughts on Web apps, software development and Digital Asset Management, since 2002.
2015-12-04

schema.org markup for a DAM system photo record

I’ve been talking about RDF and schema.org for DAM interoperability in a previous blog post. What’s been missing was an example.

Here’s what the actual schema.org markup for a random photograph could look like (in RDF/XML notation):

<?xml version="1.0" encoding="UTF-8"?>
<Photograph 
    rdf:about="https://www.flickr.com/photos/archbob/22875195123/" 
    xmlns="https://schema.org/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    >
  <name>Desert Landscape</name>
  <description>Desert Landscape at Big Bend National Park.</description>
  <keywords>nature, landscape, outdoors, big, texas, desert, bend, dusk, scenic</keywords>
  <dateCreated>2014-01-20</dateCreated>
  <contentLocation>
    <Place rdf:about="http://sws.geonames.org/5516970/">
      <name>Big Bend National Park</name>
    </Place>
  </contentLocation>
  <creator>
    <Person rdf:about="https://www.flickr.com/people/archbob/">
      <name>Yinan Chen</name>
    </Person>
  </creator>
  <copyrightHolder>
    <Person rdf:about="https://www.flickr.com/people/archbob/">
      <name>Yinan Chen</name>
    </Person>
  </copyrightHolder>
  <copyrightYear>2014</copyrightYear>
  <license>https://creativecommons.org/licenses/by/2.0/</license>
  <provider>
    <Organization rdf:about="https://www.flickr.com/">
      <name>Flickr</name>
    </Organization>
  </provider>
  <associatedMedia>
    <ImageObject rdf:about="https://www.flickr.com/photos/archbob/22875195123/#original_file">
      <contentUrl>http://c1.staticflickr.com/1/668/22875195123_4fced120f0_k.jpg</contentUrl>
      <width>2048</width>
      <height>1387</height>
      <contentSize>911577</contentSize>
      <fileFormat>image/jpeg</fileFormat>
      <thumbnail>
        <ImageObject rdf:about="https://www.flickr.com/photos/archbob/22875195123/#thumbnail_file">
          <contentUrl>http://c1.staticflickr.com/1/668/22875195123_1d0a409a41_n.jpg</contentUrl>
          <width>320</width>
          <height>216</height>
          <contentSize>36171</contentSize>
          <fileFormat>image/jpeg</fileFormat>
        </ImageObject>
      </thumbnail>
    </ImageObject>
  </associatedMedia>
</Photograph>

Not so bad. Looks like something your Digital Asset Management system could produce (and maybe even consume), doesn’t it?

If you want to see what this looks like after having been processed by an RDF parser, you can paste it into the excellent EasyRDF converter.

Update: Here’s the same record in RDFa markup instead of RDF/XML.

Update: See my follow-up post Where do I put search result context in schema.org?

Related: DAM and the Semantic Web – our webinar on Dec 9th