The Meta-Environment API

nl.cwi.sen1.visplugin.graphplugin
Class GraphVisualizationWindow

java.lang.Object
  extended by nl.cwi.sen1.visplugin.VisualizationPluginWindow
      extended by nl.cwi.sen1.visplugin.graphplugin.GraphVisualizationWindow

public class GraphVisualizationWindow
extends nl.cwi.sen1.visplugin.VisualizationPluginWindow

Graph Plugin VisualisationWindow. Shows a graph.

Author:
Anton Gerdessen (reviewer)

Field Summary
private static int DOUBLE_CLICK
           
private  GraphBuilder graphBuilder
           
private  java.lang.String m_attributedGraphTuple
           
private  java.lang.String m_relationGraph
           
private  java.lang.String m_relationGraphTuple
           
 
Fields inherited from class nl.cwi.sen1.visplugin.VisualizationPluginWindow
m_factory
 
Constructor Summary
GraphVisualizationWindow()
           
 
Method Summary
 void doLocationClick(java.lang.String nodeId)
          This method is the respondant for a double click on an graph node and then signals to open the location
 java.lang.String getRTupleName(nl.cwi.sen1.relationstores.types.RTuple fact)
          Get the name of the RTuple.
 boolean isAttributedGraphType(nl.cwi.sen1.relationstores.types.RTuple fact)
           
 boolean isRelStrStr(nl.cwi.sen1.relationstores.types.RTuple fact)
          Check to see if the RTuple is indeed a relation.
 boolean isRelTupleTuple(nl.cwi.sen1.relationstores.types.RTuple fact)
          Check to see if the RTuple is indeed a tuple([str,loc]),tuple([str,loc]) relation.
 boolean isTypeSupported(nl.cwi.sen1.relationstores.types.RTuple fact)
          Check if a given RType is supported by this visualisation.
 javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
          Render the RTuple in a graph chart.
 void setFactory(nl.cwi.sen1.relationstores.Factory factory)
          Set a new Factory object, for testing purposes.
 
Methods inherited from class nl.cwi.sen1.visplugin.VisualizationPluginWindow
createExtensionMenu, disconnectComponent, displayVisualization, executeOnLoad, exportToCsv, exportToCsvClicked, exportToImage, factOutOfDate, getController, getFactId, getStoreId, getStudio, getWindowId, initializeWindow, openLocationInEditor, rstoreUnloaded, showPopUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOUBLE_CLICK

private static final int DOUBLE_CLICK
See Also:
Constant Field Values

graphBuilder

private GraphBuilder graphBuilder

m_relationGraph

private final java.lang.String m_relationGraph
See Also:
Constant Field Values

m_relationGraphTuple

private final java.lang.String m_relationGraphTuple
See Also:
Constant Field Values

m_attributedGraphTuple

private final java.lang.String m_attributedGraphTuple
See Also:
Constant Field Values
Constructor Detail

GraphVisualizationWindow

public GraphVisualizationWindow()
Method Detail

doLocationClick

public void doLocationClick(java.lang.String nodeId)
This method is the respondant for a double click on an graph node and then signals to open the location

Parameters:
nodeId - This is the identifier of the double clicked node

render

public javax.swing.JPanel render(nl.cwi.sen1.relationstores.types.RTuple fact)
Render the RTuple in a graph chart.

Specified by:
render in class nl.cwi.sen1.visplugin.VisualizationPluginWindow
Parameters:
fact - RTuple with the information.
Returns:
JPanel holding the pie chart.

setFactory

public void setFactory(nl.cwi.sen1.relationstores.Factory factory)
Set a new Factory object, for testing purposes.

Parameters:
factory - Factory to use.

isRelStrStr

public boolean isRelStrStr(nl.cwi.sen1.relationstores.types.RTuple fact)
Check to see if the RTuple is indeed a relation.

Parameters:
fact - RTuple to test.
Returns:
True if it is the correct str,str type.

isRelTupleTuple

public boolean isRelTupleTuple(nl.cwi.sen1.relationstores.types.RTuple fact)
Check to see if the RTuple is indeed a tuple([str,loc]),tuple([str,loc]) relation.

Parameters:
fact - RTuple to test.
Returns:
True if it is the correct tuple[str,loc],tuple[str,loc] type.

isAttributedGraphType

public boolean isAttributedGraphType(nl.cwi.sen1.relationstores.types.RTuple fact)

isTypeSupported

public boolean isTypeSupported(nl.cwi.sen1.relationstores.types.RTuple fact)
Check if a given RType is supported by this visualisation.

Parameters:
fact - The facts for which to verify if the type is supported
Returns:
True if it itype is supported

getRTupleName

public java.lang.String getRTupleName(nl.cwi.sen1.relationstores.types.RTuple fact)
Get the name of the RTuple.

Parameters:
fact - RTuple holding information
Returns:
String holding the name of the tuple

The Meta-Environment API