From: Xuan B. <med...@us...> - 2008-01-22 21:28:30
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1 In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27002/src/org/tm4j/topicmap/tmdm/tm4j1 Modified Files: TopicMapImpl.java Log Message: Make the unspecified topic generic for the TM4J 0.9.x compatibility layer. Index: TopicMapImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/tm4j1/TopicMapImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TopicMapImpl.java 22 Jan 2008 21:22:25 -0000 1.10 --- TopicMapImpl.java 22 Jan 2008 21:28:32 -0000 1.11 *************** *** 55,59 **** protected org.tm4j.topicmap.tmdm.Topic type_instance; ! protected org.tm4j.topicmap.tmdm.Topic nullAssociationType; protected static HashMap<String,Boolean> defaultProperties = new HashMap<String,Boolean>(); --- 55,66 ---- protected org.tm4j.topicmap.tmdm.Topic type_instance; ! /** ! This is the topic which is placed into topic variables in TMDM where TM4J 1 allows a null value, like in ! <ul> ! <li>associations without type</li> ! <li>association roles without type</li> ! </ul> ! */ ! protected org.tm4j.topicmap.tmdm.Topic unspecifiedTopic; protected static HashMap<String,Boolean> defaultProperties = new HashMap<String,Boolean>(); *************** *** 128,137 **** } ! protected org.tm4j.topicmap.tmdm.Topic getInternalNullAssociationTypeTopic() { ! if (nullAssociationType==null) { ! nullAssociationType = getRepresentedObject().createTopic(); // this topic does not have properties, but this should be fine for now. } ! return nullAssociationType; } --- 135,144 ---- } ! protected org.tm4j.topicmap.tmdm.Topic getInternalUnspecifiedTopic() { ! if (unspecifiedTopic==null) { ! unspecifiedTopic = getRepresentedObject().createTopic(); // this topic does not have properties, but this should be fine for now. } ! return unspecifiedTopic; } *************** *** 390,394 **** assert resourceLocator==null; // not implemented ! return unmergedToExternal(getRepresentedObject().createAssociation(type!=null?(((TopicImpl) type).getRepresentedObject()):getInternalNullAssociationTypeTopic(),convertToInternalScope(themes))); } --- 397,401 ---- assert resourceLocator==null; // not implemented ! return unmergedToExternal(getRepresentedObject().createAssociation(type!=null?(((TopicImpl) type).getRepresentedObject()):getInternalUnspecifiedTopic(),convertToInternalScope(themes))); } |