You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(30) |
Jul
(74) |
Aug
(2) |
Sep
(91) |
Oct
(27) |
Nov
(77) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(175) |
Feb
(133) |
Mar
(94) |
Apr
(65) |
May
(108) |
Jun
(100) |
Jul
(46) |
Aug
(19) |
Sep
(145) |
Oct
(289) |
Nov
(134) |
Dec
(211) |
2003 |
Jan
(106) |
Feb
(269) |
Mar
(106) |
Apr
(202) |
May
(300) |
Jun
(83) |
Jul
(70) |
Aug
(217) |
Sep
(183) |
Oct
(292) |
Nov
(324) |
Dec
(117) |
2004 |
Jan
(318) |
Feb
(151) |
Mar
(64) |
Apr
(195) |
May
(279) |
Jun
(263) |
Jul
(280) |
Aug
(167) |
Sep
(91) |
Oct
(175) |
Nov
(34) |
Dec
(38) |
2005 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2006 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
2007 |
Jan
(2) |
Feb
(11) |
Mar
(1) |
Apr
(33) |
May
(13) |
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
(191) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(33) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(14) |
2009 |
Jan
(39) |
Feb
(6) |
Mar
(22) |
Apr
(31) |
May
(78) |
Jun
(74) |
Jul
(39) |
Aug
(22) |
Sep
(16) |
Oct
(32) |
Nov
(4) |
Dec
(5) |
2010 |
Jan
(1) |
Feb
|
Mar
(33) |
Apr
(45) |
May
(66) |
Jun
(63) |
Jul
(32) |
Aug
(56) |
Sep
(19) |
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
From: Xuan B. <med...@us...> - 2008-01-21 08:47:44
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25983/src/org/tm4j/topicmap/utils Modified Files: TopicMapWalker.java Log Message: A little bit debugging support for TopicMapWalker. Index: TopicMapWalker.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/TopicMapWalker.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** TopicMapWalker.java 30 Apr 2007 13:53:13 -0000 1.25 --- TopicMapWalker.java 21 Jan 2008 08:47:45 -0000 1.26 *************** *** 81,84 **** --- 81,87 ---- Iterator topics = tm.getTopicsIterator(); + // If you ever need to know the sequence number of a topic in the list for debugging purposes, uncomment the accesses to debugCount. + // int debugCount = 0; + while (topics.hasNext()) { Topic t = (Topic) topics.next(); *************** *** 86,89 **** --- 89,93 ---- walk(t); } + // debugCount++; } if (txn != null) { *************** *** 318,319 **** --- 322,325 ---- } } + + // :indentSize=2:tabSize=2: |
From: Xuan B. <med...@us...> - 2008-01-21 08:45:10
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/memory In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25136/src/org/tm4j/topicmap/memory Modified Files: TopicImpl.java Log Message: A little bit assertions for TopicImpl. Index: TopicImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/memory/TopicImpl.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** TopicImpl.java 30 Apr 2007 13:53:12 -0000 1.76 --- TopicImpl.java 21 Jan 2008 08:45:09 -0000 1.77 *************** *** 1078,1081 **** --- 1078,1084 ---- mergedTopic = mergedTopic.getBaseTopic(); } + + assert m_topicMap!=null; + if (m_topicMap.getProperty(TopicMapProvider.OPT_STATIC_MERGE) .booleanValue()) { *************** *** 1584,1604 **** try { ! /* XB: ! ! It may be that ! (1) this topic is either a base topic serving for other topics or ! (2) that this topic is a merged topic having a base topic. ! ! In such cases, this topic needs to be detached from the other topics properly. ! ! */ ! ! if (!staticallyMerged()) { ! if (m_baseTopic!=null) { // We are a slave topic. We just need to sign off from our base topic. ! ((TopicImpl) m_baseTopic).removeMergedTopic(this); ! } else if ((m_mergedTopics!=null)&&!m_mergedTopics.isEmpty()) { // We are a base topic with at least one slave. ! throw new UnsupportedOperationException(); ! } ! } // If we get here, it is OK to destroy this Topic. --- 1587,1607 ---- try { ! /* XB: ! ! It may be that ! (1) this topic is either a base topic serving for other topics or ! (2) that this topic is a merged topic having a base topic. ! ! In such cases, this topic needs to be detached from the other topics properly. ! ! */ ! ! if (!staticallyMerged()) { ! if (m_baseTopic!=null) { // We are a slave topic. We just need to sign off from our base topic. ! ((TopicImpl) m_baseTopic).removeMergedTopic(this); ! } else if ((m_mergedTopics!=null)&&!m_mergedTopics.isEmpty()) { // We are a base topic with at least one slave. ! throw new UnsupportedOperationException(); ! } ! } // If we get here, it is OK to destroy this Topic. *************** *** 1717,1722 **** /* * $Log$ ! * Revision 1.76 2007/04/30 13:53:12 mediumnet ! * Convert concrete ID comparisons to more abstracted call equalsByID(). * * Revision 1.75 2007/04/20 12:23:12 mediumnet --- 1720,1728 ---- /* * $Log$ ! * Revision 1.77 2008/01/21 08:45:09 mediumnet ! * A little bit assertions for TopicImpl. ! * ! * Revision 1.76 2007/04/30 13:53:12 mediumnet ! * Convert concrete ID comparisons to more abstracted call equalsByID(). * * Revision 1.75 2007/04/20 12:23:12 mediumnet |
From: Xuan B. <med...@us...> - 2008-01-21 08:42:31
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23906/src/org/tm4j/topicmap/utils Modified Files: XTMWriter.java Log Message: Transactions support for XTMWriter. Index: XTMWriter.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMWriter.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** XTMWriter.java 21 May 2007 17:59:01 -0000 1.48 --- XTMWriter.java 21 Jan 2008 08:42:34 -0000 1.49 *************** *** 29,32 **** --- 29,33 ---- import org.tm4j.topicmap.TopicMapObject; import org.tm4j.topicmap.TopicMapProcessingException; + import org.tm4j.topicmap.TopicMapProvider; import org.tm4j.topicmap.Variant; import org.tm4j.topicmap.VariantName; *************** *** 570,575 **** --- 571,593 ---- } + protected void openTransaction(TopicMapProvider m_provider) { + if ((m_provider != null) && m_provider.isTransactional()) { + if (!m_provider.isTransactionOpen()) { + m_provider.openTransaction(); + } + } + } + + protected void closeTransaction(TopicMapProvider m_provider) { + if ((m_provider != null) && m_provider.isTransactional()) { + if (m_provider.isTransactionOpen()) { + m_provider.getOpenTransaction().commit(); + } + } + } + public boolean startTopicMap(TopicMap tm) throws TopicMapProcessingException { + openTransaction(tm.getProvider()); org.tm4j.net.Locator base = tm.getBaseLocator(); startTopicMap(getID(tm), (base != null) ? base.getAddress() : null); *************** *** 580,583 **** --- 598,602 ---- public void endTopicMap(TopicMap tm) throws TopicMapProcessingException { endTopicMap(); + closeTransaction(tm.getProvider()); } *************** *** 970,973 **** --- 989,995 ---- /* * $Log$ + * Revision 1.49 2008/01/21 08:42:34 mediumnet + * Transactions support for XTMWriter. + * * Revision 1.48 2007/05/21 17:59:01 mediumnet * Little comment. |
From: Xuan B. <med...@us...> - 2008-01-21 08:41:07
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23414/src/org/tm4j/topicmap/utils Modified Files: XTMBuilder.java Log Message: Refine transactions support for XTMBuilder. Index: XTMBuilder.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMBuilder.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** XTMBuilder.java 21 May 2007 02:39:16 -0000 1.75 --- XTMBuilder.java 21 Jan 2008 08:41:10 -0000 1.76 *************** *** 456,459 **** --- 456,460 ---- throws TopicMapProcessingException { try { + openTransaction(); if (xmlBase != null) { m_baseLocator = m_locatorFactory.createLocator("URI", xmlBase); *************** *** 814,818 **** protected void closeTransaction() { if ((m_provider != null) && m_provider.isTransactional()) { ! if (!m_provider.isTransactionOpen()) { m_provider.getOpenTransaction().commit(); } --- 815,819 ---- protected void closeTransaction() { if ((m_provider != null) && m_provider.isTransactional()) { ! if (m_provider.isTransactionOpen()) { m_provider.getOpenTransaction().commit(); } *************** *** 825,829 **** if ((m_provider != null) && m_provider.isTransactional()) { ! if (((++transactionCloseCounter)&0xFF)==0) { closeTransaction(); } --- 826,830 ---- if ((m_provider != null) && m_provider.isTransactional()) { ! if (((++transactionCloseCounter)&0x3FF)==0) { closeTransaction(); } *************** *** 1779,1782 **** --- 1780,1786 ---- /* * $Log$ + * Revision 1.76 2008/01/21 08:41:10 mediumnet + * Refine transactions support for XTMBuilder. + * * Revision 1.75 2007/05/21 02:39:16 mediumnet * Employ transaction coarsening to reduce frequency of per-transaction overhead. |
From: Xuan B. <med...@us...> - 2008-01-21 08:38:11
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/tmapi/core In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22085/src/org/tm4j/tmapi/core Modified Files: TMAPITopicImpl.java Log Message: Some pending bugfix on TMAPITopicImpl Index: TMAPITopicImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/tmapi/core/TMAPITopicImpl.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** TMAPITopicImpl.java 7 Mar 2006 15:14:19 -0000 1.23 --- TMAPITopicImpl.java 21 Jan 2008 08:38:13 -0000 1.24 *************** *** 21,24 **** --- 21,26 ---- import org.tm4j.topicmap.Member; import org.tm4j.topicmap.MergedTopicSubjectClashException; + import org.tm4j.topicmap.BaseName; + import org.tm4j.topicmap.Occurrence; import org.tmapi.core.ModelConstraintException; import org.tmapi.core.SubjectLocatorClashException; *************** *** 74,79 **** } return Wrapper.wrap(bn, m_tm); } catch (Exception ex) { ! throw new RuntimeException(ex.toString()); } } --- 76,83 ---- } return Wrapper.wrap(bn, m_tm); + } catch (RuntimeException ex) { + throw ex; } catch (Exception ex) { ! throw new RuntimeException(ex); } } *************** *** 97,100 **** --- 101,135 ---- */ + public void remove() { + checkUpdateAllowed(); + + try { + /* + for (Occurrence occurrence : (Iterable<Occurrence>) m_obj.getOccurrences(false)) { + occurrence.destroy(); + } + + for (BaseName name : (Iterable<BaseName>) m_obj.getNames(false)) { + name.destroy(); + } + + assert isReadyToBeRemoved(); + */ + } catch (RuntimeException ex) { + throw ex; + } catch (Exception ex) { + throw new RuntimeException(ex); + } + + super.remove(); + } + + /* + protected boolean isReadyToBeRemoved() { + // return m_obj.isReadyToBeDestroyed(); + if (m_obj.getOccurrences(false). + } + */ + /* (non-Javadoc) * @see org.tmapi.core.Topic#getOccurrences() |
From: Xuan B. <med...@us...> - 2008-01-21 08:33:38
|
Update of /cvsroot/tm4j/tm4j/lib In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19949/lib Removed Files: baldauf-common-1.0.0.jar Log Message: Transition to baldauf-common-1.0.1 --- baldauf-common-1.0.0.jar DELETED --- |
From: Xuan B. <med...@us...> - 2008-01-21 08:33:05
|
Update of /cvsroot/tm4j/tm4j/lib In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19822/lib Added Files: baldauf-common-1.0.1.jar baldauf-common-1.0.1.jar.license.txt Removed Files: baldauf-common-1.0.0.jar.license.txt Log Message: Transition to baldauf-common-1.0.1 --- NEW FILE: baldauf-common-1.0.1.jar.license.txt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: baldauf-common-1.0.1.jar --- (This appears to be a binary file; contents omitted.) --- baldauf-common-1.0.0.jar.license.txt DELETED --- |
From: Xuan B. <med...@us...> - 2008-01-20 17:38:32
|
Update of /cvsroot/tm4j/tm4j/lib In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26793/tm4j/lib Added Files: baldauf-common-1.0.0.jar baldauf-common-1.0.0.jar.license.txt Log Message: Add local copy of baldauf-common-1.0.0.jar and license notice of this file (needed for upcoming TM4J 2 TMDM implementation) --- NEW FILE: baldauf-common-1.0.0.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: baldauf-common-1.0.0.jar.license.txt --- (This appears to be a binary file; contents omitted.) |
From: Conal T. <con...@us...> - 2008-01-18 05:09:37
|
Update of /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12760/src/java/org/tm4j/tm4web/cocoon Modified Files: TM4WebTransformer.java Log Message: fixed error reporting when no nested exception Index: TM4WebTransformer.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon/TM4WebTransformer.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TM4WebTransformer.java 14 Jan 2008 04:10:36 -0000 1.10 --- TM4WebTransformer.java 18 Jan 2008 05:09:32 -0000 1.11 *************** *** 238,242 **** } catch (TologParserException ex) { getLogger().error("Error found in tolog query element.", ex); ! writeError("Error in parsing tolog query. " + ex.getMessage() + "Cause: " + ex.getCause().toString()); } catch (TologProcessingException ex) { getLogger().error("Error in processing tolog query.", ex); --- 238,246 ---- } catch (TologParserException ex) { getLogger().error("Error found in tolog query element.", ex); ! StringBuffer error = new StringBuffer(ex.getMessage()); ! if (ex.getCause() != null) { ! error.append(" Cause: " + ex.getCause().toString()); ! } ! writeError(error.toString()); } catch (TologProcessingException ex) { getLogger().error("Error in processing tolog query.", ex); *************** *** 707,713 **** --- 711,722 ---- } + } + /* * $Log$ + * Revision 1.11 2008/01/18 05:09:32 conal_tuohy + * fixed error reporting when no nested exception + * * Revision 1.10 2008/01/14 04:10:36 conal_tuohy * changed TM4WebTransformer to release TopicMapManagerComponent when done transforming document |
From: Conal T. <con...@us...> - 2008-01-14 04:10:34
|
Update of /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19474/src/java/org/tm4j/tm4web/cocoon Modified Files: TM4WebTransformer.java Log Message: changed TM4WebTransformer to release TopicMapManagerComponent when done transforming document Index: TM4WebTransformer.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon/TM4WebTransformer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TM4WebTransformer.java 14 Jan 2008 03:45:08 -0000 1.9 --- TM4WebTransformer.java 14 Jan 2008 04:10:36 -0000 1.10 *************** *** 100,109 **** } ! public void dispose() { if (m_tmMgr != null) { manager.release(m_tmMgr); } } public void startTransformingElement(String uri, String name, String raw, Attributes attr) --- 100,120 ---- } ! private void releaseTopicMapManagerComponent() { if (m_tmMgr != null) { manager.release(m_tmMgr); + m_tmMgr = null; } } + + public void endDocument() throws SAXException { + releaseTopicMapManagerComponent(); + super.endDocument(); + } + + public void dispose() { + releaseTopicMapManagerComponent(); + super.dispose(); + } public void startTransformingElement(String uri, String name, String raw, Attributes attr) *************** *** 699,702 **** --- 710,716 ---- /* * $Log$ + * Revision 1.10 2008/01/14 04:10:36 conal_tuohy + * changed TM4WebTransformer to release TopicMapManagerComponent when done transforming document + * * Revision 1.9 2008/01/14 03:45:08 conal_tuohy * changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed |
From: Conal T. <con...@us...> - 2008-01-14 03:45:14
|
Update of /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8621/src/java/org/tm4j/tm4web/cocoon Modified Files: TM4WebTransformer.java TopicMapManagerComponent.java Log Message: changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed Index: TM4WebTransformer.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon/TM4WebTransformer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TM4WebTransformer.java 8 Jan 2008 22:04:55 -0000 1.8 --- TM4WebTransformer.java 14 Jan 2008 03:45:08 -0000 1.9 *************** *** 76,80 **** namespaceURI = NSURI; } ! public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException --- 76,80 ---- namespaceURI = NSURI; } ! public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException *************** *** 99,102 **** --- 99,109 ---- super.setup(resolver, objectModel, src, par); } + + public void dispose() { + if (m_tmMgr != null) + { + manager.release(m_tmMgr); + } + } public void startTransformingElement(String uri, String name, String raw, Attributes attr) *************** *** 692,695 **** --- 699,705 ---- /* * $Log$ + * Revision 1.9 2008/01/14 03:45:08 conal_tuohy + * changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed + * * Revision 1.8 2008/01/08 22:04:55 conal_tuohy * aligned XML namespace handling between TM4WebTransformer and superclass AbstractSAXTransformer Index: TopicMapManagerComponent.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon/TopicMapManagerComponent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TopicMapManagerComponent.java 5 Jul 2004 16:41:24 -0000 1.6 --- TopicMapManagerComponent.java 14 Jan 2008 03:45:08 -0000 1.7 *************** *** 14,18 **** import org.apache.avalon.excalibur.pool.Poolable; ! import org.apache.avalon.excalibur.pool.Recyclable; import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.configuration.Configurable; --- 14,18 ---- import org.apache.avalon.excalibur.pool.Poolable; ! import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.configuration.Configurable; *************** *** 62,66 **** */ public class TopicMapManagerComponent extends AbstractLogEnabled ! implements Configurable, Poolable, Recyclable, LogEnabled, Component, Contextualizable { static final String ROLE = "org.tm4j.tm4web.cocoon.TopicMapManagerComponent"; --- 62,66 ---- */ public class TopicMapManagerComponent extends AbstractLogEnabled ! implements Configurable, Poolable, Disposable, LogEnabled, Component, Contextualizable { static final String ROLE = "org.tm4j.tm4web.cocoon.TopicMapManagerComponent"; *************** *** 109,115 **** } ! public void recycle() { ! System.out.println("Recycling TopicMapManagerComponent."); Map providers = m_mgr.getProviders(); Iterator it = providers.values().iterator(); --- 109,115 ---- } ! public void dispose() { ! System.out.println("Disposing of TopicMapManagerComponent."); Map providers = m_mgr.getProviders(); Iterator it = providers.values().iterator(); *************** *** 123,127 **** } } ! System.out.println("Recylcing complete."); } --- 123,127 ---- } } ! System.out.println("TopicMapManagerComponent disposed of."); } *************** *** 332,335 **** --- 332,338 ---- /* * $Log$ + * Revision 1.7 2008/01/14 03:45:08 conal_tuohy + * changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed + * * Revision 1.6 2004/07/05 16:41:24 kal_ahmed * Updates to add features to the sample sub-site. Renamed build.properties to build.properties.template to prevent constant CVS modifications. |
From: Conal T. <con...@us...> - 2008-01-14 03:45:14
|
Update of /cvsroot/tm4j/tm4web/cocoon In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv8621 Modified Files: build.xml Log Message: changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed Index: build.xml =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** build.xml 5 Jul 2004 16:41:22 -0000 1.7 --- build.xml 14 Jan 2008 03:45:08 -0000 1.8 *************** *** 38,42 **** <property name="packagelists" location="resource/package-lists"/> <property name="common" location="../common"/> ! <property name="common.lib" location="${common}/lib"/> <property file="build.properties"/> <property file="build.number"/> --- 38,42 ---- <property name="packagelists" location="resource/package-lists"/> <property name="common" location="../common"/> ! <property name="common.lib" location="${tm4j.build}/lib"/> <property file="build.properties"/> <property file="build.number"/> *************** *** 50,54 **** <path id="tm4j.classpath"> <fileset dir="${common.lib}"> ! <include name="tm4j.jar"/> </fileset> </path> --- 50,54 ---- <path id="tm4j.classpath"> <fileset dir="${common.lib}"> ! <include name="*.jar"/> </fileset> </path> *************** *** 65,69 **** <!-- Taskdef for Cocoon offline generation. The class used is from the Cocoon scrathpad block. --> ! <taskdef name="cocoon" classname="org.apache.cocoon.ant.CocoonTask" classpathref="cocoon.classpath"/> <!-- ======================= --> --- 65,69 ---- <!-- Taskdef for Cocoon offline generation. The class used is from the Cocoon scrathpad block. --> ! <!--<taskdef name="cocoon" classname="org.apache.cocoon.ant.CocoonTask" classpathref="cocoon.classpath"/>--> <!-- ======================= --> *************** *** 400,403 **** --- 400,406 ---- <echo> $Log$ + Revision 1.8 2008/01/14 03:45:08 conal_tuohy + changed tm4web TopicMapManagerComponent from Recyclable to Disposable closing TopicMapProviders when disposed; made TM4WebTransformer disposable, releasing TopicMapManagerComponent when disposed + Revision 1.7 2004/07/05 16:41:22 kal_ahmed Updates to add features to the sample sub-site. Renamed build.properties to build.properties.template to prevent constant CVS modifications. |
From: Conal T. <con...@us...> - 2008-01-08 22:04:59
|
Update of /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17836/org/tm4j/tm4web/cocoon Modified Files: TM4WebTransformer.java Log Message: aligned XML namespace handling between TM4WebTransformer and superclass AbstractSAXTransformer Index: TM4WebTransformer.java =================================================================== RCS file: /cvsroot/tm4j/tm4web/cocoon/src/java/org/tm4j/tm4web/cocoon/TM4WebTransformer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TM4WebTransformer.java 5 Jul 2004 16:41:24 -0000 1.7 --- TM4WebTransformer.java 8 Jan 2008 22:04:55 -0000 1.8 *************** *** 72,75 **** --- 72,80 ---- private int m_radius; + public TM4WebTransformer() { + defaultNamespaceURI = NSURI; + namespaceURI = NSURI; + } + public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException *************** *** 92,96 **** throw new ProcessingException("Could not instantiate topic map manager.", ex); } - namespaceURI = NSURI; super.setup(resolver, objectModel, src, par); } --- 97,100 ---- *************** *** 312,315 **** --- 316,320 ---- throws SAXException { + super.startPrefixMapping(prefix, uri); if (m_parseTopicMapData) { *************** *** 327,330 **** --- 332,336 ---- public void endPrefixMapping(String prefix) throws SAXException { + super.endPrefixMapping(prefix); if (m_parseTopicMapData) { m_topicMapParser.endPrefixMapping(prefix); *************** *** 686,689 **** --- 692,698 ---- /* * $Log$ + * Revision 1.8 2008/01/08 22:04:55 conal_tuohy + * aligned XML namespace handling between TM4WebTransformer and superclass AbstractSAXTransformer + * * Revision 1.7 2004/07/05 16:41:24 kal_ahmed * Updates to add features to the sample sub-site. Renamed build.properties to build.properties.template to prevent constant CVS modifications. |
From: Xuan B. <med...@us...> - 2007-07-21 23:17:33
|
Update of /cvsroot/tm4j/tm4j In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25097 Modified Files: build.xml Log Message: Enable assertions when testing by default. Index: build.xml =================================================================== RCS file: /cvsroot/tm4j/tm4j/build.xml,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** build.xml 18 May 2005 21:26:37 -0000 1.136 --- build.xml 21 Jul 2007 23:17:33 -0000 1.137 *************** *** 873,876 **** --- 873,879 ---- <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.test.AllTests" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 889,892 **** --- 892,898 ---- <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.unified.test.AllTests" outfile="testresult.txt"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 905,908 **** --- 911,917 ---- <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.utils.test.AllTests" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 922,925 **** --- 931,937 ---- <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.index.test.AllIndexTests" outfile="indextestresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 939,943 **** <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.index.text.test.AllTests" outfile="textindextestresult"/> ! </junit> </target> --- 951,958 ---- <sysproperty key="backends" value="${backends}"/> <test name="org.tm4j.topicmap.index.text.test.AllTests" outfile="textindextestresult"/> ! <assertions> ! <enable/> ! </assertions> ! </junit> </target> *************** *** 957,960 **** --- 972,978 ---- <test name="org.tm4j.test.AllTests" outfile="testresult"/> <test name="org.tm4j.tmapi.test.AllTests" outfile="tmapitests"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 990,993 **** --- 1008,1014 ---- <test name="org.tm4j.ant.test.AllTests" outfile="anttaskstestresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1137,1140 **** --- 1158,1164 ---- </fileset> </batchtest> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1357,1360 **** --- 1381,1387 ---- <arg value="-topicmap=${ozone.test.file}"/> <arg value="-tmname=topicmap"/> + <assertions> + <enable/> + </assertions> </java> </target> *************** *** 1553,1556 **** --- 1580,1586 ---- outfile="testresult"/--> <test name="org.tm4j.topicmap.hibernate.utils.DataObjectWalkerTest" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1624,1627 **** --- 1654,1660 ---- value="-Dtopicmap.provider.factory=org.tm4j.topicmap.memory.TopicMapProviderFactoryImpl"/>--> <test name="org.tm4j.tmapi.test.AllTests" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1752,1755 **** --- 1785,1791 ---- <formatter type="plain"/> <test name="org.tm4j.tolog.test.TologTestSuite" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1930,1933 **** --- 1966,1972 ---- <formatter type="plain"/> <test name="org.tm4j.xalanutils.test.AllTests" outfile="testresult"/> + <assertions> + <enable/> + </assertions> </junit> </target> *************** *** 1942,1945 **** --- 1981,1987 ---- <jvmarg value="-Dbackend=${backend}"/> <arg line="resource/scale.test.properties"/> + <assertions> + <enable/> + </assertions> </java> </target> *************** *** 2073,2076 **** --- 2115,2121 ---- </fileset> </batchtest> + <assertions> + <enable/> + </assertions> </junit> </target> |
From: Xuan B. <med...@us...> - 2007-07-21 22:44:08
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/tmapi/test In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11267/src/org/tm4j/tmapi/test Modified Files: BaseNameTest.java Log Message: Incorporate test cases from bug.1749949. Thanks to user "kordzik". Index: BaseNameTest.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/tmapi/test/BaseNameTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** BaseNameTest.java 21 Jun 2004 18:42:27 -0000 1.11 --- BaseNameTest.java 21 Jul 2007 22:44:00 -0000 1.12 *************** *** 8,11 **** --- 8,13 ---- package org.tm4j.tmapi.test; + import java.util.Vector; + import org.tmapi.core.TopicName; import org.tmapi.core.ScopedObject; *************** *** 44,47 **** --- 46,82 ---- } + /** + This test case is result of bug report https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1749949&group_id=27895 . + Thanks to user "kordzik" for providing the test case. + + @author Kordzik + */ + public void testScopedName() { + try { + + //creating new user topic + Topic type = m_topicMap.createTopic(); + Topic t = m_topicMap.createTopic(); + + // creating scope collection + Vector<Topic> scope = new Vector<Topic>(); + scope.add(type); + + // creating name t.createTopicName("name", scope); + t.createTopicName("name", scope); + + //removing topic + t.remove(); + + //creating new one + t = m_topicMap.createTopic(); + + //RuntimeException occurs at the following line + t.createTopicName("name", scope); + } catch (TMAPIException ex) { + fail("Unexpected exception: " + ex.toString()); + } + } + public void testData() { Topic t = m_topicMap.createTopic(); |
From: Xuan B. <med...@us...> - 2007-07-21 22:44:08
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/test In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11267/src/org/tm4j/topicmap/test Modified Files: ScopeTest.java Log Message: Incorporate test cases from bug.1749949. Thanks to user "kordzik". Index: ScopeTest.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/test/ScopeTest.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ScopeTest.java 21 Jun 2004 18:42:29 -0000 1.14 --- ScopeTest.java 21 Jul 2007 22:44:00 -0000 1.15 *************** *** 46,49 **** --- 46,88 ---- } + /** + This test case is result of bug report https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1749949&group_id=27895 . + Thanks to user "kordzik" for providing the test case. + + @author Kordzik + */ + public void testScopedName() { + try { + //assumed TopicMap tm is instantianated beforehand + + //creating new user topic + Topic type = tm.createTopic("id0"); + Topic t = tm.createTopic("id1"); + + /* + // creating scope collection + Vector<Topic> scope = new Vector<Topic>(); + scope.add(type); + */ + + // creating name t.createTopicName("name", scope); + t.createName("id3","name", new Topic[] { type } ); + + //removing topic + t.destroy(); + + //creating new one + t = tm.createTopic("id2"); + + //RuntimeException occurs at the following line + t.createName("id4","name", new Topic[] { type } ); + } catch (Exception ex) { + ex.printStackTrace(); + fail("Unexpected exception: " + ex.toString()); + } + + System.gc(); + } + public void testScopedObject() { try { |
From: Barracuda S. F. <pos...@in...> - 2007-06-21 22:03:34
|
WW91ciBtZXNzYWdlIHRvOiB0bTRmYXJtY2hnc0BpbmRpYW5hZmFybWVycy5j b20Kd2FzIGJsb2NrZWQgYnkgb3VyIFNwYW0gRmlyZXdhbGwuIFRoZSBlbWFp bCB5b3Ugc2VudCB3aXRoIHRoZSBmb2xsb3dpbmcgc3ViamVjdCBoYXMgTk9U IEJFRU4gREVMSVZFUkVEOgoKU3ViamVjdDogUkU6Cgo= |
From: Xuan B. <med...@us...> - 2007-05-21 17:59:32
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7472/src/org/tm4j/topicmap/utils Modified Files: XTMWriter.java Log Message: Little comment. Index: XTMWriter.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMWriter.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** XTMWriter.java 21 May 2007 17:16:17 -0000 1.47 --- XTMWriter.java 21 May 2007 17:59:01 -0000 1.48 *************** *** 945,949 **** if (m_exportResourceIDs) { Collection tmSrcLocs = tmo.getTopicMap().getSourceLocators(); ! if ((m_resourceIDBase == null) && (!tmSrcLocs.isEmpty())) { m_resourceIDBase = (Locator) tmSrcLocs.iterator().next(); } --- 945,949 ---- if (m_exportResourceIDs) { Collection tmSrcLocs = tmo.getTopicMap().getSourceLocators(); ! if ((m_resourceIDBase == null) && (!tmSrcLocs.isEmpty())) { // If we have no resourceIDBase, then we choose one. IDs from this resourceIDBase can be used straightly. IDs from other resourceIDBases may not be used (because they may collide with IDs from this resourceIDBase) m_resourceIDBase = (Locator) tmSrcLocs.iterator().next(); } *************** *** 970,973 **** --- 970,976 ---- /* * $Log$ + * Revision 1.48 2007/05/21 17:59:01 mediumnet + * Little comment. + * * Revision 1.47 2007/05/21 17:16:17 mediumnet * Rework and optimize getResourceID() to be only of O(n) performance instead of O(n^2) performance. |
From: Xuan B. <med...@us...> - 2007-05-21 17:16:19
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22008/src/org/tm4j/topicmap/utils Modified Files: XTMWriter.java Log Message: Rework and optimize getResourceID() to be only of O(n) performance instead of O(n^2) performance. Index: XTMWriter.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMWriter.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** XTMWriter.java 21 May 2007 17:07:06 -0000 1.46 --- XTMWriter.java 21 May 2007 17:16:17 -0000 1.47 *************** *** 860,880 **** */ protected String getResourceID(TopicMapObject tmo, Locator srcLoc) { ! if (!(srcLoc instanceof URILocator)) return null; String ret = null; Iterator srcLocs = tmo.getSourceLocators().iterator(); while (srcLocs.hasNext()) { Locator tmoResLoc = (Locator)srcLocs.next(); - Locator tmResLoc = srcLoc; ! if ((tmoResLoc == null) || (tmResLoc == null) || ! !(tmoResLoc instanceof URILocator) || ! !(tmResLoc instanceof URILocator)) { continue; } URILocator uTmoResLoc = (URILocator) tmoResLoc; - URILocator uTmResLoc = (URILocator) tmResLoc; - String tmAddress = getDocumentPart(uTmResLoc.getAddress()); if (getDocumentPart(uTmoResLoc.getAddress()).equals(tmAddress)) { --- 860,882 ---- */ protected String getResourceID(TopicMapObject tmo, Locator srcLoc) { ! if (!(srcLoc instanceof URILocator)) ! return null; ! String ret = null; + Locator tmResLoc = srcLoc; + + URILocator uTmResLoc = (URILocator) tmResLoc; + String tmAddress = getDocumentPart(uTmResLoc.getAddress()); + Iterator srcLocs = tmo.getSourceLocators().iterator(); while (srcLocs.hasNext()) { Locator tmoResLoc = (Locator)srcLocs.next(); ! if (!(tmoResLoc instanceof URILocator)) { // if (tmoResLoc instanceof URILocator) returns true, then it is guaranteed that tmoResLoc!=null. Furthermore, tmoResLoc==null is not allowed anyway, is it? continue; } URILocator uTmoResLoc = (URILocator) tmoResLoc; if (getDocumentPart(uTmoResLoc.getAddress()).equals(tmAddress)) { *************** *** 885,904 **** } } ! ! if (tmo instanceof Topic) { ! Iterator it = ((Topic) tmo).getSubjectIndicators().iterator(); ! ! while (it.hasNext()) { ! Object o = it.next(); ! ! if (o instanceof URILocator) { ! URILocator l = (URILocator) o; ! ! if (getDocumentPart(l.getAddress()).equals(tmAddress)) { ! ret = l.getFragment(); ! ! if (!enableNiceIDs||!looksLikeBeingAutoGenerated(ret)) { ! return ret; ! } } } --- 887,906 ---- } } ! } ! ! if (tmo instanceof Topic) { ! Iterator it = ((Topic) tmo).getSubjectIndicators().iterator(); ! ! while (it.hasNext()) { ! Object o = it.next(); ! ! if (o instanceof URILocator) { ! URILocator l = (URILocator) o; ! ! if (getDocumentPart(l.getAddress()).equals(tmAddress)) { ! ret = l.getFragment(); ! ! if (!enableNiceIDs||!looksLikeBeingAutoGenerated(ret)) { ! return ret; } } *************** *** 906,909 **** --- 908,912 ---- } } + return ret; } *************** *** 967,970 **** --- 970,976 ---- /* * $Log$ + * Revision 1.47 2007/05/21 17:16:17 mediumnet + * Rework and optimize getResourceID() to be only of O(n) performance instead of O(n^2) performance. + * * Revision 1.46 2007/05/21 17:07:06 mediumnet * Fix a little typo. |
From: Xuan B. <med...@us...> - 2007-05-21 17:07:06
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv17935/src/org/tm4j/topicmap/utils Modified Files: XTMWriter.java Log Message: Fix a little typo. Index: XTMWriter.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMWriter.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** XTMWriter.java 3 May 2007 16:19:07 -0000 1.45 --- XTMWriter.java 21 May 2007 17:07:06 -0000 1.46 *************** *** 843,847 **** /** * Returns the fragment part of <code>tmo</code>'s resourceLocator property if, ! * and only if the document part of the resourceLocator matches the doucment part * of the containing TopicMap object's resourceLocator property. * This method is used to roundtrip id attribute values which were read in from --- 843,847 ---- /** * Returns the fragment part of <code>tmo</code>'s resourceLocator property if, ! * and only if the document part of the resourceLocator matches the document part * of the containing TopicMap object's resourceLocator property. * This method is used to roundtrip id attribute values which were read in from *************** *** 967,970 **** --- 967,973 ---- /* * $Log$ + * Revision 1.46 2007/05/21 17:07:06 mediumnet + * Fix a little typo. + * * Revision 1.45 2007/05/03 16:19:07 mediumnet * Create nicer (non-auto-generated) IDs when writing XTM output, so that the XTM file is more readable. |
From: Xuan B. <med...@us...> - 2007-05-21 02:39:23
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9024/src/org/tm4j/topicmap/utils Modified Files: XTMBuilder.java Log Message: Employ transaction coarsening to reduce frequency of per-transaction overhead. Index: XTMBuilder.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMBuilder.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** XTMBuilder.java 12 Apr 2007 13:58:12 -0000 1.74 --- XTMBuilder.java 21 May 2007 02:39:16 -0000 1.75 *************** *** 528,531 **** --- 528,532 ---- } */ + closeTransaction(); m_catalogResolver = null; // disable further use } *************** *** 538,544 **** } ! if ((m_provider != null) && m_provider.isTransactional()) { ! m_provider.openTransaction(); ! } Locator resourceLocator = resourceLocatorForID(id); --- 539,543 ---- } ! openTransaction(); Locator resourceLocator = resourceLocatorForID(id); *************** *** 586,592 **** m_currTopic = null; ! if ((m_provider != null) && m_provider.isTransactional()) { ! m_provider.getOpenTransaction().commit(); ! } } --- 585,589 ---- m_currTopic = null; ! maybeCloseTransaction(); } *************** *** 751,757 **** */ public void startAssociation(String id) throws TopicMapProcessingException { ! if ((m_provider != null) && m_provider.isTransactional()) { ! m_provider.openTransaction(); ! } //try { --- 748,752 ---- */ public void startAssociation(String id) throws TopicMapProcessingException { ! openTransaction(); //try { *************** *** 806,811 **** m_currScope.clear(); if ((m_provider != null) && m_provider.isTransactional()) { ! m_provider.getOpenTransaction().commit(); } } --- 801,831 ---- m_currScope.clear(); + maybeCloseTransaction(); + } + + protected void openTransaction() { if ((m_provider != null) && m_provider.isTransactional()) { ! if (!m_provider.isTransactionOpen()) { ! m_provider.openTransaction(); ! } ! } ! } ! ! protected void closeTransaction() { ! if ((m_provider != null) && m_provider.isTransactional()) { ! if (!m_provider.isTransactionOpen()) { ! m_provider.getOpenTransaction().commit(); ! } ! } ! } ! ! protected int transactionCloseCounter = 0; ! ! protected void maybeCloseTransaction() { ! if ((m_provider != null) && m_provider.isTransactional()) { ! ! if (((++transactionCloseCounter)&0xFF)==0) { ! closeTransaction(); ! } } } *************** *** 1759,1762 **** --- 1779,1785 ---- /* * $Log$ + * Revision 1.75 2007/05/21 02:39:16 mediumnet + * Employ transaction coarsening to reduce frequency of per-transaction overhead. + * * Revision 1.74 2007/04/12 13:58:12 mediumnet * Tabs->Spaces for some files. Also make indentation rules explicit (at least to jEdit). |
From: Xuan B. <med...@us...> - 2007-05-21 01:00:53
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/net In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29602/src/org/tm4j/net Modified Files: LocatorFactoryBase.java Log Message: Tag LocatorFactoryBase as being optimizable. Index: LocatorFactoryBase.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/net/LocatorFactoryBase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** LocatorFactoryBase.java 26 Feb 2004 21:33:41 -0000 1.7 --- LocatorFactoryBase.java 21 May 2007 01:00:51 -0000 1.8 *************** *** 106,109 **** --- 106,110 ---- // a little introspective magic here :-) + // FIXME: PERFORMANCE: nice, but this magic may be quite expensive, for every locator... Class[] constrArgTypes = { org.tm4j.net.LocatorFactory.class, java.lang.String.class, *************** *** 144,147 **** --- 145,151 ---- /* * $Log$ + * Revision 1.8 2007/05/21 01:00:51 mediumnet + * Tag LocatorFactoryBase as being optimizable. + * * Revision 1.7 2004/02/26 21:33:41 kal_ahmed * Updated license text and reformatted source with Jalopy. |
From: Xuan B. <med...@us...> - 2007-05-21 00:59:31
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29070/src/org/tm4j/topicmap/utils Modified Files: IDGeneratorImpl.java Log Message: Speedup IDGenerator constructor. Index: IDGeneratorImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/IDGeneratorImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IDGeneratorImpl.java 3 May 2007 16:19:07 -0000 1.10 --- IDGeneratorImpl.java 21 May 2007 00:59:30 -0000 1.11 *************** *** 27,40 **** /** * Constructs a new IDGeneratorImpl object, with the * base part of the ID string set to the time of creation. */ public IDGeneratorImpl() { ! try { ! // KA: Force a pause to ensure that we don't create ! // two IDGeneratorImpl instances with the same base ID ! // because of poor system clock resolution ! Thread.sleep(100); ! } catch (InterruptedException ex) { } --- 27,52 ---- /** + Enabling sleep at instantiation is absolutely trashing performance on JDO applications. + Furthermore, this measure only protects against generations of IDGenerators with the same baseID + when they are generated by the same thread. + + If we really need unique IDs (really fast), wie should use java.util.UUID. + + */ + protected final static boolean enableSleepAtInstantiation = false; + + /** * Constructs a new IDGeneratorImpl object, with the * base part of the ID string set to the time of creation. */ public IDGeneratorImpl() { ! if (enableSleepAtInstantiation) { ! try { ! // KA: Force a pause to ensure that we don't create ! // two IDGeneratorImpl instances with the same base ID ! // because of poor system clock resolution ! Thread.sleep(100); ! } catch (InterruptedException ex) { ! } } |
From: Xuan B. <med...@us...> - 2007-05-08 15:52:25
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/hibernate In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21639/src/org/tm4j/topicmap/hibernate Modified Files: TopicMapImpl.java Log Message: Fix a bug. Thanks to Lars Heuer for spotting it. Finding this bug in the first place was masked by another bug in the build.xml file: 'ant clean' does not properly clean up. Index: TopicMapImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/hibernate/TopicMapImpl.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** TopicMapImpl.java 21 Jun 2004 18:40:23 -0000 1.45 --- TopicMapImpl.java 8 May 2007 15:52:24 -0000 1.46 *************** *** 433,437 **** ret = find(txn, "select tm from tm in class org.tm4j.topicmap.hibernate.TopicMapDataObject," + ! " loc in tm.sourceLocators.elements where " + " loc = ? and tm = ?", new Object[] { ldo, tmdo}, new Type[] { Hibernate.entity(LocatorDataObject.class), --- 433,438 ---- ret = find(txn, "select tm from tm in class org.tm4j.topicmap.hibernate.TopicMapDataObject," + ! " loc in tm.sourceLocators.elements where " + ! " loc = ? and tm = ?", new Object[] { ldo, tmdo}, new Type[] { Hibernate.entity(LocatorDataObject.class), *************** *** 1254,1257 **** --- 1255,1270 ---- /** + * Returns wether the ID of this TopicMapObject equals to the ID of the TopicMapObject provided. + * + * This method is to allow for implementations which do not have a notion of explicit ID strings or + * where such a creation of ID strings is expensive, where IDs are not strings or where otherwise undue. + * + * The implementation can safely assume that the TopicMapObject provided is from the same TopicMap. + */ + public boolean equalsByID(TopicMapObject o) { + return getID().equals(o.getID()); + } + + /** * Returns the Locator of the XML or other resource which * caused the creation of this topic map object. *************** *** 1785,1788 **** --- 1798,1804 ---- /* * $Log$ + * Revision 1.46 2007/05/08 15:52:24 mediumnet + * Fix a bug. Thanks to Lars Heuer for spotting it. Finding this bug in the first place was masked by another bug in the build.xml file: 'ant clean' does not properly clean up. + * * Revision 1.45 2004/06/21 18:40:23 kal_ahmed * Fixed query bug in destroy() code. |
From: Xuan B. <med...@us...> - 2007-05-03 16:19:10
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv11965/src/org/tm4j/topicmap/utils Modified Files: IDGeneratorFactory.java IDGeneratorImpl.java XTMWriter.java Log Message: Create nicer (non-auto-generated) IDs when writing XTM output, so that the XTM file is more readable. Index: IDGeneratorImpl.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/IDGeneratorImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IDGeneratorImpl.java 15 Dec 2004 08:43:09 -0000 1.9 --- IDGeneratorImpl.java 3 May 2007 16:19:07 -0000 1.10 *************** *** 1,3 **** ! /* Copyright (c) 2000-2004 The TM4J Project. All rights reserved. --- 1,3 ---- ! /* :indentSize=4:tabSize=4: Copyright (c) 2000-2004 The TM4J Project. All rights reserved. *************** *** 57,59 **** --- 57,63 ---- return m_instance.getID(); } + + protected String getBaseID() { + return baseID; + } } Index: XTMWriter.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/XTMWriter.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** XTMWriter.java 3 May 2007 14:45:18 -0000 1.44 --- XTMWriter.java 3 May 2007 16:19:07 -0000 1.45 *************** *** 87,90 **** --- 87,95 ---- private LocatorFactory m_locFactory = new LocatorFactoryImpl(); private boolean m_exportSubjectIndicatorRefs = false; + + /** + Wether we want to try to write IDs which are not autogenerated. + */ + protected final static boolean enableNiceIDs = true; /** *************** *** 858,862 **** String ret = null; Iterator srcLocs = tmo.getSourceLocators().iterator(); ! while ((ret == null) && srcLocs.hasNext()) { Locator tmoResLoc = (Locator)srcLocs.next(); Locator tmResLoc = srcLoc; --- 863,868 ---- String ret = null; Iterator srcLocs = tmo.getSourceLocators().iterator(); ! ! while (srcLocs.hasNext()) { Locator tmoResLoc = (Locator)srcLocs.next(); Locator tmResLoc = srcLoc; *************** *** 873,877 **** if (getDocumentPart(uTmoResLoc.getAddress()).equals(tmAddress)) { ! return uTmoResLoc.getFragment(); } --- 879,887 ---- if (getDocumentPart(uTmoResLoc.getAddress()).equals(tmAddress)) { ! ret = uTmoResLoc.getFragment(); ! ! if (!enableNiceIDs||!looksLikeBeingAutoGenerated(ret)) { ! return ret; ! } } *************** *** 886,890 **** if (getDocumentPart(l.getAddress()).equals(tmAddress)) { ! return l.getFragment(); } } --- 896,904 ---- if (getDocumentPart(l.getAddress()).equals(tmAddress)) { ! ret = l.getFragment(); ! ! if (!enableNiceIDs||!looksLikeBeingAutoGenerated(ret)) { ! return ret; ! } } } *************** *** 894,897 **** --- 908,915 ---- return ret; } + + protected boolean looksLikeBeingAutoGenerated(String resourceID) { + return resourceID.startsWith(IDGeneratorFactory.ourIDGenerator().getBaseID()); + } /** *************** *** 949,952 **** --- 967,973 ---- /* * $Log$ + * Revision 1.45 2007/05/03 16:19:07 mediumnet + * Create nicer (non-auto-generated) IDs when writing XTM output, so that the XTM file is more readable. + * * Revision 1.44 2007/05/03 14:45:18 mediumnet * An assertion. Index: IDGeneratorFactory.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/utils/IDGeneratorFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IDGeneratorFactory.java 10 Sep 2004 12:45:17 -0000 1.8 --- IDGeneratorFactory.java 3 May 2007 16:19:07 -0000 1.9 *************** *** 54,60 **** --- 54,70 ---- return s_instance; } + + /** + only for optimization + */ + protected static IDGeneratorImpl ourIDGenerator() { + return (IDGeneratorImpl) s_instance; + } } /* * $Log$ + * Revision 1.9 2007/05/03 16:19:07 mediumnet + * Create nicer (non-auto-generated) IDs when writing XTM output, so that the XTM file is more readable. + * * Revision 1.8 2004/09/10 12:45:17 kal_ahmed * Moved IDGeneratorFactory to manage a singleton IDGenerator instance. |