Author: lgiessmann Date: Sun Apr 11 09:16:12 2010 New Revision: 272
Log: service-registry: added the file textgrid.xtm which constraints an ontology for isidorus used as textgrid-service-registry; ajax: fixed a bug when there are no players available for role-player-constraints; ajax: fixed a bug when there are no players available for other-role-player-constraints
Added: trunk/src/unit_tests/textgrid.xtm Modified: trunk/src/ajax/javascripts/tmcl_tools.js
Modified: trunk/src/ajax/javascripts/tmcl_tools.js ============================================================================== --- trunk/src/ajax/javascripts/tmcl_tools.js (original) +++ trunk/src/ajax/javascripts/tmcl_tools.js Sun Apr 11 09:16:12 2010 @@ -209,6 +209,7 @@ for(var k = 0; k !== rpcs[j].playerType.length; ++k){ for(var l = 0; l !== rpcs[j].playerType[k].length; ++l){ if(instanceOfsPsis.indexOf(rpcs[j].playerType[k][l]) !== -1){ + if(!rpcs[j].players) rpcs[j].players = new Array(); rpcs[j].players.push(new Array(CURRENT_TOPIC)); break; } @@ -224,6 +225,7 @@ for(var k = 0; k !== orcs[j].playerType.length; ++k){ for(var l = 0; l !== orcs[j].playerType[k].length; ++l){ if(instanceOfsPsis.indexOf(orcs[j].playerType[k][l]) !== -1){ + if(!orcs[j].players) orcs[j].players = new Array(); orcs[j].players.push(new Array(CURRENT_TOPIC)); break; } @@ -232,6 +234,7 @@ for(var k = 0; k !== orcs[j].otherPlayerType.length; ++k){ for(var l = 0; l !== orcs[j].otherPlayerType[k].length; ++l){ if(instanceOfsPsis.indexOf(orcs[j].otherPlayerType[k][l]) !== -1){ + if (!orcs[j].otherPlayers) orcs[j].otherPlayers = new Array(); orcs[j].otherPlayers.push(new Array(CURRENT_TOPIC)); break; }
Added: trunk/src/unit_tests/textgrid.xtm ============================================================================== --- (empty file) +++ trunk/src/unit_tests/textgrid.xtm Sun Apr 11 09:16:12 2010 @@ -0,0 +1,1667 @@ +<?xml version="1.0" encoding="UTF-8"?> +<tm:topicMap version="2.0" xmlns:tm="http://www.topicmaps.org/xtm/%22%3E + <!-- ===================================================================== --> + <!-- === TMCL meta-model topics ========================================== --> + <!-- ===================================================================== --> + <tm:topic id="topictype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/topic-type%22/%3E <!-- naming of psis: Prague, March 25-27, 2008, page 12 --> + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="occurrencetype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/occurrence-type%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="associationtype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/association-type%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="roletype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/role-type%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="nametype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/name-type%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="scopetype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/scope-type%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <!-- role types used to include the topictype metatypes in associations --> + <tm:topic id="topictype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/topic-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="occurrencetype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/occurrence-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="associationtype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/association-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="roletype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/role-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="otherroletype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/other-role-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="othertopictype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/other-topic-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="nametype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/name-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="scopetype-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/scope-type-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <!-- the constraint roletype --> + <tm:topic id="constraint-role"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/constraint-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <!-- ===================================================================== --> + <!-- === TMCL model topics =============================================== --> + <!-- ===================================================================== --> + + <!-- the constraint topic is the common supertype of all constraint types + defined by TMCL. --> + <tm:topic id="constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <!-- this occurrence type is used to type a single occurrence on each + constraint type. This occurrence holds the TMQL value used to + evaluate constraint instances for validity. --> + <tm:topic id="validation-expression"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/validation-expression%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- the association type used to bind different components into a + constraint --> + <tm:topic id="applies-to"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/applies-to%22/%3E + tm:instanceOf<tm:topicRef href="#associationtype"/></tm:instanceOf> + </tm:topic> + + <!-- the card min facet is used on many constraint types --> + <tm:topic id="card-min"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/card-min%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- the card max facet is used on many constraint types --> + <tm:topic id="card-max"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/card-max%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- the reg exp facet is used on many constraint types --> + <tm:topic id="regexp"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/reg-exp%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- the datatype facet is used on many constraint types --> + <tm:topic id="datatype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/datatype%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- ===================================================================== --> + <!-- === topics for super-subtype-associations (ako) ===================== --> + <!-- ===================================================================== --> + + <tm:topic id="supertype-subtype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/iso13250/model/supertype-subtype%22/%3E + </tm:topic> + + <tm:topic id="supertype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/iso13250/model/supertype%22/%3E + </tm:topic> + + <tm:topic id="subtype"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/iso13250/model/subtype%22/%3E + </tm:topic> + + + <!-- ===================================================================== --> + <!-- === schema type and schema definitions ============================== --> + <!-- ===================================================================== --> + + <!-- constraints can be bound to a schema --> + <tm:topic id="schema"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/schema%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + + <!-- ===================================================================== --> + <!-- === TMCL constraint types =========================================== --> + <!-- ===================================================================== --> + + <!-- topictype-constraint --> + <tm:topic id="topictype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/topic-type-constraint%22/%3E + </tm:topic> <!-- standard constraints doesn't own a valiadtion-expression-occurrence: Prague, March 25-27, 2008, page 34-36 --> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#topictype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- associationtype-constraint --> + <tm:topic id="associationtype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/association-type-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#associationtype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- roletype-constraint --> + <tm:topic id="roletype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/role-type-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#roletype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- occurrencetype-constraint --> + <tm:topic id="occurrencetype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/occurrence-type-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#occurrencetype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- nametype-constraint --> + <tm:topic id="nametype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/name-type-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#nametype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- abstract-topictype-constraint --> + <tm:topic id="abstract-topictype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/abstract-topic-type-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#abstract-topictype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + + <!-- exclusive-instance --> + <tm:topic id="exclusive-instance"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/exclusive-instance%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#exclusive-instance"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + + <!-- ===================================================================== --> + <!-- === subjectidentifier/locator constraints =========================== --> + <!-- ===================================================================== --> + + <!-- subjectlocator-constraint --> + <tm:topic id="subjectlocator-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/subject-locator-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#subjectlocator-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- subjectidentifier-constraint --> + <tm:topic id="subjectidentifier-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/subject-identifier-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#subjectidentifier-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + + <!-- ===================================================================== --> + <!-- === names/occurrences/associations/association roles ================ --> + <!-- ===================================================================== --> + + <!-- topicname-constraint --> + <tm:topic id="topicname-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/topic-name-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#topicname-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- topicoccurrence-constraint --> + <tm:topic id="topicoccurrence-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/topic-occurrence-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#topicoccurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- occurrencedatatype-constraint --> + <tm:topic id="occurrencedatatype-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/occurrence-datatype-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#occurrencedatatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- uniqueoccurrence-constraint --> + <tm:topic id="uniqueoccurrence-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/unique-occurrence-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#uniqueoccurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- associationrole-constraint --> + <tm:topic id="associationrole-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/association-role-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#associationrole-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- roleplayer-constraint --> + <tm:topic id="roleplayer-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/role-player-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#roleplayer-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- otherrole-constraint --> + <tm:topic id="otherrole-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/other-role-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#otherrole-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- ===================================================================== --> + <!-- === scopes ========================================================== --> + <!-- ===================================================================== --> + + <!-- nametypescope-constraint --> + <tm:topic id="nametypescope-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/name-type-scope-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#nametypescope-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- occurrencetypescope-constraint --> + <tm:topic id="occurrencetypescope-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/occurrence-type-scope-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#occurrencetypescope-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + <!-- associationtypescope-constraint --> + <tm:topic id="associationtypescope-constraint"> + <tm:subjectIdentifier href="http://psi.topicmaps.org/tmcl/association-type-scope-constraint%22/%3E + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#supertype-subtype"/></tm:type> + tm:role + tm:type<tm:topicRef href="#subtype"/></tm:type> + <tm:topicRef href="#associationtypescope-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#supertype"/></tm:type> + <tm:topicRef href="#constraint"/> + </tm:role> + </tm:association> + + + <!-- ===================================================================== --> + <!-- === own datamodel: type handling ==================================== --> + <!-- ===================================================================== --> + + <!-- only topics that are instances of topictype are allowed as topic + types --> + <tm:topic id="ttc"> + <tm:subjectIdentifier href="http://some.where/constraint-psis/ttc%22/%3E + tm:instanceOf<tm:topicRef href="#topictype-constraint"/></tm:instanceOf> + </tm:topic> + + <!-- only topics that are instances of associationtype are allowed as + association types --> + <tm:topic id="atc"> + <tm:subjectIdentifier href="http://some.where/constraint-psis/atc%22/%3E + tm:instanceOf<tm:topicRef href="#associationtype-constraint"/></tm:instanceOf> + </tm:topic> + + <!-- only topics that are instances of roletype are allowed as + association role types --> + <tm:topic id="rtc"> + <tm:subjectIdentifier href="http://some.where/constraint-psis/rtc%22/%3E + tm:instanceOf<tm:topicRef href="#roletype-constraint"/></tm:instanceOf> + </tm:topic> + + <!-- only topics that are instances of occurrencetype are allowed as + occurrence types --> + <tm:topic id="otc"> + <tm:subjectIdentifier href="http://some.where/constraint-psis/otc%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype-constraint"/></tm:instanceOf> + </tm:topic> + + <!-- only topics that are instances of nametype are allowed as + name types --> + <tm:topic id="ntc"> + <tm:subjectIdentifier href="http://some.where/constraint-psis/ntc%22/%3E + tm:instanceOf<tm:topicRef href="#nametype-constraint"/></tm:instanceOf> + </tm:topic> + + + <!-- ===================================================================== --> + <!-- === own datamodel: base types ======================================= --> + <!-- ===================================================================== --> + + <!-- service --> + <tm:topic id="service"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="service-name"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-name%22/%3E + tm:instanceOf<tm:topicRef href="#nametype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="description"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/description%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="service-type"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-type%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="service-environment"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-environment%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="service-key"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-key%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- url --> + <tm:topic id="url"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="url-content"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url-content%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- parameter --> + <tm:topic id="parameter"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/parameter%22/%3E + tm:instanceOf<tm:topicRef href="#topictype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="parameter-name"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/parameter-name%22/%3E + tm:instanceOf<tm:topicRef href="#nametype"/></tm:instanceOf> + </tm:topic> + + <!-- description is already defined for the topic-type "service" --> + + <tm:topic id="default-value"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/default-value%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencetype"/></tm:instanceOf> + </tm:topic> + + <!-- association service - url --> + <tm:topic id="has-url"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/has-url%22/%3E + tm:instanceOf<tm:topicRef href="#associationtype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="service-role"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <tm:topic id="url-role"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <!-- association url - parameter --> + <tm:topic id="has-parameter"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/has-parameter%22/%3E + tm:instanceOf<tm:topicRef href="#associationtype"/></tm:instanceOf> + </tm:topic> + + <!-- url-role is already defined for has-url associations --> + <tm:topic id="parameter-role"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/parameter-role%22/%3E + tm:instanceOf<tm:topicRef href="#roletype"/></tm:instanceOf> + </tm:topic> + + <!-- ===================================================================== --> + <!-- === own datamodel: exclusive type constraint ======================== --> + <!-- ===================================================================== --> + <!-- same instances of the type service, url and parameter are not allowed --> + <tm:topic id="exc"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/exc%22/%3E + tm:instanceOf<tm:topicRef href="#exclusive-instance"/></tm:instanceOf> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#exc"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#exc"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#exc"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#description"/> + </tm:role> + </tm:association> + + <!-- ===================================================================== --> + <!-- === own datamodel: subjectIdentifier constraints ==================== --> + <!-- ===================================================================== --> + <!-- topictype "service": + *psis: 1:1:"^http://textgrid.org/isidorus/.+/.+$" + topictype "url": + *psis: 1:1:"^http://textgrid.org/isidorus/url/.+$" + topictype "parameter" + *psis: 1:1:"^http://textgrid.org/isidorus/parameter/.+$" --> + + <!-- subjectidentifier of service --> + <tm:topic id="sic-service"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/sic-service%22/%3E + tm:instanceOf<tm:topicRef href="#subjectidentifier-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5Ehttp://textgrid.org/isidorus...</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#sic-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + <!-- subjectidentifier of url --> + <tm:topic id="sic-url"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/sic-url%22/%3E + tm:instanceOf<tm:topicRef href="#subjectidentifier-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5Ehttp://textgrid.org/isidorus...</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#sic-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + <!-- subjectidentifier of parameter --> + <tm:topic id="sic-parameter"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/sic-parameter%22/%3E + tm:instanceOf<tm:topicRef href="#subjectidentifier-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5Ehttp://textgrid.org/isidorus...</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#sic-parameter"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> + + <!-- ===================================================================== --> + <!-- === own datamodel: subjectLocator constraints ======================= --> + <!-- ===================================================================== --> + <!-- topictype "service": + *locators: 0 + topictype "url": + *locators: 0 + topictype "parameter" + *locators: 0 --> + + <tm:topic id="slc-service-url-parameter"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/slc-service-url-parameter%22/%3E + tm:instanceOf<tm:topicRef href="#subjectlocator-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E0</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E0</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.*$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#slc-service-url-parameter"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#slc-service-url-parameter"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#slc-service-url-parameter"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> + + <!-- ===================================================================== --> + <!-- === own datamodel: name constraints ================================= --> + <!-- ===================================================================== --> + <!-- topictype "service": + *names: service-name:1:1:"^.+$" + topictype "param": + *names: param-name:1:1:"^.+$" --> + + <!-- service-name --> + <tm:topic id="service-name-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-name-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicname-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.+$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-name-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-name-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#nametype-role"/></tm:type> + <tm:topicRef href="#service-name"/> + </tm:role> + </tm:association> + + <!-- parameter-name --> + <tm:topic id="parameter-name-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/parameter-name-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicname-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.+$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#parameter-name-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#parameter-name-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#nametype-role"/></tm:type> + <tm:topicRef href="#parameter-name"/> + </tm:role> + </tm:association> + + <!-- ===================================================================== --> + <!-- === own datamodel: occurence constraints ============================ --> + <!-- ===================================================================== --> + <!-- topictype "service": + *occurrences: service-key:1:1:"^.+$":xml:string + *occurrences: description:0:1:".*":xml:string + *occurrences: service-type:0:1:".*":xml:string + *occurrences: service-environment:1:1:"^.+$":xml:string + topictype "url": + *occurrences: url-content:1:1:"^.+$" + topictype "param": + *occurrences: description:0:1:".*" + *occurrences: default-value:0:1:".*" --> + + <!-- service-key occurrence --> + <tm:topic id="service-key-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-key-occurrence-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.+$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-key-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-key"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-key-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + <!-- description occurrence --> + <tm:topic id="description-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/description-occurrence-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E0</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E.*</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#description-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#description"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#description-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#description-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> + + + <!-- string datatype --> + <tm:topic id="string-datatype-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/string-datatype-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencedatatype-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#datatype"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3Ehttp://www.w3.org/2001/XMLSchem...</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#string-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#description"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#string-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-type"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#string-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-environment"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#string-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#default-value"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#string-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-key"/> + </tm:role> + </tm:association> + + + <!-- anyUri datatype --> + <tm:topic id="anyUri-datatype-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/anyUri-datatype-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#occurrencedatatype-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#datatype"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3Ehttp://www.w3.org/2001/XMLSchem...</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#anyUri-datatype-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#url-content"/> + </tm:role> + </tm:association> + + + <!-- service-type occurrence --> + <tm:topic id="service-type-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-type-occurrence-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E0</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.*$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-type-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-type"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-type-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + + <!-- service-environment occurrence --> + <tm:topic id="service-environment-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-environment-occurrence-constraint%... + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.+$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-environment-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#service-environment"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-environment-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + + <!-- url-content occurrence --> + <tm:topic id="url-content-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url-content-occurrence-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E%5E.+$</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-content-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#url-content"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-content-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + + <!-- default-value occurrence --> + <tm:topic id="default-value-occurrence-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/default-value-occurrence-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#topicoccurrence-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E0</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#regexp"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#string%22%3E.*</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#default-value-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#occurrencetype-role"/></tm:type> + <tm:topicRef href="#default-value"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#default-value-occurrence-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> + + + <!-- ===================================================================== --> + <!-- === own datamodel: association (-role) constraints ================== --> + <!-- ===================================================================== --> + <!-- association "has-url": + *roles: service-role:service:1:1 + *roles: url-role:url:1:1 + association "has-param" + *roles: url-role:url:1:1 + *roles: parameter-role:parameter:1:1 --> + + <!-- the service-role has to appear exactly once in an association of type + has-url --> + <tm:topic id="service-role-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-role-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#associationrole-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-role-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-role-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#service-role"/> + </tm:role> + </tm:association> + + + <!-- the service-role owns a player of the type servie --> + <tm:topic id="service-role-player-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/service-role-player-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#roleplayer-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#service-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#service-role"/> + </tm:role> + </tm:association> + + + <!-- otherrole-constraint: + If there is a role of the type service-role with a player of the type + service there must be another role of the type url-role with a player + of the type url. --> + <tm:topic id="has-url-otherrole-constraint-for-service"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/has-url-otherrole-constraint-for-service%2... + tm:instanceOf<tm:topicRef href="#otherrole-constraint"/></tm:instanceOf> + tm:occurrence + tm:type + <tm:topicRef href="#card-min"/> + </tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type + <tm:topicRef href="#card-max"/> + </tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-url-otherrole-constraint-for-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-url-otherrole-constraint-for-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#service-role"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-url-otherrole-constraint-for-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#service"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-url-otherrole-constraint-for-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#otherroletype-role"/></tm:type> + <tm:topicRef href="#url-role"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-url-otherrole-constraint-for-service"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#othertopictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + + <!-- the url-role has to appear exactly once in an association of type + has-parameter --> + <tm:topic id="url-role-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url-role-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#associationrole-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-role-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-parameter"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-role-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#url-role"/> + </tm:role> + </tm:association> + + + <!-- the service-role owns a player of the type servie --> + <tm:topic id="url-role-player-constraint"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/url-role-player-constraint%22/%3E + tm:instanceOf<tm:topicRef href="#roleplayer-constraint"/></tm:instanceOf> + tm:occurrence + tm:type<tm:topicRef href="#card-min"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type<tm:topicRef href="#card-max"/></tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-parameter"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#url-role-player-constraint"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#url-role"/> + </tm:role> + </tm:association> + + + <!-- otherrole-constraint: + If there is a role of the type url-role with a player of the type + url there must be another role of the type parameter-role with a player + of the type parameter. --> + <tm:topic id="has-parameter-otherrole-constraint-for-url"> + <tm:subjectIdentifier href="http://textgrid.org/isidorus/tmcl/has-parameter-otherrole-constraint-for-url... + tm:instanceOf<tm:topicRef href="#otherrole-constraint"/></tm:instanceOf> + tm:occurrence + tm:type + <tm:topicRef href="#card-min"/> + </tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + tm:occurrence + tm:type + <tm:topicRef href="#card-max"/> + </tm:type> + <tm:resourceData datatype="http://www.w3.org/2001/XMLSchema#unsignedInt%22%3E1</tm:resourceData> + </tm:occurrence> + </tm:topic> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-parameter-otherrole-constraint-for-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#associationtype-role"/></tm:type> + <tm:topicRef href="#has-parameter"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-parameter-otherrole-constraint-for-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#roletype-role"/></tm:type> + <tm:topicRef href="#url-role"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-parameter-otherrole-constraint-for-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#topictype-role"/></tm:type> + <tm:topicRef href="#url"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-parameter-otherrole-constraint-for-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#otherroletype-role"/></tm:type> + <tm:topicRef href="#parameter-role"/> + </tm:role> + </tm:association> + + tm:association + tm:type<tm:topicRef href="#applies-to"/></tm:type> + tm:role + tm:type<tm:topicRef href="#constraint-role"/></tm:type> + <tm:topicRef href="#has-parameter-otherrole-constraint-for-url"/> + </tm:role> + tm:role + tm:type<tm:topicRef href="#othertopictype-role"/></tm:type> + <tm:topicRef href="#parameter"/> + </tm:role> + </tm:association> +</tm:topicMap>