private static Layer ParseLayer(LayerDocument layerDocument, Graph graph)
        {
            Layer layer = new Layer(layerDocument.id, layerDocument.name, new List <Relation>());

            layerDocument.relations.ForEach(relation => layer.Relations.Add(ParseRelation(relation, layer, graph)));

            return(layer);
        }
        private static LayerDocument MakeLayerDocument(Layer layer)
        {
            LayerDocument layerDocument = new LayerDocument()
            {
                id        = layer.ID,
                name      = layer.Name,
                relations = MakeRelationDocuments(layer)
            };

            return(layerDocument);
        }