From: Xuan B. <med...@us...> - 2008-01-22 19:58:18
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1 In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21783/src/org/tm4j/topicmap/tmdm/tm4j1 Modified Files: TopicMapImpl.java Log Message: Implement TopicMapImpl.getTopicByID() legacy method. Index: TopicMapImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1/TopicMapImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TopicMapImpl.java 21 Jan 2008 11:13:45 -0000 1.1 --- TopicMapImpl.java 22 Jan 2008 19:58:22 -0000 1.2 *************** *** 533,537 **** */ public Topic getTopicByID(String id) { ! throw new UnsupportedOperationException(); } --- 533,549 ---- */ public Topic getTopicByID(String id) { ! try { ! Locator itemIdentifier = idToItemIdentifier(id); ! ! TopicMapObject o = mergedToExternal(getMergedTopicMapView().getMergedTopicMapConstructForItemIdentifierOrSubjectIdentifier(itemIdentifier)); ! ! try { ! return (Topic) o; ! } catch (ClassCastException e) { ! throw new IllegalArgumentException("The id \""+id+"\" does not identify a topic, but it identifies this object: "+o,e); ! } ! } catch (LocatorFactoryException e) { ! throw new RuntimeException("This should not happen.",e); ! } } |