<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to JavaInteractingWithTheKnowledgeBase</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>Recent changes to JavaInteractingWithTheKnowledgeBase</description><atom:link href="https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 25 Jun 2018 19:46:35 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/feed" rel="self" type="application/rss+xml"/><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -459,7 +459,7 @@

 # More Information

-The Java module is fully documented with standard java documentation. Please use the API at [JavaDocs](http://madara.sourceforge.net/docs/java) or tell your editor of choice to load source files from the Git repository.
+The Java module is fully documented with standard java documentation. Please use the API at [JavaDocs](https://www.javadoc.io/doc/ai.madara/madara) or tell your editor of choice to load source files from the Git repository.

 ----
 &lt;b&gt;Java Guide Series&lt;/b&gt;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Mon, 25 Jun 2018 19:46:35 -0000</pubDate><guid>https://sourceforge.neta01b9da7f50f0cc46248697e2d963910f05d04fd</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -43,7 +43,7 @@
 _Example of UDP transport constructor example_

 ~~~~~~
-import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;
 import ai.madara.transport.QoSTransportSettings;
 import ai.madara.transport.TransportType;

@@ -63,7 +63,7 @@
 _Example of multicast transport constructor_ ([Multicast IP range](http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml))

 ~~~~~~
-import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;
 import ai.madara.transport.QoSTransportSettings;
 import ai.madara.transport.TransportType;

@@ -83,7 +83,7 @@
 _Example of broadcast transport constructor_

 ~~~~~~
-import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;
 import ai.madara.transport.QoSTransportSettings;
 import ai.madara.transport.TransportType;

@@ -116,8 +116,8 @@
 _Example of Using Get and Set_

 ~~~~~~
-import ai.madara.knowledge..KnowledgeBase;
-import ai.madara.knowledge..EvalSettings;
+import ai.madara.knowledge.KnowledgeBase;
+import ai.madara.knowledge.EvalSettings;
 import ai.madara.transport.QoSTransportSettings;
 import ai.madara.transport.TransportType;
 import someGpsModule;
@@ -177,8 +177,8 @@
 _Example showcasing the difference between evaluate and wait_

 ~~~~~~
-import ai.madara.knowledge..KnowledgeBase;
-import ai.madara.knowledge..EvalSettings;
+import ai.madara.knowledge.KnowledgeBase;
+import ai.madara.knowledge.EvalSettings;
 import ai.madara.transport.QoSTransportSettings;
 import ai.madara.transport.TransportType;
 import someGpsModule;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Mon, 25 Jun 2018 19:38:50 -0000</pubDate><guid>https://sourceforge.net849659e02ddb35636a298df4a4df7bbe0e7b723f</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -24,7 +24,7 @@

 ~~~~~~
 # import the KnowledgeBase class
-import com.madara.KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;

 # create a knowledge base with no transport
 knowledge = engine.KnowledgeBase ();
@@ -43,9 +43,9 @@
 _Example of UDP transport constructor example_

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.transport.QoSTransportSettings;
-import com.madara.transport.TransportType;
+import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.transport.QoSTransportSettings;
+import ai.madara.transport.TransportType;

 //Create transport settings for a multicast transport
 QoSTransportSettings settings = new QoSTransportSettings();
@@ -63,9 +63,9 @@
 _Example of multicast transport constructor_ ([Multicast IP range](http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml))

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.transport.QoSTransportSettings;
-import com.madara.transport.TransportType;
+import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.transport.QoSTransportSettings;
+import ai.madara.transport.TransportType;

 //Create transport settings for a multicast transport
 QoSTransportSettings settings = new QoSTransportSettings ();
@@ -83,9 +83,9 @@
 _Example of broadcast transport constructor_

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.transport.QoSTransportSettings;
-import com.madara.transport.TransportType;
+import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.transport.QoSTransportSettings;
+import ai.madara.transport.TransportType;

 //Create transport settings for a multicast transport
 QoSTransportSettings settings = new QoSTransportSettings ();
@@ -116,10 +116,10 @@
 _Example of Using Get and Set_

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.EvalSettings;
-import com.madara.transport.QoSTransportSettings;
-import com.madara.transport.TransportType;
+import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.knowledge..EvalSettings;
+import ai.madara.transport.QoSTransportSettings;
+import ai.madara.transport.TransportType;
 import someGpsModule;

 # Create transport settings for a multicast transport
@@ -145,7 +145,7 @@
 # use some third party library to get our current GPS position
 # this is NOT a MADARA function and is used as an example of working
 # with arbitrary libraries or code bases
-gpsCoords = someGpsModule.get_current_gps();
+gpsCoords = someGpsModule.getCurrentGps();

 # now use these gpsCoords to update other agents on your position
 # we've set the eval settings to delay sending modifications until
@@ -155,9 +155,9 @@
 # here we create an array of 3 doubles called "agent{.id}. position". By setting
 # the last index (2) first, we allocate the full array instead of
 # growing it from 0 to 2, which would be much slower.
-knowledge.set_index("agent{.id}.position", 2, gpsCoords.getAltitude(), evalSettings);
-knowledge.set_index("agent{.id}.position", 0, gpsCoords.getLatitude(), evalSettings);
-knowledge.set_index("agent{.id}.position", 1, gpsCoords.getLongitude(), evalSettings);
+knowledge.setIndex("agent{.id}.position", 2, gpsCoords.getAltitude(), evalSettings);
+knowledge.setIndex("agent{.id}.position", 0, gpsCoords.getLatitude(), evalSettings);
+knowledge.setIndex("agent{.id}.position", 1, gpsCoords.getLongitude(), evalSettings);

 # aggregate a timestamp in milliseconds with the update of the above position
 knowledge.set("agent{.id}.position.timestamp", System.currentTimeMillis(), evalSettings);
@@ -177,10 +177,10 @@
 _Example showcasing the difference between evaluate and wait_

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.EvalSettings;
-import com.madara.transport.QoSTransportSettings;
-import com.madara.transport.TransportType;
+import ai.madara.knowledge..KnowledgeBase;
+import ai.madara.knowledge..EvalSettings;
+import ai.madara.transport.QoSTransportSettings;
+import ai.madara.transport.TransportType;
 import someGpsModule;

 # Create transport settings for a multicast transport
@@ -241,15 +241,15 @@

 ## 2.c. Evaluate and Wait Settings

-A call to evaluate, get, and set can be controlled and augmented by modifying the [Eval_Settings](http://madara.sourceforge.net/docs/cpp/dc/da5/structMadara_1_1Knowledge__Engine_1_1Eval__Settings.html). The class [Wait_Settings](http://madara.sourceforge.net/docs/cpp/db/d79/structMadara_1_1Knowledge__Engine_1_1Wait__Settings.html) extends the Eval_Settings class by adding specific controls for the wait function.
+A call to evaluate, get, and set can be controlled and augmented by modifying the [EvalSettings](https://static.javadoc.io/ai.madara/madara/3.2.0/ai/madara/knowledge/EvalSettings.html). The class [WaitSettings](https://static.javadoc.io/ai.madara/madara/3.2.0/ai/madara/knowledge/WaitSettings.html) extends the Eval_Settings class by adding specific controls for the wait function.

 The following example shows how to configure a wait statement with various settings available through `EvalSettings` and `WaitSettings`. 

 _Example of Configuring Wait with the Wait Settings class_

 ~~~~~~
-import com.madara.KnowledgeBase;
-import com.madara.EvalSettings;
+import ai.madara.knowledge.KnowledgeBase;
+import ai.madara.knowledge.EvalSettings;

 waitSettings = new WaitSettings();

@@ -288,11 +288,11 @@

 ~~~~~~
 # import the submodules and give them shorter aliases
-import com.madara.KnowledgeBase;
-import com.madara.MadaraFunction;
-import com.madara.KnowledgeRecord;
-import com.madara.KnowledgeList;
-import com.madara.Variables;
+import ai.madara.knowledge.KnowledgeBase;
+import ai.madara.knowledge.MadaraFunction;
+import ai.madara.knowledge.KnowledgeRecord;
+import ai.madara.knowledge.KnowledgeList;
+import ai.madara.knowledge.Variables;
 import someGpsModule;

 public class MoveToGps extends MadaraFunction
@@ -338,7 +338,7 @@

 ~~~~~~
 # import the submodules and give them shorter aliases
-import madara.knowledge_engine as engine;
+import ai.madara.knowledge as engine;
 KnowledgeBase knowledge = new KnowledgeBase();

 knowledge.evaluate (
@@ -388,7 +388,7 @@
 _Example of saving context_

 ~~~~~~
-import com.madara.KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;

 KnowledgeBase knowledge = new KnowledgeBase();
 # make changes to the context or have changes come in over the network
@@ -411,7 +411,7 @@
 _Example of saving checkpoint after save context_

 ~~~~~~
-import com.madara.KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;

 KnowledgeBase knowledge = new KnowledgeBase();

@@ -419,13 +419,13 @@
 ...

 # Save everything to a file
-knowledge.saveContext("recent_context.kkb");
+knowledge.saveContext("recent_context.kb");

 # make additional changes to the context
 ...

 # Append everything since save_context to the end of the file.
-knowledge.saveCheckpoint("recent_context.kkb");
+knowledge.saveCheckpoint("recent_context.kb");
 ~~~~~~

 *Important note about checkpoint*: Checkpointing will only save global variable changes. In order to save local variable changes, you will need to do evaluates, sets, and waits with track_local_changes enabled in the Eval Settings.
@@ -439,7 +439,7 @@
 _Loading Context_

 ~~~~~~
-import com.madara.KnowledgeBase;
+import ai.madara.knowledge.KnowledgeBase;

 KnowledgeBase knowledge = new KnowledgeBase();

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Mon, 25 Jun 2018 19:37:46 -0000</pubDate><guid>https://sourceforge.net5629665f41d723a58c54ab1d2e1aa3c0da9ff7d2</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -159,8 +159,8 @@
 knowledge.set_index("agent{.id}.position", 0, gpsCoords.getLatitude(), evalSettings);
 knowledge.set_index("agent{.id}.position", 1, gpsCoords.getLongitude(), evalSettings);

-# aggregate a nanosecond timestamp with the update of position
-knowledge.set("agent{.id}.position.timestamp", madara.utility.get_time(), evalSettings);
+# aggregate a timestamp in milliseconds with the update of the above position
+knowledge.set("agent{.id}.position.timestamp", System.currentTimeMillis(), evalSettings);

 # send all modifications in the same packet for consistency
 knowledge.sendModifieds();
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Sun, 07 Jun 2015 05:07:50 -0000</pubDate><guid>https://sourceforge.net157ba93a34eb3015b9791219f437926bbd81fea3</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -1,6 +1,5 @@
 &lt;b&gt;Java Guide Series&lt;/b&gt;
-[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
-
+[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads)
 ----

 # The MADARA Knowledge Base
@@ -464,4 +463,4 @@

 ----
 &lt;b&gt;Java Guide Series&lt;/b&gt;
-[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
+[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 02:05:45 -0000</pubDate><guid>https://sourceforge.net253b5a4b0a46f3f7fad50943672799f05dba2c2c</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,5 +1,5 @@
 &lt;b&gt;Java Guide Series&lt;/b&gt;
-[Architecture](JavaMadaraArchitecture) | [Knowledge Base](JavaInteractingWithTheKnowledgeBase) | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
+[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)

 ----

@@ -464,4 +464,4 @@

 ----
 &lt;b&gt;Java Guide Series&lt;/b&gt;
-[Architecture](JavaMadaraArchitecture) | [Knowledge Base](JavaInteractingWithTheKnowledgeBase) | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
+[Architecture](JavaMadaraArchitecture) | Knowledge Base | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 02:04:18 -0000</pubDate><guid>https://sourceforge.netc49f244e93157f597a57d5839d20cd3ed34aaefb</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -298,7 +298,7 @@

 public class MoveToGps extends MadaraFunction
 {
-  KnowledgeRecord moveToGps(KnowledgeList args, Variables variables)
+  KnowledgeRecord execute(KnowledgeList args, Variables variables)
   {
     KnowledgeRecord result = new KnowledgeRecord();

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 01:44:49 -0000</pubDate><guid>https://sourceforge.net6c385e6f1de49e33a96bf4667c4a054a611401da</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -460,7 +460,7 @@

 # More Information

-The Java module is fully documented with standard java documentation. Please use the API at [JavaDocs](http://madara.sourceforge.net/docs/java) or tell your editor of choice to load source files from the SVN repository
+The Java module is fully documented with standard java documentation. Please use the API at [JavaDocs](http://madara.sourceforge.net/docs/java) or tell your editor of choice to load source files from the Git repository.

 ----
 &lt;b&gt;Java Guide Series&lt;/b&gt;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 00:58:35 -0000</pubDate><guid>https://sourceforge.netd870afe7a4ca22058f60802cde407a82bde44d0b</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,3 +1,8 @@
+&lt;b&gt;Java Guide Series&lt;/b&gt;
+[Architecture](JavaMadaraArchitecture) | [Knowledge Base](JavaInteractingWithTheKnowledgeBase) | [Networking](JavaInteractingWithTheTransport) | [Containers](JavaKnowledgeContainers) | [Threads](JavaWorkingWithThreads) | [Optimizations](JavaOptimizingKaRL)
+
+----
+
 # The MADARA Knowledge Base

 The main entry point into the MADARA middleware is the Knowledge Base. The Knowledge Base supports a variety of programming styles and interactions, and we'll discuss many of those capabilities on this page.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 00:44:04 -0000</pubDate><guid>https://sourceforge.net6c49e0c4732b03a387a90238e60ad1201f9816ba</guid></item><item><title>JavaInteractingWithTheKnowledgeBase modified by James Edmondson</title><link>https://sourceforge.net/p/madara/wiki/JavaInteractingWithTheKnowledgeBase/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,4 +1,3 @@
-
 # The MADARA Knowledge Base

 The main entry point into the MADARA middleware is the Knowledge Base. The Knowledge Base supports a variety of programming styles and interactions, and we'll discuss many of those capabilities on this page.
@@ -285,30 +284,40 @@

 ~~~~~~
 # import the submodules and give them shorter aliases
-import madara.knowledge_engine as engine;
-import some_gps_module;
-
-def  move_to_gps (args, variables)
+import com.madara.KnowledgeBase;
+import com.madara.MadaraFunction;
+import com.madara.KnowledgeRecord;
+import com.madara.KnowledgeList;
+import com.madara.Variables;
+import someGpsModule;
+
+public class MoveToGps extends MadaraFunction
 {
-  result = madara.KnowledgeRecord;
-
-  if len(args) 3:
-    # assuming the GPS_Library::move_to_gps function returns
-    # some kind of integer, double, or string
-    result.set_value(some_gps_module.move_to_gps (
-      args[0].to_string (), # latitude
-      args[1].to_string (), # longitude
-      args[2].to_string ()  # altitude);
-
-  return result;
+  KnowledgeRecord moveToGps(KnowledgeList args, Variables variables)
+  {
+    KnowledgeRecord result = new KnowledgeRecord();
+
+    if (args.size() == 3)
+    {
+      # assuming the GPS_Library::move_to_gps function returns
+      # some kind of integer, double, or string
+      result = new KnowledgeRecord(someGpsModule.moveToGps(
+        args.get(0).toString(),
+        args.get(1).toString(),
+        args.get(2).toString());
+    }
+
+    return result;
+  }
+}

 # We don't need a networking transport for this example
-knowledge = engine.KnowledgeBase();
+KnowledgeBase knowledge = new KnowledgeBase();

 # define a function call which is called "move_to_gps" inside
 # of evaluate and wait functions and maps to a C++ function called
 # move_to_gps
-knowledge.define_function("move_to_gps", move_to_gps);
+knowledge.defineFunction("move_to_gps", new MoveToGps());

 # call the mapped "move_to_gps" function with a latitude,
 # longitude, and altitude.
@@ -326,7 +335,7 @@
 ~~~~~~
 # import the submodules and give them shorter aliases
 import madara.knowledge_engine as engine;
-knowledge = engine.KnowledgeBase();
+KnowledgeBase knowledge = new KnowledgeBase();

 knowledge.evaluate (
   # get time in nanoseconds
@@ -375,44 +384,44 @@
 _Example of saving context_

 ~~~~~~
-# import the submodules and give them shorter aliases
-import madara.knowledge_engine as engine;
-knowledge = engine.KnowledgeBase();
+import com.madara.KnowledgeBase;
+
+KnowledgeBase knowledge = new KnowledgeBase();
 # make changes to the context or have changes come in over the network
 ...

 # we recommend saving to a "kkb" file -- KaRL Knowledge Base to help
 # with sorting/visualization in a directory. This command saves every
 # local and global variable to the context file.
-knowledge.save_context("recent_context.kkb");
+knowledge.saveContext("recent_context.kkb");
 ~~~~~~

 ----

 ## 5.b. Saving a Checkpoint

-In contrast to save_context, save_checkpoint only saves updates since the last save_context or save_checkpoint. This function is far more efficient than save_context, especially for a large `Knowledge_Base`.
+In contrast to save_context, save_checkpoint only saves updates since the last save_context or save_checkpoint. This function is far more efficient than save_context, especially for a large `KnowledgeBase`.

 *Saving only global changes since last full save*

 _Example of saving checkpoint after save context_

 ~~~~~~
-# import the submodules and give them shorter aliases
-import madara.knowledge_engine as engine;
-knowledge = engine.KnowledgeBase();
+import com.madara.KnowledgeBase;
+
+KnowledgeBase knowledge = new KnowledgeBase();

 # make changes to the context or have changes come in over the network
 ...

 # Save everything to a file
-knowledge.save_context("recent_context.kkb");
+knowledge.saveContext("recent_context.kkb");

 # make additional changes to the context
 ...

 # Append everything since save_context to the end of the file.
-knowledge.save_checkpoint("recent_context.kkb");
+knowledge.saveCheckpoint("recent_context.kkb");
 ~~~~~~

 *Important note about checkpoint*: Checkpointing will only save global variable changes. In order to save local variable changes, you will need to do evaluates, sets, and waits with track_local_changes enabled in the Eval Settings.
@@ -426,9 +435,9 @@
 _Loading Context_

 ~~~~~~
-# import the submodules and give them shorter aliases
-import madara.knowledge_engine as engine;
-knowledge = engine.KnowledgeBase();
+import com.madara.KnowledgeBase;
+
+KnowledgeBase knowledge = new KnowledgeBase();

 # Load context from a file. The second parameter is the decision of
 # whether or not to load the Knowledge Base's id from the file. We
@@ -439,7 +448,7 @@
 # class. The default settings here treat all updates as local updates
 # (i.e., changes will not be disseminated as new updates), but this is
 # tunable if you want to specify your own Eval Settings class.
-knowledge.load_context("agent1_context.kkb", false);
+knowledge.loadContext("agent1_context.kkb", false);
 ~~~~~~

 ----
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Edmondson</dc:creator><pubDate>Tue, 04 Nov 2014 00:43:22 -0000</pubDate><guid>https://sourceforge.net7d075ec4093162e3e2c13217a5ce0054ecf1affa</guid></item></channel></rss>