/usr/share/doc/python-swap/myStore.html is in python-swap 1.2.1-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module myStore</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>myStore</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/syosi/cvs-trunk/WWW/2000/10/swap/myStore.py">/home/syosi/cvs-trunk/WWW/2000/10/swap/myStore.py</a></font></td></tr></table>
<p><tt>$Id: myStore.html,v 1.13 2007/11/18 02:01:56 syosi Exp $<br>
<br>
Process-global store<br>
<br>
Global variables are often a bad idea. However, the majority of cwm<br>
applications involve just one RDF store. One store can contain many<br>
formulae. The main thing which these formulae of the same store share<br>
is the index with which names and strings are interned. Within a<br>
store, you can compare things by comparing memory addresses rather<br>
than the whole tring, uri or list.<br>
<br>
Therefore, it is normal to just use one store. When you do this, the<br>
store paremeter to most methods beceomes unnecessary, and you get a<br>
simpler API. That is what this module does. If you import it, you<br>
will get a global store. This will not stop you using other stores.<br>
<br>
You also get the <a href="#Namespace">Namespace</a>() class which allows you to generate<br>
symbols easily.<br>
<br>
History:<br>
Spilt off from thing.py 2003-08-19<br>
<br>
$Log: myStore.html,v $
Revision 1.13 2007/11/18 02:01:56 syosi
closer to getting release process to run
only problem in tests now is double-proof.n3
<br>
Revision 1.14 2007/08/06 16:13:56 syosi<br>
A month of changes<br>
<br>
Revision 1.13 2007/06/26 02:36:15 syosi<br>
fix tabs<br>
<br>
Revision 1.12 2005/10/24 16:58:38 timbl<br>
--n3=B flag introduced. --why improved but not perfect.<br>
<br>
Revision 1.11 2004/08/08 01:44:49 syosi<br>
undo what I did last thing Friday. Those changes are nowhere near ready for the trunk<br>
<br>
Revision 1.9 2004/07/29 16:16:11 syosi<br>
rdflib tests in the default test suite<br>
<br>
Revision 1.8 2004/04/19 13:32:22 connolly<br>
trap __special_names__ in <a href="#Namespace">Namespace</a>.__getattr__ so<br>
that pychecker can work<br>
<br>
Revision 1.7 2004/03/21 04:24:35 timbl<br>
(See doc/changes.html)<br>
on xml output, nodeID was incorrectly spelled.<br>
update.py provides cwm's --patch option.<br>
diff.py as independent progrem generates patch files for cwm --patch<br>
<br>
Revision 1.6 2004/03/09 23:55:50 connolly<br>
updated load to track change in llyn<br>
<br>
Revision 1.5 2004/03/06 20:39:38 timbl<br>
See <a href="http://www.w3.org/2000/10/swap/doc/changes.html">http://www.w3.org/2000/10/swap/doc/changes.html</a> for details<br>
- Regresssion test incorporates the RDF Core Positive Parser Tests except XMLLiteral & reification<br>
- xml:base support was added in the parser.<br>
- Use the --rdf=R flag to allow RDF to be parsed even when there is no enveloping <rdf:RDF> tag<br>
- nodeid generated on RDF output<br>
- Automatically generated terms with no URIs sort after anything which has a URI.<br>
- <a href="#Namespace">Namespace</a> prefix smarts on output - default ns used for that most frequently used.<br>
- suppresses namespace prefix declarations which are not actually needed in the output.<br>
- Cwm will also make up prefixes when it needs them for a namespace, and none of the input data uses one.-<br>
- Will not use namespace names for URIs which do not have a "#". Including a "/" in the flags overrides.<br>
<br>
Revision 1.4 2004/01/29 21:10:39 timbl<br>
ooops - ref to SYMBOL<br>
<br>
Revision 1.3 2004/01/28 23:03:00 connolly<br>
- added unit tests to confirm that symbol functions take ustrings<br>
- wrapped some comments at 79 chars<br>
per <a href="http://www.python.org/doc/essays/styleguide.html">http://www.python.org/doc/essays/styleguide.html</a></tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="uripath.html">uripath</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="myStore.html#Namespace">Namespace</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Namespace">class <strong>Namespace</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A shortcut for getting a symbols as interned by the default store<br>
<br>
>>> RDF = <a href="#Namespace">Namespace</a>('<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns">http://www.w3.org/1999/02/22-rdf-syntax-ns</a>#')<br>
>>> x = RDF.type<br>
>>> y = RDF.type<br>
>>> x is y<br>
1<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Namespace-__getattr__"><strong>__getattr__</strong></a>(self, lname)</dt><dd><tt>get the lname Symbol in this namespace.<br>
<br>
lname -- an XML name (limited to URI characters)<br>
I hope this is only called *after* the ones defines above have been checked</tt></dd></dl>
<dl><dt><a name="Namespace-__getitem__"><strong>__getitem__</strong></a> = <a href="#Namespace-sym">sym</a>(self, lname)</dt></dl>
<dl><dt><a name="Namespace-__init__"><strong>__init__</strong></a>(self, name, store<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Namespace-sym"><strong>sym</strong></a>(self, lname)</dt><dd><tt>For getting a symbol for an expression, rather than a constant.<br>
For, and from, pim/toIcal.py</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'Namespace' objects><dd><tt>list of weak references to the <a href="__builtin__.html#object">object</a> (if defined)</tt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-bind"><strong>bind</strong></a>(prefix, uri)</dt></dl>
<dl><dt><a name="-existential"><strong>existential</strong></a>(str, context, uri)</dt><dd><tt>Create or reuse, in the default store, a new named variable<br>
existentially qualified within the given<br>
formula as context, and return it for future use</tt></dd></dl>
<dl><dt><a name="-formula"><strong>formula</strong></a>()</dt><dd><tt>Create or reuse, in the default store, a new empty formula (triple people think: triple store)<br>
and return it for future use</tt></dd></dl>
<dl><dt><a name="-intern"><strong>intern</strong></a>(v)</dt></dl>
<dl><dt><a name="-literal"><strong>literal</strong></a>(str, dt<font color="#909090">=None</font>, lang<font color="#909090">=None</font>)</dt><dd><tt>Create or reuse, in the default store, an interned version of<br>
the given literal string and return it for future use<br>
<br>
>>> x = <a href="#-literal">literal</a>("#Andr\xe9")<br>
>>> y = <a href="#-literal">literal</a>("#Andr\xe9")<br>
>>> x is y<br>
1</tt></dd></dl>
<dl><dt><a name="-load"><strong>load</strong></a>(uri<font color="#909090">=None</font>, openFormula<font color="#909090">=None</font>, contentType<font color="#909090">=None</font>, remember<font color="#909090">=1</font>, flags<font color="#909090">=''</font>)</dt><dd><tt>Get and parse document. Guesses format if necessary.<br>
<br>
uri: if None, load from standard input.<br>
remember: if 1, store as metadata the relationship between this URI and this formula.<br>
<br>
Returns: top-level formula of the parsed document.<br>
Raises: IOError, SyntaxError, DocumentError</tt></dd></dl>
<dl><dt><a name="-loadMany"><strong>loadMany</strong></a>(uris, openFormula<font color="#909090">=None</font>, referer<font color="#909090">=None</font>)</dt><dd><tt>Load a number of resources into the same formula<br>
<br>
Returns: top-level formula of the parsed information.<br>
Raises: IOError, SyntaxError, DocumentError</tt></dd></dl>
<dl><dt><a name="-setStore"><strong>setStore</strong></a>(s)</dt><dd><tt>Set the process-global default store to be used when an explicit store is not</tt></dd></dl>
<dl><dt><a name="-setStoreClass"><strong>setStoreClass</strong></a>(c)</dt><dd><tt>Set the process-global class to be used to generate a new store if needed</tt></dd></dl>
<dl><dt><a name="-symbol"><strong>symbol</strong></a>(uri)</dt><dd><tt>Create or reuse an interned version of the given symbol<br>
in the default store. and return it for future use<br>
<br>
>>> x = <a href="#-symbol">symbol</a>(u'<a href="http://example.org/#Andr\xe9">http://example.org/#Andr\xe9</a>')<br>
>>> y = <a href="#-symbol">symbol</a>(u'<a href="http://example.org/#Andr\xe9">http://example.org/#Andr\xe9</a>')<br>
>>> x is y<br>
1</tt></dd></dl>
<dl><dt><a name="-universal"><strong>universal</strong></a>(str, context, uri)</dt><dd><tt>Create or reuse, in the default store, a named variable<br>
universally qualified within the given<br>
formula as context, and return it for future use</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>store</strong> = None<br>
<strong>storeClass</strong> = None</td></tr></table>
</body></html>
|