Aikido Technique Builder Technical Description

First I created an XML file that specifies the technique hierarchy. Inside it, I allow references to other subtrees of techniques that are defined elsewhere in the file use the <use> tag. Upon parsing of the file the references are replaced with copies of those subtrees. This saves a lot of work. The whole reason that I think this application can be a success is because there is so much overlap among techniques after the first few moves. I also created a DTD (Document Type Definition) for my XML hierarchy syntax. This enforces the legal structure of the data file when it gets parsed. This avoids much difficult debugging. Here is a snippet from the XML datafile:


<?xml version="1.0"?>
<!DOCTYPE hierarchy SYSTEM "hierarchy.dtd">
<hierarchy title="Katate dori technique hierarchy" imgpath="images/katate_dori/" date="10/19/2014" author="Barry Becker">
  <node id="katate_dori" label="katate dori" description="left wrist grab">
      <node id="tenkan_grabbed" label="tenkan entrance (grabbed)">
          <node id="sumi_grabbed" label="sumi entrance (grabbed)">
              <node id="sumi_otoshi_basic" label="sumi otoshi (basic)"/>
              <node id="sumi_otoshi_elbow" label="sumi otoshi (elbow)"/>
              <node id="sumi_otoshi_inside_shoulder" label="sumi otoshi (inside shoulder)" />
              <node id="sumi_otoshi_outside_shoulder" label="sumi otoshi (outside shoulder)"/>
              <node id="sumi_otoshi_head" label="sumi otoshi (head)" img="sumi_otoshi_head"/>
              <node id="sumi_koshinage" label="sumi koshinage (morote seoinage)">
                  <node id="koshinage_right_finish" label="koshinage finish" />
              </node>
              <node id="omote_uchi_zempo_nage" label="omote uchi zempo nage" >
                  <node id="zempo_nage_left_finish" label="zempo nage" />
              </node>
              <node id="ikkyo_omote_entrance" label="ikkyo omote entrance">
                  <node id="ikkyo_omote" label="ikkyo omote">
                      <node id="ikkyo_pin" label="ikkyo pin"/>
                  </node>
                  <node id="nikkyo" label="nikkyo">
                      <node id="nikkyo_ura_finish" label="nikkyo ura finish">
                          <node id="nikkyo_pin" label="nikkyo pin"/>
                      </node>
                      <node id="nikkyo_omote_finish" label="nikkyo omote finish">
                          <use ref="nikkyo_pin"/>
                      </node>
                  </node>
          :::
          :::
</hierarchy>

Next I shot the images at the dojo using a digital camera. The images were too large, so I resampled them using IRFan (a free image processing tool). One of the mistakes I made was to not batch the contrast and color correction. On my next attempt I will try photoshop or script GIMP. I also need to redo many of the images. More images may be necessary to avoid so many abrupt camera angle switches.

There is a Java program that reads in the XML data file (parsing it using javax.xml.parsers). This is another advantage of XML, there are native java parsers and validating logic available (I hardly had to write any code to do this part). Then the program generates an HTML page that contains a ton of generated javascript to specify state information. Javascript builds the dropdowns, handles the images to show, and does the rollovers. Every time you change a dropdown, Javascript dynamically changes the page DOM to show appropriate new form elements and images. The java code actually generates 3 different html files used for different purposes but based on the same data. There is the technique builder, all possible techniques, and all unique images.