CsvLocationServiceReader
This class is used to read a location service in CSV format from a string or a file. The expected structure is the following.
The first line contains the declariation of the number of locations in the considered spatial model: LOCATIONS n
where n
is an integer.
After that we can have a line containing either DIRECTED
or UNDIRECTED
that is used to declare that the forthcoming spatial models are directed or not. If omitted, models are handled as directed.
The next line can contain either a declaration of a \emph{static} location service: STATIC
or the first time in the sequence of evolving spatial models: TIME t
where t
is a (non negative) double.
In both the cases the content of the model is expressed via a sequence of rows having the following structure: l1;l2;v_1;...;v_k
where l1
and l2
are the indexes (indexes start from 0!) of the two connected locations, while v_1;...;v_k
is the tuple of strings of values labelling the connecting edges.
When the service is not static, another line of the form TIME t'
indicates the beginning of a new graph model at time t'
.
Empty lines and extra spaces are ignored.