Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7632/src/org/tm4j/topicmap/tmdm/tm4j1
Modified Files:
TopicImpl.java
Log Message:
Implement TopicImpl.getMergedTopics() legacy method.
Index: TopicImpl.java
===================================================================
RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1/TopicImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TopicImpl.java 21 Jan 2008 20:00:27 -0000 1.2
--- TopicImpl.java 22 Jan 2008 20:38:34 -0000 1.3
***************
*** 6,9 ****
--- 6,10 ----
import java.util.Collections;
import java.util.Iterator;
+ import java.util.ArrayList;
import java.beans.PropertyVetoException;
***************
*** 520,524 ****
*/
public Collection getMergedTopics() {
! throw new UnsupportedOperationException();
}
--- 521,534 ----
*/
public Collection getMergedTopics() {
! Collection<ReadableTopic> components = getMergedObject().getComponents();
! ArrayList<TopicImpl> result = new ArrayList(components.size()-1);
!
! for (ReadableTopic t : components) {
! if (t!=this) {
! result.add(getContainer().unmergedToExternal((org.tm4j.topicmap.tmdm.Topic) t));
! }
! }
!
! return result;
}
|