Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

rdfQuery tests

  • Loading branch information...
commit 74e769b578d6db2037452392a0b7bf37ffa48b1a 1 parent a6ad054
Marek Rosa rosic authored
5 .gitignore
@@ -9,9 +9,12 @@
9 9
10 10 # Ignore the default SQLite database.
11 11 /db/*.sqlite3
  12 +/db/shard*
12 13
13 14 # Ignore all logfiles and tempfiles.
14   -/log/*.log
  15 +/log/**/*.log
15 16 /tmp
16 17
17 18 /config/mongoid.yml
  19 +
  20 +tags
3,598 app/assets/javascripts/jquery.rdfquery.core-1.0.js
3,598 additions, 0 deletions not shown
4,386 app/assets/javascripts/jquery.rdfquery.rdfa-1.0.js
4,386 additions, 0 deletions not shown
4,779 app/assets/javascripts/jquery.rdfquery.rules-1.0.js
4,779 additions, 0 deletions not shown
5 app/views/work_items/index.rdf.builder
@@ -2,6 +2,7 @@ xml.instruct!
2 2 xml.rdf(:RDF,
3 3 "xmlns:rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
4 4 "xmlns:dcterms" => "http://purl.org/dc/terms/",
  5 + "xmlns:foaf" => "http://xmlns.com/foaf/0.1/",
5 6 "xmlns:oslc" => "http://open-services.net/ns/core#",
6 7 "xmlns:rdfs" => "http://www.w3.org/2000/01/rdf-schema#") do
7 8
@@ -11,7 +12,9 @@ xml.rdf(:RDF,
11 12 xml.rdf(:type, "rdf:resource" => "http://open-services.net/ns/core#responseInfo")
12 13
13 14 @work_items.each do |work_item|
14   - xml.rdfs(:member, "rdf:resource" => work_item_url(work_item))
  15 + xml.rdfs(:member, "rdf:about" => work_item_url(work_item)) do
  16 + xml.rdfs(:label, work_item.name, "rdf:parseType" => "Literal")
  17 + end
15 18 end
16 19 end
17 20 end
79 public/oslc_client/index.html
... ... @@ -0,0 +1,79 @@
  1 +<!DOCTYPE html>
  2 +<html>
  3 + <head>
  4 + <title>VersativeMongo</title>
  5 + <link href="/assets/twitter/bootstrap.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  6 + <link href="/assets/bootstrap.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  7 + <link href="/assets/documents.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  8 + <link href="/assets/application.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  9 + <script src="/assets/jquery.js?body=1" type="text/javascript"></script>
  10 + <script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
  11 + <script src="/assets/twitter/bootstrap/bootstrap-alerts.js?body=1" type="text/javascript"></script>
  12 + <script src="/assets/twitter/bootstrap/bootstrap-dropdown.js?body=1" type="text/javascript"></script>
  13 + <script src="/assets/twitter/bootstrap/bootstrap-modal.js?body=1" type="text/javascript"></script>
  14 + <script src="/assets/twitter/bootstrap/bootstrap-twipsy.js?body=1" type="text/javascript"></script>
  15 + <script src="/assets/twitter/bootstrap/bootstrap-popover.js?body=1" type="text/javascript"></script>
  16 + <script src="/assets/twitter/bootstrap/bootstrap-scrollspy.js?body=1" type="text/javascript"></script>
  17 + <script src="/assets/twitter/bootstrap/bootstrap-tabs.js?body=1" type="text/javascript"></script>
  18 + <script src="/assets/twitter/bootstrap/bootstrap-buttons.js?body=1" type="text/javascript"></script>
  19 + <script src="/assets/twitter/bootstrap.js?body=1" type="text/javascript"></script>
  20 + <script src="/assets/bootstrap.js?body=1" type="text/javascript"></script>
  21 + <script src="/assets/documents.js?body=1" type="text/javascript"></script>
  22 + <script src="/assets/jquery.rdfquery.core-1.0.js?body=1" type="text/javascript"></script>
  23 + <script src="/assets/jquery.rdfquery.rdfa-1.0.js?body=1" type="text/javascript"></script>
  24 + <script src="/assets/jquery.rdfquery.rules-1.0.js?body=1" type="text/javascript"></script>
  25 + <script src="/assets/application.js?body=1" type="text/javascript"></script>
  26 + <meta content="authenticity_token" name="csrf-param" />
  27 + <meta content="G7eMiKbocFlJr6W2cFvhoqHYcBV/iSbxqAVv1vi9Xh0=" name="csrf-token" />
  28 + </head>
  29 + <body>
  30 + <div class='topbar'>
  31 + <div class='fill'>
  32 + <div class='container'>
  33 + <h3><a href="/">Project</a></h3>
  34 + <ul>
  35 + <li><a href="/projects">Projects</a></li>
  36 + <li><a href="/users">Users</a></li>
  37 + <li><a href="/custom_fields">Custom fields</a></li>
  38 + <li><a href="/work_item_types">Work item types</a></li>
  39 + <li><a href="/work_items">Work items</a></li>
  40 + <li ><a href="/oauth_clients">OAuth Clients</a></li>
  41 + <li class='active'><a href="/oslc_client/">OSLC Client</a></li>
  42 + </ul>
  43 + </div>
  44 + </div>
  45 + </div>
  46 + <div class='container'>
  47 + <h1>OSLC Client Application</h1>
  48 + <div>
  49 + <ul id="wiList"></ul>
  50 + </div>
  51 + </div>
  52 + <script type="text/javascript" charset="utf-8">
  53 + $(function() {
  54 + $.ajax("/work_items.rdf", {
  55 + dataType: "xml",
  56 + success: function(data) {
  57 + var rdf = $.rdf().load(data, {});
  58 + rdf.prefix('rdf',"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
  59 + rdf.prefix('dcterms',"http://purl.org/dc/terms/");
  60 + rdf.prefix('oslc',"http://open-services.net/ns/core#");
  61 + rdf.prefix('rdfs',"http://www.w3.org/2000/01/rdf-schema#");
  62 +
  63 + rdf.where("?member rdfs:member ?resource")
  64 + .each(function() {
  65 + var item = $("<li></li>");
  66 + item.text(this.resource.value.toString());
  67 + $("#wiList").append(item);
  68 + });
  69 + },
  70 + complete: function() {
  71 + },
  72 + error: function(error, message, status) {
  73 + alert("error: " + status);
  74 + }
  75 + });
  76 + });
  77 + </script>
  78 + </body>
  79 +</html>

0 comments on commit 74e769b

Please sign in to comment.
Something went wrong with that request. Please try again.