######################################################################################### ## This is a partial description of type 'composer' ## Can be 'merged' with other partial description of type 'composer' ## Some of the elements of the description can be inherited from type 'person' ## Some of them - can be 'deduced' from association and occurrence descriptions ## ## I added Python-like TMCL example: ## http://homepage.mac.com/dmitryv/TopicMaps/TMPath/TMCL-Lite-Compact_PTM.html ## ## Copyright @ 2003 Dmitry Bogachev ## ######################################################################################### ## Declare default namespace. We can use "IDs" now. declare default subjectIndicator namespace="http://psi.ontopia.net/opera/#" Type: composer ## Firstly, we specify supertypes and subtypes for type 'composer' ## Each statement can introduce names - $ ## These names can be used later for describing constraints ## For example, disjointSubtypes(type1,...,typeN) ## ## When we specify subtype/supertype we can use extended relationship ## which has additional "dimension" parameter ## Example: subtype(computer,operatingSystem,Win2KServer) ## subtype(computer,operatingSystem,LinuxServer) ## subtype(computer,operatingSystem,OSXServer) SuperTypes: $SupMusician - supertype($self,musician) SubTypes: ## TODO: Type description can include "Definitions" - if and only if statements ## TODO: kind of OWL class definitions ## TODO: It can be a tolog expression, for example... ## TODO: isa($X,$self) iff isa($X,musician),.... ## Secondly, we specify "what is possible" for type 'composer' ## Each schema element can introduce names - $ ## $self is a predefined name ## * is a placeholder, we use it if we do not need to reference element later ## / is used for scope Schema-BaseNames: $BN1 - baseName($self,*) $BN2 - baseName($self,*)/normal $BN3 - baseName($self,*)/shortname $BN4 - baseName($self,*)/nom-de-plume $BN5 - baseName($self,*)/nom-de-plume,normal Schema-Occurrences: $BornOC - born($self,$BornDate) $DiedOC - died($self,$DiedDate) $IllustrationOC-illustration($self,$Illustration) $ArticleOC - article($self,$Article) $BioOC - bio($self,$Bio) $DescOC - desc($self,$Desc) $WebsiteOC - website($self,$WebSite) $HomepageOC - homepage($self,$HomePage) $GalleryOC - gallery($self,$Gallery) $SnippetOC- snippet($self,$Snippet) Schema-RolesInAssociations: $Born-in - born-in($self::person,$BornPlace::place) $Died-in - died-in($self::person,$DiedPlace::place) $Composed-by - composed-by($self::composer,*) $Pupil-of - pupil-of($self::teacher,*) $Exponent-of - exponent-of($self::person,*) ## After that, we apply some constraints to "what is possible" ## We use introduced names for referencing items related to type Basic Constraints: cardMin($BN1,1) cardMax($BN1,1) cardMin($BN2,1) cardMax($BN2,1) cardMin($BN3,1) cardMax($BN3,1) external($BornOC,false) cardMin($BornOC,1) cardMax($BornOC,1) external($DiedOC,false) cardMin($DiedOC,1) cardMax($DiedOC,1) external($IllustrationOC,true) cardMin($IllustrationOC,1) cardMax($IllustrationOC,1) external($ArticleOC,true) external($BioOC,true) external($DescOC,false) external($WebsiteOC,true) ## we can use datatype constraints !!! datatype($WebSite,"xsd:anyURI") external($HomepageOC,true) cardMin($HomepageOC,1) external($GalleryOC,true) external($SnippetOC,true) cardMin($Born-in,1) cardMax($Born-in,1) ## we can constrain 'other' role players, ~ of property restrictions in OWL allValuesFrom($BornPlace,location) cardMin($BornPlace,1) cardMax($BornPlace,1) cardMin($Died-in,1) cardMax($Died-in,1) cardMin($Composed-by,1)