//+----------------------------------------------------------------------------- //+ Overview: //+ *Part 1: Basic elements //+ *Part 2: XTM - data model //+ *Part 3: Object summaries //+ *Part 4: TMCL - data model //+ *Part 5: Object notation for marking objects as deleted //+----------------------------------------------------------------------------- //+----------------------------------------------------------------------------- //+ Part 1: Basic elements //+----------------------------------------------------------------------------- Char = "a" | "b" | ... | "A" | "B" | ... | "0" | "1" | ... | "-" | "_" | ... String = "\"" char* "\"" Null = "\"null\"" List = "[" string ("," string)* "]" DblList = ("[" List ("," List)* "]") TrpList = ("[" DblList ("," DblList)* "]") Bool = "\"true\"" | "\"false\"" Cipher = "1" | "2" | ... Number = "\"0\"" | "\"" (Cipher (Cipher | "0")*) "\"" ENumber = Number | "\"MAX_INT\"" //+----------------------------------------------------------------------------- //+ Part 2: XTM - data model //+ A fragment contains a valid but incomplete topic map with one main topic //+ all referenced associations and all referenced topic stubs. //+ The schema is close to XTM 2.0 with the difference that referencing topics //+ is done via their PSIs, so a reference is always a list of PSIs. //+----------------------------------------------------------------------------- Datatype = "\"datatype\":" String Value = "\"value\":" String Data = "\"resourceData\":{" Datatype "," Value "}" RData = "\"resourceRef\":" ((string ",\"resourceData\":null") | (Null "," Data)) ItemIdentity = "\"itemIdentities\":" (List | Null) SubjectLocator = "\"subjectLocators\":" (List | Null) SubjectIdentifier = "\"subjectItentifers\":" (List | Null) Scope = "\"scopes\":" (DblList | Null) InstanceOf = "\"instanceOfs\":" (DblList | Null) Type = "\"type\":" List ID = "\id\":" String TopicRef = "\"topicRef\":" List Variant = "{" ItemIdentity "," Scope "," RData "}" Variants = "\"variants\":" (("[" Variant+ "]") | Null) Name = "{" ItemIdentity "," Type "," Scope "," Value "," Variants "}" Names = "\"names\":" (("[" Name+ "]") | Null) Occurrence = "{" ItemIdentity "," Type "," Scope "," RData "}" Occurrences = "\"occurrences\":" (("[" Occurrence+ "]") | Null) Topic = "\"topic\":{" ID "," ItemIdentity "," SubjectLocator "," SubjectIdentifier "," InstanceOf "," Names "," Occurences "}" Role = "{" ItemIdentity "," Type "," TopicRef "}" Roles = "\"roles\":" (("[" Role+ "]") | Null) Association = "{" ItemIdentity "," Type "," Scope "," Roles "}" Associations = "\"associations\":" (("[" Association "]") | Null) TopicStub = "{" ID "," ItemIdentity "," SubjectLocator "," SubjectIdentifier "}" TopicStubs = "\"topicStubs\":" (("[" TopicStub+ "]") | Null) TmIDs = "\"tmIds\":" List Fragment = "{" Topic "," TopicStubs "," Associations "," TmIDs "}" //+----------------------------------------------------------------------------- //+ Part 3: Object summaries //+ These Summaries are necessary to offer information of existing topics in the //+ store. A PsiSummary contains a list of PSI lists, so the client is able to //+ find out all existing topics. The TreeView contains a hierarchical //+ map of the stored Topics. //+----------------------------------------------------------------------------- PsiSummary = DblList | Null NameSummary = "\"names\":" (List | Null) OccurrenceSummary = "\"occurrences\":" (List | Null) TopicSummary = "{" ID "," ItemIdentity "," SubjectLocator "," SubjectIdentifier "," InstanceOf "," NameSummary "," OccurrenceSummary "}" TopicSummaries = ("[" TopicSummary+ "]") | Null TopicList = "\"topic\":" List IsType = "\isType\":" Bool IsInstance = "\"isInstance\":" Bool Instances = "\"instances\":" (("[" TreeNode "]") | Null) TreeNode = "{" TopicList "," isType "," isInstance "," Instances "}" TreeView = ("[" TreeNode+ "]") | Null //+----------------------------------------------------------------------------- //+ Part 4: TMCL - data model //+----------------------------------------------------------------------------- CardMin = "\"cardMin\":" Number CardMax = "\"cardMax\":" ENumber RegExp = "\"regexp\":" String SimpleConstraint = "{" RegExp "," CardMin "," CardMax "}" Constraints = "\"constraints\":[" SimpleConstraint+ "]" // Contains the owner instances and all topic types that are defined // es exclusives for the owner type ExclusiveInstances = "\"exclusiveInstances\":{\"owner\":" List ",\"exclisives\":" (DblList | Null) "}" // Contains a list of constraints that offer information about // the regular expressions and cardinalities for subjectIdentifiers // or subjectLocators SubjectIdentifierConstraints = "\"subjectIdentifierConstraints\":" (Constraints | Null) SubjectLocatorConstraints = "\"subjectLocatorConstraints\":" (Constraints | Null) // Offers scope information. The ScopeType contains a representation of all // available scopes and their subtys. Further constructs describe the // cardinalities ScopeType = "\"scopeTypes\":" TrpList ScopeConstraint = "{" ScopeType "," CardMin "," CardMax "}" ScopeConstraints = "\"scopeConstraints\":" (("[" scopeConstraint "]") | Null) // Describes a name constraint for a nametype and its subtypes. NameTypeScope = "{\"nameType\":" List "," scopeConstraints "}" NameTypeScopes = "\"nametypescopes\":[" NameTypeScope+ "]" TopicNameConstraint = "{" NameTypeScopes "," Constraints "}" TopicNameConstraints "\"topicNameConstraints\":" (("[" TopicNameConstraint+ "]") | Null) // Describes an occurrence constraint for an occurencetype and its subtypes. UniqueConstraints = "\"uniqeConstraints\":[" SimpleConstraint+ "]" DatatypeConstraint = "\"datatypeConstraint\":" String OccurrenceTypeScope = "{\"occurrenceType\":" List "," scopeConstraints "," DatatypeConstraint "}" OccurrenceTypeScopes = "\"occurrenceTypes\":[" OccurrenceTypeScope+ "]" TopicOccurrenceConstraint = "{" OccurrenceTypeScopes "," Constraints "," UniqueConstraints "}" TopicOccurrenceConstraints = "\"topicOccurrenceConstraints\":" (("[" TopicOccurrenceConstraints+ "]") | Null) // Contains all constraints that depends on a topic TopicConstraint = "{" ExclusiveInstances "," SubjectIdentifierConstraints "," SubjectLocatorConstraints "," TopicNameConstraints "," TopicOccurrenceConstraints "," AbstractConstraint "}" // Describes an associationrole-constraint RoleType = "\"roleType\":" DblList ARC = "{" RoleType "," cardMin "," cardMax "}" ARCs = "\"AssociationRoleConstraints\":" (("[" ARC+ "]") | Null) // Describes a roleplayer-constraint and also contains all possible // players. PlayerType = "\"playerType\":" DblList Players = "\"players\":" DblList RPC = "{" playerType "," Players "," RoleType "," cardMin "," cardMax "}" RPCs = "\"rolePlayerConstraints\":" (("[" RPC+ "]") | Null) // Describes an otherrole-constraint and also contains all possible // players and otherplayers. OtherRoleType = "\"otherRoleType\":" DblList OtherPlayerType = "\"otherPlayewrType\":" DblList OtherPlayers = "\"otherPlayers\":" DblList ORC = "{" PlayerType "," Players "," RoleType "," OtherPlayerType "," OtherPlayers "," OtherRoleType "," cardMin "," cardMax "}" ORCs "\"otehrRoleConstraints\":" (("[" ORC+ "]") | Null) // Describes all constraints of all associations depending to the topic AssocType = "\"associationType\":" List AConstraints = "{" AssocType "," ARCs "," RPCs "," ORCs "," ScopeConstraints "}" AssociationsConstraints "\"associationsConstraints\":" (("[" AConstraints+ "]") | Null) // Contains the entire TMCL information FragmentConstraint ="{" TopicConstraints "," AssociationsConstraints "}" //+----------------------------------------------------------------------------- //+ Part 5: Object notation for marking objects as deleted //+ type: the type of the deleted object, e.g. Topic for TopicC //+ topics: a list of PSIs, where every single PSI represents a topic that //+ has to be deleted //+ associations: a list of associations that have to be deleted //+ parent-topic: a single PSI of the name's, occurrence's or variant's owner //+ topic //+ parent-name: the parent name of the variants that have to be deleted //+ (in this case the parent-topic is the topic of the name) //+ names: a list of the deletable names //+ variants: a list of deletable names //+ occurrences: a list of the deletable occurrences //+ parent-association: the parent association of the deletable roles //+ roles: a list of the deltable roles //+----------------------------------------------------------------------------- DeleteType = "\"type\":" ("Topic" | "Occurrence" | "Name" | "Association" | "Role" | "Variant") DeleteTopics = "\"topics\":" List DeleteAssociations = "\"associations\":" Associations DeleteParentTopic = "\"parentTopic\":" String DeleteParentName = "\"parentName\":" Name DeleteNames = "\"names\":" Names DeleteVariants = "\"variants\":" Variants DeleteOccurrences = "\"occurrences\":" Occurrences DeleteParentAssociation = "\"parentAssociation\":" Association DeleteRoles = "\"roles\":" Roles DeleteObject = "{" DeleteType "," DeleteTopics "," DeleteAssociations "," DeleteParentTopic "," DeleteParentName "," DeleteNames "," DeleteVariants "," DeleteOccurrences "," DeleteParentAssociation "," DeleteRoles "}"