add todo
add todo

--- a/admin/neo4jimporter/.idea/workspace.xml
+++ b/admin/neo4jimporter/.idea/workspace.xml
@@ -3,6 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="ed822005-138f-4926-b199-24e1d82d9f3d" name="Default" comment="">
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/StAXSample.java" afterPath="$PROJECT_DIR$/src/main/java/StAXSample.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/agency-sample.xml" afterPath="$PROJECT_DIR$/agency-sample.xml" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
     </list>
     <ignored path="neo4jimporter.iws" />
@@ -79,10 +80,23 @@
       <file leaf-file-name="StAXSample.java" pinned="false" current="true" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/main/java/StAXSample.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="0.096345514" vertical-offset="5603" max-vertical-offset="6766">
-              <caret line="333" column="77" selection-start-line="333" selection-start-column="66" selection-end-line="333" selection-end-column="66" />
+            <state vertical-scroll-proportion="0.5116279" vertical-offset="1426" max-vertical-offset="7174">
+              <caret line="102" column="65" selection-start-line="102" selection-start-column="64" selection-end-line="102" selection-end-column="64" />
               <folding>
                 <element signature="imports" expanded="true" />
+                <element signature="e#10619#10635#0" expanded="true" />
+                <element signature="e#10853#10869#0" expanded="true" />
+                <element signature="e#11074#11090#0" expanded="true" />
+                <element signature="e#13031#13047#0" expanded="true" />
+                <element signature="e#13236#13252#0" expanded="true" />
+                <element signature="e#14578#14594#0" expanded="true" />
+                <element signature="e#14783#14799#0" expanded="true" />
+                <element signature="e#16639#16655#0" expanded="true" />
+                <element signature="e#16848#16864#0" expanded="true" />
+                <element signature="e#18180#18181#0" expanded="true" />
+                <element signature="e#18246#18247#0" expanded="true" />
+                <element signature="e#18461#18462#0" expanded="true" />
+                <element signature="e#18501#18502#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -413,7 +427,7 @@
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3985043" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32992327" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32905984" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
       <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32905984" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
@@ -424,7 +438,7 @@
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Amazon EC2" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25314465" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32905984" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32905984" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@@ -473,6 +487,19 @@
           <caret line="89" column="72" selection-start-line="89" selection-start-column="53" selection-end-line="89" selection-end-column="53" />
           <folding>
             <element signature="imports" expanded="true" />
+            <element signature="e#10619#10635#0" expanded="true" />
+            <element signature="e#10853#10869#0" expanded="true" />
+            <element signature="e#11074#11090#0" expanded="true" />
+            <element signature="e#13031#13047#0" expanded="true" />
+            <element signature="e#13236#13252#0" expanded="true" />
+            <element signature="e#14578#14594#0" expanded="true" />
+            <element signature="e#14783#14799#0" expanded="true" />
+            <element signature="e#16639#16655#0" expanded="true" />
+            <element signature="e#16848#16864#0" expanded="true" />
+            <element signature="e#18180#18181#0" expanded="true" />
+            <element signature="e#18246#18247#0" expanded="true" />
+            <element signature="e#18461#18462#0" expanded="true" />
+            <element signature="e#18501#18502#0" expanded="true" />
           </folding>
         </state>
       </provider>
@@ -491,6 +518,19 @@
           <caret line="92" column="44" selection-start-line="92" selection-start-column="44" selection-end-line="92" selection-end-column="44" />
           <folding>
             <element signature="imports" expanded="true" />
+            <element signature="e#10619#10635#0" expanded="true" />
+            <element signature="e#10853#10869#0" expanded="true" />
+            <element signature="e#11074#11090#0" expanded="true" />
+            <element signature="e#13031#13047#0" expanded="true" />
+            <element signature="e#13236#13252#0" expanded="true" />
+            <element signature="e#14578#14594#0" expanded="true" />
+            <element signature="e#14783#14799#0" expanded="true" />
+            <element signature="e#16639#16655#0" expanded="true" />
+            <element signature="e#16848#16864#0" expanded="true" />
+            <element signature="e#18180#18181#0" expanded="true" />
+            <element signature="e#18246#18247#0" expanded="true" />
+            <element signature="e#18461#18462#0" expanded="true" />
+            <element signature="e#18501#18502#0" expanded="true" />
           </folding>
         </state>
       </provider>
@@ -509,6 +549,19 @@
           <caret line="92" column="44" selection-start-line="92" selection-start-column="44" selection-end-line="92" selection-end-column="44" />
           <folding>
             <element signature="imports" expanded="true" />
+            <element signature="e#10619#10635#0" expanded="true" />
+            <element signature="e#10853#10869#0" expanded="true" />
+            <element signature="e#11074#11090#0" expanded="true" />
+            <element signature="e#13031#13047#0" expanded="true" />
+            <element signature="e#13236#13252#0" expanded="true" />
+            <element signature="e#14578#14594#0" expanded="true" />
+            <element signature="e#14783#14799#0" expanded="true" />
+            <element signature="e#16639#16655#0" expanded="true" />
+            <element signature="e#16848#16864#0" expanded="true" />
+            <element signature="e#18180#18181#0" expanded="true" />
+            <element signature="e#18246#18247#0" expanded="true" />
+            <element signature="e#18461#18462#0" expanded="true" />
+            <element signature="e#18501#18502#0" expanded="true" />
           </folding>
         </state>
       </provider>
@@ -525,11 +578,7 @@
       <provider selected="true" editor-type-id="text-editor">
         <state vertical-scroll-proportion="0.0" vertical-offset="30" max-vertical-offset="180">
           <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
-          <folding>
-            <element signature="tag#AGENCY#0;tag#AGENCIES#0" expanded="false" />
-            <element signature="tag#AGENCY#1;tag#AGENCIES#0" expanded="false" />
-            <element signature="tag#AGENCY#2;tag#AGENCIES#0" expanded="false" />
-          </folding>
+          <folding />
         </state>
       </provider>
     </entry>
@@ -537,11 +586,7 @@
       <provider selected="true" editor-type-id="text-editor">
         <state vertical-scroll-proportion="0.0397878" vertical-offset="0" max-vertical-offset="754">
           <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
-          <folding>
-            <element signature="tag#AGENCY#0;tag#AGENCIES#0" expanded="false" />
-            <element signature="tag#AGENCY#1;tag#AGENCIES#0" expanded="false" />
-            <element signature="tag#AGENCY#2;tag#AGENCIES#0" expanded="false" />
-          </folding>
+          <folding />
         </state>
       </provider>
     </entry>
@@ -555,10 +600,23 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/StAXSample.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.096345514" vertical-offset="5603" max-vertical-offset="6766">
-          <caret line="333" column="77" selection-start-line="333" selection-start-column="66" selection-end-line="333" selection-end-column="66" />
+        <state vertical-scroll-proportion="0.5116279" vertical-offset="1426" max-vertical-offset="7174">
+          <caret line="102" column="65" selection-start-line="102" selection-start-column="64" selection-end-line="102" selection-end-column="64" />
           <folding>
             <element signature="imports" expanded="true" />
+            <element signature="e#10619#10635#0" expanded="true" />
+            <element signature="e#10853#10869#0" expanded="true" />
+            <element signature="e#11074#11090#0" expanded="true" />
+            <element signature="e#13031#13047#0" expanded="true" />
+            <element signature="e#13236#13252#0" expanded="true" />
+            <element signature="e#14578#14594#0" expanded="true" />
+            <element signature="e#14783#14799#0" expanded="true" />
+            <element signature="e#16639#16655#0" expanded="true" />
+            <element signature="e#16848#16864#0" expanded="true" />
+            <element signature="e#18180#18181#0" expanded="true" />
+            <element signature="e#18246#18247#0" expanded="true" />
+            <element signature="e#18461#18462#0" expanded="true" />
+            <element signature="e#18501#18502#0" expanded="true" />
           </folding>
         </state>
       </provider>

--- a/admin/neo4jimporter/src/main/java/StAXSample.java
+++ b/admin/neo4jimporter/src/main/java/StAXSample.java
@@ -92,10 +92,23 @@
                             processAgencyFunction(r);
                         } else if (hasStartTagName(e, "AGENCY_STATUS")) {
                             processAgencyStatus(r);
+                            /* TODO
+                            Unhandled tag: AGENCY_NOTE content:
+
+Unhandled tag: NOTE_AGENCY_NO content:CA 4886
+Unhandled tag: NOTE_TYPE content:Archivists note
+Unhandled tag: NOTE content:null
+Unhandled tag: head content:
+
+Unexpected character 'C' (code 67) in start tag Expected a quote
+ at [row,col,system-id]: [1093387,18,"agency-sample.xml"]
+                             */
                         } else if (hasStartTagName(e, "AGENCY_NO")) {
                             previousAgency.put("agency_no", getCharacters(r));
                         } else if (hasStartTagName(e, "TITLE")) {
-                            previousAgency.put("name", getCharacters(r));
+                            String title = getCharacters(r);
+                            previousAgency.put("name", title);
+                            previousAgency.put("label", title);
                         } else if (hasStartTagName(e, "START_DATE")) {
                             previousAgency.put("start_date", getCharacters(r));
                         } else if (hasStartTagName(e, "START_DATE_QUAL")) {
@@ -139,6 +152,9 @@
                 agencyFullVersion.put(properties.get("agency_no").toString(), true);
             }
             agencyIDs.put(properties.get("agency_no").toString(), agencyID);
+            //if (agencyID % 10 == 0) {
+                System.out.println("Agency #"+agencyID);
+            //}
             return agencyID;
         } else {
             long agencyID = agencyIDs.get(properties.get("agency_no").toString());
@@ -154,6 +170,7 @@
         if (locationIDs.get(locationName) == null) {
             HashMap properties = new HashMap< String,Object > ();
             properties.put("name", locationName);
+            properties.put("label", locationName);
             long locationID = inserter.createNode(properties, locationLabel);
             locationIDs.put(locationName, locationID);
             return locationID;
@@ -165,6 +182,7 @@
         if (functionIDs.get(functionName) == null) {
             HashMap properties = new HashMap< String,Object > ();
             properties.put("name", functionName);
+            properties.put("label", functionName);
             long functionID = inserter.createNode(properties, functionLabel);
             functionIDs.put(functionName, functionID);
             return functionID;
@@ -176,6 +194,7 @@
         if (statusIDs.get(statusName) == null) {
             HashMap properties = new HashMap< String,Object > ();
             properties.put("name", statusName);
+            properties.put("label", statusName);
             long statusID = inserter.createNode(properties, statusLabel);
             statusIDs.put(statusName, statusID);
             return statusID;
@@ -215,7 +234,7 @@
             if (e.isEndElement()) {
                 if (hasEndTagName(e, "AGENCY_LINK")) {
 
-                    //System.out.println("Finished processing link:  Name = " + name + "; of = " + of + "; date = " + date);
+                    //System.out.println("Finished processing link:  type = " + link_type+ "; from = " + agency_from_no + "; to = " + agency_to_no);
                     long agencyFromID, agencyToID;
                     Map<String, Object> agencyFromProperties = new HashMap<String, Object>();
                     agencyFromProperties.put("agency_no",agency_from_no);
@@ -262,7 +281,7 @@
             }
             if (e.isEndElement()) {
                 if (hasEndTagName(e, "AGENCY_LOCATION")) {
-                    System.out.println("Finished processing location:  Name = " + name + "; of = " + of + "; date = " + date);
+                    //System.out.println("Finished processing location:  Name = " + name + "; of = " + of + "; date = " + date);
                     long locationID, agencyID;
                     locationID = getLocation(name);
                     Map<String, Object> agencyProperties = new HashMap<String, Object>();
@@ -297,7 +316,7 @@
             }
             if (e.isEndElement()) {
                 if (hasEndTagName(e, "AGENCY_STATUS")) {
-                    System.out.println("Finished processing status:  Status = " + status + "; of = " + of + "; date = " + date);
+                    //System.out.println("Finished processing status:  Status = " + status + "; of = " + of + "; date = " + date);
                     long statusID, agencyID;
                             statusID = getStatus(status);
                     Map<String, Object> agencyProperties = new HashMap<String, Object>();
@@ -395,3 +414,4 @@
 
 }
 
+