/usr/share/doc/python-swap/thing.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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module thing</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>thing</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/yosi/CVSROOT/WWW/2000/10/swap/thing.py">/Users/yosi/CVSROOT/WWW/2000/10/swap/thing.py</a></font></td></tr></table>
<p><tt>$Id: thing.html,v 1.23 2007/06/27 17:58:39 syosi Exp $<br>
<br>
OBSOLETE<br>
This module was too much of a mixture. See<br>
<br>
- myStore.py to import to set up a default store for your program, and <a href="#Namespace">Namespace</a>.<br>
- term.py to define the class of <a href="#Term">Term</a> and some subclasses.<br>
<br>
Was: Interning of URIs and strings for storage in SWAP store<br>
<br>
Includes:<br>
- template classes for builtins</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="binascii.html">binascii</a><br>
<a href="md5.html">md5</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="uripath.html">uripath</a><br>
<a href="urllib.html">urllib</a><br>
</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="thing.html#Namespace">Namespace</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="thing.html#Term">Term</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#CompoundTerm">CompoundTerm</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#List">List</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#EmptyList">EmptyList</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#FragmentNil">FragmentNil</a>(<a href="thing.html#EmptyList">EmptyList</a>, <a href="thing.html#Fragment">Fragment</a>)
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="thing.html#NonEmptyList">NonEmptyList</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="thing.html#Fragment">Fragment</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#Anonymous">Anonymous</a>
</font></dt><dt><font face="helvetica, arial"><a href="thing.html#BuiltIn">BuiltIn</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#Function">Function</a>
</font></dt><dt><font face="helvetica, arial"><a href="thing.html#HeavyBuiltIn">HeavyBuiltIn</a>
</font></dt><dt><font face="helvetica, arial"><a href="thing.html#LightBuiltIn">LightBuiltIn</a>
</font></dt><dt><font face="helvetica, arial"><a href="thing.html#ReverseFunction">ReverseFunction</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="thing.html#Literal">Literal</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="thing.html#Integer">Integer</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="thing.html#Symbol">Symbol</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="Anonymous">class <strong>Anonymous</strong></a>(<a href="thing.html#Fragment">Fragment</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#Anonymous">Anonymous</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Anonymous-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<dl><dt><a name="Anonymous-asPair"><strong>asPair</strong></a>(self)</dt></dl>
<dl><dt><a name="Anonymous-generated"><strong>generated</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="Anonymous-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="Anonymous-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="Anonymous-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="Anonymous-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Anonymous-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="Anonymous-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Anonymous-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="Anonymous-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Anonymous-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Anonymous-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="BuiltIn">class <strong>BuiltIn</strong></a>(<a href="thing.html#Fragment">Fragment</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>This class is a supercalss to any builtin predicate in cwm.<br>
<br>
A binary operator can calculate truth value given 2 arguments<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#BuiltIn">BuiltIn</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="BuiltIn-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<dl><dt><a name="BuiltIn-eval"><strong>eval</strong></a>(self, subj, obj, queue, bindings, proof, query)</dt><dd><tt>This function which has access to the store, unless overridden,<br>
calls a simpler one which uses python conventions.<br>
<br>
To reduce confusion, the inital ones called with the internals available<br>
use abreviations "eval", "subj" etc while the python-style ones use evaluate, subject, etc.</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="BuiltIn-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="BuiltIn-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="BuiltIn-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="BuiltIn-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="BuiltIn-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="BuiltIn-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="BuiltIn-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="BuiltIn-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="BuiltIn-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="BuiltIn-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="BuiltIn-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="BuiltIn-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="CompoundTerm">class <strong>CompoundTerm</strong></a>(<a href="thing.html#Term">Term</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A compound term has occurrences of terms within it.<br>
Examples: <a href="#List">List</a>, Formula<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="CompoundTerm-__init__"><strong>__init__</strong></a>(self, store<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="CompoundTerm-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="CompoundTerm-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="CompoundTerm-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="CompoundTerm-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="CompoundTerm-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="CompoundTerm-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
<dl><dt><a name="CompoundTerm-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="CompoundTerm-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="CompoundTerm-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="EmptyList">class <strong>EmptyList</strong></a>(<a href="thing.html#List">List</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#EmptyList">EmptyList</a></dd>
<dd><a href="thing.html#List">List</a></dd>
<dd><a href="thing.html#CompoundTerm">CompoundTerm</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="EmptyList-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="EmptyList-newList"><strong>newList</strong></a>(self, value)</dt></dl>
<dl><dt><a name="EmptyList-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="EmptyList-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="EmptyList-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="EmptyList-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="EmptyList-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#List">List</a>:<br>
<dl><dt><a name="EmptyList-__init__"><strong>__init__</strong></a>(self, store, first, rest)</dt></dl>
<dl><dt><a name="EmptyList-__iter__"><strong>__iter__</strong></a>(self)</dt><dd><tt>The internal method which allows one to iterate over the statements<br>
as though a formula were a sequence.</tt></dd></dl>
<dl><dt><a name="EmptyList-asSequence"><strong>asSequence</strong></a>(self)</dt><dd><tt>Convert to a python sequence - NOT recursive</tt></dd></dl>
<dl><dt><a name="EmptyList-precededBy"><strong>precededBy</strong></a>(self, first)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="EmptyList-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="EmptyList-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="EmptyList-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="EmptyList-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
</td></tr></table> <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="Fragment">class <strong>Fragment</strong></a>(<a href="thing.html#Term">Term</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A <a href="#Term">Term</a> which DOES have a fragment id in its URI<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Fragment-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<dl><dt><a name="Fragment-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="Fragment-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="Fragment-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="Fragment-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="Fragment-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Fragment-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="Fragment-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="Fragment-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Fragment-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="Fragment-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Fragment-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Fragment-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="FragmentNil">class <strong>FragmentNil</strong></a>(<a href="thing.html#EmptyList">EmptyList</a>, <a href="thing.html#Fragment">Fragment</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>This is unique in being both a symbol and a list<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#FragmentNil">FragmentNil</a></dd>
<dd><a href="thing.html#EmptyList">EmptyList</a></dd>
<dd><a href="thing.html#List">List</a></dd>
<dd><a href="thing.html#CompoundTerm">CompoundTerm</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="FragmentNil-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#EmptyList">EmptyList</a>:<br>
<dl><dt><a name="FragmentNil-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="FragmentNil-newList"><strong>newList</strong></a>(self, value)</dt></dl>
<dl><dt><a name="FragmentNil-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="FragmentNil-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="FragmentNil-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="FragmentNil-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="FragmentNil-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#List">List</a>:<br>
<dl><dt><a name="FragmentNil-__iter__"><strong>__iter__</strong></a>(self)</dt><dd><tt>The internal method which allows one to iterate over the statements<br>
as though a formula were a sequence.</tt></dd></dl>
<dl><dt><a name="FragmentNil-asSequence"><strong>asSequence</strong></a>(self)</dt><dd><tt>Convert to a python sequence - NOT recursive</tt></dd></dl>
<dl><dt><a name="FragmentNil-precededBy"><strong>precededBy</strong></a>(self, first)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="FragmentNil-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="FragmentNil-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="FragmentNil-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="FragmentNil-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="FragmentNil-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="FragmentNil-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
</td></tr></table> <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="Function">class <strong>Function</strong></a>(<a href="thing.html#BuiltIn">BuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A function is a builtin which can calculate its <a href="__builtin__.html#object">object</a> given its subject.<br>
<br>
To get cwm to invoke it this way, your built-in must be a subclass of <a href="#Function">Function</a>.<br>
I may make changes to clean up the parameters of these methods below some day. -tbl<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#Function">Function</a></dd>
<dd><a href="thing.html#BuiltIn">BuiltIn</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Function-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="Function-eval"><strong>eval</strong></a>(self, subj, obj, queue, bindings, proof, query)</dt></dl>
<dl><dt><a name="Function-evalObj"><strong>evalObj</strong></a>(self, subj, queue, bindings, proof, query)</dt><dd><tt>This function which has access to the store, unless overridden,<br>
calls a simpler one which uses python conventions.<br>
<br>
To reduce confusion, the inital ones called with the internals available<br>
use abreviations "eval", "subj" etc while the python-style ones use "evaluate", "subject", etc.</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="Function-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="Function-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="Function-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="Function-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="Function-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Function-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="Function-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="Function-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Function-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="Function-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Function-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Function-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="HeavyBuiltIn">class <strong>HeavyBuiltIn</strong></a>(<a href="thing.html#BuiltIn">BuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A heavy built-in is fast and is calculated late, after searching the store<br>
to see if the answer is already in it.<br>
<br>
Make your built-in a subclass of either this or LightBultIn to tell cwm when to<br>
run it. Going out onto the web or net counts as Heavy.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#HeavyBuiltIn">HeavyBuiltIn</a></dd>
<dd><a href="thing.html#BuiltIn">BuiltIn</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods inherited from <a href="thing.html#BuiltIn">BuiltIn</a>:<br>
<dl><dt><a name="HeavyBuiltIn-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<dl><dt><a name="HeavyBuiltIn-eval"><strong>eval</strong></a>(self, subj, obj, queue, bindings, proof, query)</dt><dd><tt>This function which has access to the store, unless overridden,<br>
calls a simpler one which uses python conventions.<br>
<br>
To reduce confusion, the inital ones called with the internals available<br>
use abreviations "eval", "subj" etc while the python-style ones use evaluate, subject, etc.</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="HeavyBuiltIn-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="HeavyBuiltIn-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="HeavyBuiltIn-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="HeavyBuiltIn-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="HeavyBuiltIn-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="Integer">class <strong>Integer</strong></a>(<a href="thing.html#Literal">Literal</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#Integer">Integer</a></dd>
<dd><a href="thing.html#Literal">Literal</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Integer-__init__"><strong>__init__</strong></a>(self, store, str)</dt></dl>
<dl><dt><a name="Integer-__int__"><strong>__int__</strong></a>(self)</dt></dl>
<dl><dt><a name="Integer-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Integer-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Integer-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Integer-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Literal">Literal</a>:<br>
<dl><dt><a name="Integer-asHashURI"><strong>asHashURI</strong></a>(self)</dt><dd><tt>return a md5: URI for this literal.<br>
Hmm... encoding... assuming utf8? @@test this.<br>
Hmm... for a class of literals including this one,<br>
strictly speaking.</tt></dd></dl>
<dl><dt><a name="Integer-asPair"><strong>asPair</strong></a>(self)</dt></dl>
<dl><dt><a name="Integer-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Integer-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:value "un expression quelconque"@fr ]</tt></dd></dl>
<dl><dt><a name="Integer-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Integer-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Integer-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Integer-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="Integer-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
</td></tr></table> <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="LightBuiltIn">class <strong>LightBuiltIn</strong></a>(<a href="thing.html#BuiltIn">BuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A light built-in is fast and is calculated immediately before searching the store.<br>
<br>
Make your built-in a subclass of either this or HeavyBultIn to tell cwm when to<br>
run it. Going out onto the web or net counts as heavy.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#LightBuiltIn">LightBuiltIn</a></dd>
<dd><a href="thing.html#BuiltIn">BuiltIn</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods inherited from <a href="thing.html#BuiltIn">BuiltIn</a>:<br>
<dl><dt><a name="LightBuiltIn-__init__"><strong>__init__</strong></a>(self, resource, fragid)</dt></dl>
<dl><dt><a name="LightBuiltIn-eval"><strong>eval</strong></a>(self, subj, obj, queue, bindings, proof, query)</dt><dd><tt>This function which has access to the store, unless overridden,<br>
calls a simpler one which uses python conventions.<br>
<br>
To reduce confusion, the inital ones called with the internals available<br>
use abreviations "eval", "subj" etc while the python-style ones use evaluate, subject, etc.</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="LightBuiltIn-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="LightBuiltIn-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="LightBuiltIn-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="LightBuiltIn-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="LightBuiltIn-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="List">class <strong>List</strong></a>(<a href="thing.html#CompoundTerm">CompoundTerm</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#List">List</a></dd>
<dd><a href="thing.html#CompoundTerm">CompoundTerm</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="List-__init__"><strong>__init__</strong></a>(self, store, first, rest)</dt></dl>
<dl><dt><a name="List-__iter__"><strong>__iter__</strong></a>(self)</dt><dd><tt>The internal method which allows one to iterate over the statements<br>
as though a formula were a sequence.</tt></dd></dl>
<dl><dt><a name="List-asSequence"><strong>asSequence</strong></a>(self)</dt><dd><tt>Convert to a python sequence - NOT recursive</tt></dd></dl>
<dl><dt><a name="List-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt><dd><tt>Which variables in the list occur in this list?</tt></dd></dl>
<dl><dt><a name="List-precededBy"><strong>precededBy</strong></a>(self, first)</dt></dl>
<dl><dt><a name="List-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="List-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="List-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="List-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="List-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="List-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="List-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="List-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
<dl><dt><a name="List-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
</td></tr></table> <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="Literal">class <strong>Literal</strong></a>(<a href="thing.html#Term">Term</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A <a href="#Literal">Literal</a> is a representation of an RDF literal<br>
<br>
really, data:text/rdf+n3;%22hello%22 == "hello" but who<br>
wants to store it that way? Maybe we do... at least in theory and maybe<br>
practice but, for now, we keep them in separate subclases of <a href="#Term">Term</a>.<br>
An RDF literal has a value - by default a string, and a datattype, and a language<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Literal-__init__"><strong>__init__</strong></a>(self, store, string, dt<font color="#909090">=None</font>, lang<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Literal-__int__"><strong>__int__</strong></a>(self)</dt></dl>
<dl><dt><a name="Literal-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Literal-__str__"><strong>__str__</strong></a>(self)</dt></dl>
<dl><dt><a name="Literal-asHashURI"><strong>asHashURI</strong></a>(self)</dt><dd><tt>return a md5: URI for this literal.<br>
Hmm... encoding... assuming utf8? @@test this.<br>
Hmm... for a class of literals including this one,<br>
strictly speaking.</tt></dd></dl>
<dl><dt><a name="Literal-asPair"><strong>asPair</strong></a>(self)</dt></dl>
<dl><dt><a name="Literal-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Literal-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:value "un expression quelconque"@fr ]</tt></dd></dl>
<dl><dt><a name="Literal-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Literal-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Literal-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Literal-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="Literal-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Literal-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="Literal-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
</td></tr></table> <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>
>>> RDF.type<br>
'<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</a>'<br>
>>> RDF.type is RDF.type<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 <a href="#Symbol">Symbol</a> 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-__init__"><strong>__init__</strong></a>(self, name)</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> <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="NonEmptyList">class <strong>NonEmptyList</strong></a>(<a href="thing.html#List">List</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#NonEmptyList">NonEmptyList</a></dd>
<dd><a href="thing.html#List">List</a></dd>
<dd><a href="thing.html#CompoundTerm">CompoundTerm</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="NonEmptyList-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="NonEmptyList-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#List">List</a>:<br>
<dl><dt><a name="NonEmptyList-__init__"><strong>__init__</strong></a>(self, store, first, rest)</dt></dl>
<dl><dt><a name="NonEmptyList-__iter__"><strong>__iter__</strong></a>(self)</dt><dd><tt>The internal method which allows one to iterate over the statements<br>
as though a formula were a sequence.</tt></dd></dl>
<dl><dt><a name="NonEmptyList-asSequence"><strong>asSequence</strong></a>(self)</dt><dd><tt>Convert to a python sequence - NOT recursive</tt></dd></dl>
<dl><dt><a name="NonEmptyList-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt><dd><tt>Which variables in the list occur in this list?</tt></dd></dl>
<dl><dt><a name="NonEmptyList-precededBy"><strong>precededBy</strong></a>(self, first)</dt></dl>
<dl><dt><a name="NonEmptyList-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="NonEmptyList-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="NonEmptyList-value"><strong>value</strong></a>(self)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="NonEmptyList-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="NonEmptyList-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="NonEmptyList-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="NonEmptyList-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
</td></tr></table> <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="ReverseFunction">class <strong>ReverseFunction</strong></a>(<a href="thing.html#BuiltIn">BuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A reverse function is a builtin which can calculate its subject given its <a href="__builtin__.html#object">object</a>.<br>
<br>
To get cwm to invoke it this way, your built-in must be a subclass of <a href="#ReverseFunction">ReverseFunction</a>.<br>
If a function (like log:uri for example) is a two-way (1:1) builtin, it should be declared<br>
a subclass of <a href="#Function">Function</a> and <a href="#ReverseFunction">ReverseFunction</a>. Then, cwm will call it either way as needed<br>
in trying to resolve a query.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="thing.html#ReverseFunction">ReverseFunction</a></dd>
<dd><a href="thing.html#BuiltIn">BuiltIn</a></dd>
<dd><a href="thing.html#Fragment">Fragment</a></dd>
<dd><a href="thing.html#Term">Term</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="ReverseFunction-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="ReverseFunction-eval"><strong>eval</strong></a>(self, subj, obj, queue, bindings, proof, query)</dt></dl>
<dl><dt><a name="ReverseFunction-evalSubj"><strong>evalSubj</strong></a>(self, obj, queue, bindings, proof, query)</dt><dd><tt>This function which has access to the store, unless overridden,<br>
calls a simpler one which uses python conventions</tt></dd></dl>
<hr>
Methods inherited from <a href="thing.html#Fragment">Fragment</a>:<br>
<dl><dt><a name="ReverseFunction-generated"><strong>generated</strong></a>(self)</dt><dd><tt>A generated identifier?<br>
This arises when a document is parsed and a arbitrary<br>
name is made up to represent a node with no known URI.<br>
It is useful to know that its ID has no use outside that<br>
context.</tt></dd></dl>
<dl><dt><a name="ReverseFunction-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/#whatever">http://example.org/#whatever</a>"]</tt></dd></dl>
<dl><dt><a name="ReverseFunction-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>Optimize output if prefixes available</tt></dd></dl>
<dl><dt><a name="ReverseFunction-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="ReverseFunction-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="ReverseFunction-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="ReverseFunction-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="ReverseFunction-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="ReverseFunction-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="ReverseFunction-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="ReverseFunction-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="ReverseFunction-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="Symbol">class <strong>Symbol</strong></a>(<a href="thing.html#Term">Term</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A <a href="#Term">Term</a> which has no fragment<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Symbol-__init__"><strong>__init__</strong></a>(self, uri, store<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Symbol-internAnonymous"><strong>internAnonymous</strong></a>(r, fragid)</dt></dl>
<dl><dt><a name="Symbol-internFrag"><strong>internFrag</strong></a>(self, fragid, thetype)</dt></dl>
<dl><dt><a name="Symbol-reification"><strong>reification</strong></a>(self, sink, why<font color="#909090">=None</font>)</dt><dd><tt>Describe myself in RDF to the given context<br>
<br>
[ reify:uri "<a href="http://example.org/whatever">http://example.org/whatever</a>"]</tt></dd></dl>
<dl><dt><a name="Symbol-uriref"><strong>uriref</strong></a>(self)</dt></dl>
<dl><dt><a name="Symbol-uriref2"><strong>uriref2</strong></a>(self, base)</dt></dl>
<hr>
Methods inherited from <a href="thing.html#Term">Term</a>:<br>
<dl><dt><a name="Symbol-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="Symbol-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="Symbol-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="Symbol-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Symbol-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="Symbol-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
<dl><dt><a name="Symbol-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Symbol-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Symbol-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></dl>
</td></tr></table> <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="Term">class <strong>Term</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The <a href="#Term">Term</a> <a href="__builtin__.html#object">object</a> represents an RDF term.<br>
<br>
It is interned for speed of processing by the store.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Term-__init__"><strong>__init__</strong></a>(self, store<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Term-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>This method only used for debugging output - it can be ambiguous,<br>
as it is is deliberately short to make debug printout readable.</tt></dd></dl>
<dl><dt><a name="Term-asPair"><strong>asPair</strong></a>(self)</dt><dd><tt>Representation in an earlier format, being phased out 2002/08<br>
<br>
The first part of the pair is a constant number represnting the type<br>
see RDFSink.py. the second is the value -- uri for symbols, string for literals</tt></dd></dl>
<dl><dt><a name="Term-generated"><strong>generated</strong></a>(self)</dt><dd><tt>Boolean Is this thing a genid - is its name arbitrary?</tt></dd></dl>
<dl><dt><a name="Term-occurringIn"><strong>occurringIn</strong></a>(self, vars)</dt></dl>
<dl><dt><a name="Term-qname"><strong>qname</strong></a>(self)</dt><dd><tt>Output XML qnames [<a href="http://www.w3.org/TR/REC-xml-names/#NT-QName">http://www.w3.org/TR/REC-xml-names/#NT-QName</a>].<br>
This should be beefed up to guarantee unambiguity (see __repr__ documentation).</tt></dd></dl>
<dl><dt><a name="Term-representation"><strong>representation</strong></a>(self, base<font color="#909090">=None</font>)</dt><dd><tt>The string represnting this in N3</tt></dd></dl>
<dl><dt><a name="Term-substitution"><strong>substitution</strong></a>(self, bindings, why<font color="#909090">=None</font>)</dt><dd><tt>Return this or a version of me with subsitution made</tt></dd></dl>
<dl><dt><a name="Term-unify"><strong>unify</strong></a>(self, other, vars, existentials, bindings)</dt><dd><tt>Unify this which may contain variables with the other,<br>
which may contain existentials but not variables.<br>
Return 0 if impossible.<br>
Return [(var1, val1), (var2,val2)...] if match</tt></dd></dl>
<dl><dt><a name="Term-value"><strong>value</strong></a>(self)</dt><dd><tt>As a python value - by default, none exists, use self</tt></dd></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="-bNode"><strong>bNode</strong></a>(str, context)</dt><dd><tt>Create or reuse, in the default store, a new unnamed node within the given<br>
formula as context, and return it for future use</tt></dd></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="-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 the given literal string<br>
and return it for future use</tt></dd></dl>
<dl><dt><a name="-load"><strong>load</strong></a>(uri<font color="#909090">=None</font>, contentType<font color="#909090">=None</font>, formulaURI<font color="#909090">=None</font>, remember<font color="#909090">=1</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)</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="-merge"><strong>merge</strong></a>(a, b)</dt><dd><tt>Merge sorted sequences<br>
<br>
The fact that the sequences are sorted makes this faster</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, in the default store, an interned version of the given symbol<br>
and return it for future use</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>
<dl><dt><a name="-uri_encode"><strong>uri_encode</strong></a>(str)</dt><dd><tt>untested - this must be in a standard library somewhere</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>ALL4</strong> = (0, 1, 2, 3)<br>
<strong>ANONYMOUS</strong> = 3<br>
<strong>BOUNDLISTS</strong> = 4<br>
<strong>CONSTS</strong> = 2<br>
<strong>CONTEXT</strong> = 0<br>
<strong>FORMULA</strong> = 1<br>
<strong>INFINITY</strong> = 1000000000<br>
<strong>LITERAL</strong> = 2<br>
<strong>LITERAL_URI_prefix</strong> = 'data:text/rdf+n3;'<br>
<strong>List_NS</strong> = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'<br>
<strong>Logic_NS</strong> = 'http://www.w3.org/2000/10/swap/log#'<br>
<strong>OBJ</strong> = 3<br>
<strong>PARTS</strong> = (1, 2, 3)<br>
<strong>PRED</strong> = 1<br>
<strong>QUAD</strong> = 5<br>
<strong>SHORT</strong> = 1<br>
<strong>STATE</strong> = 0<br>
<strong>SUBJ</strong> = 2<br>
<strong>SYMBOL</strong> = 0<br>
<strong>VARS</strong> = 3<br>
<strong>generators</strong> = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 4096)<br>
<strong>reify</strong> = <thing.Namespace object><br>
<strong>store</strong> = None<br>
<strong>storeClass</strong> = None<br>
<strong>subcontext_cache_context</strong> = None<br>
<strong>subcontext_cache_subcontexts</strong> = None</td></tr></table>
</body></html>
|