pho 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +19 -0
- data/Rakefile +6 -4
- data/doc/index.html +6 -0
- data/doc/rdoc/classes/Pho.html +250 -0
- data/doc/rdoc/classes/Pho/Analyzers.html +288 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.html +209 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000034.html +21 -0
- data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000035.html +29 -0
- data/doc/rdoc/classes/Pho/Etags.html +238 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000088.html +23 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000089.html +28 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000090.html +21 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000091.html +18 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000092.html +18 -0
- data/doc/rdoc/classes/Pho/Etags.src/M000093.html +18 -0
- data/doc/rdoc/classes/Pho/Facet.html +119 -0
- data/doc/rdoc/classes/Pho/Facet/Results.html +225 -0
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000001.html +20 -0
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000002.html +27 -0
- data/doc/rdoc/classes/Pho/Facet/Results.src/M000003.html +54 -0
- data/doc/rdoc/classes/Pho/Facet/Term.html +166 -0
- data/doc/rdoc/classes/Pho/Facet/Term.src/M000004.html +20 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.html +461 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000005.html +38 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000006.html +28 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000007.html +20 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000008.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000009.html +23 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000010.html +23 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000011.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000012.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000013.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000014.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000015.html +18 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000016.html +21 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000017.html +21 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000018.html +38 -0
- data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000019.html +18 -0
- data/doc/rdoc/classes/Pho/FieldWeighting.html +202 -0
- data/doc/rdoc/classes/Pho/FieldWeighting.src/M000075.html +20 -0
- data/doc/rdoc/classes/Pho/FieldWeighting.src/M000076.html +26 -0
- data/doc/rdoc/classes/Pho/Job.html +147 -0
- data/doc/rdoc/classes/Pho/Job.src/M000074.html +21 -0
- data/doc/rdoc/classes/Pho/Namespaces.html +128 -0
- data/doc/rdoc/classes/Pho/QueryProfile.html +355 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000024.html +39 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000025.html +24 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000026.html +20 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000027.html +18 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000028.html +18 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000029.html +21 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000030.html +18 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000031.html +18 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000032.html +38 -0
- data/doc/rdoc/classes/Pho/QueryProfile.src/M000033.html +18 -0
- data/doc/rdoc/classes/Pho/RDFCollection.html +353 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000077.html +23 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000078.html +22 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000079.html +24 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000080.html +23 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000081.html +18 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000082.html +22 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000083.html +22 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000084.html +26 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000085.html +23 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000086.html +18 -0
- data/doc/rdoc/classes/Pho/RDFCollection.src/M000087.html +18 -0
- data/doc/rdoc/classes/Pho/Snapshot.html +271 -0
- data/doc/rdoc/classes/Pho/Snapshot.src/M000070.html +31 -0
- data/doc/rdoc/classes/Pho/Snapshot.src/M000071.html +21 -0
- data/doc/rdoc/classes/Pho/Snapshot.src/M000072.html +18 -0
- data/doc/rdoc/classes/Pho/Snapshot.src/M000073.html +37 -0
- data/doc/rdoc/classes/Pho/Status.html +245 -0
- data/doc/rdoc/classes/Pho/Status.src/M000020.html +20 -0
- data/doc/rdoc/classes/Pho/Status.src/M000021.html +31 -0
- data/doc/rdoc/classes/Pho/Status.src/M000022.html +18 -0
- data/doc/rdoc/classes/Pho/Status.src/M000023.html +18 -0
- data/doc/rdoc/classes/Pho/Store.html +1055 -0
- data/doc/rdoc/classes/Pho/Store.src/M000036.html +22 -0
- data/doc/rdoc/classes/Pho/Store.src/M000037.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000038.html +25 -0
- data/doc/rdoc/classes/Pho/Store.src/M000039.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000040.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000041.html +28 -0
- data/doc/rdoc/classes/Pho/Store.src/M000042.html +23 -0
- data/doc/rdoc/classes/Pho/Store.src/M000043.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000044.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000045.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000046.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000047.html +23 -0
- data/doc/rdoc/classes/Pho/Store.src/M000048.html +22 -0
- data/doc/rdoc/classes/Pho/Store.src/M000049.html +26 -0
- data/doc/rdoc/classes/Pho/Store.src/M000050.html +24 -0
- data/doc/rdoc/classes/Pho/Store.src/M000051.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000052.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000053.html +25 -0
- data/doc/rdoc/classes/Pho/Store.src/M000054.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000055.html +30 -0
- data/doc/rdoc/classes/Pho/Store.src/M000056.html +21 -0
- data/doc/rdoc/classes/Pho/Store.src/M000057.html +23 -0
- data/doc/rdoc/classes/Pho/Store.src/M000058.html +28 -0
- data/doc/rdoc/classes/Pho/Store.src/M000059.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000060.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000061.html +18 -0
- data/doc/rdoc/classes/Pho/Store.src/M000062.html +31 -0
- data/doc/rdoc/classes/Pho/Store.src/M000063.html +21 -0
- data/doc/rdoc/classes/Pho/Store.src/M000064.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000065.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000066.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000067.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000068.html +20 -0
- data/doc/rdoc/classes/Pho/Store.src/M000069.html +20 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +140 -0
- data/doc/rdoc/files/README.html +9 -8
- data/doc/rdoc/files/lib/pho/etags_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/facet_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/job_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/query_profile_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/rdf_collection_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/snapshot_rb.html +108 -0
- data/doc/rdoc/files/lib/pho/status_rb.html +101 -0
- data/doc/rdoc/files/lib/pho/store_rb.html +101 -0
- data/doc/rdoc/files/lib/pho_rb.html +120 -0
- data/doc/rdoc/fr_class_index.html +16 -0
- data/doc/rdoc/fr_file_index.html +11 -0
- data/doc/rdoc/fr_method_index.html +93 -0
- data/examples/status.rb +3 -3
- data/lib/pho.rb +11 -2
- data/lib/pho/facet.rb +101 -0
- data/lib/pho/field_predicate_map.rb +4 -4
- data/lib/pho/query_profile.rb +170 -0
- data/lib/pho/status.rb +65 -0
- data/lib/pho/store.rb +26 -13
- data/tests/tc_facet.rb +91 -0
- data/tests/tc_query_profile.rb +196 -0
- data/tests/tc_status.rb +56 -0
- data/tests/ts_pho.rb +3 -0
- metadata +148 -3
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: pho.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>pho.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/pho.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Sun Mar 01 16:52:04 +0000 2009</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<div id="requires-list">
|
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
|
74
|
+
|
|
75
|
+
<div class="name-list">
|
|
76
|
+
rubygems
|
|
77
|
+
httpclient
|
|
78
|
+
json
|
|
79
|
+
yaml
|
|
80
|
+
rexml/document
|
|
81
|
+
pho/etags
|
|
82
|
+
pho/store
|
|
83
|
+
pho/snapshot
|
|
84
|
+
pho/field_predicate_map
|
|
85
|
+
pho/query_profile
|
|
86
|
+
pho/status
|
|
87
|
+
pho/facet
|
|
88
|
+
pho/rdf_collection
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<!-- if includes -->
|
|
99
|
+
|
|
100
|
+
<div id="section">
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<!-- if method_list -->
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<div id="validator-badges">
|
|
116
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
</body>
|
|
120
|
+
</html>
|
|
@@ -20,6 +20,22 @@
|
|
|
20
20
|
<div id="index">
|
|
21
21
|
<h1 class="section-bar">Classes</h1>
|
|
22
22
|
<div id="index-entries">
|
|
23
|
+
<a href="classes/Pho.html">Pho</a><br />
|
|
24
|
+
<a href="classes/Pho/Analyzers.html">Pho::Analyzers</a><br />
|
|
25
|
+
<a href="classes/Pho/DatatypeProperty.html">Pho::DatatypeProperty</a><br />
|
|
26
|
+
<a href="classes/Pho/Etags.html">Pho::Etags</a><br />
|
|
27
|
+
<a href="classes/Pho/Facet.html">Pho::Facet</a><br />
|
|
28
|
+
<a href="classes/Pho/Facet/Results.html">Pho::Facet::Results</a><br />
|
|
29
|
+
<a href="classes/Pho/Facet/Term.html">Pho::Facet::Term</a><br />
|
|
30
|
+
<a href="classes/Pho/FieldPredicateMap.html">Pho::FieldPredicateMap</a><br />
|
|
31
|
+
<a href="classes/Pho/FieldWeighting.html">Pho::FieldWeighting</a><br />
|
|
32
|
+
<a href="classes/Pho/Job.html">Pho::Job</a><br />
|
|
33
|
+
<a href="classes/Pho/Namespaces.html">Pho::Namespaces</a><br />
|
|
34
|
+
<a href="classes/Pho/QueryProfile.html">Pho::QueryProfile</a><br />
|
|
35
|
+
<a href="classes/Pho/RDFCollection.html">Pho::RDFCollection</a><br />
|
|
36
|
+
<a href="classes/Pho/Snapshot.html">Pho::Snapshot</a><br />
|
|
37
|
+
<a href="classes/Pho/Status.html">Pho::Status</a><br />
|
|
38
|
+
<a href="classes/Pho/Store.html">Pho::Store</a><br />
|
|
23
39
|
</div>
|
|
24
40
|
</div>
|
|
25
41
|
</body>
|
data/doc/rdoc/fr_file_index.html
CHANGED
|
@@ -20,7 +20,18 @@
|
|
|
20
20
|
<div id="index">
|
|
21
21
|
<h1 class="section-bar">Files</h1>
|
|
22
22
|
<div id="index-entries">
|
|
23
|
+
<a href="files/CHANGES.html">CHANGES</a><br />
|
|
23
24
|
<a href="files/README.html">README</a><br />
|
|
25
|
+
<a href="files/lib/pho_rb.html">lib/pho.rb</a><br />
|
|
26
|
+
<a href="files/lib/pho/etags_rb.html">lib/pho/etags.rb</a><br />
|
|
27
|
+
<a href="files/lib/pho/facet_rb.html">lib/pho/facet.rb</a><br />
|
|
28
|
+
<a href="files/lib/pho/field_predicate_map_rb.html">lib/pho/field_predicate_map.rb</a><br />
|
|
29
|
+
<a href="files/lib/pho/job_rb.html">lib/pho/job.rb</a><br />
|
|
30
|
+
<a href="files/lib/pho/query_profile_rb.html">lib/pho/query_profile.rb</a><br />
|
|
31
|
+
<a href="files/lib/pho/rdf_collection_rb.html">lib/pho/rdf_collection.rb</a><br />
|
|
32
|
+
<a href="files/lib/pho/snapshot_rb.html">lib/pho/snapshot.rb</a><br />
|
|
33
|
+
<a href="files/lib/pho/status_rb.html">lib/pho/status.rb</a><br />
|
|
34
|
+
<a href="files/lib/pho/store_rb.html">lib/pho/store.rb</a><br />
|
|
24
35
|
</div>
|
|
25
36
|
</div>
|
|
26
37
|
</body>
|
|
@@ -20,6 +20,99 @@
|
|
|
20
20
|
<div id="index">
|
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
|
22
22
|
<div id="index-entries">
|
|
23
|
+
<a href="classes/Pho/QueryProfile.html#M000027"><< (Pho::QueryProfile)</a><br />
|
|
24
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000008"><< (Pho::FieldPredicateMap)</a><br />
|
|
25
|
+
<a href="classes/Pho/Etags.html#M000090">add (Pho::Etags)</a><br />
|
|
26
|
+
<a href="classes/Pho/Etags.html#M000091">add_from_response (Pho::Etags)</a><br />
|
|
27
|
+
<a href="classes/Pho/Store.html#M000052">augment (Pho::Store)</a><br />
|
|
28
|
+
<a href="classes/Pho/Store.html#M000051">augment_uri (Pho::Store)</a><br />
|
|
29
|
+
<a href="classes/Pho/Store.html#M000058">build_job_request (Pho::Store)</a><br />
|
|
30
|
+
<a href="classes/Pho/Store.html#M000038">build_uri (Pho::Store)</a><br />
|
|
31
|
+
<a href="classes/Pho/Store.html#M000053">configure_headers_for_conditional_get (Pho::Store)</a><br />
|
|
32
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000006">create_mapping (Pho::FieldPredicateMap)</a><br />
|
|
33
|
+
<a href="classes/Pho/QueryProfile.html#M000025">create_weighting (Pho::QueryProfile)</a><br />
|
|
34
|
+
<a href="classes/Pho/Store.html#M000056">delete_item (Pho::Store)</a><br />
|
|
35
|
+
<a href="classes/Pho/Store.html#M000042">describe (Pho::Store)</a><br />
|
|
36
|
+
<a href="classes/Pho/Snapshot.html#M000073">download (Pho::Snapshot)</a><br />
|
|
37
|
+
<a href="classes/Pho/Store.html#M000049">facet (Pho::Store)</a><br />
|
|
38
|
+
<a href="classes/Pho/RDFCollection.html#M000082">failures (Pho::RDFCollection)</a><br />
|
|
39
|
+
<a href="classes/Pho/Etags.html#M000092">get (Pho::Etags)</a><br />
|
|
40
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000013">get_by_name (Pho::FieldPredicateMap)</a><br />
|
|
41
|
+
<a href="classes/Pho/QueryProfile.html#M000028">get_by_name (Pho::QueryProfile)</a><br />
|
|
42
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000014">get_by_uri (Pho::FieldPredicateMap)</a><br />
|
|
43
|
+
<a href="classes/Pho/RDFCollection.html#M000086">get_fail_file_for (Pho::RDFCollection)</a><br />
|
|
44
|
+
<a href="classes/Pho/Store.html#M000066">get_field_predicate_map (Pho::Store)</a><br />
|
|
45
|
+
<a href="classes/Pho/Store.html#M000057">get_item (Pho::Store)</a><br />
|
|
46
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000009">get_name (Pho::FieldPredicateMap)</a><br />
|
|
47
|
+
<a href="classes/Pho/RDFCollection.html#M000087">get_ok_file_for (Pho::RDFCollection)</a><br />
|
|
48
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000010">get_property_uri (Pho::FieldPredicateMap)</a><br />
|
|
49
|
+
<a href="classes/Pho/Store.html#M000068">get_query_profile (Pho::Store)</a><br />
|
|
50
|
+
<a href="classes/Pho/Store.html#M000050">get_search_params (Pho::Store)</a><br />
|
|
51
|
+
<a href="classes/Pho/Store.html#M000065">get_snapshots (Pho::Store)</a><br />
|
|
52
|
+
<a href="classes/Pho/Store.html#M000064">get_status (Pho::Store)</a><br />
|
|
53
|
+
<a href="classes/Pho/Etags.html#M000093">has_tag? (Pho::Etags)</a><br />
|
|
54
|
+
<a href="classes/Pho/RDFCollection.html#M000081">list (Pho::RDFCollection)</a><br />
|
|
55
|
+
<a href="classes/Pho/QueryProfile.html#M000031">mapped_name? (Pho::QueryProfile)</a><br />
|
|
56
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000011">mapped_name? (Pho::FieldPredicateMap)</a><br />
|
|
57
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000012">mapped_uri? (Pho::FieldPredicateMap)</a><br />
|
|
58
|
+
<a href="classes/Pho/RDFCollection.html#M000077">new (Pho::RDFCollection)</a><br />
|
|
59
|
+
<a href="classes/Pho/Store.html#M000036">new (Pho::Store)</a><br />
|
|
60
|
+
<a href="classes/Pho/Status.html#M000020">new (Pho::Status)</a><br />
|
|
61
|
+
<a href="classes/Pho/DatatypeProperty.html#M000034">new (Pho::DatatypeProperty)</a><br />
|
|
62
|
+
<a href="classes/Pho/Etags.html#M000088">new (Pho::Etags)</a><br />
|
|
63
|
+
<a href="classes/Pho/FieldWeighting.html#M000075">new (Pho::FieldWeighting)</a><br />
|
|
64
|
+
<a href="classes/Pho/QueryProfile.html#M000026">new (Pho::QueryProfile)</a><br />
|
|
65
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000007">new (Pho::FieldPredicateMap)</a><br />
|
|
66
|
+
<a href="classes/Pho/Facet/Term.html#M000004">new (Pho::Facet::Term)</a><br />
|
|
67
|
+
<a href="classes/Pho/Snapshot.html#M000071">new (Pho::Snapshot)</a><br />
|
|
68
|
+
<a href="classes/Pho/Facet/Results.html#M000001">new (Pho::Facet::Results)</a><br />
|
|
69
|
+
<a href="classes/Pho/RDFCollection.html#M000084">new_files (Pho::RDFCollection)</a><br />
|
|
70
|
+
<a href="classes/Pho/Snapshot.html#M000070">parse (Pho::Snapshot)</a><br />
|
|
71
|
+
<a href="classes/Pho/Facet/Results.html#M000003">parse (Pho::Facet::Results)</a><br />
|
|
72
|
+
<a href="classes/Pho/Job.html#M000074">parse_jobs (Pho::Job)</a><br />
|
|
73
|
+
<a href="classes/Pho/Store.html#M000067">put_field_predicate_map (Pho::Store)</a><br />
|
|
74
|
+
<a href="classes/Pho/Store.html#M000069">put_query_profile (Pho::Store)</a><br />
|
|
75
|
+
<a href="classes/Pho/Facet/Results.html#M000002">read_from_store (Pho::Facet::Results)</a><br />
|
|
76
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000005">read_from_store (Pho::FieldPredicateMap)</a><br />
|
|
77
|
+
<a href="classes/Pho/Status.html#M000021">read_from_store (Pho::Status)</a><br />
|
|
78
|
+
<a href="classes/Pho/QueryProfile.html#M000024">read_from_store (Pho::QueryProfile)</a><br />
|
|
79
|
+
<a href="classes/Pho/Snapshot.html#M000072">read_md5 (Pho::Snapshot)</a><br />
|
|
80
|
+
<a href="classes/Pho/Status.html#M000022">readable? (Pho::Status)</a><br />
|
|
81
|
+
<a href="classes/Pho/Store.html#M000054">record_etags (Pho::Store)</a><br />
|
|
82
|
+
<a href="classes/Pho/Store.html#M000060">reindex (Pho::Store)</a><br />
|
|
83
|
+
<a href="classes/Pho/QueryProfile.html#M000030">remove (Pho::QueryProfile)</a><br />
|
|
84
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000015">remove (Pho::FieldPredicateMap)</a><br />
|
|
85
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000016">remove_by_name (Pho::FieldPredicateMap)</a><br />
|
|
86
|
+
<a href="classes/Pho/QueryProfile.html#M000029">remove_by_name (Pho::QueryProfile)</a><br />
|
|
87
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000017">remove_by_uri (Pho::FieldPredicateMap)</a><br />
|
|
88
|
+
<a href="classes/Pho/RDFCollection.html#M000080">reset (Pho::RDFCollection)</a><br />
|
|
89
|
+
<a href="classes/Pho/Store.html#M000059">reset (Pho::Store)</a><br />
|
|
90
|
+
<a href="classes/Pho/Store.html#M000062">restore (Pho::Store)</a><br />
|
|
91
|
+
<a href="classes/Pho/RDFCollection.html#M000079">retry_failures (Pho::RDFCollection)</a><br />
|
|
92
|
+
<a href="classes/Pho/Etags.html#M000089">save (Pho::Etags)</a><br />
|
|
93
|
+
<a href="classes/Pho/Store.html#M000048">search (Pho::Store)</a><br />
|
|
94
|
+
<a href="classes/Pho/Store.html#M000037">set_credentials (Pho::Store)</a><br />
|
|
95
|
+
<a href="classes/Pho/Store.html#M000061">snapshot (Pho::Store)</a><br />
|
|
96
|
+
<a href="classes/Pho/Store.html#M000047">sparql (Pho::Store)</a><br />
|
|
97
|
+
<a href="classes/Pho/Store.html#M000045">sparql_ask (Pho::Store)</a><br />
|
|
98
|
+
<a href="classes/Pho/Store.html#M000044">sparql_construct (Pho::Store)</a><br />
|
|
99
|
+
<a href="classes/Pho/Store.html#M000043">sparql_describe (Pho::Store)</a><br />
|
|
100
|
+
<a href="classes/Pho/Store.html#M000046">sparql_select (Pho::Store)</a><br />
|
|
101
|
+
<a href="classes/Pho/RDFCollection.html#M000078">store (Pho::RDFCollection)</a><br />
|
|
102
|
+
<a href="classes/Pho/Store.html#M000039">store_data (Pho::Store)</a><br />
|
|
103
|
+
<a href="classes/Pho/Store.html#M000040">store_file (Pho::Store)</a><br />
|
|
104
|
+
<a href="classes/Pho/Store.html#M000041">store_url (Pho::Store)</a><br />
|
|
105
|
+
<a href="classes/Pho/Store.html#M000063">submit_job (Pho::Store)</a><br />
|
|
106
|
+
<a href="classes/Pho/RDFCollection.html#M000083">successes (Pho::RDFCollection)</a><br />
|
|
107
|
+
<a href="classes/Pho/RDFCollection.html#M000085">summary (Pho::RDFCollection)</a><br />
|
|
108
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000018">to_rdf (Pho::FieldPredicateMap)</a><br />
|
|
109
|
+
<a href="classes/Pho/DatatypeProperty.html#M000035">to_rdf (Pho::DatatypeProperty)</a><br />
|
|
110
|
+
<a href="classes/Pho/FieldWeighting.html#M000076">to_rdf (Pho::FieldWeighting)</a><br />
|
|
111
|
+
<a href="classes/Pho/QueryProfile.html#M000032">to_rdf (Pho::QueryProfile)</a><br />
|
|
112
|
+
<a href="classes/Pho/FieldPredicateMap.html#M000019">upload (Pho::FieldPredicateMap)</a><br />
|
|
113
|
+
<a href="classes/Pho/QueryProfile.html#M000033">upload (Pho::QueryProfile)</a><br />
|
|
114
|
+
<a href="classes/Pho/Store.html#M000055">upload_item (Pho::Store)</a><br />
|
|
115
|
+
<a href="classes/Pho/Status.html#M000023">writeable? (Pho::Status)</a><br />
|
|
23
116
|
</div>
|
|
24
117
|
</div>
|
|
25
118
|
</body>
|
data/examples/status.rb
CHANGED
|
@@ -3,7 +3,7 @@ require 'pho'
|
|
|
3
3
|
|
|
4
4
|
# Create the store object
|
|
5
5
|
store = Pho::Store.new("http://api.talis.com/stores/space")
|
|
6
|
-
# Retrieve the store status as a
|
|
7
|
-
status = store
|
|
8
|
-
# Dump the
|
|
6
|
+
# Retrieve the store status as a Status object
|
|
7
|
+
status = Pho::Status.read_from_store(store)
|
|
8
|
+
# Dump the object to the console
|
|
9
9
|
puts status.inspect
|
data/lib/pho.rb
CHANGED
|
@@ -2,11 +2,15 @@ require 'rubygems'
|
|
|
2
2
|
require 'httpclient'
|
|
3
3
|
require 'json'
|
|
4
4
|
require 'yaml'
|
|
5
|
+
require 'rexml/document'
|
|
5
6
|
|
|
6
7
|
require 'pho/etags'
|
|
7
8
|
require 'pho/store'
|
|
8
9
|
require 'pho/snapshot'
|
|
9
10
|
require 'pho/field_predicate_map'
|
|
11
|
+
require 'pho/query_profile'
|
|
12
|
+
require 'pho/status'
|
|
13
|
+
require 'pho/facet'
|
|
10
14
|
require 'pho/rdf_collection'
|
|
11
15
|
|
|
12
16
|
module Pho
|
|
@@ -22,7 +26,12 @@ module Pho
|
|
|
22
26
|
JOB_RESTORE = "http://schemas.talis.com/2006/bigfoot/configuration#RestoreJob".freeze
|
|
23
27
|
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
module Namespaces
|
|
30
|
+
|
|
31
|
+
CONFIG = "http://schemas.talis.com/2006/bigfoot/configuration#"
|
|
32
|
+
FRAME = "http://schemas.talis.com/2006/frame/schema#"
|
|
33
|
+
FACET = "http://schemas.talis.com/2007/facet-results#"
|
|
34
|
+
|
|
35
|
+
end
|
|
27
36
|
|
|
28
37
|
end
|
data/lib/pho/facet.rb
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
module Pho
|
|
2
|
+
|
|
3
|
+
#This module organizes the classes related to the Facet service
|
|
4
|
+
module Facet
|
|
5
|
+
|
|
6
|
+
#Captures the information about a specific term
|
|
7
|
+
class Term
|
|
8
|
+
attr_reader :hits
|
|
9
|
+
attr_reader :search_uri
|
|
10
|
+
attr_reader :value
|
|
11
|
+
|
|
12
|
+
def initialize(hits, search_uri, value)
|
|
13
|
+
@hits = hits
|
|
14
|
+
@search_uri = search_uri
|
|
15
|
+
@value = value
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
#Captures the data returned in a facetted search
|
|
21
|
+
class Results
|
|
22
|
+
|
|
23
|
+
#The query used to generate the facet results, as echoed in the response
|
|
24
|
+
attr_reader :query
|
|
25
|
+
|
|
26
|
+
#The fields used to generate the results
|
|
27
|
+
attr_reader :fields
|
|
28
|
+
|
|
29
|
+
#An array of facets
|
|
30
|
+
attr_reader :facets
|
|
31
|
+
|
|
32
|
+
def initialize(query, fields, facets=Hash.new)
|
|
33
|
+
@query = query
|
|
34
|
+
@fields = fields
|
|
35
|
+
@facets = facets
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
#Convenience function to perform a facetted search against a store, returning a
|
|
39
|
+
#Results object parsed from the XML response
|
|
40
|
+
#
|
|
41
|
+
#store:: the store against which the query will be performed
|
|
42
|
+
#query:: the search query
|
|
43
|
+
#facets:: an ordered list of facets to be used
|
|
44
|
+
#params:: additional params. See Store.facet for details. XML output is requested automatically
|
|
45
|
+
def Results.read_from_store(store, query, facets, params=Hash.new)
|
|
46
|
+
|
|
47
|
+
params["output"] = "xml"
|
|
48
|
+
resp = store.facet(query, facets, params)
|
|
49
|
+
|
|
50
|
+
if resp.status != 200
|
|
51
|
+
raise "Unable to do facetted search. Response code was #{resp.status}"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
return parse(resp.content)
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def Results.parse(data)
|
|
59
|
+
doc = REXML::Document.new(data)
|
|
60
|
+
root = doc.root
|
|
61
|
+
head = root.elements[1]
|
|
62
|
+
|
|
63
|
+
query = ""
|
|
64
|
+
fields = ""
|
|
65
|
+
queryEl = head.get_elements("query")[0]
|
|
66
|
+
if queryEl != nil
|
|
67
|
+
query = queryEl.text
|
|
68
|
+
end
|
|
69
|
+
fieldsEl = head.get_elements("fields")[0]
|
|
70
|
+
if fieldsEl != nil
|
|
71
|
+
fields = fieldsEl.text
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
results = Results.new(query, fields)
|
|
75
|
+
|
|
76
|
+
fields = root.get_elements("fields")[0]
|
|
77
|
+
if fields == nil
|
|
78
|
+
raise "No fields in document!"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
fields.get_elements("field").each do |field|
|
|
82
|
+
field_name = field.attribute("name").value
|
|
83
|
+
results.facets[field_name] = Array.new
|
|
84
|
+
|
|
85
|
+
field.get_elements("term").each do |term|
|
|
86
|
+
term = Term.new(term.attribute("number").value.to_i,
|
|
87
|
+
term.attribute("search-uri").value,
|
|
88
|
+
term.text() )
|
|
89
|
+
|
|
90
|
+
results.facets[field_name] << term
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
return results
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
end
|
|
101
|
+
end
|
|
@@ -68,7 +68,7 @@ module Pho
|
|
|
68
68
|
def to_rdf(ns=true)
|
|
69
69
|
rdf = "<rdf:Description "
|
|
70
70
|
if ns
|
|
71
|
-
rdf << " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:frm=\"#{Pho::
|
|
71
|
+
rdf << " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:frm=\"#{Pho::Namespaces::FRAME}\" xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" "
|
|
72
72
|
end
|
|
73
73
|
rdf << " rdf:about=\"#{@uri}\">"
|
|
74
74
|
rdf << " <frm:property rdf:resource=\"#{@property_uri}\"/>"
|
|
@@ -221,14 +221,14 @@ module Pho
|
|
|
221
221
|
|
|
222
222
|
#Dump this object to an RDF/XML representation suitable for submitting to the Platform
|
|
223
223
|
def to_rdf
|
|
224
|
-
rdf = "<rdf:RDF xmlns:frm=\"#{Pho::
|
|
224
|
+
rdf = "<rdf:RDF xmlns:frm=\"#{Pho::Namespaces::FRAME}\" "
|
|
225
225
|
rdf << " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" "
|
|
226
226
|
rdf << " xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" "
|
|
227
|
-
rdf << " xmlns:bf=\"#{Pho::
|
|
227
|
+
rdf << " xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" > "
|
|
228
228
|
|
|
229
229
|
rdf << " <rdf:Description rdf:about=\"#{@uri}\"> "
|
|
230
230
|
|
|
231
|
-
rdf << " <rdf:type rdf:resource=\"#{Pho::
|
|
231
|
+
rdf << " <rdf:type rdf:resource=\"#{Pho::Namespaces::CONFIG}FieldPredicateMap\"/> "
|
|
232
232
|
rdf << " <rdfs:label>#{@label}</rdfs:label> "
|
|
233
233
|
|
|
234
234
|
@datatype_properties.each do |property|
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
module Pho
|
|
2
|
+
|
|
3
|
+
#Captures the details of a weighted field from a QueryProfile
|
|
4
|
+
class FieldWeighting
|
|
5
|
+
|
|
6
|
+
#The uri of the field weighting
|
|
7
|
+
attr_reader :uri
|
|
8
|
+
|
|
9
|
+
#The name of the field being weighted
|
|
10
|
+
attr_reader :name
|
|
11
|
+
|
|
12
|
+
#The weighting applied to the field
|
|
13
|
+
attr_reader :weight
|
|
14
|
+
|
|
15
|
+
def initialize(uri, name, weight)
|
|
16
|
+
@uri = uri
|
|
17
|
+
@name = name
|
|
18
|
+
@weight = weight
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#Convert this object into an RDF representation. Generates a simple rdf:Description, optionally including namespaces
|
|
22
|
+
#ns:: include namespace declarations
|
|
23
|
+
def to_rdf(ns=true)
|
|
24
|
+
rdf = "<rdf:Description "
|
|
25
|
+
if ns
|
|
26
|
+
rdf << " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:frm=\"#{Pho::Namespaces::FRAME}\" xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" "
|
|
27
|
+
end
|
|
28
|
+
rdf << " rdf:about=\"#{@uri}\">"
|
|
29
|
+
rdf << " <frm:name>#{@name}</frm:name>"
|
|
30
|
+
rdf << " <bf:weight>#{@weight}</bf:weight>"
|
|
31
|
+
rdf << "</rdf:Description>"
|
|
32
|
+
return rdf
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
#Models the QueryProfile configuration associated with a Platform store
|
|
39
|
+
#
|
|
40
|
+
#Class methods exist to read a QueryProfile from a store, providing some convenience
|
|
41
|
+
#over the basic Store methods.
|
|
42
|
+
class QueryProfile
|
|
43
|
+
|
|
44
|
+
#Label associated with the resource in the Platform config
|
|
45
|
+
attr_reader :label
|
|
46
|
+
|
|
47
|
+
#URI for this resource
|
|
48
|
+
attr_reader :uri
|
|
49
|
+
|
|
50
|
+
#The list of field weightings
|
|
51
|
+
attr_reader :field_weights
|
|
52
|
+
|
|
53
|
+
def QueryProfile.read_from_store(store)
|
|
54
|
+
resp = store.get_query_profile(Pho::ACCEPT_JSON)
|
|
55
|
+
if resp.status != 200
|
|
56
|
+
raise "Unable to read Query Profile from store. Response code was #{resp.status}"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
qp_uri = store.build_uri("/config/queryprofiles/1")
|
|
60
|
+
|
|
61
|
+
json = JSON.parse( resp.content )
|
|
62
|
+
|
|
63
|
+
label = json[qp_uri]["http:\/\/www.w3.org\/2000\/01\/rdf-schema#label"][0]["value"]
|
|
64
|
+
qp = QueryProfile.new(qp_uri, label)
|
|
65
|
+
|
|
66
|
+
field_weights = json[qp_uri]["http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#fieldWeight"]
|
|
67
|
+
field_weights.each { |uri|
|
|
68
|
+
property = json[uri["value"]]
|
|
69
|
+
name = property["http:\/\/schemas.talis.com\/2006\/frame\/schema#name"][0]["value"]
|
|
70
|
+
weight = property["http:\/\/schemas.talis.com\/2006\/bigfoot\/configuration#weight"][0]["value"]
|
|
71
|
+
qp << FieldWeighting.new(uri["value"], name, weight)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return qp
|
|
75
|
+
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
#Create a FieldWeighting object suitable for adding to this store. Will ensure that the
|
|
79
|
+
#name of the propery is valid according to the Platform naming rules
|
|
80
|
+
#
|
|
81
|
+
#store:: the store that the weighting is to be created for
|
|
82
|
+
#name:: name of the field to be weighted
|
|
83
|
+
#weight:: the weighting of the field
|
|
84
|
+
def QueryProfile.create_weighting(store, name, weight)
|
|
85
|
+
if !name.match(/^[a-zA-Z][a-zA-Z0-9]*$/)
|
|
86
|
+
raise "Name does not conform to regular expression: ^[a-zA-Z][a-zA-Z0-9]*$"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
weight_uri = store.build_uri("/config/queryprofiles/1##{name}")
|
|
90
|
+
return FieldWeighting.new(weight_uri, name, weight)
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def initialize(uri, label, field_weights=Array.new)
|
|
95
|
+
@uri = uri
|
|
96
|
+
@label = label
|
|
97
|
+
@field_weights = field_weights
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def <<(weight)
|
|
101
|
+
@field_weights << weight
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
#Retrieve a FieldWeighing by name
|
|
105
|
+
def get_by_name(name)
|
|
106
|
+
return @field_weights.detect { |field| field.name == name }
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
#Remove a FieldWeighting by name
|
|
110
|
+
def remove_by_name(name)
|
|
111
|
+
fw = get_by_name(name)
|
|
112
|
+
if (fw != nil)
|
|
113
|
+
return remove(fw)
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
#Remove a FieldWeighting from the collection
|
|
118
|
+
def remove(fw)
|
|
119
|
+
return @field_weights.delete(fw)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
#Is there a field weighting for a property with this name?
|
|
123
|
+
def mapped_name?(name)
|
|
124
|
+
return get_by_name(name) != nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
#Dump this object to an RDF/XML representation suitable for submitting to the Platform
|
|
128
|
+
def to_rdf
|
|
129
|
+
rdf = "<rdf:RDF xmlns:frm=\"#{Pho::Namespaces::FRAME}\" "
|
|
130
|
+
rdf << " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" "
|
|
131
|
+
rdf << " xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" "
|
|
132
|
+
rdf << " xmlns:bf=\"#{Pho::Namespaces::CONFIG}\" > "
|
|
133
|
+
|
|
134
|
+
rdf << " <rdf:Description rdf:about=\"#{@uri}\"> "
|
|
135
|
+
|
|
136
|
+
rdf << " <rdf:type rdf:resource=\"#{Pho::Namespaces::CONFIG}QueryProfile\"/> "
|
|
137
|
+
rdf << " <rdfs:label>#{@label}</rdfs:label> "
|
|
138
|
+
|
|
139
|
+
@field_weights.each do |property|
|
|
140
|
+
rdf << " <frm:fieldWeight rdf:resource=\"#{property.uri}\"/> "
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
rdf << " </rdf:Description>"
|
|
144
|
+
|
|
145
|
+
@field_weights.each do |property|
|
|
146
|
+
rdf << property.to_rdf(false)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
rdf << "</rdf:RDF>"
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
#Upload an RDF/XML presentation of this object to the provided Platform Store
|
|
153
|
+
def upload(store)
|
|
154
|
+
return store.put_query_profile(self.to_rdf)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
private
|
|
159
|
+
def QueryProfile.get_suffix(uri)
|
|
160
|
+
candidate_suffix = uri.split("/").last
|
|
161
|
+
if candidate_suffix.index("#") != -1
|
|
162
|
+
return candidate_suffix.split("#").last
|
|
163
|
+
end
|
|
164
|
+
return candidate_suffix
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
end
|