Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27805/src/org/tm4j/topicmap/tmdm/tm4j1
Modified Files:
ScopedObjectImpl.java
Log Message:
Implement ScopedObjectImpl.addTheme().
Index: ScopedObjectImpl.java
===================================================================
RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1/ScopedObjectImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ScopedObjectImpl.java 23 Jan 2008 21:27:07 -0000 1.2
--- ScopedObjectImpl.java 23 Jan 2008 21:32:44 -0000 1.3
***************
*** 66,70 ****
*/
public void addTheme(Topic theme) throws PropertyVetoException {
! throw new UnsupportedOperationException();
}
--- 66,78 ----
*/
public void addTheme(Topic theme) throws PropertyVetoException {
! try {
! getRepresentedObject().addScopingTopic(getContainer().externalToUnmerged(theme));
! } catch (NullPointerException e) {
! if (theme==null) {
! throw new IllegalArgumentException("Null themes are not allowed, but some callers expect an IllegalArgumentException instead of a NullPointerException",e);
! } else {
! throw e;
! }
! }
}
|