How the ApplicationOntology Works

The ApplicationOntology class works by taking a configured list of mappings from short identifiers to full subject identifiers and then using these full subject identifiers to look-up a topic from one of a set of topic maps, returning the topic's unique object ID. This shortening of identifiers can make your queries much easier to read and also a lot shorter as it removes the need to explicitly look for a topic by its subject identifier - you can simply insert the short identifier for the topic in the place where you would normally have to type the object identifier for the topic. In addtion, the ApplicationOntology object caches successful lookups to make subsequent requests for the same topic much faster than embedding the lookup as part of a TMRQL query.

From a programming perspective, once it is configured the ApplicationOntology object works like a read-only Dictionary where the keys are short identifier strings and the values return are ITopic instances.

The ApplicationOntology class supports two forms of mapping between short identifiers and full subject identifiers. The simplest form of mapping is simply to map a short identifier string to a complete subject identifier. This simple form of mapping is useful for one-off or small numbers of mappings, but in some cases you may have tens, hundreds or even thousands of URIs to map. In this case you can make use of the second form of mapping in which short identifier prefix is mapped to subject identifier prefix. Once this mapping is made you can refer to a full subject identifier by specifying the short prefix followed by the remaining part of the identifier with a colon (:) separator. For example, if you map the short identifier prefix "org" to the subject identifier prefix "http://www.networkedplanet.com/2005/01/organisation/", then to refer to the topic with the full subject identifier "http://www.networkedplanet.com/2005/01/organisation/article", you would use the short reference "org:article".