From SMW+ 1.5.6

Jump to: navigation, search
Go to: Annotation step one Annotation step two Querying the data Embedding query results Next sandbox



A task for Fred
Advanced annotation with SMW+

Sandb AdvAno head.png

I magine you are working together with Fred, who is one of your friendly colleagues in the really important and trend-setting "Test project". Recently, there was another release of your fascinating flight simulation software that is the core product of "Test company". Unfortunately, Fred was so busy with the release that he forgot to update the screenshots in the internal documentation. Thus, you would like to remind him of this important task. Furthermore, you want to add a deadline and connect it to "Test project", because Fred is also engaged in "Test project 2" and tends to mix things up. So you type:

Task: Update Screenshots

Description

During the next phase, it is necessary to update the screenshots in the internal documentation.

Assignee

Fred

Start time

25.07.2010

Deadline

30.07.2010

Related to

This task is part of the Test project.



Now you could send the task to Fred. But don't forget about Mike. Mike is the Test project's project manager. He has to overview all of the project activities and to achieve the best possible results by cleverly arranging workflows and processes. So you would like to make the task information also available to him. But he should not waste his time with retyping or transferring the information to another place. And also Fred is happy, if the task simply appears in his to-do list without further efforts. Therefore, the easiest way to help Mike AND Fred is to add some annotations to your task, which then both can query in their own articles.

And here come the steps how you can do this:

[edit] First: Annotate a category

First, you annotate a category. This is good to make the whole article (also referred to as "instance") or a group of equally categorized articles citable.

  1. Click More > Annotate to switch to the Advanced annotation mode
    TUT firstannotation2.png
    The Semantic toolbar appears at the bottom right of the page
  2. Click Annotate
    TUT firstannotation3.png
  3. Type Task in sandbox into the Category field
    TUT firstannotation4.png
  4. Click Add

Result: Now you have annotated this sandbox article (named "Update screenshots") to the category "Task in sandbox". You can also [Create a new page] for the task or any task you can think of and annotate the created page as described. In doing so, you can find any task ever entered to this wiki via the category "Task in sandbox".

[edit] Second: Annotate properties

Second, you annotate single elements of the task with "content tags" that e.g. simply say: "This is a date", "This is a city" etc. Such content tags are also referred to as "properties".

  1. Select the description part of the task with the mouse saying:
    During the next phase, it is necessary to update the screenshots in the internal documentation.
    Since it makes no difference for SMW+, where the relevant information is placed in the article, you can either select the task description sentence on top of this page or the one given just a few lines before. In any case, the box "Specify this property" pops up.
    TUT firstannotation5.png
  2. Enter Description in the field property. If you press  Ctrl +  Alt +  Space, the autocompletion function opens and you can also choose out of already existing properties.
  3. Click Add.
    The highlighted text indicates the annotation. Click B AAMdelete.png to delete the annotation; click B AAMedit.png to edit the annotation. Now you can process with the other annotations.
  4. Select "Fred" with the mouse, enter Assigned to and click Add
  5. Annotate the start time with the property Start date: 25.07.2010
  6. Annotate the deadline with the property End date: 30.07.2010
  7. Annotate "Test project" with the property Related to project
  8. Finally click Save annotations
    TUT firstannotation8.png
  9. Check your done annotations
    TUT firstannotation9.png
  10. Click on the Page tab (top left of the article) to leave the Advanced annotation mode
  11. If you did your annotations "inline" directly in the seven points above, the text should now look like this:
    TUT firstannotation5 2.png

Result: You're done. You have annotated the relevant elements of the screenshot update task and thus made them readable for your machine. Now it's up to Mike and Fred to use this information.

[edit] Third: Query Freds to-do list

Fred 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 Query Interface.

Hint: Preferably, you open the interface in a new tab or window so you can switch back to this article at any time.

In the Result preview you see now all tasks Fred is assignee of.
TUT firstannotation13.png
  1. Open the special page queryInterface (in a new tab/window)
  2. Click Add category. Like in the Semantic toolbar you can press  Ctrl +  Alt +  Space to use autocompletion.
  3. Enter Task in sandbox
    TUT firstannotation10.png
  4. Click Add.
    Below the section Result preview you see all articles ("instances") that are assigned to the category "Task in sandbox". You will also notice your new task "Update screenshots":
    TUT firstannotation11.png
  5. Since the Test Company has a lot of employees, we should now restrict the results to Freds tasks. For this click Add property
  6. Enter Assigned to
  7. Activate the checkbox Show in results to list the property values in the result preview
  8. Activate the checkbox Value must be set to get only results that have explicitly this property
  9. Activate the radiobutton Specific value
  10. Enter Fred in the field property value
  11. Click Add.
    Your screen should look similar to this:
    TUT firstannotation12.png

Result: You have composed the elements of the task list by simply adding properties. 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 Semantic Result Formats extension installed, you can also use timelines, 3d-bars, pie-charts, maps etc. to visualize the data.

[edit] Fourth: Embed Freds task list into an article

Never mind what kind of visualization you choose, the last step is to embed it into an article. Fred for example has created a tasks article, where he can always check his current activities. Let's have a look at how this works:

  1. Go back to the query Inteface
  2. Click query source to get the sourcecode of the query
    TUT firstannotation18.png
  3. Select the sourcecode and copy it to clipboard by pressing the keys  Ctrl +  C
  4. Come back to this page. You will work with wikitext in the next step so remember the "HERE" you see below.
  5. Click edit and switch to wikitext mode via the "Source" button.
    B wikitext.gif
    HERE (you can paste the query sourcecode with pressing STRG and V). Then click "Save page".
    Result: You should now see the table populated with property values from this article.
  6. Fred would probably prefer a version without "Assigned to" (because it is always him) and have descriptions and dead lines in the list instead:

    warning.pngTSC not accessible. Check server: localhost:8090

  7. Information.png Note: To update the page and get the latest changed facts, simply click Refresh


E verything went fine? Good. Let us also hint you at the "tabular forms" as a result format that lets you even change values and add instances directly into the table, i.e. without creating a new article. This is the most comfortable way to create e.g. a new task for Fred that will be also reflected immediately in Mikes articles and tables.

By the way, instead of opening the specialpage query interface, you can also directly open the interface while editing an article in the WYSIWYG editor's toolbar. And this is only one of the great WYSIWYG extension features.




It's time to go to the next sandbox: have a try and compose appealing articles as easy as you write word documents!
Button GoToNext.png




Static facts Derived facts
Facts about Update screenshotsRDF feed
Content hash5fa216944adcf7211b191db91e2e06b3  +
Part of bundleSmwplussandbox  +
RationaleThis article is the first sandbox of the SMW+ sandbox tour. It contains a step-by-step guide for new users about how to enter the first annotation into this wiki, how to query for it, and how to embed query results in the article.
This page was last modified on 11 July 2011, at 11:19.This page has been accessed 11 times.
SemanticTreeview close tree