Re: Common music database?



On Fri, 2006-03-31 at 14:27 +0100, Jamie McCracken wrote:
> For example to get all 80's music the following query could be performed 
> in Tracker using the xml based rdf query:
> 
> <rdfq:rdfquery>
>    <rdfq:From eachResource="Files">
>      <rdfq:Select>
>        <rdfq:Condition>
>          <rdfq:and>	
> 
>            <rdfq:greaterThan>
>              <rdfq:Property name="Audio.Year" />
>              <rdf:Integer>1979</rdf:Integer>
>            </rdfq:greaterThan>
> 
>            <rdfq:lessThan>
>              <rdfq:Property name="Audio.Year" />
>              <rdf:Integer>1990</rdf:Integer>
>            </rdfq:lessThan>
>
>         </rdfq:and>
>       </rdfq:Condition>
>     </rdfq:Select>
>    </rdfq:From>
> </rdfq:rdfquery>

That looks very similar to how Rhythmbox handles it's queries. They
aren't represented as xml in memory, but on disk it looks like:

<conjunction>
  <equals prop="type">0</equals>
  <subquery>
    <conjunction>
      <greater prop="date">julian date of jan 1 1980</greater>
      <less prop="date">julian date of dec 31 1989</less>
    </conjunction>
  </subquery>
</conjunction>


If tracker held all the metadata we needed, it wouldn't actually be that
hard to turn our in-memory representation into rdf-query xml. Of course,
there are a few things that we currently do which probably wouldn't
translate that well - but you get that.


Cheers,

James "Doc" Livingston
-- 
I love ASR, you have total freedom of speech as long as it's punctuated
correctly. -- Chris Hacking in a.s.r




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]