<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://sske.cloud.upb.ro/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://sske.cloud.upb.ro/wiki/index.php?action=history&amp;feed=atom&amp;title=Smwplussandbox%2FQuery_for_data</id>
		<title>Smwplussandbox/Query for data - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://sske.cloud.upb.ro/wiki/index.php?action=history&amp;feed=atom&amp;title=Smwplussandbox%2FQuery_for_data"/>
		<link rel="alternate" type="text/html" href="http://sske.cloud.upb.ro/wiki/index.php?title=Smwplussandbox/Query_for_data&amp;action=history"/>
		<updated>2026-05-28T03:01:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://sske.cloud.upb.ro/wiki/index.php?title=Smwplussandbox/Query_for_data&amp;diff=238&amp;oldid=prev</id>
		<title>Ontoprise: auto-generated by Wiki admin tool</title>
		<link rel="alternate" type="text/html" href="http://sske.cloud.upb.ro/wiki/index.php?title=Smwplussandbox/Query_for_data&amp;diff=238&amp;oldid=prev"/>
				<updated>2011-11-25T14:06:43Z</updated>
		
		<summary type="html">&lt;p&gt;auto-generated by Wiki admin tool&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| align=&amp;quot;center&amp;quot; cellspacing=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | &amp;lt;div style=&amp;quot;font-size: 20pt;  line-height: 30px&amp;quot;&amp;gt;The QueryInterface&amp;lt;br/&amp;gt;&amp;lt;span style=&amp;quot;font-size: 14pt&amp;quot;&amp;gt;Learn&amp;amp;nbsp;to&amp;amp;nbsp;query&amp;amp;nbsp;for&amp;amp;nbsp;data&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | [[File:QI_head.png|300px|QueryInterface]]&lt;br /&gt;
| align=&amp;quot;right&amp;quot; | __TOC__&lt;br /&gt;
|} __NOTOC__&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 20pt;  font-weight: bold&amp;quot;&amp;gt;F&amp;lt;/span&amp;gt;red always has much work to do and finds it very handy to overview his tasks in well-arranged tables. For this, he wants to create a table that not only contains all relevant information, but also gets automatically updated everytime something has changed or was created. You can help him to create the table by using one of SMW+/Halo's basic features: the [[Glossary#query|Query Interface]].&lt;br /&gt;
&lt;br /&gt;
= Open the QueryInterface =&lt;br /&gt;
#Select from the '''Articles and data'''-menu the menu item '''QueryInterface'''&lt;br /&gt;
#:[[File:Queryinterface_menu.png|thumb|left|500px|Click on the &amp;quot;QueryInterface&amp;quot; menu item to open the QueryInterface.]]&lt;br /&gt;
#The QueryInterface opens.&lt;br /&gt;
#:[[File:TUT firstannotation10.png|thumb|left|550px|The Query Interface special page.]]&lt;br /&gt;
&lt;br /&gt;
'''Result: the QueryInterface is open and you can start building your query.'''&lt;br /&gt;
&lt;br /&gt;
= Build the query =&lt;br /&gt;
#Click '''Add category'''. Like in the Data Toolbar you can press {{Keys|Ctrl}} + {{Keys|Alt}} + {{Keys|Space}} to use autocompletion.&lt;br /&gt;
#Enter &amp;lt;tt&amp;gt;Smwplussandbox/Task&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Click '''Add'''.&lt;br /&gt;
#Below the section '''Result preview''' you should now see all articles (&amp;quot;[[Glossary#instance|instances]]&amp;quot;) that contain the category tag &amp;quot;Smwplussandbox/Task&amp;quot;. You will also notice your new task &amp;quot;Update screenshots&amp;quot;:&lt;br /&gt;
#:[[File:TUT firstannotation11.png|thumb|left|400px|The list of query results is located in the &amp;quot;Result preview&amp;quot; section.]]&lt;br /&gt;
#In order to restrict the results to Freds tasks, you click on '''Add property'''&lt;br /&gt;
#Enter &amp;lt;tt&amp;gt;Smwplussandbox/Assigned to&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Activate the checkbox '''Show in results''' to list the property values in the result preview&lt;br /&gt;
#Activate the checkbox '''Value must be set''' to get only results that have explicitly this property&lt;br /&gt;
#Activate the radiobutton '''Specific value'''&lt;br /&gt;
#Enter &amp;lt;tt&amp;gt;User:Fred&amp;lt;/tt&amp;gt; in the field '''property value'''&lt;br /&gt;
#Click '''Add'''.&amp;lt;br/&amp;gt;Your screen should look similar to this:&lt;br /&gt;
#:[[File:TUT firstannotation12.png|thumb|left|550px|Restrict the values of query results.]]&lt;br /&gt;
#Open again the '''Result preview''' to verify that it contains only tasks that belong to Fred.&lt;br /&gt;
&lt;br /&gt;
'''Result: You have created a query for all tasks that belong to a Fred.'''&lt;br /&gt;
&lt;br /&gt;
You can add more properties (e.g. End date, description...) if you like and do this via trial and error in the Query Interface until you are satisfied with the results. And if you have the [http://smwforum.ontoprise.com/smwforum/index.php/Help:Semantic_Result_Formats Semantic Result Formats extension] installed, you can also use timelines, 3d-bars, pie-charts, maps etc. to visualize the data.&lt;br /&gt;
&lt;br /&gt;
{{NoteInText|If you call the QueryInterface from within the WYSIWYG editor then you can embed the result table into the article.}}&lt;br /&gt;
&lt;br /&gt;
= Embed a query into an article =&lt;br /&gt;
#Open the article that you have created in [[Smwplussandbox/Create_articles|Lesson 1: Create articles]]. &lt;br /&gt;
#Open the article in the WYSIWYG editor by clicking on the &amp;quot;Edit&amp;quot;-tab.&lt;br /&gt;
#:[[File:Edittab.png|thumb|left|250px]]&lt;br /&gt;
#Place the cursor somewhere in the text of the article.&lt;br /&gt;
#Click on the &amp;quot;Query Interface&amp;quot; icon to open the Query Interface.&lt;br /&gt;
#:[[File:WWqueryinterface.png|thumb|left|500px]]&lt;br /&gt;
#The Query Interface must be visible as an overlay in the WYSIWYG editor.&lt;br /&gt;
#:[[File:TUT firstannotation10.png|thumb|left|550px]]&lt;br /&gt;
#Click '''Add category'''. Like in the Semantic Toolbar you can press {{Keys|Ctrl}} + {{Keys|Alt}} + {{Keys|Space}} to use autocompletion.&lt;br /&gt;
#Enter &amp;lt;tt&amp;gt;Smwplussandbox/Task&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Click '''Add'''.&lt;br /&gt;
#Below the section '''Result preview''' you should now see all articles (&amp;quot;[[Glossary#instance|instances]]&amp;quot;) that are assigned to the category &amp;quot;Task&amp;quot;. You will also notice your new task &amp;quot;Update screenshots&amp;quot;:&lt;br /&gt;
#:[[File:TUT firstannotation11.png|thumb|left|400px]]&lt;br /&gt;
#Click on the button &amp;quot;Insert Query&amp;quot; (located at the bottom of the overlay) to embed the query result into the article.&lt;br /&gt;
&lt;br /&gt;
'''Result: the query result is embedded into your article.'''&lt;br /&gt;
&lt;br /&gt;
= Next Lesson =&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; cellspacing=&amp;quot;2&amp;quot; width=&amp;quot;90%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; | &amp;lt;br/&amp;gt;&lt;br /&gt;
! width=&amp;quot;10%&amp;quot; | &amp;lt;br/&amp;gt;&lt;br /&gt;
! width=&amp;quot;40%&amp;quot; | &amp;lt;br/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Tried out enough? Then it's time to go to the next sandbox: '''Create your own data model with the DataExplorer'''&amp;lt;br/&amp;gt;&lt;br /&gt;
| &amp;lt;br/&amp;gt;&lt;br /&gt;
| [[File:Button GoToNext.png|left|Button GoToNext.png|link=Smwplussandbox/Create_a_data_model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[[Rationale::This article is the second sandbox of the SMW+ sandbox tour. It gives some basic hints to the Query Interface, provides demo content elements and an area where users can check out the editor and play with the content elements.| ]] [[Part of bundle::Smwplussandbox]]&lt;/div&gt;</summary>
		<author><name>Ontoprise</name></author>	</entry>

	</feed>