1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
<?xml version="1.0" ?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>docs/document.rd</title>
</head>
<body>
<h2><a name="label-0" id="label-0">BDB::XML::Document</a></h2><!-- RDLabel: "BDB::XML::Document" -->
<p>A Document is the unit of storage within a Container. A document consists
of content, a name, and a set of metadata attributes.</p>
<p>The document content is a byte stream. It must be well formed XML,
but need not be valid.</p>
<p>included module : Enumerable</p>
<h3><a name="label-1" id="label-1">Methods</a></h3><!-- RDLabel: "Methods" -->
<dl>
<dt><a name="label-2" id="label-2"><code>self[name]</code></a></dt><!-- RDLabel: "self[name]" -->
<dd>
Returns the value of the specified metadata.</dd>
<dt><a name="label-3" id="label-3"><code>self[name] = <var>val</var></code></a></dt><!-- RDLabel: "self[name] = val" -->
<dd>
Set the value of the specified metadata.</dd>
<dt><a name="label-4" id="label-4"><code>content</code></a></dt><!-- RDLabel: "content" -->
<dd>
Return the content of the document</dd>
<dt><a name="label-5" id="label-5"><code>content = <var>val</var></code></a></dt><!-- RDLabel: "content = val" -->
<dd>
Set the content of the document</dd>
<dt><a name="label-6" id="label-6"><code>each {|<var>uri</var>, <var>name</var>, <var>value</var>| ... }</code></a></dt><!-- RDLabel: "each" -->
<dt><a name="label-7" id="label-7"><code>each_metadata {|<var>uri</var>, <var>name</var>, <var>value</var>| ... }</code></a></dt><!-- RDLabel: "each_metadata" -->
<dd>
Iterate over all metadata</dd>
<dt><a name="label-8" id="label-8"><code>get_metadata(<var>uri</var>, <var>name</var>)</code></a></dt><!-- RDLabel: "get_metadata" -->
<dt><a name="label-9" id="label-9"><code>get_metadata(<var>name</var>)</code></a></dt><!-- RDLabel: "get_metadata" -->
<dt><a name="label-10" id="label-10"><code>get(<var>uri</var>, <var>name</var>)</code></a></dt><!-- RDLabel: "get" -->
<dt><a name="label-11" id="label-11"><code>get(<var>name</var>)</code></a></dt><!-- RDLabel: "get" -->
<dd>
Get the identified metadata from the document.
<ul>
<li><var>uri</var>
The namespace within which the name resides.</li>
<li><var>name</var>
The name of the metadata attribute to be retrieved.</li>
</ul></dd>
<dt><a name="label-12" id="label-12"><code>manager</code></a></dt><!-- RDLabel: "manager" -->
<dd>
Return the manager</dd>
<dt><a name="label-13" id="label-13"><code>name</code></a></dt><!-- RDLabel: "name" -->
<dd>
Return the name of the document</dd>
<dt><a name="label-14" id="label-14"><code>name = <var>val</var></code></a></dt><!-- RDLabel: "name = val" -->
<dd>
Set the name of the document</dd>
<dt><a name="label-15" id="label-15"><code>remove_metadata(<var>uri</var>, <var>name</var>)</code></a></dt><!-- RDLabel: "remove_metadata" -->
<dt><a name="label-16" id="label-16"><code>remove_metadata(<var>name</var>)</code></a></dt><!-- RDLabel: "remove_metadata" -->
<dd>
Remove the identified metadata from the document.
<ul>
<li><var>uri</var>
The namespace within which the name resides.</li>
<li><var>name</var>
The name of the metadata attribute to be removed.</li>
</ul></dd>
<dt><a name="label-17" id="label-17"><code>set_metadata(<var>name</var>, <var>value</var>)</code></a></dt><!-- RDLabel: "set_metadata" -->
<dt><a name="label-18" id="label-18"><code>set_metadata(<var>uri</var>, <var>name</var>, <var>value</var>)</code></a></dt><!-- RDLabel: "set_metadata" -->
<dt><a name="label-19" id="label-19"><code>set(<var>name</var>, <var>value</var>)</code></a></dt><!-- RDLabel: "set" -->
<dt><a name="label-20" id="label-20"><code>set(<var>uri</var>, <var>name</var>, <var>value</var>)</code></a></dt><!-- RDLabel: "set" -->
<dd>
Set the identified metadata from the document.
<ul>
<li><var>uri</var>
The namespace within which the name resides.</li>
<li><var>name</var>
The name of the metadata attribute to be set.</li>
<li><var>value</var>
an XML::Value object</li>
</ul></dd>
<dt><a name="label-21" id="label-21"><code>to_s</code></a></dt><!-- RDLabel: "to_s" -->
<dd>
Return the document as a String object</dd>
<dt><a name="label-22" id="label-22"><code>to_str</code></a></dt><!-- RDLabel: "to_str" -->
<dd>
same than <var>to_s</var></dd>
<dt><a name="label-23" id="label-23"><code>event_reader</code></a></dt><!-- RDLabel: "event_reader" -->
<dd>
Retrieve content as an XML::EventReader.</dd>
</dl>
</body>
</html>
|