3DCube's File Format

The file format of 3DCube is inherited from the Diagram Server project. Here is its Backus-Naur like description:


graph ::= '(' schema-model-id ' '
              node-list ' '
              edge-list ' '
              diagram-list ')'

node-list ::= '(' [ node { ' ' node } ] ')'

node ::= '(' node-id ' '
             node-model-id ' '
             status-model-id ' '
             label-text-list ')'

label-text-list ::= '(' [ label-text { ' ' label-text } ] ')'

label-text ::= '(' label-model-id ' ' text ')'

edge-list ::= '(' [ edge { ' ' edge } ] ')'

edge ::= '(' edge-id ' '
             from-node-id ' '
             to-node-id ' '
             edge-model-id ' '
             status-model-id ' '
             label-text-list ')'

diagram-list ::= '(' [ diagram { ' ' diagram  } ] ')'

diagram ::= '(' diagram-id ')'

schema-model-id ::= id

node-model-id ::= id

edge-model-id ::= id

status-model-id ::= id

label-model-id ::= id

node-id ::= id

edge-id ::= id

diagram-id ::= id

id ::= string

text ::= string

 

As an example, consider the following pair of textual file and corresponding graph

      (7)-----(8)
      /|      /|
     / |     / |
   (2)-----(1) |
    |  |    |  |
    | (6)---|-(5)
    | /     | /
    |/      |/
   (3)-----(4)

(  3Ddefault
  (  
     (  1 node normal  (  ( name 1 )  )  )
     (  2 node normal  (  ( name 2 )  )  )
     (  3 node normal  (  ( name 3 )  )  )
     (  4 node normal  (  ( name 4 )  )  )
     (  5 node normal  (  ( name 5 )  )  )
     (  6 node normal  (  ( name 6 )  )  )
     (  7 node normal  (  ( name 7 )  )  )
     (  8 node normal  (  ( name 8 )  )  )
  )
  (
     (  first    1 2 undirect normal  (  ( activity 1 )  )  )
     (  second   1 4 undirect normal  (  ( activity 1 )  )  )
     (  third    1 8 undirect normal  (  ( activity 1 )  )  )
     (  fourth   2 3 undirect normal  (  ( activity 1 )  )  )
     (  fifth    2 7 undirect normal  (  ( activity 1 )  )  )
     (  sixth    3 4 undirect normal  (  ( activity 1 )  )  )
     (  seventh  3 6 undirect normal  (  ( activity 1 )  )  )
     (  eight    4 5 undirect normal  (  ( activity 1 )  )  )
     (  ninth    5 6 undirect normal  (  ( activity 1 )  )  )
     (  tenth    5 8 undirect normal  (  ( activity 1 )  )  )
     (  eleventh 6 7 undirect normal  (  ( activity 1 )  )  )
     (  twelfth  7 8 undirect normal  (  ( activity 1 )  )  )
  )
  ( )
)