This patch allows TMAPI implementations to provide a TopicMapSystemFactory as a service, rather than relying on the information from META-INF/services.
It does not affect any existing TMAPI implementations or applications based on them.
The patch requires an interface called TopicMapSystemFactoryService to be included in the core package, under which implementations can provide their service. This interface only declares the newTopicMapSystem() method. Alternatively, the interface could be placed in a seperate package, possibly core.osgi.
Using blueprint, an implementation could provide its TopicMapSystemFactory implementation as a service using the following code in the declaring xml file (located in OSGI-INF/blueprint/):
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
...
<!-- Provide TopicMapSystemFactory as a service -->
<bean id="topicMapSystemFactoryBean"
class="path.to.implementation.OSGiTopicMapSystemFactory">
...
</bean>
<!-- Export service -->
<service interface="org.tmapi.core.TopicMapSystemFactoryService" ref="topicMapSystemFactoryBean"></service>
...
</blueprint>
svn diff on tmapi-2.0.2