Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10045/src/org/tm4j/topicmap/tmdm/tm4j1
Modified Files:
TopicMapImpl.java
Log Message:
Support TopicMapImpl.unmergedToExternal(TopicMap tm), at least if we are tm ourselves.
Index: TopicMapImpl.java
===================================================================
RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1/TopicMapImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TopicMapImpl.java 22 Jan 2008 20:26:50 -0000 1.5
--- TopicMapImpl.java 22 Jan 2008 20:46:52 -0000 1.6
***************
*** 259,262 ****
--- 259,264 ----
} else if (unmerged instanceof org.tm4j.topicmap.tmdm.Association) {
return unmergedToExternal((org.tm4j.topicmap.tmdm.Association) unmerged);
+ } else if (unmerged instanceof org.tm4j.topicmap.tmdm.TopicMap) {
+ return unmergedToExternal((org.tm4j.topicmap.tmdm.TopicMap) unmerged);
} else if (unmerged==null) {
return null;
***************
*** 300,307 ****
protected TopicMapImpl unmergedToExternal(org.tm4j.topicmap.tmdm.TopicMap unmerged) {
assert unmerged!=null;
!
assert getMergedObject().containsComponent(unmerged);
! return this;
}
--- 302,313 ----
protected TopicMapImpl unmergedToExternal(org.tm4j.topicmap.tmdm.TopicMap unmerged) {
assert unmerged!=null;
! assert unmerged==getRepresentedObject();
assert getMergedObject().containsComponent(unmerged);
! if (unmerged==getRepresentedObject()) {
! return this;
! } else {
! throw new UnsupportedOperationException("Returning the TopicMapImpl objects for TopicMaps which we do not represent ourselves is currently not supported.");
! }
}
|