pho 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/CHANGES +9 -0
  2. data/Rakefile +2 -1
  3. data/bin/talis_store +263 -0
  4. data/doc/rdoc/classes/Pho.html +3 -21
  5. data/doc/rdoc/classes/Pho/Analyzers.html +22 -0
  6. data/doc/rdoc/classes/Pho/DatatypeProperty.html +42 -10
  7. data/doc/rdoc/classes/Pho/Etags.html +102 -30
  8. data/doc/rdoc/classes/Pho/Facet/Results.html +81 -7
  9. data/doc/rdoc/classes/Pho/Facet/Term.html +13 -2
  10. data/doc/rdoc/classes/Pho/FieldPredicateMap.html +233 -30
  11. data/doc/rdoc/classes/Pho/FieldWeighting.html +38 -10
  12. data/doc/rdoc/classes/Pho/Job.html +488 -9
  13. data/doc/rdoc/classes/Pho/JobUpdate.html +141 -0
  14. data/doc/rdoc/classes/Pho/Jobs.html +538 -0
  15. data/doc/rdoc/classes/Pho/Namespaces.html +33 -2
  16. data/doc/rdoc/classes/Pho/QueryProfile.html +162 -20
  17. data/doc/rdoc/classes/Pho/RDFCollection.html +200 -60
  18. data/doc/rdoc/classes/Pho/Snapshot.html +162 -36
  19. data/doc/rdoc/classes/Pho/Status.html +59 -8
  20. data/doc/rdoc/classes/Pho/Store.html +589 -253
  21. data/doc/rdoc/created.rid +1 -1
  22. data/doc/rdoc/files/CHANGES.html +24 -1
  23. data/doc/rdoc/files/lib/pho/field_predicate_map_rb.html +1 -1
  24. data/doc/rdoc/files/lib/pho/job_rb.html +1 -1
  25. data/doc/rdoc/files/lib/pho/snapshot_rb.html +2 -1
  26. data/doc/rdoc/files/lib/pho/status_rb.html +1 -1
  27. data/doc/rdoc/files/lib/pho/store_rb.html +1 -1
  28. data/doc/rdoc/files/lib/pho_rb.html +2 -1
  29. data/doc/rdoc/fr_class_index.html +2 -0
  30. data/doc/rdoc/fr_method_index.html +85 -68
  31. data/lib/pho.rb +18 -10
  32. data/lib/pho/field_predicate_map.rb +6 -1
  33. data/lib/pho/job.rb +326 -6
  34. data/lib/pho/snapshot.rb +46 -19
  35. data/lib/pho/store.rb +22 -56
  36. data/tests/tc_job.rb +262 -0
  37. data/tests/tc_jobcontrol.rb +159 -12
  38. data/tests/tc_snapshots.rb +57 -28
  39. data/tests/ts_pho.rb +1 -0
  40. metadata +9 -110
  41. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000034.html +0 -21
  42. data/doc/rdoc/classes/Pho/DatatypeProperty.src/M000035.html +0 -29
  43. data/doc/rdoc/classes/Pho/Etags.src/M000088.html +0 -23
  44. data/doc/rdoc/classes/Pho/Etags.src/M000089.html +0 -28
  45. data/doc/rdoc/classes/Pho/Etags.src/M000090.html +0 -21
  46. data/doc/rdoc/classes/Pho/Etags.src/M000091.html +0 -18
  47. data/doc/rdoc/classes/Pho/Etags.src/M000092.html +0 -18
  48. data/doc/rdoc/classes/Pho/Etags.src/M000093.html +0 -18
  49. data/doc/rdoc/classes/Pho/Facet/Results.src/M000001.html +0 -20
  50. data/doc/rdoc/classes/Pho/Facet/Results.src/M000002.html +0 -27
  51. data/doc/rdoc/classes/Pho/Facet/Results.src/M000003.html +0 -54
  52. data/doc/rdoc/classes/Pho/Facet/Term.src/M000004.html +0 -20
  53. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000005.html +0 -38
  54. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000006.html +0 -28
  55. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000007.html +0 -20
  56. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000008.html +0 -18
  57. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000009.html +0 -23
  58. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000010.html +0 -23
  59. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000011.html +0 -18
  60. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000012.html +0 -18
  61. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000013.html +0 -18
  62. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000014.html +0 -18
  63. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000015.html +0 -18
  64. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000016.html +0 -21
  65. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000017.html +0 -21
  66. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000018.html +0 -38
  67. data/doc/rdoc/classes/Pho/FieldPredicateMap.src/M000019.html +0 -18
  68. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000075.html +0 -20
  69. data/doc/rdoc/classes/Pho/FieldWeighting.src/M000076.html +0 -26
  70. data/doc/rdoc/classes/Pho/Job.src/M000074.html +0 -21
  71. data/doc/rdoc/classes/Pho/QueryProfile.src/M000024.html +0 -39
  72. data/doc/rdoc/classes/Pho/QueryProfile.src/M000025.html +0 -24
  73. data/doc/rdoc/classes/Pho/QueryProfile.src/M000026.html +0 -20
  74. data/doc/rdoc/classes/Pho/QueryProfile.src/M000027.html +0 -18
  75. data/doc/rdoc/classes/Pho/QueryProfile.src/M000028.html +0 -18
  76. data/doc/rdoc/classes/Pho/QueryProfile.src/M000029.html +0 -21
  77. data/doc/rdoc/classes/Pho/QueryProfile.src/M000030.html +0 -18
  78. data/doc/rdoc/classes/Pho/QueryProfile.src/M000031.html +0 -18
  79. data/doc/rdoc/classes/Pho/QueryProfile.src/M000032.html +0 -38
  80. data/doc/rdoc/classes/Pho/QueryProfile.src/M000033.html +0 -18
  81. data/doc/rdoc/classes/Pho/RDFCollection.src/M000077.html +0 -23
  82. data/doc/rdoc/classes/Pho/RDFCollection.src/M000078.html +0 -22
  83. data/doc/rdoc/classes/Pho/RDFCollection.src/M000079.html +0 -24
  84. data/doc/rdoc/classes/Pho/RDFCollection.src/M000080.html +0 -23
  85. data/doc/rdoc/classes/Pho/RDFCollection.src/M000081.html +0 -18
  86. data/doc/rdoc/classes/Pho/RDFCollection.src/M000082.html +0 -22
  87. data/doc/rdoc/classes/Pho/RDFCollection.src/M000083.html +0 -22
  88. data/doc/rdoc/classes/Pho/RDFCollection.src/M000084.html +0 -26
  89. data/doc/rdoc/classes/Pho/RDFCollection.src/M000085.html +0 -23
  90. data/doc/rdoc/classes/Pho/RDFCollection.src/M000086.html +0 -18
  91. data/doc/rdoc/classes/Pho/RDFCollection.src/M000087.html +0 -18
  92. data/doc/rdoc/classes/Pho/Snapshot.src/M000070.html +0 -31
  93. data/doc/rdoc/classes/Pho/Snapshot.src/M000071.html +0 -21
  94. data/doc/rdoc/classes/Pho/Snapshot.src/M000072.html +0 -18
  95. data/doc/rdoc/classes/Pho/Snapshot.src/M000073.html +0 -37
  96. data/doc/rdoc/classes/Pho/Status.src/M000020.html +0 -20
  97. data/doc/rdoc/classes/Pho/Status.src/M000021.html +0 -31
  98. data/doc/rdoc/classes/Pho/Status.src/M000022.html +0 -18
  99. data/doc/rdoc/classes/Pho/Status.src/M000023.html +0 -18
  100. data/doc/rdoc/classes/Pho/Store.src/M000036.html +0 -22
  101. data/doc/rdoc/classes/Pho/Store.src/M000037.html +0 -18
  102. data/doc/rdoc/classes/Pho/Store.src/M000038.html +0 -25
  103. data/doc/rdoc/classes/Pho/Store.src/M000039.html +0 -20
  104. data/doc/rdoc/classes/Pho/Store.src/M000040.html +0 -20
  105. data/doc/rdoc/classes/Pho/Store.src/M000041.html +0 -28
  106. data/doc/rdoc/classes/Pho/Store.src/M000042.html +0 -23
  107. data/doc/rdoc/classes/Pho/Store.src/M000043.html +0 -18
  108. data/doc/rdoc/classes/Pho/Store.src/M000044.html +0 -18
  109. data/doc/rdoc/classes/Pho/Store.src/M000045.html +0 -18
  110. data/doc/rdoc/classes/Pho/Store.src/M000046.html +0 -18
  111. data/doc/rdoc/classes/Pho/Store.src/M000047.html +0 -23
  112. data/doc/rdoc/classes/Pho/Store.src/M000048.html +0 -22
  113. data/doc/rdoc/classes/Pho/Store.src/M000049.html +0 -26
  114. data/doc/rdoc/classes/Pho/Store.src/M000050.html +0 -24
  115. data/doc/rdoc/classes/Pho/Store.src/M000051.html +0 -20
  116. data/doc/rdoc/classes/Pho/Store.src/M000052.html +0 -20
  117. data/doc/rdoc/classes/Pho/Store.src/M000053.html +0 -25
  118. data/doc/rdoc/classes/Pho/Store.src/M000054.html +0 -20
  119. data/doc/rdoc/classes/Pho/Store.src/M000055.html +0 -30
  120. data/doc/rdoc/classes/Pho/Store.src/M000056.html +0 -21
  121. data/doc/rdoc/classes/Pho/Store.src/M000057.html +0 -23
  122. data/doc/rdoc/classes/Pho/Store.src/M000058.html +0 -28
  123. data/doc/rdoc/classes/Pho/Store.src/M000059.html +0 -18
  124. data/doc/rdoc/classes/Pho/Store.src/M000060.html +0 -18
  125. data/doc/rdoc/classes/Pho/Store.src/M000061.html +0 -18
  126. data/doc/rdoc/classes/Pho/Store.src/M000062.html +0 -31
  127. data/doc/rdoc/classes/Pho/Store.src/M000063.html +0 -21
  128. data/doc/rdoc/classes/Pho/Store.src/M000064.html +0 -20
  129. data/doc/rdoc/classes/Pho/Store.src/M000065.html +0 -20
  130. data/doc/rdoc/classes/Pho/Store.src/M000066.html +0 -20
  131. data/doc/rdoc/classes/Pho/Store.src/M000067.html +0 -20
  132. data/doc/rdoc/classes/Pho/Store.src/M000068.html +0 -20
  133. data/doc/rdoc/classes/Pho/Store.src/M000069.html +0 -20
data/CHANGES CHANGED
@@ -1,5 +1,14 @@
1
1
  Brief notes on significant changes and additions in each release
2
2
 
3
+ == Version 0.4
4
+
5
+ * Added support for reading Job lifecycle data exposed in Talis Platform Release 21
6
+ * Added constants for 2 new analysers added in Talis Platform Release 21
7
+ * Refactored job submission code to move methods from the Store class onto the Jobs and Job classes instead.
8
+ This brings that code in line with the patterns used elsewhere
9
+ * Re-implemented snapshot reading code to use RDF/XML rather than scraping the HTML
10
+ * Added a fledgling command-line tool for working with the platform "pho_store"
11
+
3
12
  == Version 0.3
4
13
 
5
14
  * Added support for QueryProfiles, Facets
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake/testtask'
5
5
  require 'rake/clean'
6
6
 
7
7
  NAME = "pho"
8
- VER = "0.3"
8
+ VER = "0.4"
9
9
 
10
10
  RDOC_OPTS = ['--quiet', '--title', 'Pho (Talis Platform Client) Reference', '--main', 'README']
11
11
 
@@ -31,6 +31,7 @@ SPEC =
31
31
  s.files = PKG_FILES
32
32
  s.require_path = "lib"
33
33
  s.bindir = "bin"
34
+ s.executables = ["talis_store"]
34
35
  s.test_file = "tests/ts_pho.rb"
35
36
  s.add_dependency("httpclient", ">= 2.1.3.1")
36
37
  s.add_dependency("json", ">= 1.1.3")
@@ -0,0 +1,263 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'pho'
4
+ require 'getoptlong'
5
+
6
+ PROGRAM = File::basename $0
7
+
8
+ USAGE = <<-EOL
9
+ SYNOPSIS
10
+
11
+ #{ PROGRAM } mode [args]*
12
+
13
+ DESCRIPTION
14
+
15
+ Provides a simple command-line interface for working with a Talis Platform store. The script attempts to provide
16
+ access to the most useful core functionality, making it easier to write scripts that interact with a store,
17
+ as well as providing a simple set of developer tools.
18
+
19
+ MODE
20
+
21
+ backup
22
+ Take a snapshot of a store and then download that new snapshot to the local system
23
+ By default the snapshot is downloaded into /tmp, but can be specified on the command-line
24
+
25
+ example :
26
+
27
+ #{ PROGRAM } backup -u user -p pass -s my-dev1
28
+ #{ PROGRAM } backup -u user -p pass -s my-dev1 -d ~/backups
29
+
30
+ describe
31
+ Fetch description of a resource.
32
+
33
+ example :
34
+
35
+ #{ PROGRAM } describe -u user -p pass -s my-dev1 -r http://www.example.org/foo
36
+
37
+ reindex
38
+ Trigger a reindex job on the store
39
+
40
+ example :
41
+
42
+ #{ PROGRAM } reindex -u user -p pass -s my-dev1
43
+
44
+ reset
45
+ Reset the store. THIS WILL DELETE ALL DATA.
46
+
47
+ example :
48
+
49
+ #{ PROGRAM } reset -u user -p pass -s my-dev1
50
+
51
+ restore
52
+ Restore the store from a snapshot. By default it will restore from the most recent snapshot
53
+ held in the Platform. Specify a url parameter to indicate a url from which a snapshot can be downloaded.
54
+
55
+ example :
56
+
57
+ #{ PROGRAM } restore -u user -p pass -s my-dev1
58
+ #{ PROGRAM } restore -u user -p pass -s my-dev1 -r http://www.example.org/backups/snapshot.tar
59
+
60
+ snapshot
61
+ Generate a snapshot of the store. (This doesnt download the snapshot, use backup for that).
62
+
63
+ example :
64
+
65
+ #{ PROGRAM } snapshot -u user -p pass -s my-dev1
66
+
67
+ sparql
68
+ Run a SPARQL query against the Platform.
69
+
70
+ example :
71
+
72
+ #{ PROGRAM } sparql -f ~/queries/query.rq
73
+
74
+ status
75
+ Show read-write status of the store
76
+
77
+ store
78
+ Upload some RDF data to the Platform. Can either specify a local file, or a URL
79
+ When a url is specified, then the data is retrieved and then submitted to the Platform
80
+ Can also be used to store an entire directory of RDF/XML using the --dir option.
81
+
82
+ example :
83
+
84
+ #{ PROGRAM } store -u user -p pass -s my-dev1 -f /tmp/data.rdf
85
+ #{ PROGRAM } store -u user -p pass -s my-dev1 -r http://www.example.net/data/somedata.rdf
86
+ #{ PROGRAM } store -u user -p pass -s my-dev1 -d ~/data
87
+
88
+ OPTIONS
89
+
90
+ --help , -h
91
+ show this message
92
+ --username , -u
93
+ specify username
94
+ --password , -p
95
+ specify password
96
+ --store , -s
97
+ specify store name. Can be just name, or full URL
98
+ --url , -r
99
+ specify a url, e.g. for retrieving description or uploading
100
+ --file , -f
101
+ specify a file name, e.g. data to upload
102
+ --dir
103
+ specify a directory, e.g. containing data to upload or location to place data.
104
+
105
+ EOL
106
+
107
+ mode = ARGV.shift
108
+
109
+ opts = GetoptLong::new(
110
+ [ "--help" , "-h" , GetoptLong::NO_ARGUMENT ],
111
+ [ "--username" , "-u" , GetoptLong::REQUIRED_ARGUMENT ],
112
+ [ "--password" , "-p" , GetoptLong::REQUIRED_ARGUMENT ],
113
+ [ "--store" , "-s" , GetoptLong::REQUIRED_ARGUMENT ],
114
+ [ "--url" , "-r" , GetoptLong::REQUIRED_ARGUMENT ],
115
+ [ "--file" , "-f" , GetoptLong::REQUIRED_ARGUMENT ],
116
+ [ "--dir" , "-d" , GetoptLong::REQUIRED_ARGUMENT ]
117
+ ).enum_for.inject({}) { |h, (k, v)| h.update k.delete('-') => v }
118
+
119
+ mode = "help" if opts["--help"]
120
+
121
+ if mode == "help"
122
+ USAGE.display
123
+ else
124
+
125
+ if !opts["username"]
126
+ puts "no <username>"
127
+ abort USAGE
128
+ end
129
+ if !opts["password"]
130
+ puts "no <password>"
131
+ abort USAGE
132
+ end
133
+ if !opts["store"]
134
+ puts "no <store>"
135
+ abort USAGE
136
+ end
137
+
138
+ storename = opts["store"]
139
+ if !storename.start_with?("http")
140
+ storename = "http://api.talis.com/stores/#{storename}"
141
+ end
142
+
143
+ store = Pho::Store.new(storename, opts["username"], opts["password"])
144
+
145
+ #begin
146
+
147
+ case mode
148
+ when "status"
149
+ status = Pho::Status.read_from_store(store)
150
+ puts "Store Status:\nReadable: #{status.readable?}\nWritable: #{status.writeable?}"
151
+ when "backup"
152
+ puts "Submitting Snapshot Job"
153
+ resp = Pho::Jobs.submit_snapshot(store, "Reindex", Time.now)
154
+ puts "Monitoring Job"
155
+ job = Pho::Jobs.wait_for_submitted(resp, store) do |job, message, time|
156
+ puts "#{time} #{message}"
157
+ end
158
+ puts "Job Completed"
159
+ snapshot = Pho::Snapshot.read_from_store(store)
160
+ puts "Retrieving #{snapshot.url}"
161
+ dir = opts["dir"] || Dir.tmpdir
162
+ snapshot.backup(store, dir)
163
+ puts "Download complete. MD5 OK."
164
+ when "snapshot"
165
+ puts "Submitting Snapshot Job"
166
+ resp = Pho::Jobs.submit_snapshot(store, "Reindex", Time.now)
167
+ puts "Monitoring Job"
168
+ job = Pho::Jobs.wait_for_submitted(resp, store) do |job, message, time|
169
+ puts "#{time} #{message}"
170
+ end
171
+ puts "Snapshot Completed"
172
+ when "reindex"
173
+ puts "Submitting Reindex Job"
174
+ resp = Pho::Jobs.submit_reindex(store, "Reindex", Time.now)
175
+ if resp.status == 201
176
+ puts "Monitoring Reindex Job: #{resp.header["Location"].first}"
177
+ end
178
+ job = Pho::Jobs.wait_for_submitted(resp, store) do |job, message, time|
179
+ puts "#{time} #{message}"
180
+ end
181
+ puts "Reindex Completed"
182
+ when "reset"
183
+ puts "Resetting Store"
184
+ resp = Pho::Jobs.submit_reset(store, "Reset", Time.now)
185
+ puts "Monitoring Reset Job:"
186
+ job = Pho::Jobs.wait_for_submitted(resp, store) do |job, message, time|
187
+ puts "#{time} #{message}"
188
+ end
189
+ puts "Reset Completed"
190
+ when "restore"
191
+ url = opts["url"]
192
+ if url == nil
193
+ puts "Restore from latest snapshot"
194
+ snapshot = Pho::Snapshot.read_from_store(store)
195
+ url = snapshot.url
196
+ end
197
+ puts "Restoring from #{url}"
198
+ resp = Pho::Jobs.submit_restore(store, url, "Reset", Time.now)
199
+ job = Pho::Jobs.wait_for_submitted(resp, store) do |job, message, time|
200
+ puts "#{time} #{message}"
201
+ end
202
+ puts "Restore Completed"
203
+ when "store"
204
+ resp = nil
205
+ if opts["url"]
206
+ puts "Storing remote data: #{opts["url"]}"
207
+ resp = store.store_url( opts["url"] )
208
+ elsif opts["file"]
209
+ puts "Storing local file: #{opts["file"]}"
210
+ resp = store.store_file( File.new( opts["file"] ) )
211
+ elsif opts["dir"]
212
+ puts "Storing contents of directory: #{opts["dir"]}"
213
+ collection = Pho::RDFCollection.new(store, opts["dir"])
214
+ collection.store()
215
+ puts collection.summary()
216
+ else
217
+ abort USAGE
218
+ end
219
+
220
+ if resp != nil
221
+ if resp.status == 204
222
+ puts "Complete"
223
+ else
224
+ puts "Error: #{resp.status} #{resp.reason}"
225
+ puts resp.content
226
+ end
227
+ end
228
+
229
+ when "describe"
230
+ if opts["url"] == nil
231
+ abort USAGE
232
+ end
233
+ resp = store.describe( opts["url"] )
234
+ if resp.status == 200
235
+ puts resp.content
236
+ else
237
+ puts "Error: #{resp.status} #{resp.reason}"
238
+ puts resp.content
239
+ end
240
+ when "sparql"
241
+ if opts["file"] == nil
242
+ abort USAGE
243
+ end
244
+ query = File.new( opts["file"] ).read()
245
+ resp = store.sparql(query)
246
+ if resp.status == 200
247
+ puts resp.content
248
+ else
249
+ puts "Error: #{resp.status} #{resp.reason}"
250
+ puts resp.content
251
+ end
252
+
253
+ else
254
+ abort USAGE
255
+ end
256
+
257
+ #rescue StandardError => e
258
+ # puts "Failed!"
259
+ # puts e
260
+ #end
261
+
262
+ end
263
+
@@ -124,13 +124,15 @@
124
124
  <h3 class="section-bar">Classes and Modules</h3>
125
125
 
126
126
  Module <a href="Pho/Facet.html" class="link">Pho::Facet</a><br />
127
- Module <a href="Pho/Namespaces.html" class="link">Pho::Namespaces</a><br />
128
127
  Class <a href="Pho/Analyzers.html" class="link">Pho::Analyzers</a><br />
129
128
  Class <a href="Pho/DatatypeProperty.html" class="link">Pho::DatatypeProperty</a><br />
130
129
  Class <a href="Pho/Etags.html" class="link">Pho::Etags</a><br />
131
130
  Class <a href="Pho/FieldPredicateMap.html" class="link">Pho::FieldPredicateMap</a><br />
132
131
  Class <a href="Pho/FieldWeighting.html" class="link">Pho::FieldWeighting</a><br />
133
132
  Class <a href="Pho/Job.html" class="link">Pho::Job</a><br />
133
+ Class <a href="Pho/JobUpdate.html" class="link">Pho::JobUpdate</a><br />
134
+ Class <a href="Pho/Jobs.html" class="link">Pho::Jobs</a><br />
135
+ Class <a href="Pho/Namespaces.html" class="link">Pho::Namespaces</a><br />
134
136
  Class <a href="Pho/QueryProfile.html" class="link">Pho::QueryProfile</a><br />
135
137
  Class <a href="Pho/RDFCollection.html" class="link">Pho::RDFCollection</a><br />
136
138
  Class <a href="Pho/Snapshot.html" class="link">Pho::Snapshot</a><br />
@@ -159,26 +161,6 @@ Class <a href="Pho/Store.html" class="link">Pho::Store</a><br />
159
161
  <td>=</td>
160
162
  <td class="context-item-value">{&quot;Content-Type&quot;=&gt;&quot;application/rdf+xml&quot;}.freeze</td>
161
163
  </tr>
162
- <tr class="top-aligned-row context-row">
163
- <td class="context-item-name">JOB_RESET</td>
164
- <td>=</td>
165
- <td class="context-item-value">&quot;http://schemas.talis.com/2006/bigfoot/configuration#ResetDataJob&quot;.freeze</td>
166
- </tr>
167
- <tr class="top-aligned-row context-row">
168
- <td class="context-item-name">JOB_SNAPSHOT</td>
169
- <td>=</td>
170
- <td class="context-item-value">&quot;http://schemas.talis.com/2006/bigfoot/configuration#SnapshotJob&quot;.freeze</td>
171
- </tr>
172
- <tr class="top-aligned-row context-row">
173
- <td class="context-item-name">JOB_REINDEX</td>
174
- <td>=</td>
175
- <td class="context-item-value">&quot;http://schemas.talis.com/2006/bigfoot/configuration#ReindexJob&quot;.freeze</td>
176
- </tr>
177
- <tr class="top-aligned-row context-row">
178
- <td class="context-item-name">JOB_RESTORE</td>
179
- <td>=</td>
180
- <td class="context-item-value">&quot;http://schemas.talis.com/2006/bigfoot/configuration#RestoreJob&quot;.freeze</td>
181
- </tr>
182
164
  <tr class="top-aligned-row context-row">
183
165
  <td class="context-item-name">READ_ONLY</td>
184
166
  <td>=</td>
@@ -263,6 +263,28 @@ their unaccented equivalent See API documentation at <a
263
263
  href="http://n2.talis.com/wiki/Field_Predicate_Map">n2.talis.com/wiki/Field_Predicate_Map</a>
264
264
  for details of replacements
265
265
 
266
+ </td>
267
+ </tr>
268
+ <tr class="top-aligned-row context-row">
269
+ <td class="context-item-name">PORTER_NORMALIZE_STANDARD</td>
270
+ <td>=</td>
271
+ <td class="context-item-value">&quot;http://schemas.talis.com/2007/bigfoot/analyzers#porter-norm-en&quot;.freeze</td>
272
+ <td width="3em">&nbsp;</td>
273
+ <td class="context-item-desc">
274
+ English analyzer with porter stemming, case normalization, latin 1
275
+ normalization, and stop words removal
276
+
277
+ </td>
278
+ </tr>
279
+ <tr class="top-aligned-row context-row">
280
+ <td class="context-item-name">PORTER_NO_STOP_WORD_STANDARD</td>
281
+ <td>=</td>
282
+ <td class="context-item-value">&quot;http://schemas.talis.com/2007/bigfoot/analyzers#porter-nostop-norm-en&quot;.freeze</td>
283
+ <td width="3em">&nbsp;</td>
284
+ <td class="context-item-desc">
285
+ English analyzer with porter stemming, case normalization and latin 1
286
+ normalization.
287
+
266
288
  </td>
267
289
  </tr>
268
290
  </table>
@@ -92,8 +92,8 @@ Captures information about a mapped datatype from a Field Predicate Map
92
92
  <h3 class="section-bar">Methods</h3>
93
93
 
94
94
  <div class="name-list">
95
- <a href="#M000034">new</a>&nbsp;&nbsp;
96
- <a href="#M000035">to_rdf</a>&nbsp;&nbsp;
95
+ <a href="#M000044">new</a>&nbsp;&nbsp;
96
+ <a href="#M000045">to_rdf</a>&nbsp;&nbsp;
97
97
  </div>
98
98
  </div>
99
99
 
@@ -155,28 +155,39 @@ URI for this mapping
155
155
  <div id="methods">
156
156
  <h3 class="section-bar">Public Class methods</h3>
157
157
 
158
- <div id="method-M000034" class="method-detail">
159
- <a name="M000034"></a>
158
+ <div id="method-M000044" class="method-detail">
159
+ <a name="M000044"></a>
160
160
 
161
161
  <div class="method-heading">
162
- <a href="DatatypeProperty.src/M000034.html" target="Code" class="method-signature"
163
- onclick="popupCode('DatatypeProperty.src/M000034.html');return false;">
162
+ <a href="#M000044" class="method-signature">
164
163
  <span class="method-name">new</span><span class="method-args">(uri, property_uri, name, analyzer=nil)</span>
165
164
  </a>
166
165
  </div>
167
166
 
168
167
  <div class="method-description">
168
+ <p><a class="source-toggle" href="#"
169
+ onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000044-source">
171
+ <pre>
172
+ <span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 64</span>
173
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">property_uri</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">analyzer</span>=<span class="ruby-keyword kw">nil</span>)
174
+ <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">uri</span>
175
+ <span class="ruby-ivar">@property_uri</span> = <span class="ruby-identifier">property_uri</span>
176
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
177
+ <span class="ruby-ivar">@analyzer</span> = <span class="ruby-identifier">analyzer</span>
178
+ <span class="ruby-keyword kw">end</span>
179
+ </pre>
180
+ </div>
169
181
  </div>
170
182
  </div>
171
183
 
172
184
  <h3 class="section-bar">Public Instance methods</h3>
173
185
 
174
- <div id="method-M000035" class="method-detail">
175
- <a name="M000035"></a>
186
+ <div id="method-M000045" class="method-detail">
187
+ <a name="M000045"></a>
176
188
 
177
189
  <div class="method-heading">
178
- <a href="DatatypeProperty.src/M000035.html" target="Code" class="method-signature"
179
- onclick="popupCode('DatatypeProperty.src/M000035.html');return false;">
190
+ <a href="#M000045" class="method-signature">
180
191
  <span class="method-name">to_rdf</span><span class="method-args">(ns=true)</span>
181
192
  </a>
182
193
  </div>
@@ -191,6 +202,27 @@ rdf:Description, optionally including namespaces
191
202
 
192
203
  </td></tr>
193
204
  </table>
205
+ <p><a class="source-toggle" href="#"
206
+ onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
207
+ <div class="method-source-code" id="M000045-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File lib/pho/field_predicate_map.rb, line 73</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_rdf</span>(<span class="ruby-identifier">ns</span>=<span class="ruby-keyword kw">true</span>)
211
+ <span class="ruby-identifier">rdf</span> = <span class="ruby-value str">&quot;&lt;rdf:Description &quot;</span>
212
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ns</span>
213
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; xmlns:rdf=\&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#\&quot; xmlns:frm=\&quot;#{Pho::Namespaces::FRAME}\&quot; xmlns:bf=\&quot;#{Pho::Namespaces::CONFIG}\&quot; &quot;</span>
214
+ <span class="ruby-keyword kw">end</span>
215
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; rdf:about=\&quot;#{@uri}\&quot;&gt;&quot;</span>
216
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;frm:property rdf:resource=\&quot;#{@property_uri}\&quot;/&gt;&quot;</span>
217
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;frm:name&gt;#{@name}&lt;/frm:name&gt;&quot;</span>
218
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@analyzer</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
219
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot; &lt;bf:analyzer rdf:resource=\&quot;#{@analyzer}\&quot; /&gt;&quot;</span>
220
+ <span class="ruby-keyword kw">end</span>
221
+ <span class="ruby-identifier">rdf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&lt;/rdf:Description&gt;&quot;</span>
222
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">rdf</span>
223
+ <span class="ruby-keyword kw">end</span>
224
+ </pre>
225
+ </div>
194
226
  </div>
195
227
  </div>
196
228