The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Redland RDF Application Framework - Ruby RDoc - Class: Redland::Namespace</title>
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
  
  // ]]>
</script>
</head>
<body>
<div class="outerBlock">

<div class="outerHeader">
Go to <a href="/" target="_parent">Redland Home</a> - 
<a href="/bindings/" target="_parent">Language Bindings Home</a> - 
<a href="/docs/ruby.html" target="_parent">Ruby API Home</a>
</div>

<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">Redland::Namespace</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td><a href="../../files/rdf/redland/node_rb.html">rdf/redland/node.rb</a><br /></td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td><a href="Node.html">Node</a></td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
<div id="description">
<p>A helper class for namespace. Caches the nodes for a given namespaces</p>
<pre>
 foaf = Namespace.new('http://xmlns.com/0.1/foaf/')
 model.find(nil,foaf['name'],'Dominic')
 puts foaf['name'] =&gt; http://xmlns.com/0.1/foaf/name
</pre></div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list"><a href="#M000104">[]</a>&nbsp;&nbsp; <a href="#M000103">new</a>&nbsp;&nbsp;</div>
</div>
</div>
<!-- if includes -->
<div id="section"><!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
<div id="method-M000103" class="method-detail"><a name="M000103" id="M000103"></a>
<div class="method-heading"><a href="#M000103" class="method-signature"><span class="method-name">new</span><span class="method-args">(namespace)</span></a></div>
<div class="method-description">
<p><a class="source-toggle" href="#" onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000103-source">
<pre>
<span class="ruby-comment cmt"># File rdf/redland/node.rb, line 198</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">namespace</span>)
      <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">:uri_string=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">namespace</span>)
      <span class="ruby-ivar">@nodecache</span> = {}
    <span class="ruby-keyword kw">end</span>
</pre></div>
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000104" class="method-detail"><a name="M000104" id="M000104"></a>
<div class="method-heading"><a href="#M000104" class="method-signature"><span class="method-name">[]</span><span class="method-args">(item)</span></a></div>
<div class="method-description">
<p><a class="source-toggle" href="#" onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000104-source">
<pre>
<span class="ruby-comment cmt"># File rdf/redland/node.rb, line 203</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">item</span>)
      <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">the_node</span>(<span class="ruby-identifier">item</span>)
    <span class="ruby-keyword kw">end</span>
</pre></div>
</div>
</div>
</div>
</div>
<hr />

<div class="outerHeader">
Go to <a href="/" target="_parent">Redland Home</a> - 
<a href="/bindings/" target="_parent">Language Bindings Home</a> - 
<a href="/docs/ruby.html" target="_parent">Ruby API Home</a>
</div>

<p>(C) Copyright 2004-2011 <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>

</div> <!-- end outerBlock -->

</body>
</html>