/*
 * $Id: datastore_rdf.js,v 1.2 2001/05/21 02:22:58 barstow Exp $
 *
 * Copyright World Wide Web Consortium, (Massachusetts Institute of
 * Technology, Institut National de Recherche en Informatique et en
 * Automatique, Keio University).
 *
 * All Rights Reserved.
 *
 * Please see the full Copyright clause at
 * <http://www.w3.org/Consortium/Legal/copyright-software.html>
 */

/*
 * Create an XML/RDF string of an datastore record based on the
 * given parameters.
 *
 * See http://www.w3.org/2000/05/rdf-fs/datastore-schema
 */
function createRDFString(uri, title, author, introduction, implementation,
    query, inference, scalability, performance, provenance, license,
    api, transaction, platform, distribution, seealso, lastupdate)
{
  var s;

  s = "<?xml version='1.0'?>\n"
     +"<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\n"
              +"xmlns:ds='http://www.w3.org/2001/05/rdf-ds/datastore-schema#'>\n"

    +"<rdf:Description rdf:about='" + uri + "'>\n"
      +"<ds:title>\n"
      +   title
      +"</ds:title>\n"
      +"<ds:author rdf:parseType='Literal'>\n"
      +   author
      +"</ds:author>\n"
      +"<ds:introduction rdf:parseType='Literal'>\n"
      +   introduction
      +"</ds:introduction>\n"
      +"<ds:implementation rdf:parseType='Literal'>\n"
      +   implementation
      +"</ds:implementation>\n"
      +"<ds:query rdf:parseType='Literal'>\n"
      +   query
      +"</ds:query>\n"
      +"<ds:inference rdf:parseType='Literal'>\n"
      +   inference
      +"</ds:inference>\n"
      +"<ds:scalability rdf:parseType='Literal'>\n"
      +   scalability
      +"</ds:scalability>\n"
      +"<ds:performance rdf:parseType='Literal'>\n"
      +   performance
      +"</ds:performance>\n"
      +"<ds:provenance rdf:parseType='Literal'>\n"
      +   provenance
      +"</ds:provenance>\n"
      +"<ds:license rdf:parseType='Literal'>\n"
      +   license
      +"</ds:license>\n"
      +"<ds:api rdf:parseType='Literal'>\n"
      +   api
      +"</ds:api>\n"
      +"<ds:transaction rdf:parseType='Literal'>\n"
      +   transaction
      +"</ds:transaction>\n"
      +"<ds:platform rdf:parseType='Literal'>\n"
      +   platform
      +"</ds:platform>\n"
      +"<ds:distribution rdf:parseType='Literal'>\n"
      +   distribution
      +"</ds:distribution>\n"
      +"<ds:seealso rdf:parseType='Literal'>\n"
      +   seealso
      +"</ds:seealso>\n"
      +"<ds:lastupdate rdf:parseType='Literal'>\n"
      +   lastupdate
      +"</ds:lastupdate>\n"
    +"</rdf:Description>\n"
  +"</rdf:RDF>\n";

  return new String (s);
}
