From: Xuan B. <med...@us...> - 2008-01-22 20:22:00
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/merged In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32468/src/org/tm4j/topicmap/tmdm/merged Modified Files: MergedTopicMapView.java Log Message: Implement TopicMapImpl.getTopicBySubject(). Index: MergedTopicMapView.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/merged/MergedTopicMapView.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MergedTopicMapView.java 22 Jan 2008 20:17:51 -0000 1.7 --- MergedTopicMapView.java 22 Jan 2008 20:22:03 -0000 1.8 *************** *** 138,142 **** MergedTopicMapConstruct mergedTopicMapConstruct = getMergedTopicMapConstructForItemIdentifierOrSubjectIdentifier(subjectIdentifier); ! if (mergedTopicMapConstruct instanceof MergedTopic) { /* FIXME: In theory, it may be that this topic has subjectIdentifier as itemIdentifier, not as subjectIdentifier. --- 138,142 ---- MergedTopicMapConstruct mergedTopicMapConstruct = getMergedTopicMapConstructForItemIdentifierOrSubjectIdentifier(subjectIdentifier); ! if (mergedTopicMapConstruct instanceof MergedTopic) { // It is expected that this succeeds almost always. Maybe we just assume the cast to succeed and catch a ClassCastException if it fails? /* FIXME: In theory, it may be that this topic has subjectIdentifier as itemIdentifier, not as subjectIdentifier. *************** *** 149,152 **** --- 149,156 ---- } + public MergedTopic getMergedTopicForSubjectLocator(Locator subjectLocator) { + return subjectLocatorToMergedTopic.get(subjectLocator); + } + public MergedTopic getMergedTopic(ReadableTopic basicTopic) { MergedTopic result = topicToMergedTopic.get(basicTopic); |