Custom topic panel

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
(Configuring the custom topic panel)
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
Custom topic panel is one of several available [[topic panels]] in Wandora. As the name suggests the custom topic panel can be customized. Custom topic panel uses Wandora's [[Query language]] scripts to select information viewed in the panel. Custom topic panel consists of information tables and table groups.  
+
Custom topic panel is one of several available [[topic panels]] in Wandora. As the name suggests the custom topic panel can be customized. Custom topic panel uses Wandora's [[Query language]] scripts to select the information viewed in the panel. Custom topic panel consists of information tables and table groups.  
  
 
Next screen capture views custom topic panel with the '''Schema type''' topic. The custom topic panel views two table groups: '''Classes and Instances''' and '''New group'''. First group contains two information tables viewing class-instance and subclass-superclass relations of the '''Schema type''' topic. Latter group contains one table table views instances of '''Schema type''' topic and the number of instances of every instance topic. The user should notice that custom topic panel tables can view numbers and more generally characters addition to topics.
 
Next screen capture views custom topic panel with the '''Schema type''' topic. The custom topic panel views two table groups: '''Classes and Instances''' and '''New group'''. First group contains two information tables viewing class-instance and subclass-superclass relations of the '''Schema type''' topic. Latter group contains one table table views instances of '''Schema type''' topic and the number of instances of every instance topic. The user should notice that custom topic panel tables can view numbers and more generally characters addition to topics.
Line 7: Line 7:
  
  
== Configuration ==
+
== Using information tables ==
  
Custom topic panel is configured by selecting '''Options > Configure Custom panel panel w ... > Configure panel''' in the '''View''' menu. Note that this option is only available when you have enabled custom topic panel and have a topic opened. Selecting this will bring open the following dialog.
+
Custom topic panel looks very much like the [[traditional topic panel]]. Basically it views information related to one topic. Top of the panel views topic's base name, subject locator and subject identifiers. Below that are all the query groups. Each group contains one or more queries. Query results are viewed in information tables. Each table can view topics, characters strings and numbers. Number of table rows and columns depends on the [[query language]] script that generates the information.  
  
[[Image:Wandora_custom_config.jpg|center]]
 
  
Custom queries are organized in groups. In the above example there are two groups "Classes and instances" and "New Group". Under these are the queries belonging to the groups. To create a new group, click the '''Add group''' button on the right. You can rename a group by first selecting it and then clicking on the name again.
+
[[Image:Custom_topic_panel_example.gif|center]]
  
To add queries click the '''Add query''' button on the right. Queries can also be renamed by clicking on the name. You can rearrange groups and queries by dragging them to a different place. You can also move queries from one group to another by dragging and dropping them. Queries and groups can be removed by selecting them and clicking either '''Remove group''' or '''Remove query''' button.
 
  
You can also use the '''Copy query''' button to duplicate an existing query and use it as a base when creating a new query.
+
The user can select information tables cells, rows and columns, and perform operations for the selection. Available operations are discussed in the page [[Working with topic tables]].
  
To edit a query either double click it or select it and press the '''Modify query''' button. This will open following dialog.
+
== Configuring the custom topic panel ==
  
[[Image:Wandora_custom_script.jpg|center]]
+
The number of and type of information tables in the custom topic panel is not limited. The user can edit old information tables and create new information tables. Information tables are created in the configuration panel.
  
Here you can change the name of the query, the scripting engine used to execute the query and the query script itself. You can only select scripting engines that are available to Wandora using the Java scripting API. '''See [[Query language]] for information about the query scripts'''.
+
Custom topic panel is configured by selecting menu option '''View > Custom w ... > Configure panel'''. The menu option is available only when the user has enabled custom topic panel and is viewing thee custom topic panel. Selecting the configuration option opens up the configuration dialog. Next image views a screen capture of the configuration dialog.
  
Clicking the '''Check script''' button will parse the script using the selected scripting engine and provide information if any errors were encountered. You can use this to make sure that the script is syntactically correct.
 
  
The menu at the top of the dialog provides basic text editing functionality.
+
[[Image:Wandora_custom_config.jpg|center]]
  
Clicking '''OK''' will also check that the script is valid and if no errors are found, saves the query.
 
  
== Using custom topic panel ==
+
Custom queries are organized in groups. The example above contains two groups, namely '''Classes and instances''' and '''New Group'''. To create a new group, the user can click the '''Add group''' button. To rename the group, the user can double click the group name and the label becomes editable.
  
Custom topic panel looks much like traditional topic panel. Top of the page contains topic base name, subject locator and subject identifiers. Below this basic information are all the query groups defined in panel configuration. Each group may contain several queries. Query results are shown as tables of topics. Note that unlike association roles, table column headers may contain subject identifiers for which the topic map does not contain a topic.
+
To add queries the user can click the '''Add query''' button. Queries can also be renamed by double clicking the label. The user can also rearrange groups and queries by dragging. Also, a query can be moved from one group to another. To remove a query or a group, the user can select it and click either '''Remove group''' or '''Remove query''' button.
  
[[Image:Custom_topic_panel_example.gif|center]]
+
To duplicate an existing query the user can press the '''Copy query''' button.
 +
 
 +
To edit a query the user can either double click it or select it and press the '''Modify query''' button. Both actions open the query editor dialog. Next image views the query editor. It is very simple text editor with a text field and a language selection box.
 +
 
 +
 
 +
[[Image:Wandora_custom_script.jpg|center]]
 +
 
 +
 
 +
The text field on top of the editor window is used to hold script's name. Below that is a select box used to specify the scripting engine that is used to execute the query. Below the select box is a text area for the query script. Read the page [[Query language]] for more information about writing query scripts.
 +
 
 +
The user can use '''Check script''' button to parse the script. If parse fails, Wandora provides more information about the error.
 +
 
 +
The menu at the top of the dialog provides basic text editing functionality.
  
You can toggle visibility of each query group in the '''View > Options > ''' menu.
+
The '''OK''' button also checks the syntax of the script, closes the configuration window and saves the script if no errors are found. The '''Cancel''' button closes the configuration window and cancels all changes in query scripts.
  
 
== See also ==
 
== See also ==
Line 48: Line 56:
 
* [[Processing topic panel]]
 
* [[Processing topic panel]]
 
* [[Sketch grid]]
 
* [[Sketch grid]]
 +
* [[Webview]]

Latest revision as of 11:18, 10 February 2015

Custom topic panel is one of several available topic panels in Wandora. As the name suggests the custom topic panel can be customized. Custom topic panel uses Wandora's Query language scripts to select the information viewed in the panel. Custom topic panel consists of information tables and table groups.

Next screen capture views custom topic panel with the Schema type topic. The custom topic panel views two table groups: Classes and Instances and New group. First group contains two information tables viewing class-instance and subclass-superclass relations of the Schema type topic. Latter group contains one table table views instances of Schema type topic and the number of instances of every instance topic. The user should notice that custom topic panel tables can view numbers and more generally characters addition to topics.


Custom topic panel2.jpg


[edit] Using information tables

Custom topic panel looks very much like the traditional topic panel. Basically it views information related to one topic. Top of the panel views topic's base name, subject locator and subject identifiers. Below that are all the query groups. Each group contains one or more queries. Query results are viewed in information tables. Each table can view topics, characters strings and numbers. Number of table rows and columns depends on the query language script that generates the information.


Custom topic panel example.gif


The user can select information tables cells, rows and columns, and perform operations for the selection. Available operations are discussed in the page Working with topic tables.

[edit] Configuring the custom topic panel

The number of and type of information tables in the custom topic panel is not limited. The user can edit old information tables and create new information tables. Information tables are created in the configuration panel.

Custom topic panel is configured by selecting menu option View > Custom w ... > Configure panel. The menu option is available only when the user has enabled custom topic panel and is viewing thee custom topic panel. Selecting the configuration option opens up the configuration dialog. Next image views a screen capture of the configuration dialog.


Wandora custom config.jpg


Custom queries are organized in groups. The example above contains two groups, namely Classes and instances and New Group. To create a new group, the user can click the Add group button. To rename the group, the user can double click the group name and the label becomes editable.

To add queries the user can click the Add query button. Queries can also be renamed by double clicking the label. The user can also rearrange groups and queries by dragging. Also, a query can be moved from one group to another. To remove a query or a group, the user can select it and click either Remove group or Remove query button.

To duplicate an existing query the user can press the Copy query button.

To edit a query the user can either double click it or select it and press the Modify query button. Both actions open the query editor dialog. Next image views the query editor. It is very simple text editor with a text field and a language selection box.


Wandora custom script.jpg


The text field on top of the editor window is used to hold script's name. Below that is a select box used to specify the scripting engine that is used to execute the query. Below the select box is a text area for the query script. Read the page Query language for more information about writing query scripts.

The user can use Check script button to parse the script. If parse fails, Wandora provides more information about the error.

The menu at the top of the dialog provides basic text editing functionality.

The OK button also checks the syntax of the script, closes the configuration window and saves the script if no errors are found. The Cancel button closes the configuration window and cancels all changes in query scripts.

[edit] See also