Gizra / CDL

Casa del Lector
http://gizra.github.io/CDL/
13 stars 1 forks source link

Prepare JSON from Brain's XML #1

Closed amitaibu closed 10 years ago

amitaibu commented 10 years ago
<Thought>
  <guid>5F686845-0FE0-05B2-DA4E-F175EF995458</guid>
  <name>The Holocaust</name>
  <label>&amp; ... #1501;
  </label>
  <creationDateTime>2013-10-15 14:30:22.000 @+0200</creationDateTime>
  <realModificationDateTime>2013-10-20 16:17:47.000 @+0200
  </realModificationDateTime>
  <displayModificationDateTime>2013-10-27 16:53:25.387 @+0200
  </displayModificationDateTime>
  <activationDateTime>2013-11-03 16:57:19.993 @+0200</activationDateTime>
  <linksModificationDateTime>2013-11-03 17:00:29.592 @+0200
  </linksModificationDateTime>
  <isType>0</isType>
  <color>0</color>
  <accessControlType>0</accessControlType>
</Thought>

via guid we reach the Link:

<Link>
  <guid>1D45C65C-6B66-4666-4A1D-546F8593C55F</guid>
  <idA>5F686845-0FE0-05B2-DA4E-F175EF995458</idA>
  <idB>72F39E01-4AA4-B0F0-A73F-6A5A2A39C293</idB>
  <dir>2</dir>
  <isBackward>0</isBackward>
  <name></name>
  <labelForward></labelForward>
  <labelBackward></labelBackward>
  <creationDateTime>2013-11-03 17:00:21.214 @+0200</creationDateTime>
  <modificationDateTime>2013-11-03 17:00:29.590 @+0200
  </modificationDateTime>
  <isType>0</isType>
  <color>0</color>
  <thickness>0</thickness>
  <strength>0</strength>
  <meaning>0</meaning>
  <linkTypeID>A612649B-7311-4A04-D5F9-0D53879CACE3</linkTypeID>
</Link>

via idA and idB we reach Entry

<Entry>
  <guid>49A12098-E17B-065E-FA93-4A4F4EDB1EBD</guid>
  <EntryObjects>
    <EntryObject>
      <objectType>0</objectType>
      <objectID>5F686845-0FE0-05B2-DA4E-F175EF995458</objectID>
    </EntryObject>
  </EntryObjects>
  <body>&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0
    Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;
    &amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
    &amp;lt;head&amp;gt;
    &amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;EditLive!
    7.6.2.10&amp;quot; /&amp;gt;
    &amp;lt;meta name=&amp;quot;generator&amp;quot; content=&amp;quot;TheBrain
    7.0.4.5&amp;quot; /&amp;gt;
    &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html;
    charset=UTF-8&amp;quot; /&amp;gt;
    &amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;
    &amp;lt;!--
    body {
    font-family: Arial; font-size: small; background: #ffffff; color:
    #000000;
    }
    p {
    margin-top: 0pt; margin-bottom: 0pt;
    }
    --&amp;gt;
    &amp;lt;/style&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
    &amp;lt;p&amp;gt;One of the most distinct characteristics of the Nazi
    regime was its ideology of the&amp;amp;#160; supremacy of the Aryan race
    and its detestation of the Jews and other groups. In 1942, in the
    Wannsee conference, the Nazis decided to implement a plan called the
    &amp;#8220;Final Solution of the Jewish Question&amp;#8221;. After that
    the Jews of Europe were systematically murdered in the extermination
    camps as part of the Final Solution. In some of the camps permanent gas
    chambers were erected.&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;By 1945 6,000,000 Jews, the majority of the Jews in
    Europe, were dead.&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;For more on the Holocaust follow the link to Yad Vashem&amp;apos;s
    website.&amp;lt;/p&amp;gt;
    &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;
  </body>
  <format>HTML</format>
  <creationDateTime>2013-10-15 15:06:26.000 @+0200</creationDateTime>
  <modificationDateTime>2013-10-27 16:53:25.386 @+0200
  </modificationDateTime>
</Entry>
<Attachment>
  <guid>0F1A495D-CD86-6FD4-FB2B-EF7080D63A18</guid>
  <AttachmentEntries>
    <attachmentEntryID>49A12098-E17B-065E-FA93-4A4F4EDB1EBD
    </attachmentEntryID>
  </AttachmentEntries>
  <objectID>5F686845-0FE0-05B2-DA4E-F175EF995458</objectID>
  <name>Twin Holocaust survivors describe arriving at Auschwitz</name>
  <attachmentType>3</attachmentType>
  <location>http://www.youtube.com/watch?v=MWJyjAYyF8E</location>
  <dataLength>0</dataLength>
  <format></format>
  <creationDateTime>2013-10-15 15:06:26.973 @+0200</creationDateTime>
  <modificationDateTime>2013-10-15 15:06:27.306 @+0200
  </modificationDateTime>
</Attachment>
amitaibu commented 10 years ago

@ceoaliongroo

  1. Download Brain so you can import the XML and see how the data was created.
  2. Go over the XML and the explanation above to better understand the data structure.
  3. Write a grunt.task that will go over the XML file (under brain/brain.xml) and create a JSON file that we can later use in 3d js. As first step it should include only Thought. Disregard Attachments for now.
  4. To test your JSON you can create a simple page with 3d js that will show those points. Something like this
ceoaliongroo commented 10 years ago

Update: We are now parsing the XML into a JSON that can be rendered by 3d JS screen shot 2013-11-17 at 9 50 56 am

Now working on getting the data in a Tree layout

ceoaliongroo commented 10 years ago

Update: Drawn the tree layout from top to down. screen shot 2013-11-17 at 3 11 28 pm

ceoaliongroo commented 10 years ago

Found that it's necessary check for childs with dir=1 with idA:guid and dir=2 with idB:guid in links tags, working in have all the data of the exported file.

ceoaliongroo commented 10 years ago

Update: Draw all the data of the two brach of the root "Torah+Basch 10.11.13" screen shot 2013-11-18 at 1 28 15 pm 1

amitaibu commented 10 years ago

Done. specific design issue will be opened as follow-up issues.