~ubuntu-branches/debian/squeeze/redland-bindings/squeeze

« back to all changes in this revision

Viewing changes to docs/rdoc/classes/Redland/Resource.html

  • Committer: Bazaar Package Importer
  • Author(s): Dave Beckett
  • Date: 2009-04-07 00:24:21 UTC
  • mfrom: (0.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090407002421-dce2r4otm5vqtheg
Tags: 1.0.8.1-2
* Use new sections ruby, php for librdf-ruby and php5-librdf respectively.
* Merge features from ubuntu packaging.  Thanks to Matthias Klose
  (not taking linker -Wl,--as-needed since that makes dyloading fail
  to pull in raptor symbols):
  debian/rules:
  - get python lib dir from distutils
  - make dh_pycentral use symlinks
  debian/python-librdf.examples:
  - add data/dc.rdf to examples dir and adjust example.py
    to point to it (Closes: #402612)
* Patch python/Makefile.in so it can allow the include dir to be
  overridden by the particular python version build in debian/rules
  using PYTHON_INCLUDES

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
</div>
72
72
<div id="method-list">
73
73
<h3 class="section-bar">Methods</h3>
74
 
<div class="name-list"><a href="#M000160">add_property</a>&nbsp;&nbsp; <a href="#M000162">delete_properties</a>&nbsp;&nbsp; <a href="#M000161">delete_property</a>&nbsp;&nbsp; <a href="#M000158">get_properties</a>&nbsp;&nbsp; <a href="#M000157">get_property</a>&nbsp;&nbsp; <a href="#M000156">new</a>&nbsp;&nbsp; <a href="#M000159">object_of_predicate</a>&nbsp;&nbsp; <a href="#M000168">set_context</a>&nbsp;&nbsp; <a href="#M000167">set_type</a>&nbsp;&nbsp; <a href="#M000166">type</a>&nbsp;&nbsp; <a href="#M000165">type=</a>&nbsp;&nbsp; <a href="#M000163">type?</a>&nbsp;&nbsp; <a href="#M000164">update_property</a>&nbsp;&nbsp;</div>
 
74
<div class="name-list"><a href="#M000128">add_property</a>&nbsp;&nbsp; <a href="#M000130">delete_properties</a>&nbsp;&nbsp; <a href="#M000129">delete_property</a>&nbsp;&nbsp; <a href="#M000126">get_properties</a>&nbsp;&nbsp; <a href="#M000125">get_property</a>&nbsp;&nbsp; <a href="#M000124">new</a>&nbsp;&nbsp; <a href="#M000127">object_of_predicate</a>&nbsp;&nbsp; <a href="#M000136">set_context</a>&nbsp;&nbsp; <a href="#M000135">set_type</a>&nbsp;&nbsp; <a href="#M000134">type</a>&nbsp;&nbsp; <a href="#M000133">type=</a>&nbsp;&nbsp; <a href="#M000131">type?</a>&nbsp;&nbsp; <a href="#M000132">update_property</a>&nbsp;&nbsp;</div>
75
75
</div>
76
76
</div>
77
77
<!-- if includes -->
96
96
<!-- if method_list -->
97
97
<div id="methods">
98
98
<h3 class="section-bar">Public Class methods</h3>
99
 
<div id="method-M000156" class="method-detail"><a name="M000156" id="M000156"></a>
100
 
<div class="method-heading"><a href="#M000156" class="method-signature"><span class="method-name">new</span><span class="method-args">(arg=nil,model=nil,new_node=true)</span></a></div>
 
99
<div id="method-M000124" class="method-detail"><a name="M000124" id="M000124"></a>
 
100
<div class="method-heading"><a href="#M000124" class="method-signature"><span class="method-name">new</span><span class="method-args">(arg=nil,model=nil,new_node=true)</span></a></div>
101
101
<div class="method-description">
102
102
<p>Create a <a href="Resource.html">Redland::Resource</a>. Arg can be a String, or a <a href="Uri.html">Redland::Uri</a></p>
103
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
104
 
<div class="method-source-code" id="M000156-source">
 
103
<p><a class="source-toggle" href="#" onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
 
104
<div class="method-source-code" id="M000124-source">
105
105
<pre>
106
106
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 16</span>
107
107
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">arg</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">model</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">new_node</span>=<span class="ruby-keyword kw">true</span>)
129
129
</div>
130
130
</div>
131
131
<h3 class="section-bar">Public Instance methods</h3>
132
 
<div id="method-M000160" class="method-detail"><a name="M000160" id="M000160"></a>
133
 
<div class="method-heading"><a href="#M000160" class="method-signature"><span class="method-name">add_property</span><span class="method-args">(p,o,context=nil)</span></a></div>
 
132
<div id="method-M000128" class="method-detail"><a name="M000128" id="M000128"></a>
 
133
<div class="method-heading"><a href="#M000128" class="method-signature"><span class="method-name">add_property</span><span class="method-args">(p,o,context=nil)</span></a></div>
134
134
<div class="method-description">
135
 
<p>Adds a statement to the model with the subject as the resource and p as the predicate and o as the object same as <a href="Model.html#M000059">Model.add</a>(this,p,o)</p>
136
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
137
 
<div class="method-source-code" id="M000160-source">
 
135
<p>Adds a statement to the model with the subject as the resource and p as the predicate and o as the object same as <a href="Model.html#M000048">Model.add</a>(this,p,o)</p>
 
136
<p><a class="source-toggle" href="#" onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
 
137
<div class="method-source-code" id="M000128-source">
138
138
<pre>
139
139
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 94</span>
140
140
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_property</span>(<span class="ruby-identifier">p</span>,<span class="ruby-identifier">o</span>,<span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>)
144
144
</pre></div>
145
145
</div>
146
146
</div>
147
 
<div id="method-M000162" class="method-detail"><a name="M000162" id="M000162"></a>
148
 
<div class="method-heading"><a href="#M000162" class="method-signature"><span class="method-name">delete_properties</span><span class="method-args">()</span></a></div>
 
147
<div id="method-M000130" class="method-detail"><a name="M000130" id="M000130"></a>
 
148
<div class="method-heading"><a href="#M000130" class="method-signature"><span class="method-name">delete_properties</span><span class="method-args">()</span></a></div>
149
149
<div class="method-description">
150
150
<p>Removes all of the properties from the model with this resource as the subject</p>
151
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
152
 
<div class="method-source-code" id="M000162-source">
 
151
<p><a class="source-toggle" href="#" onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
 
152
<div class="method-source-code" id="M000130-source">
153
153
<pre>
154
154
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 108</span>
155
155
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_properties</span>()
158
158
</pre></div>
159
159
</div>
160
160
</div>
161
 
<div id="method-M000161" class="method-detail"><a name="M000161" id="M000161"></a>
162
 
<div class="method-heading"><a href="#M000161" class="method-signature"><span class="method-name">delete_property</span><span class="method-args">(pred,context=nil)</span></a></div>
 
161
<div id="method-M000129" class="method-detail"><a name="M000129" id="M000129"></a>
 
162
<div class="method-heading"><a href="#M000129" class="method-signature"><span class="method-name">delete_property</span><span class="method-args">(pred,context=nil)</span></a></div>
163
163
<div class="method-description">
164
164
<p>Removes the property from the model with the predicate pred and optional context</p>
165
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
166
 
<div class="method-source-code" id="M000161-source">
 
165
<p><a class="source-toggle" href="#" onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
 
166
<div class="method-source-code" id="M000129-source">
167
167
<pre>
168
168
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 101</span>
169
169
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_property</span>(<span class="ruby-identifier">pred</span>,<span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>)
173
173
</pre></div>
174
174
</div>
175
175
</div>
176
 
<div id="method-M000158" class="method-detail"><a name="M000158" id="M000158"></a>
177
 
<div class="method-heading"><a href="#M000158" class="method-signature"><span class="method-name">get_properties</span><span class="method-args">(pred=nil) {|st.object| ...}</span></a></div>
 
176
<div id="method-M000126" class="method-detail"><a name="M000126" id="M000126"></a>
 
177
<div class="method-heading"><a href="#M000126" class="method-signature"><span class="method-name">get_properties</span><span class="method-args">(pred=nil) {|st.object| ...}</span></a></div>
178
178
<div class="method-description">
179
179
<p>Answer model.find(self,pred,nil) in the associated model If no predicate or block given, returns and array of statements matching model.find(self,nil,nil) If block_given? yields the predicate and the object</p>
180
180
<pre>
191
191
  puts "Nicknames are"
192
192
    resource.get_properties(FOAF_NICK){|o| puts o}
193
193
</pre>
194
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
195
 
<div class="method-source-code" id="M000158-source">
 
194
<p><a class="source-toggle" href="#" onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
 
195
<div class="method-source-code" id="M000126-source">
196
196
<pre>
197
197
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 60</span>
198
198
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_properties</span>(<span class="ruby-identifier">pred</span>=<span class="ruby-keyword kw">nil</span>)
211
211
</pre></div>
212
212
</div>
213
213
</div>
214
 
<div id="method-M000157" class="method-detail"><a name="M000157" id="M000157"></a>
215
 
<div class="method-heading"><a href="#M000157" class="method-signature"><span class="method-name">get_property</span><span class="method-args">(p)</span></a></div>
 
214
<div id="method-M000125" class="method-detail"><a name="M000125" id="M000125"></a>
 
215
<div class="method-heading"><a href="#M000125" class="method-signature"><span class="method-name">get_property</span><span class="method-args">(p)</span></a></div>
216
216
<div class="method-description">
217
217
<p>Answer model.find(self,p,nil) in the associated model. If there are several such statements, any one of them may be returned</p>
218
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
219
 
<div class="method-source-code" id="M000157-source">
 
218
<p><a class="source-toggle" href="#" onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
 
219
<div class="method-source-code" id="M000125-source">
220
220
<pre>
221
221
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 40</span>
222
222
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">p</span>)
225
225
</pre></div>
226
226
</div>
227
227
</div>
228
 
<div id="method-M000159" class="method-detail"><a name="M000159" id="M000159"></a>
229
 
<div class="method-heading"><a href="#M000159" class="method-signature"><span class="method-name">object_of_predicate</span><span class="method-args">(pred = nil) {|sub| ...}</span></a></div>
 
228
<div id="method-M000127" class="method-detail"><a name="M000127" id="M000127"></a>
 
229
<div class="method-heading"><a href="#M000127" class="method-signature"><span class="method-name">object_of_predicate</span><span class="method-args">(pred = nil) {|sub| ...}</span></a></div>
230
230
<div class="method-description">
231
231
<p>Finds all objects of a given predicate. Takes an optional block, yielding each statement if given.</p>
232
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
233
 
<div class="method-source-code" id="M000159-source">
 
232
<p><a class="source-toggle" href="#" onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
 
233
<div class="method-source-code" id="M000127-source">
234
234
<pre>
235
235
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 76</span>
236
236
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_of_predicate</span>(<span class="ruby-identifier">pred</span> = <span class="ruby-keyword kw">nil</span>)
250
250
</pre></div>
251
251
</div>
252
252
</div>
253
 
<div id="method-M000168" class="method-detail"><a name="M000168" id="M000168"></a>
254
 
<div class="method-heading"><a href="#M000168" class="method-signature"><span class="method-name">set_context</span><span class="method-args">(context)</span></a></div>
 
253
<div id="method-M000136" class="method-detail"><a name="M000136" id="M000136"></a>
 
254
<div class="method-heading"><a href="#M000136" class="method-signature"><span class="method-name">set_context</span><span class="method-args">(context)</span></a></div>
255
255
<div class="method-description">
256
256
<p>Defines a context for this resource</p>
257
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
258
 
<div class="method-source-code" id="M000168-source">
 
257
<p><a class="source-toggle" href="#" onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
 
258
<div class="method-source-code" id="M000136-source">
259
259
<pre>
260
260
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 146</span>
261
261
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_context</span>(<span class="ruby-identifier">context</span>)
264
264
</pre></div>
265
265
</div>
266
266
</div>
267
 
<div id="method-M000167" class="method-detail"><a name="M000167" id="M000167"></a>
268
 
<div class="method-heading"><a href="#M000167" class="method-signature"><span class="method-name">set_type</span><span class="method-args">(type,context=@context)</span></a></div>
 
267
<div id="method-M000135" class="method-detail"><a name="M000135" id="M000135"></a>
 
268
<div class="method-heading"><a href="#M000135" class="method-signature"><span class="method-name">set_type</span><span class="method-args">(type,context=@context)</span></a></div>
269
269
<div class="method-description">
270
 
<p>Set the <a href="Resource.html#M000166">type</a> of this <a href="Resource.html">Resource</a></p>
271
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
272
 
<div class="method-source-code" id="M000167-source">
 
270
<p>Set the <a href="Resource.html#M000134">type</a> of this <a href="Resource.html">Resource</a></p>
 
271
<p><a class="source-toggle" href="#" onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
 
272
<div class="method-source-code" id="M000135-source">
273
273
<pre>
274
274
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 139</span>
275
275
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_type</span>(<span class="ruby-identifier">type</span>,<span class="ruby-identifier">context</span>=<span class="ruby-ivar">@context</span>)
280
280
</pre></div>
281
281
</div>
282
282
</div>
283
 
<div id="method-M000166" class="method-detail"><a name="M000166" id="M000166"></a>
284
 
<div class="method-heading"><a href="#M000166" class="method-signature"><span class="method-name">type</span><span class="method-args">()</span></a></div>
 
283
<div id="method-M000134" class="method-detail"><a name="M000134" id="M000134"></a>
 
284
<div class="method-heading"><a href="#M000134" class="method-signature"><span class="method-name">type</span><span class="method-args">()</span></a></div>
285
285
<div class="method-description">
286
 
<p>returns the RDF <a href="Resource.html#M000166">type</a> of this <a href="Resource.html">Resource</a> where RDF <a href="Resource.html#M000166">type</a> is &lt;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#TYPE">www.w3.org/1999/02/22-rdf-syntax-ns#TYPE</a>&gt;</p>
287
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
288
 
<div class="method-source-code" id="M000166-source">
 
286
<p>returns the RDF <a href="Resource.html#M000134">type</a> of this <a href="Resource.html">Resource</a> where RDF <a href="Resource.html#M000134">type</a> is &lt;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#TYPE">www.w3.org/1999/02/22-rdf-syntax-ns#TYPE</a>&gt;</p>
 
287
<p><a class="source-toggle" href="#" onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
 
288
<div class="method-source-code" id="M000134-source">
289
289
<pre>
290
290
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 134</span>
291
291
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type</span>
294
294
</pre></div>
295
295
</div>
296
296
</div>
297
 
<div id="method-M000165" class="method-detail"><a name="M000165" id="M000165"></a>
298
 
<div class="method-heading"><a href="#M000165" class="method-signature"><span class="method-name">type=</span><span class="method-args">(type,context=@context)</span></a></div>
 
297
<div id="method-M000133" class="method-detail"><a name="M000133" id="M000133"></a>
 
298
<div class="method-heading"><a href="#M000133" class="method-signature"><span class="method-name">type=</span><span class="method-args">(type,context=@context)</span></a></div>
299
299
<div class="method-description">
300
 
<p>Sets the RDF <a href="Resource.html#M000166">type</a> of this <a href="Resource.html">Resource</a> where RDF <a href="Resource.html#M000166">type</a> is &lt;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#TYPE">www.w3.org/1999/02/22-rdf-syntax-ns#TYPE</a>&gt;</p>
301
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
302
 
<div class="method-source-code" id="M000165-source">
 
300
<p>Sets the RDF <a href="Resource.html#M000134">type</a> of this <a href="Resource.html">Resource</a> where RDF <a href="Resource.html#M000134">type</a> is &lt;<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#TYPE">www.w3.org/1999/02/22-rdf-syntax-ns#TYPE</a>&gt;</p>
 
301
<p><a class="source-toggle" href="#" onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
 
302
<div class="method-source-code" id="M000133-source">
303
303
<pre>
304
304
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 126</span>
305
305
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type=</span>(<span class="ruby-identifier">type</span>,<span class="ruby-identifier">context</span>=<span class="ruby-ivar">@context</span>)
310
310
</pre></div>
311
311
</div>
312
312
</div>
313
 
<div id="method-M000163" class="method-detail"><a name="M000163" id="M000163"></a>
314
 
<div class="method-heading"><a href="#M000163" class="method-signature"><span class="method-name">type?</span><span class="method-args">(type)</span></a></div>
 
313
<div id="method-M000131" class="method-detail"><a name="M000131" id="M000131"></a>
 
314
<div class="method-heading"><a href="#M000131" class="method-signature"><span class="method-name">type?</span><span class="method-args">(type)</span></a></div>
315
315
<div class="method-description">
316
 
<p>Determine if this resource is of a given <a href="Resource.html#M000166">type</a></p>
317
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
318
 
<div class="method-source-code" id="M000163-source">
 
316
<p>Determine if this resource is of a given <a href="Resource.html#M000134">type</a></p>
 
317
<p><a class="source-toggle" href="#" onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
 
318
<div class="method-source-code" id="M000131-source">
319
319
<pre>
320
320
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 113</span>
321
321
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type?</span>(<span class="ruby-identifier">type</span>)
324
324
</pre></div>
325
325
</div>
326
326
</div>
327
 
<div id="method-M000164" class="method-detail"><a name="M000164" id="M000164"></a>
328
 
<div class="method-heading"><a href="#M000164" class="method-signature"><span class="method-name">update_property</span><span class="method-args">(prop,value,context=nil)</span></a></div>
 
327
<div id="method-M000132" class="method-detail"><a name="M000132" id="M000132"></a>
 
328
<div class="method-heading"><a href="#M000132" class="method-signature"><span class="method-name">update_property</span><span class="method-args">(prop,value,context=nil)</span></a></div>
329
329
<div class="method-description">
330
330
<p>Change the value of the given property</p>
331
 
<p><a class="source-toggle" href="#" onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
332
 
<div class="method-source-code" id="M000164-source">
 
331
<p><a class="source-toggle" href="#" onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
 
332
<div class="method-source-code" id="M000132-source">
333
333
<pre>
334
334
<span class="ruby-comment cmt"># File rdf/redland/resource.rb, line 118</span>
335
335
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_property</span>(<span class="ruby-identifier">prop</span>,<span class="ruby-identifier">value</span>,<span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>)
350
350
<a href="/docs/ruby.html" target="_parent">Ruby API Home</a>
351
351
</div>
352
352
 
353
 
<p>(C) Copyright 2004-2007 <a href="http://purl.org/net/dajobe/" target="_parent">Dave Beckett</a>, (C) Copyright 2004-2005 <a href="http://www.bristol.ac.uk/" target="_parent">University of Bristol</a></p>
 
353
<p>(C) Copyright 2004-2008 <a href="http://www.dajobe.org/" target="_parent">Dave Beckett</a>, (C) Copyright 2004-2005 <a href="http://www.bristol.ac.uk/" target="_parent">University of Bristol</a></p>
354
354
 
355
355
</div> <!-- end outerBlock -->
356
356