wildwood/docs/codox/wildwood.knowledge-accessor.html

12 lines
8.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>wildwood.knowledge-accessor documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Wildwood</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="AgainstTruth.html"><div class="inner"><span>Against Truth</span></div></a></li><li class="depth-1 "><a href="Analysis.html"><div class="inner"><span>Analysis</span></div></a></li><li class="depth-1 "><a href="Arboretum.html"><div class="inner"><span>Arboretum</span></div></a></li><li class="depth-1 "><a href="Arden.html"><div class="inner"><span>Arden</span></div></a></li><li class="depth-1 "><a href="BatesonKammerer.html"><div class="inner"><span>The Bateson / Kammerer debate</span></div></a></li><li class="depth-1 "><a href="Bialowieza.html"><div class="inner"><span>Bialowieza</span></div></a></li><li class="depth-1 "><a href="Errata.html"><div class="inner"><span>Errata</span></div></a></li><li class="depth-1 "><a href="Experience.html"><div class="inner"><span>Experience</span></div></a></li><li class="depth-1 "><a href="HegemonicArgument.html"><div class="inner"><span>Hegemonic Argument</span></div></a></li><li class="depth-1 "><a href="History.html"><div class="inner"><span>History</span></div></a></li><li class="depth-1 "><a href="HuxleyKropotkin.html"><div class="inner"><span>The Huxley / Kropotkin debate</span></div></a></li><li class="depth-1 "><a href="Implementing.html"><div class="inner"><span>Implementing</span></div></a></li><li class="depth-1 "><a href="JAccuse.html"><div class="inner"><span>J'Accuse</span></div></a></li><li class="depth-1 "><a href="KnacqTools.html"><div class="inner"><span>KnacqTools</span></div></a></li><li class="depth-1 "><a href="Manifesto.html"><div class="inner"><span>Manifesto</span></div></a></li><li class="depth-1 "><a href="OnHylasAndPhilonus.html"><div class="inner"><span>On the First Dialogue of Hylas and Philonous</span></div></a></li><li class="depth-1 "><a href="TheProblem.html"><div class="inner"><span>The Problem</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to Wildwood</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>wildwood</span></div></div></li><li class="depth-2 branch"><a href="wildwood.advocate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>advocate</span></div></a></li><li class="depth-2 branch"><a href="wildwood.bialowieza.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bialowieza</span></div></a></li><li class="depth-2 branch"><a href="wildwood.caesar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>caesar</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dengine</span></div></div></li><li class="depth-3 branch"><a href="wildwood.dengine.engine.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>engine</span></div></a></li><li class="depth-3"><a href="wildwood.dengine.node.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>node</span></div></a></li><li class="depth-2 branch current"><a href="wildwood.knowledge-accessor.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>knowledge-accessor</span></div></a></li><li class="depth-2 branch"><a href="wildwood.mongo-ka.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mongo-ka</span></div></a></li><li class="depth-2"><a href="wildwood.schema.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>schema</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="wildwood.knowledge-accessor.html#var-Accessor"><div class="inner"><span>Accessor</span></div></a></li><li class="depth-2 branch"><a href="wildwood.knowledge-accessor.html#var-fetch"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fetch</span></div></a></li><li class="depth-2 branch"><a href="wildwood.knowledge-accessor.html#var-match"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>match</span></div></a></li><li class="depth-2"><a href="wildwood.knowledge-accessor.html#var-store"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>store</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">wildwood.knowledge-accessor</h1><div class="doc"><div class="markdown"><p>The key point of building Bialowieza as a library rather than a complete application is that it should be possible to hook it up to multiple sources of knowledge. Thus we must design a protocol through which knowledge can be accessed, and a schema in which it will be returned. Note that the accessor must be able to add knowledge to the knowledge base, as well as retrieve it.</p></div></div><div class="public anchor" id="var-Accessor"><h3>Accessor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fetch"><h3>fetch</h3><div class="usage"><code>(fetch self id)</code></div><div class="doc"><div class="markdown"><p>Fetch all the knowledge I have about the object identified by this <code>id</code> value, as a map whose <code>:id</code> key has this <code>id</code> value.</p>
<p><em>NOTE THAT:</em> I now think knowledge should only be managed at the Wildwood level as sets of propositions, so the idea of bringing back some sort of object representation here is probably wrong.</p></div></div></div><div class="public anchor" id="var-match"><h3>match</h3><div class="usage"><code>(match self proposition)</code></div><div class="doc"><div class="markdown"><p>Return all the propositions I know which match this proposition. The intended use case here is that you will either supply a fully specified proposition to verify that that proposition is true, or else supply a partially specified proposition to query.</p>
<p>e.g. passing the proposition</p>
<pre><code>{:verb :kill :object :caesar}
</code></pre>
<p>would be a way of asking who killed caesar, and might return</p>
<pre><code>[{:verb :kill :subject :brutus :object :caesar}
{:verb :kill :subject :cassius :object :caesar}
{:verb :kill :subject :longus :object :caesar}]
</code></pre></div></div></div><div class="public anchor" id="var-store"><h3>store</h3><div class="usage"><code>(store self proposition)</code></div><div class="doc"><div class="markdown"><p>Add this <code>proposition</code> to the knowledge I hold.</p></div></div></div></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/wildwood/knowledge_accessor.clj#L10">view source</a></div></div></div></body></html>