Schema

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
(Creating a schema example)
Line 14: Line 14:
 
==Creating a schema example==
 
==Creating a schema example==
  
Wandora software package contains a sample topic map '''ArtofNoise.xtm''' covering almost perfect discography of Art of Noise music group. Let's say we are planning to modify and extend this discography to cover other bands also. We could use schemaless association editor but as we think the work is continual we want to optimize the work flow as smooth as possible. Schema assists our filing project.
+
Wandora software package contains a sample topic map '''ArtofNoise.xtm''' covering almost perfect discography of Art of Noise music group. Let's say we are planning to extend this discography to cover unlisted albums also. We could use schemaless association editor but as we think the work is continual we want to optimize the work flow as smooth as possible. Schema assists our filing project.
  
 
First open the topic map '''ArtofNoise.xtm''' found in samples/ArtofNoise folder. Drag and drop the XTM file to layer stack. Select new layer named after the imported XTM file. Open topic '''artist'''.
 
First open the topic map '''ArtofNoise.xtm''' found in samples/ArtofNoise folder. Drag and drop the XTM file to layer stack. Select new layer named after the imported XTM file. Open topic '''artist'''.

Revision as of 13:54, 13 October 2006

Wandora schema describes some of the general editing features of the Wandora application. Schema defines

  • What associations are allowed for the topic.
  • What roles are allowed within the association.
  • What players are allowed within the association.
  • What text datas (occurrences) are allowed for the topic.

Schema is a collection of topics and associations found usually under Schema type topic.


Schema tree.gif


Creating a schema example

Wandora software package contains a sample topic map ArtofNoise.xtm covering almost perfect discography of Art of Noise music group. Let's say we are planning to extend this discography to cover unlisted albums also. We could use schemaless association editor but as we think the work is continual we want to optimize the work flow as smooth as possible. Schema assists our filing project.

First open the topic map ArtofNoise.xtm found in samples/ArtofNoise folder. Drag and drop the XTM file to layer stack. Select new layer named after the imported XTM file. Open topic artist.


Schema example 01.gif


Now you should have artist open in Wandora as shown above. Note that topic has only one class myMusic and one instance of The Art of Noise (artist). Next step is to add class Content type to the topic. Right click Classes header title and select Add class.... Wandora opens dialog used to select topic. Open Schema type subtree and select Content type. Finally confirm class addition clicking OK.


Schema example 02.gif


Now you should have the topic artist open and topic has two classes of myMusic and Content type as shown above. Our next step is to define associations of all artists. Right click on Associations and select Add association.... As we described the topic instance of Content type association editor offers us schema associations. By default editor waits for associations of Association type. This is fine for us. Enter hasAlbum to the text field title Association type and click OK.


Schema example 03.gif


You should now see first association in the artist topic. Association's type is Association type and association has two players of artist and hasAlbum with roles Content type and Association type. We have just described that all instances of artist topic ie. The Art of Noise (artist) for example has associations of type hasAlbum. Next step is to tie roles and players of hasAlbum associations. Open hasAlbum double clicking the topic. Note that hasAlbum has class Association type. This class was added to the topic during the previous step while we added association to the artist.


Schema example 05.gif


Right click Associations header title and select Add association.... As the topic is instance of Association type association editor expects you to enter Role association. Write album to the text field titled Role and click Add. Association is added to the topic but association editor remains open. Continue writing artist to the text field titled Role and click OK. We have just created two associations to the topic. Both associations are typed as Role and hasAlbum plays role Association type in both association while Role player is artist and album. This means that we can add two players to every hasAlbum association. First player is instance of artist and second player is instance of album. Artist and album topics are also roles of the players.


Schema example 07.gif


Now we are are to try how the schema works in real life. Lets create yet another album. Select album topic in tree. Right click the topic and select New topic > New instance topic....


Schema example 08.gif


Write Best Of Art Of Noise to the basename field and http://www.wandora.net/album/Best_Of_Art_Of_Noise to the subject identifier field. Confirm the request and new topic appears in albums.


Schema example 09.gif


Open topic The Art of Noise (artist). Open association editor by selecting Add assocation.... You are now able to create hasAlbum associations between artists and albums very easily. Just press TAB on the album field and Wandora opens drop down selector for existing albums or write new album name to the text field and Wandora creates new topic for the album and makes the created topic instance of album topic. This is just much more convenient than explicitly picking up every role and player in associations.


Schema example 10.gif


Created schema is not automatically symmetric. You must link artists and albums in the artist. Schema says nothing about creating same association in the album. If you want to add artist-album associations in albums you need to create symmetric schema definitions to album topic. As role definitions remain the same you just have to define Content type and Association type.

Personal tools