From: SourceForge.net <no...@so...> - 2004-12-28 11:40:25
|
Bugs item #1092125, was opened at 2004-12-28 13:40 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1092125&group_id=27895 Category: In-Memory Impl Group: None Status: Open Resolution: None Priority: 5 Submitted By: George Tryfon (gtryfon) Assigned to: Nobody/Anonymous (nobody) Summary: TMAPI "features" 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) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1092125&group_id=27895 |