2 # Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
20 from lib
.rdcl_graph
import RdclGraph
22 logging
.basicConfig(level
=logging
.DEBUG
)
23 log
= logging
.getLogger('OsmRdclGraph')
25 class OsmRdclGraph(RdclGraph
):
26 """Operates on the graph representation used for the GUI graph views"""
32 def build_graph_from_project(self
, json_project
, model
={}):
33 """Creates a single graph for a whole project"""
35 #print "json_project ",json_project
39 'graph_parameters': {},
43 positions
= json_project
['positions'] if 'positions' in json_project
else False
44 log
.debug('build graph from project json')
47 except Exception as e
:
48 log
.exception('Exception in build_graph_from_project')