Click here to Skip to main content
13,344,287 members (80,313 online)
Click here to Skip to main content


57 bookmarked
Posted 10 Mar 2006

Music and the Semantic Web

, 10 Aug 2006
An article on the semantic Web and a simple music application
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SemWeb;

public partial class _Default : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e)
        //A place where the triples will be stored. 
        Store store = new MemoryStore();
        Store store2 = new MemoryStore();

        System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
        store.Import(new RdfXmlReader(doc));

        System.Xml.XmlDocument doc3 = new System.Xml.XmlDocument();
        store.Import(new RdfXmlReader(doc3));

        //Define some representations (Entities)
        const string RDF = "";
        const string GEN = "";

        Entity rdftype = RDF + "type";
        Entity GENjazz = GEN + "#jazz";
        System.Xml.XmlDocument doc2 = new System.Xml.XmlDocument();

        SemWeb.Inference.RDFS rdfs = new SemWeb.Inference.RDFS(new RdfXmlReader(doc2), store);
        rdfs.Select(new Statement(null, rdftype, GENjazz), store2);

        foreach (Statement s in store2.Select(new Statement(null, null, null)))
            output1.Text += s.Subject.Uri + s.Predicate.Uri + s.Object.Uri + "\n";
        output1.Text += "\n";

        foreach (Statement s in store.Select(new Statement(null, null, null)))
            output2.Text += s.Subject.Uri + s.Predicate.Uri + s.Object.Uri + "\n";
        output2.Text += "\n";

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
United Kingdom United Kingdom
Chris is a PhD research student working on machine learning in the area of music information systems. His current incarnation lecturers and researches at Anglia Ruskin University as part of the Audio music technology pathway. He has published in journals and has worked as a network consultant to finance his research. He entered the world of windows programming while writing a piece of software for music genre recognition. A passion for music technology has lead him to explore some of the fundamentals of audio programming.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 10 Aug 2006
Article Copyright 2006 by ChrisMitchell_
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid