Schema
(→Creating schema example) |
(→Creating schema example) |
||
Line 34: | Line 34: | ||
− | You should now | + | 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'''. |
[[Image:schema_example_05.gif|center]] | [[Image:schema_example_05.gif|center]] | ||
+ | |||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | [[Image:schema_example_07.gif|center]] | ||
+ | |||
+ | |||
+ | Now we are are to try how the shema works in real life. Lets create another album. Select '''album''' topic in tree. Right click the topic and select '''New topic > New instance topic...'''. | ||
+ | |||
+ | |||
+ | [[Image:schema_example_08.gif|center]] | ||
+ | |||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | [[Image:schema_example_09.gif|center]] | ||
+ | |||
+ | |||
+ | Open artist 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. | ||
+ | |||
+ | |||
+ | [[Image:schema_example_09.gif|center]] |
Revision as of 13:37, 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.
Creating 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.
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.
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.
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.
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.
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.
Now we are are to try how the shema works in real life. Lets create another album. Select album topic in tree. Right click the topic and select New topic > New instance topic....
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.
Open artist 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.