-
Notifications
You must be signed in to change notification settings - Fork 4
Tool Configuration
Prov Viewer uses a configuration file to configure the tool in order to understand the provenance data semantics and adapt it to the domain peculiarities. This is accomplished by creating a XML file based on the configuration schema of Prov Viewer (config.xsd) . The configuration schema can be divided into five components, which is explained in the following subsections:
The tool also has an automatic configuration, which is described in the Automatic Configuration section.
The Layout Variables comprise of attributes to configure the tool when using the Temporal or Spatial layout. Currently there are 10 variables in the configuration schema:
-
vertexSize: This changes the vertex size in the graph (default size is vertexSize = 15)
-
default_layout: This configures the tool to use the selected layout as the default when starting the tool. Acceptable values: SpatialLayout, TemporalLayout, FRRLayout, FRLayout2, CircleLayout, ISOMLayout, and KKLayout.
-
layoutAxis_X: The name of the attribute that contains the X coordinate or the longitude when using the Spatial Layout.
-
layoutAxis_Y: The name of the attribute that contains the Y coordinate or the latitude when using the Spatial Layout.
-
imageLocation: The image path that is used as the background for the Spatial Layout.
-
imageOffset_X: The camera X position in world space when the image was taken when using an orthographic image. For Google Maps or OpenStreetMap images, this variable represents the longitude from the top-left corner of the image.
-
imageOffset_Y: The camera Y position in world space when the image was taken when using an orthographic image. For Google Maps or OpenStreetMap images, this variable represents the latitude from the top-left corner of the image.
-
spatialLayoutPosition: The upper left corner of the screen offset (only the X coordinate) in relation to the camera: Upper-Left-border_X_coordinate - Camera_X_coordinate). This variable is only used for orthographic images.
-
zoomLevel: The zoom level used to generate the Google Maps or OpenStreetMap image. This variable is not used in orthographic images.
-
temporalLayoutbackbone: Defines the type of vertex for the temporal layout backbone. Use the vertex's label to position all vertices with the same label in the center of the layout.
-
temporalLayoutscale: Defines the spacing between vertices in the temporal layout.
An example using these variables is presented below.
<default_layout>SpatialLayout</default_layout>
<layoutAxis_X>ObjectPosition_X</layoutAxis_X>
<layoutAxis_Y>ObjectPosition_Z</layoutAxis_Y>
<imageLocation>/images/AngrybotsMap.png</imageLocation>
<imageOffset_X>2.247497</imageOffset_X>
<imageOffset_Y>-48.11044</imageOffset_Y>
<spatialLayoutPosition>113.404</spatialLayoutPosition>
<zoomLevel>0</zoomLevel>
<temporalLayoutbackbone>Player</temporalLayoutbackbone>
<temporalLayoutscale>1.0</temporalLayoutscale>
The Edge Type component contains the list of all relationship types in the provenance data, along with some important values that are used in the visualization process. This is used to populate the edge filter with all the entries that are described in component.
-
edge: the label or type of the edge
-
edgestroke: the function used to calculate the edge thickness based on the maximum value for this type/label of relationship or the mean value. Accepted values are MEAN and MAX.
-
collapsefunction: the function used to calculate the collapsed edge new value from the original values. The accepted values are SUM or AVERAGE.
-
isInverted: invert the color scheme used in edges. If TRUE, positive values will be red and negative will be green.
An example using these variables is presented below.
<edgetype>
<edge>Credits</edge>
<edgestroke>MEAN</edgestroke>
<collapsefunction>SUM</collapsefunction>
<isInverted>false</isInverted>
</edgetype>
<edgetype>
<edge>Aid</edge>
<edgestroke>MAX</edgestroke>
<collapsefunction>AVERAGE</collapsefunction>
</edgetype>
The Color Scheme component contains a list of all schemes that can be used during the analysis. Each scheme is defined by the “attribute” field, which is the desired vertex attribute to be analyzed, the “class”, which is the class name that the scheme is based upon, the “values” field which contains additional space separated information that are used depending on the selected “class”, and “goodvalue” and “badvalue”, which are used as limiters for certain types of schemes.
-
attribute: the name of the attribute to be analyzed in the vertices.
-
class: the name of the schema to be used.
-
values: this parameter is used by some of the color schemes. Please consult which color schema property uses this optional parameter.
-
goodvalue: the value limiter to compose the colors (green). This field is optional and if not informed, the tool will use the maximum value for the attribute.
-
badvalue: the value limiter to compose the colors (red). This field is optional and if not informed, the tool will use the minimum value for the attribute.
-
restrictedAttribute: parameter used by the Restricted property. Only evaluates attribute if the vertex also has restrictedAttribute with value being equal to restrictedValue.
-
restrictedValue: parameter used by the Restricted property.
-
trafficLightType: defines the gradient type for the scheme. It can be either type1 or type2
-
isInverted: invert the color scheme used in vertices. If TRUE, positive values will be red and negative will be green.
An example using these variables is presented below.
<colorscheme>
<attribute>Morale</attribute>
<class>ActivityScheme</class>
</colorscheme>
<colorscheme>
<attribute>Hours</attribute>
<class>ActivityScheme</class>
<goodvalue>0</goodvalue>
<badvalue>16</badvalue>
<trafficLightType>type2</trafficLightType>
<isInverted>true</isInverted>
</colorscheme>
Prov Viewer has twelve different classes available for color schemes that evaluate an attribute and return the vertex color. These classes vary in vertex types (activity or entity) and how the color is calculated. However they are all based on an abstract color scheme class, allowing users to create new schemes. For new schemes, it is necessary to implement two functions (the abstract call and color functions) and place the class in the same folder as the other schemes in order to allow Prov Viewer to automatically identify the scheme and use it when called. The current available schemes are:
-
ActivityMultiScheme
-
ActivityRestrictedScheme
-
ActivityScheme
-
ActivityVectorScheme
-
DefaultScheme
-
DefaultVertexColorScheme
-
EntityMultiScheme
-
EntityRestrictedScheme
-
EntityScheme
-
GraphVisualizationScheme
-
ProvScheme
The Vertex Stroke component designates a list of values for specific attributes that are used to change the vertex to have a dashed border for easier identification.
-
attribute: the name of the attribute.
-
values: the accepted values, separated by a blank space, from the to dot the vertex.
An example using these variables is presented below where vertices with the attribute “Task” and value “Idle” have dotted border.
<vertexstroke>
<attribute>Task</attribute>
<values>Idle Fired Promotion Training Hired</values>
</vertexstroke>
The Activity Color component is similar to Vertex Stroke component but more restrictive: it only evaluates activity vertices and only changes to the desired color.
-
attribute: the name of the attribute.
-
value: the accepted values, separated by a blank space, from the to dot the vertex.
-
vercolor: the RGB color for the vertex that contains the and has the same
An example using these variables is presented below where activity vertices with the attribute “Task” and value “Idle” have pink color.
<activitycolor>
<attribute>Task</attribute>
<value>Idle</value>
<vercolor><r>238</r><g>180</g><b>180</b></vercolor>
</activitycolor>
Prov Viewer also has a feature for automatic detection and configuration for each edge type and color scheme according to the graph being used. These features are available through the interface in the Options menu.
The tool automatically detect all types of edges and labels to populate the Edge Filter using default values (edgestroke = MAX, collapsefunction = SUM). This feature does not overwrite the already defined from the configuration XML, only complements with the missing edges.
This process can take a while depending on the number of edges in the graph since it scans all edges to determine the labels and types being used.
The tool automatically detects all different attributes being used by vertices to populate the available color schemes in the interface with the DefaultVertexColorScheme. This feature does not overwrite the already defined from the configuration XML, only complements with the missing attributes.