From: SourceForge.net <no...@so...> - 2006-03-14 13:20:20
|
Bugs item #1092125, was opened at 2004-12-28 12:40 Message generated for change (Comment added) made by lheuer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1092125&group_id=27895 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: In-Memory Impl Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: George Tryfon (gtryfon) Assigned to: Nobody/Anonymous (nobody) >Summary: TMAPI Initial Comment: Hello, I am using TM4J 0.9.8 (I didn't find this in the Group and I selected "None") I am having problem on working with http://tmapi.org/features/automerge http://tmapi.org/features/merge/byTopicName http://tmapi.org/features/readOnly http://tmapi.org/features/model/xtm1.0 http://tmapi.org/features/model/xtm1.1 http://tmapi.org/features/notation/URI this is what I do: propsprops.setProperty ("http://tmapi.org/features/readOnly", "true"); mapFeatures.put ("http://tmapi.org/features/readOnly", Boolean.TRUE); TMAPITopicMapSystemImpl tmApiSystImpl = new TMAPITopicMapSystemImpl (providerFactory.getClass().getName(), props, mapFeatures); URI uri = ... InputStream is = uri.toURL().openStream (); TopicMap tm = OpenXtmSupport.readXtm (is, uri.toString(), provider, tmApiSystImpl); is.close (); static public TMAPITopicMapImpl readXtm (InputStream is, String baseURI, TopicMapProvider provider, TMAPITopicMapSystemImpl tmApiSystImpl) throws Exception { try { Locator baseLoc = provider.getLocatorFactory().createLocator("URI", baseURI); TopicMapSource source = new SerializedTopicMapSource (is, baseLoc); TopicMap tm = provider.addTopicMap (source); TMAPITopicMapImpl tmImpl = (TMAPITopicMapImpl)Wrapper.wrap (tm, tmApiSystImpl); return tmImpl; } catch(LocatorFactoryException ex) { throw new RuntimeException("Could not convert file name: " + baseURI + " to a TM4J Locator."); } catch(TopicMapProviderException ex) { throw new RuntimeException("Could not parse topic map file: ", ex); } } also: tmApiSystImpl.getProperty ("http://tmapi.org/features/readOnly") gives "true" tmApiSystImpl.getFeature ("http://tmapi.org/features/readOnly") gives Boolean.TRUE but still I don't get Exception when I change the TopicMap. also I can't merge without TopicName (they merge TopicNames) (I haven't tested the rest) Cheers George Tryfon (TA-KT research group) ---------------------------------------------------------------------- >Comment By: Lars Heuer (lheuer) Date: 2006-03-14 14:20 Message: Logged In: YES user_id=399396 Fixed in CVS ---------------------------------------------------------------------- Comment By: Lars Heuer (lheuer) Date: 2006-02-18 18:11 Message: Logged In: YES user_id=399396 As long as you use the TMAPI interfaces rather than the concrete TMAPI implementation of TM4J, the fix here: https://sourceforge.net/tracker/index.php?func=detail&aid=1434160&group_id=27895&atid=391879 should solve the reported problems ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1092125&group_id=27895 |