Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The central operation of KWebS is graphLayout, which is shown in the listing below. It calculates the layout of a graph that you deliver in serial notation as the serializedGraph parameter. This parameter is declaring a general serial notation. The server has to know the underlying meta model and form of serialization, therefore, you have to define the format you used to submit your graph with the informat parameter. In general, when the server has calculated the layout, it delivers the graph for which the layout was calculated in the same format that you chose to submit your source graph. Alternatively, you can define a different output format with the parameter outformat and the server performs the necessary translation.

At the moment, KWebS supports the following formats:

...

There is a wiki page explaining the currently supported graph formats.

Code Block
themeEclipse
languagejava
/**
 * Calculating the layout of a graph with KWebS
 * 
 * @param serializedGraph the serial notation of the source graph
 * @param informat the format of the source graph
 * @param outformat the optional format of the result
 * @param options the optional layout options
 * 
 * @return the serial notation of the graph with calculated layout either
 *         in the format of the source graph or a format chosen by the user
 */
String graphLayout(
    String serializedGraph,          
    String informat,                 
    String outformat,               
    List<GraphLayoutOption> options 
);

...