Season of KDE 2020 ( weekly progress).

It's been nearly 10 days since the start of Sok2020. My accepted proposal is to add the ability to import/export KML graph files in ROCS graph IDE followed by non-ASCII character and HTML/XML tag processing in GML graph files. This includes tests and documentation of the above implementation.
Uptil now I have completed reading about Spirit Boost library and understanding its API.
I understood the qi (parser) and karma (generator) classes with basic type of parsers and skipper functions.
Based on my understanding of KML, KML is a simple format to organise data in nested HTML like tags. KML format is easy to interpret for human and light to export/import graphs in ROCS. Google provides some standard attributes that have to be used in KML. We will only be using its HTML like structure to process graph, ROCS will have its own special tags different than the KML which google currently uses to plot maps.
My definition of grammer (tags) for KML file format is given as below:

<Graph>   : tells the nested tags will contain, graph nodes, edges etc
  <id>        :  can be a number, name , etc symbol denoting graph
  <type>    : digraph(directional), graph specifying the type of graph
<Node>    :  each node present inside the graph
  <id>        : a visual id for the node, can be name or digit
  <unq id> : a unique id to be used later in joining edges.
  <color>  : node color
  <style>   : just a generalised definition for all the less required attributes like text size, etc
<Edge>    : contains all the edges and shows how they are interconnected
  <Nodes>: a comma seperated parameter which will speficy the two nodes connect. In case of directed graph the parser will assume it to be first points to the second. Eg: for a and b nodes it will be as a,b and when its directed it will be as a,b but interpreted as a->b
  <color> : color of the edge
  <wieght> : wieght of the edge
  <style>  : other less important attributes.

An example :

<Graph>
<Type>
Directed
</Type>
<Node>
<id>A</id>
<color> blue </color>
</Node>
<Node>
<id>B</id>
<color> blue </color>
</Node>
<Node>
<id>C</id
<color> blue </color>
</Node>
<Edge>
<color>
<connect>
A, B
</connect>
<connect>
B, C
</connect>
<connect>
C, A
</connect>
blue
</color>
</Edge>
</Graph>

Visualisation :

 A->B->C

This above parser can be realised using spirit boost library as used in rocs/libgraphtheory/fileformats/grammer* files.
I am yet to fully discuss this with my mentor ( will be doing a short call tommorow to clear out all these details )
Once finalised the grammer, I will start implementing it.
In the meanwhile, looking forward for everyone's reply on what changes/updates are required.

Comments

Popular Posts