You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(414) |
Apr
(123) |
May
(448) |
Jun
(180) |
Jul
(17) |
Aug
(49) |
Sep
(3) |
Oct
(92) |
Nov
(101) |
Dec
(64) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(132) |
Feb
(230) |
Mar
(146) |
Apr
(146) |
May
|
Jun
|
Jul
(34) |
Aug
(4) |
Sep
(3) |
Oct
(10) |
Nov
(12) |
Dec
(24) |
2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(4) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Bryan T. <tho...@us...> - 2006-03-14 18:34:57
|
Update of /cvsroot/cweb/cweb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30373 Modified Files: RELEASE-HOWTO.html Log Message: Added notes directing people to write up a news annoucement and post it on sourceforge when making a release. Index: RELEASE-HOWTO.html =================================================================== RCS file: /cvsroot/cweb/cweb/RELEASE-HOWTO.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RELEASE-HOWTO.html 10 Mar 2006 14:06:44 -0000 1.5 --- RELEASE-HOWTO.html 14 Mar 2006 18:34:52 -0000 1.6 *************** *** 385,388 **** --- 385,396 ---- </li> + + <li> Write up and <a href="http://sourceforge.net/news/submit.php?group_id=95673"> + post a news annoucement</a> on the project site on sourceforge. See the <a + href="./NEWS-HOWTO.txt"> CWEB NEWS HOWTO </a> for guidence and the <a + href="http://sourceforge.net/news/?group_id=95673"> CWEB news archive </a> + for examples. + + </li> </ol> |
From: Bryan T. <tho...@us...> - 2006-03-14 18:29:02
|
Update of /cvsroot/cweb/cweb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25933 Added Files: NEWS-HOWTO.txt Log Message: Added guidelines on posting announcements for the cweb project. --- NEW FILE: NEWS-HOWTO.txt --- See the SF news guidelines [1] and the CWEB news archive[2] for examples. The basic structure for CWEB postings is: - Title - A summary paragraph that introduces the module(s) or other topic relevant to the announcement. This paragraph would be the same for each release of the same set of modules. Since many features are broken down into more than one module, announcements should speak to the feature (GOM, RDFS SAIL, XPointer, Shruti, etc.) rather than the specific modules. If an annoucement is not linked to a specific release effort, then another topic paragraph must be crafted. A template should be crafted for security annoucements if that becomes relevant. - A 2nd paragraph describing the specific news event. E.g., the new features in the current release or the relevance of this release to the other projects, etc. - A trailer paragraph describing the CognitiveWeb project. The CognitiveWeb hosts critical open source infrastructure efforts in web architecture, semantic web, and fuzzy logics designed to facilitate collaborative decision-making, critical thinking and conflict resolution processes. The goal of the CognitiveWeb is to extend human decision-making horizons by compensating for some intrinsic aspects of selective attention. See http://www.cognitiveweb.org or http://www.sourceforge.net/projects/cweb for more information. - URLs can be inline, but no HTML. The use of [x] to place URLs at the bottom of the news article may conflict with the re-distribution of news. It may be better to place URLs at the end of a paragraph per the SF news formatting guidelines. [1] http://sourceforge.net/docman/display_doc.php?docid=12834&group_id=1 [2] http://sourceforge.net/news/?group_id=95673 |
From: Bryan T. <tho...@us...> - 2006-03-14 18:17:27
|
Update of /cvsroot/cweb/oracle-sail/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18451/xdocs Modified Files: navigation.xml Log Message: Changed wiki page name to reflect copyright guideance on the Oracle web site. Index: navigation.xml =================================================================== RCS file: /cvsroot/cweb/oracle-sail/xdocs/navigation.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** navigation.xml 20 Dec 2005 17:20:02 -0000 1.5 --- navigation.xml 14 Mar 2006 18:17:01 -0000 1.6 *************** *** 28,32 **** /> <item name="Wiki" ! href="http://wiki.cognitiveweb.org/OracleSail" /> <item name="Javadoc" --- 28,32 ---- /> <item name="Wiki" ! href="http://wiki.cognitiveweb.org/SailForOracle" /> <item name="Javadoc" |
From: Bryan T. <tho...@us...> - 2006-03-14 16:03:44
|
Update of /cvsroot/cweb/concurrent/src/test/org/CognitiveWeb/concurrent/locking In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5097/src/test/org/CognitiveWeb/concurrent/locking Added Files: TestTxDag.java Log Message: Adding test case harness for TxDag. --- NEW FILE: TestTxDag.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Mar 14, 2006 * $Id: TestTxDag.java,v 1.1 2006/03/14 16:03:34 thompsonbry Exp $ */ package org.CognitiveWeb.concurrent.locking; import junit.framework.TestCase; /** * @author thompsonbry */ public class TestTxDag extends TestCase { public TestTxDag() { } public TestTxDag( String name ) { super( name ); } } |
From: Bryan T. <tho...@us...> - 2006-03-14 15:19:38
|
Update of /cvsroot/cweb/dbcache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11330 Removed Files: .classpath .project Log Message: Removed .project and .classpath files from repository. --- .project DELETED --- --- .classpath DELETED --- |
From: Bryan T. <tho...@us...> - 2006-03-14 15:17:23
|
Update of /cvsroot/cweb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10101 Modified Files: .cvsignore Log Message: adding target, .classpath and .project to .cvsignore. Index: .cvsignore =================================================================== RCS file: /cvsroot/cweb/extser/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 9 Mar 2006 18:37:08 -0000 1.1 --- .cvsignore 14 Mar 2006 15:17:20 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + target .classpath .project |
From: Bryan T. <tho...@us...> - 2006-03-14 15:17:21
|
Update of /cvsroot/cweb/dbcache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10074 Added Files: .cvsignore Log Message: adding target, .classpath and .project to .cvsignore. --- NEW FILE: .cvsignore --- target .project .classpath |
From: Bryan T. <tho...@us...> - 2006-03-14 15:15:12
|
Update of /cvsroot/cweb/concurrent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8720 Added Files: .cvsignore Log Message: adding target, .classpath and .project to .cvsignore. --- NEW FILE: .cvsignore --- target .project .classpath |
From: Bryan T. <tho...@us...> - 2006-03-14 15:13:18
|
Update of /cvsroot/cweb/concurrent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7791 Removed Files: .classpath .project Log Message: Removed .project and .classpath files from repository. --- .project DELETED --- --- .classpath DELETED --- |
From: Bryan T. <tho...@us...> - 2006-03-10 14:06:52
|
Update of /cvsroot/cweb/cweb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7989 Modified Files: project.xml TODO.txt RELEASE-HOWTO.html Log Message: Migrated some TODOs out of a plain text file in CVS and into JIRA issues for the Master POM. Fixed some HTML errors in RELEASE-HOWTO.html. Added JIRA link to Master POM and fixed links to the CVS repository. Index: TODO.txt =================================================================== RCS file: /cvsroot/cweb/cweb/TODO.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TODO.txt 9 Feb 2004 19:21:44 -0000 1.3 --- TODO.txt 10 Mar 2006 14:06:44 -0000 1.4 *************** *** 1,27 **** ********************************* ! ************* MAVEN ************* ********************************* - - done. Fix build of a multi-project site. The multiproject:site - build assumes that the different projects have been checked out - under an umbrella project such that they fall beneath that - umbrella project within the file system. However, the cweb - projects have been laid out as siblings and not in a parent-child - relationship. This has several implications, one of which is that - the projects must use "copy down" inheritance in the POM. This - approach was selected after some comparison of the costs and - benefits of "POM" inheritence. It was decided that POM - inheritance, as currently (25Nov2003) realized broke artifact - boundaries, did not provide great savings through eliminated - redundency (you can always use "copy down" inheritance), and - potentially created risky situations in the CVS repository by - establishing dependencies among how the projects were laid out in - the file system and within the CVS repository. A POM inheritance - mechanism that explicitly declared the dependency on a "parent" - artifact that it extends could avoid these issues using the maven - local repository to cache the POM for the parent artifact rather - than the path to the POM of the parent project in the local file - system, e.g., "../project.xml". - - Some script should take responsibility for publishing the various DTDs and related resources into their well-known locations on the --- 1,6 ---- ********************************* ! ********* REST SERVICES ********* ********************************* - Some script should take responsibility for publishing the various DTDs and related resources into their well-known locations on the *************** *** 64,79 **** ... - - - done. Fix automatic publishing of generated site. - - - Get artifacts uploaded to the main ibiblio repository. Folks are - working on an automated solution. Currently you have to post an - issue against JIRA, which we could do automatically -- but they - still have to process it manually. - >>>>>>> 1.2 - - See "http://maven.apache.org/repository-upload.html" - and "http://maven.apache.org/reference/plugins/artifact/index.html". - - How do I build and deploy the WAR (vs just the JAR). The best way is to create a project that produces the WAR artifact. Test the --- 43,46 ---- *************** *** 89,115 **** web services. - - CheckStyle is complaining that the LICENSE.txt content is not - being found at the top of each source file. This is a bit of a - pain since it is seeing /**\n <text> */ where <text> is what it - should be recognizing as the license text. In general, the - license needs to be bracketed by the comment model for the content - model.... - - ********************************* - ********** ALL PROJECTS ********* - ********************************* - - - Fixup copyright notices that should only read 2003 (vs 2002-2003). - This came about through cut & paste. Also, be consistent in the - use of the license within the source files. The license text - should be verbatim and other mechanisms, e.g., modification lists, - @author, the LEGAL file, etc. should be used to document the - developer or contributor. - - - Support log4j. However, note that the primary logging mechanism - for HTTP requests is the request journel. - - - Develop cactus in-container service-level tests. - - Migrate all services to Servlet basis with Cactus tests for basic functionality. --- 56,59 ---- *************** *** 126,137 **** - Provide for automatic conversion of UML models into PDF and migration into the generated documentation. - - - Establish policy for contributions and incremental and stable - releases. This will require re-factoring the webapp structure - into a repository structure and providing for generating the - webapp (deployment) structure from a checked-out version of the - repository structure. - - - Refactor the web site with respect to project sites generated - using Maven. There is a lot of redundency there. - --- 70,71 ---- Index: RELEASE-HOWTO.html =================================================================== RCS file: /cvsroot/cweb/cweb/RELEASE-HOWTO.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RELEASE-HOWTO.html 8 Mar 2006 20:34:32 -0000 1.4 --- RELEASE-HOWTO.html 10 Mar 2006 14:06:44 -0000 1.5 *************** *** 74,78 **** issue.) ! <li> <p><strong> Install artifacts in your local Maven repository </strong> ("m(n)install"). If you forget this step, then other modules that you build on your system will be using the --- 74,78 ---- issue.) ! </li><li> <p><strong> Install artifacts in your local Maven repository </strong> ("m(n)install"). If you forget this step, then other modules that you build on your system will be using the *************** *** 214,224 **** that it was released to SourceForge.</strong> ! <pre> cd target ! md5sum.exe cweb-commons-1.1-b1-dev.jar > cweb-commons-1.1-b1-dev.jar.md5 scp cweb-commons-1.1-b1-dev.jar* use...@pr...:/home/groups/c/cw/cweb/maven-repository/org.CognitiveWeb/jars </pre> Where <i>username</i> is your login name on that host. Be --- 214,225 ---- that it was released to SourceForge.</strong> ! </p><pre> cd target ! md5sum.exe cweb-commons-1.1-b1-dev.jar > cweb-commons-1.1-b1-dev.jar.md5 scp cweb-commons-1.1-b1-dev.jar* use...@pr...:/home/groups/c/cw/cweb/maven-repository/org.CognitiveWeb/jars </pre> + <p> Where <i>username</i> is your login name on that host. Be *************** *** 228,232 **** the JAR and the MD5 signature!</em> ! </p> <p> <strong>Verify that the artifact is in the <a --- 229,233 ---- the JAR and the MD5 signature!</em> ! </p> <p> <strong>Verify that the artifact is in the <a *************** *** 242,249 **** its <code>project.properties</code> file. For example: ! <pre> maven.repo.remote=http://www.ibiblio.org/maven/,http://www.cognitiveweb.org/maven-repository,http://proto.cognitiveweb.org/maven-repository </pre> ! This has already been done for all the existing cweb modules. </p> --- 243,250 ---- its <code>project.properties</code> file. For example: ! </p><pre> maven.repo.remote=http://www.ibiblio.org/maven/,http://www.cognitiveweb.org/maven-repository,http://proto.cognitiveweb.org/maven-repository </pre> ! <p> This has already been done for all the existing cweb modules. </p> *************** *** 303,315 **** Password: 230 Anonymous access granted, restrictions apply. ! ftp> <strong>cd incoming</strong> 250 CWD command successful. ! ftp> <strong>bin</strong> 200 Type set to I. ! ftp> <strong>hash</strong> Hash mark printing On ftp: (2048 bytes/hash mark) . ! ftp> <strong>lcd target/distributions</strong> Local directory now C:\usr\local\src\sql\target\distributions. ! ftp> <strong>!ls -l</strong> total 175 -rwx------ 1 thompson mkpasswd 15428 Jun 9 04:58 cweb-sql-1.1-b1-dev-src.tar.gz --- 304,316 ---- Password: 230 Anonymous access granted, restrictions apply. ! ftp> <strong>cd incoming</strong> 250 CWD command successful. ! ftp> <strong>bin</strong> 200 Type set to I. ! ftp> <strong>hash</strong> Hash mark printing On ftp: (2048 bytes/hash mark) . ! ftp> <strong>lcd target/distributions</strong> Local directory now C:\usr\local\src\sql\target\distributions. ! ftp> <strong>!ls -l</strong> total 175 -rwx------ 1 thompson mkpasswd 15428 Jun 9 04:58 cweb-sql-1.1-b1-dev-src.tar.gz *************** *** 317,321 **** -rwx------ 1 thompson mkpasswd 43238 Jun 9 04:58 cweb-sql-1.1-b1-dev.tar.gz -rwx------ 1 thompson mkpasswd 92703 Jun 9 04:58 cweb-sql-1.1-b1-dev.zip ! ftp> <strong>mput *</strong> mput cweb-sql-1.1-b1-dev-src.tar.gz? <strong>y</strong> 200 PORT command successful. --- 318,322 ---- -rwx------ 1 thompson mkpasswd 43238 Jun 9 04:58 cweb-sql-1.1-b1-dev.tar.gz -rwx------ 1 thompson mkpasswd 92703 Jun 9 04:58 cweb-sql-1.1-b1-dev.zip ! ftp> <strong>mput *</strong> mput cweb-sql-1.1-b1-dev-src.tar.gz? <strong>y</strong> 200 PORT command successful. *************** *** 342,346 **** 226 Transfer complete. ftp: 92703 bytes sent in 3.20Seconds 29.02Kbytes/sec. ! ftp> <strong>bye</strong> </pre> --- 343,347 ---- 226 Transfer complete. ftp: 92703 bytes sent in 3.20Seconds 29.02Kbytes/sec. ! ftp> <strong>bye</strong> </pre> Index: project.xml =================================================================== RCS file: /cvsroot/cweb/cweb/project.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** project.xml 6 Apr 2004 10:11:57 -0000 1.15 --- project.xml 10 Mar 2006 14:06:44 -0000 1.16 *************** *** 80,84 **** <!-- copy down inheritance applies. --> <issueTrackingUrl> ! http://sourceforge.net/tracker/?atid=612226&group_id=95673&func=browse </issueTrackingUrl> --- 80,84 ---- <!-- copy down inheritance applies. --> <issueTrackingUrl> ! http://jira.cognitiveweb.org/browse/CWEB </issueTrackingUrl> *************** *** 95,104 **** --> <connection> ! scm:cvs:pserver:ano...@cv...:/cvsroot/cweb:${pom.artifactId} </connection> <developerConnection> ! scm:cvs:ext:user@${maven.scm.cvs.host}:/cvsroot/cweb:${pom.artifactId} </developerConnection> ! <url>http://cvs.sourceforge.net/viewcvs.py/cweb/</url> </repository> --- 95,104 ---- --> <connection> ! scm:cvs:pserver:ano...@cv...:/cvsroot/cweb:cweb </connection> <developerConnection> ! scm:cvs:ext:user@${maven.scm.cvs.host}:/cvsroot/cweb:cweb </developerConnection> ! <url>http://cvs.sourceforge.net/viewcvs.py/cweb/cweb</url> </repository> |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:16
|
Update of /cvsroot/cweb/extser/src/test/org/CognitiveWeb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010/src/test/org/CognitiveWeb/extser Added Files: ShortPackerTestCase.java TestExtensibleSerializer.java LongPackerTestCase.java TestAll.java Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: ShortPackerTestCase.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 28, 2005 */ package org.CognitiveWeb.extser; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Random; import org.CognitiveWeb.extser.ShortPacker; import junit.framework.TestCase; /** * TestAll suite for {@link ShortPacker}. * * @author thompsonbry */ public class ShortPackerTestCase extends TestCase { /** * */ public ShortPackerTestCase() { super(); } /** * @param name */ public ShortPackerTestCase(String name) { super(name); } /** * Unpacks a short value. * * @param expected The expected long value. * * @param packed The packed byte[]. * * @throws IOException * If there was not enough data. * * @throws junit.framework.AssertionFailedError * If there is too much data. */ public void doUnpackTest( short expected, byte[] packed ) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream( packed ); short actual = ShortPacker.unpackShort( new DataInputStream( bais ) ); assertEquals( "value", expected, actual ); assertTrue( "Expecting EOF", bais.read() == -1 ); } /* * A short in [0:127] is packed into one byte. Larger values are packed into * two bytes. The high bit of the first byte is set if the value was packed * into two bytes. If the bit is set, clear the high bit, read the next * byte, and interpret the two bytes as a short value. Otherwise interpret * the byte as a short value. */ public void testUnpack() throws IOException { doUnpackTest( (short) 0x0, new byte[]{(byte)0x0} ); doUnpackTest( (short) 0x1, new byte[]{(byte)0x1} ); doUnpackTest( (short) 0x7, new byte[]{(byte)0x7} ); doUnpackTest( (short) 0xf, new byte[]{(byte)0xf} ); doUnpackTest( (short) 0x70, new byte[]{(byte)0x70} ); doUnpackTest( (short) 0x7f, new byte[]{(byte)0x7f} ); doUnpackTest( (short) 0x80, new byte[]{(byte)0x80, (byte)0x80} ); doUnpackTest( (short) 0x8e, new byte[]{(byte)0x80, (byte)0x8e} ); } public void doPackTest( short v, byte[] expected ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); final int nbytes = ShortPacker.packShort( new DataOutputStream( baos ), v ); final byte[] actual = baos.toByteArray(); assertEquals( "nbytes", expected.length, nbytes ); assertEquals( "bytes", expected, actual ); } public void testPack() throws IOException { // [0:127] should be packed into one byte. doPackTest( (short) 0x00, new byte[]{(byte)0x0} ); doPackTest( (short) 0x01, new byte[]{(byte)0x1} ); doPackTest( (short) 0x02, new byte[]{(byte)0x2} ); doPackTest( (short) 0x0e, new byte[]{(byte)0xe} ); doPackTest( (short) 0x0f, new byte[]{(byte)0xf} ); doPackTest( (short) 0x10, new byte[]{(byte)0x10 }); doPackTest( (short) 0x11, new byte[]{(byte)0x11 }); doPackTest( (short) 0x1f, new byte[]{(byte)0x1f }); doPackTest( (short) 0x20, new byte[]{(byte)0x20 }); doPackTest( (short) 0x70, new byte[]{(byte)0x70 }); doPackTest( (short) 0x7f, new byte[]{(byte)0x7f }); // high nibble of the short value is zero. doPackTest( (short) 0x80, new byte[]{(byte)0x80, (byte)0x80 }); doPackTest( (short) 0xff, new byte[]{(byte)0x80, (byte)0xff }); doPackTest( (short) 0x100, new byte[]{(byte)0x81, (byte)0x00 }); doPackTest( (short) 0x101, new byte[]{(byte)0x81, (byte)0x01 }); doPackTest( (short) 0x121, new byte[]{(byte)0x81, (byte)0x21 }); doPackTest( (short) 0x1ee, new byte[]{(byte)0x81, (byte)0xee }); doPackTest( (short) 0x1ff, new byte[]{(byte)0x81, (byte)0xff }); doPackTest( (short) 0xfff, new byte[]{(byte)0x8f, (byte)0xff }); } public void test_rejectNegatives() throws IOException { try { doPackTest( (short) 0x8fff, new byte[]{}); fail( "Expecting: "+IllegalArgumentException.class ); } catch( IllegalArgumentException ex ) { System.err.println( "Ignoring expected exception: "+ex ); } try { doPackTest( (short) 0xffff, new byte[]{}); fail( "Expecting: "+IllegalArgumentException.class ); } catch( IllegalArgumentException ex ) { System.err.println( "Ignoring expected exception: "+ex ); } } public static final long SIGN_MASK = 11<<15; public void testHighBit() { assertTrue( "sign bit", ( (short)-1 & SIGN_MASK ) != 0 ); assertFalse( "sign bit", ( (short) 0 & SIGN_MASK ) != 0 ); } private interface ShortGenerator { public short nextShort(); } /** * All long values in sequence starting from the given start value * and using the given increment. * @author thompsonbry */ private static class Sequence implements ShortGenerator { short _start, _inc, _next; public Sequence( short start, short inc ) { _start = start; _inc = inc; _next = start; } public short nextShort() { if( _next == Short.MAX_VALUE ) { throw new RuntimeException( "No more short values."); } short v = _next; _next += _inc; return v; } } /** * Random short values (16 bits of random short), including negatives, * with a uniform distribution. * * @author thompsonbry */ private static class RandomShort implements ShortGenerator { Random _rnd; public RandomShort( Random rnd ) { _rnd = rnd; } public short nextShort() { return (short)_rnd.nextInt(); // truncate. } } /** * Run a large #of pack/unpack operations on a sequence of short values to * demonstrate correctness in that sequence. The sequence is the short values * from -1 to {@link Short#MAX_VALUE} by one (dense coverage). * * @throws IOException */ public void testStressSequence() throws IOException { // dense coverage of the first 1M values. doStressTest( Short.MAX_VALUE+1, new Sequence( (short)-1, (short)1 ) ); } /** * Run a large #of random pack/unpack operations to sample the space while * showing correctness on those samples. * * @throws IOException */ public void testStressRandom() throws IOException { // test on random long values. doStressTest( 0xffff, new RandomShort( new Random() ) ); } /** * Run a stress test. Writes some information of possible interest onto * System.err. * * @param ntrials #of trials. * * @param g Generator for the long values. * * @throws IOException */ public void doStressTest( int ntrials, ShortGenerator g ) throws IOException { long nwritten = 0L; long packlen = 0L; long minv = Short.MAX_VALUE, maxv = Short.MIN_VALUE; for( int i=0; i<ntrials; i++ ) { short expected = g.nextShort(); if( expected < 0L ) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream( baos ); try { ShortPacker.packShort( dos, expected ); fail( "Expecting rejection of negative value: val="+expected ); } catch( IllegalArgumentException ex ) { // System.err.println( "Ingoring expected exception: "+ex ); } } else { if( expected > maxv ) maxv = expected; if( expected < minv ) minv = expected; ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream( baos ); int nbytesActual = ShortPacker.packShort( dos, expected ); byte[] packed = baos.toByteArray(); final int nbytesExpected = ShortPacker.getNBytes( packed[ 0 ] ); ByteArrayInputStream bais = new ByteArrayInputStream( packed ); DataInputStream dis = new DataInputStream( bais ); final short actual = ShortPacker.unpackShort( dis ); assertEquals( "trial="+i, expected, actual ); assertEquals( "trial="+i+", v="+expected+", nbytes", nbytesExpected, nbytesActual ); assertEquals( "trial="+i+", v="+expected+", nbytes", nbytesExpected, packed.length ); packlen += packed.length; // total #of packed bytes. nwritten++; // count #of non-negative random values. } } System.err.println( "\nWrote "+nwritten+" non-negative long values." ); System.err.println( "minv="+minv+", maxv="+maxv ); System.err.println( "#packed bytes ="+packlen ); System.err.println( "#bytes if not packed="+(nwritten * 8)); long nsaved = ( nwritten * 8 ) - packlen; System.err.println ("#bytes saved ="+nsaved); System.err.println( "%saved by packing ="+nsaved/(nwritten*8f)*100+"%"); } public static void assertEquals( String msg, byte[] expected, byte[] actual ) { assertEquals( msg+": length", expected.length, actual.length ); for( int i=0; i<expected.length; i++ ) { assertEquals( msg+": byte[i="+i+"]", expected[i], actual[i] ); } } } --- NEW FILE: TestAll.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ package org.CognitiveWeb.extser; import org.CognitiveWeb.extser.TestExtensibleSerializer; import junit.framework.*; /** * Package test suite. * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> */ public class TestAll extends TestCase { public static junit.framework.Test suite() { TestSuite retval = new TestSuite(); retval.addTestSuite( LongPackerTestCase.class ); retval.addTestSuite( ShortPackerTestCase.class ); retval.addTestSuite( TestExtensibleSerializer.class ); return retval; } } --- NEW FILE: TestExtensibleSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations [...1362 lines suppressed...] * NOP. */ protected void update() throws IOException {} /** * Returns the ISerializer set using {@link #setSerializer( long recid )} for * that recid. */ public ISerializer getSerializer(long recid) throws IOException { return (ISerializer) _serializers.get( new Long(recid) ); } protected ISerializer setSerializer(long recid, ISerializer serializer ) { return (ISerializer) _serializers.put( new Long(recid), serializer ); } } } --- NEW FILE: LongPackerTestCase.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 28, 2005 */ package org.CognitiveWeb.extser; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Random; import org.CognitiveWeb.extser.LongPacker; import junit.framework.TestCase; /** * TestAll suite for {@link LongPacker}. * * @author thompsonbry */ public class LongPackerTestCase extends TestCase { /** * */ public LongPackerTestCase() { super(); } /** * @param name */ public LongPackerTestCase(String name) { super(name); } /** * Unpacks a long. * * @param expected The expected long value. * * @param packed The packed byte[]. * * @throws IOException * If there was not enough data. * * @throws junit.framework.AssertionFailedError * If there is too much data. */ public void doUnpackTest( long expected, byte[] packed ) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream( packed ); long actual = LongPacker.unpackLong( new DataInputStream( bais ) ); assertEquals( "value", expected, actual ); assertTrue( "Expecting EOF", bais.read() == -1 ); } /** * Given the first byte of a packed long value, return the #of bytes into which * that value was packed (including this one). * * @param firstByte The first byte. * * @return The #of bytes. This is in the range [1:8] inclusive. */ public int getNBytes( int firstByte ) { int nbytes; if( ( firstByte & 0x80 ) != 0 ) { // high bit is set. nbytes = 8; } else { nbytes = firstByte >> 4; // clear the high bit and right shift one nibble. } return nbytes; } public void testNBytes() { // high bit is set - always 8 bytes. assertEquals( "nbytes", 8, getNBytes( 0x80 ) ); assertEquals( "nbytes", 8, getNBytes( 0x81 ) ); assertEquals( "nbytes", 8, getNBytes( 0x8e ) ); assertEquals( "nbytes", 8, getNBytes( 0x8f ) ); // high bit is NOT set. nbytes is the upper nibble. assertEquals( "nbytes", 1, getNBytes( 0x10 ) ); assertEquals( "nbytes", 2, getNBytes( 0x20 ) ); assertEquals( "nbytes", 3, getNBytes( 0x30 ) ); assertEquals( "nbytes", 4, getNBytes( 0x40 ) ); assertEquals( "nbytes", 5, getNBytes( 0x50 ) ); assertEquals( "nbytes", 6, getNBytes( 0x60 ) ); assertEquals( "nbytes", 7, getNBytes( 0x70 ) ); // high bit is NOT set. nbytes is the upper nibble. assertEquals( "nbytes", 1, getNBytes( 0x11 ) ); assertEquals( "nbytes", 2, getNBytes( 0x21 ) ); assertEquals( "nbytes", 3, getNBytes( 0x31 ) ); assertEquals( "nbytes", 4, getNBytes( 0x41 ) ); assertEquals( "nbytes", 5, getNBytes( 0x51 ) ); assertEquals( "nbytes", 6, getNBytes( 0x61 ) ); assertEquals( "nbytes", 7, getNBytes( 0x71 ) ); // high bit is NOT set. nbytes is the upper nibble. assertEquals( "nbytes", 1, getNBytes( 0x1f ) ); assertEquals( "nbytes", 2, getNBytes( 0x2f ) ); assertEquals( "nbytes", 3, getNBytes( 0x3f ) ); assertEquals( "nbytes", 4, getNBytes( 0x4f ) ); assertEquals( "nbytes", 5, getNBytes( 0x5f ) ); assertEquals( "nbytes", 6, getNBytes( 0x6f ) ); assertEquals( "nbytes", 7, getNBytes( 0x7f ) ); } public void testUnpack() throws IOException { // upper nibble is 1, so nbytes == 1 and the lower nibble is the value. doUnpackTest( 0x0, new byte[]{(byte)0x10} ); doUnpackTest( 0x1, new byte[]{(byte)0x11} ); doUnpackTest( 0x7, new byte[]{(byte)0x17} ); doUnpackTest( 0xf, new byte[]{(byte)0x1f} ); // upper nibble is 2, so nbytes == 2. doUnpackTest( 0xf00, new byte[]{(byte)0x2f, (byte)0x00} ); doUnpackTest( 0xfa7, new byte[]{(byte)0x2f, (byte)0xa7} ); doUnpackTest( 0xfa0, new byte[]{(byte)0x2f, (byte)0xa0} ); doUnpackTest( 0xf07, new byte[]{(byte)0x2f, (byte)0x07} ); // upper nibble is 3, so nbytes == 3. doUnpackTest( 0xcaa4d, new byte[]{(byte)0x3c, (byte)0xaa, (byte)0x4d} ); // high bit only, lower nibble plus next seven bytes are the value. doUnpackTest( 0xaeede00a539271fL, new byte[]{(byte)0x8a, (byte)0xee, (byte)0xde, (byte)0x00, (byte)0xa5, (byte)0x39, (byte)0x27, (byte)0x1f } ); } public void doPackTest( long v, byte[] expected ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); final int nbytes = LongPacker.packLong( new DataOutputStream( baos ), v ); final byte[] actual = baos.toByteArray(); assertEquals( "nbytes", expected.length, nbytes ); assertEquals( "nbytes", getNBytes(expected[0]), nbytes ); assertEquals( "bytes", expected, actual ); } public void test_getNibbleLength() { // Note: zero (0) is interpreted as being one nibble for our purposes. assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0x0 ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0x1 ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0x2 ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0x7 ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0x8 ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0xe ) ); assertEquals( "nibbles", 1, LongPacker.getNibbleLength( 0xf ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x10 ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x11 ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x12 ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x17 ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x18 ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x1e ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x1f ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x7f ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0x8f ) ); assertEquals( "nibbles", 2, LongPacker.getNibbleLength( 0xff ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0x100 ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0x101 ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0x121 ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0x1ee ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0x1ff ) ); assertEquals( "nibbles", 3, LongPacker.getNibbleLength( 0xfff ) ); assertEquals( "nibbles", 4, LongPacker.getNibbleLength( 0x1ff0 ) ); assertEquals( "nibbles", 4, LongPacker.getNibbleLength( 0x7ff0 ) ); assertEquals( "nibbles", 4, LongPacker.getNibbleLength( 0xfff0 ) ); assertEquals( "nibbles", 4, LongPacker.getNibbleLength( 0xfff1 ) ); assertEquals( "nibbles", 5, LongPacker.getNibbleLength( 0x12345 ) ); assertEquals( "nibbles", 5, LongPacker.getNibbleLength( 0x54321 ) ); assertEquals( "nibbles", 6, LongPacker.getNibbleLength( 0x123456 ) ); assertEquals( "nibbles", 6, LongPacker.getNibbleLength( 0x654321 ) ); assertEquals( "nibbles", 7, LongPacker.getNibbleLength( 0x1234567 ) ); assertEquals( "nibbles", 7, LongPacker.getNibbleLength( 0x7654321 ) ); /* * Note: At 8 nibbles we have 32 bits. When the high bit is one, this * MUST be expressed as a long (trailing 'L', NOT cast to a long) or it * will be interpreted as a negative integer and sign extended to a * negative long. */ assertEquals( "nibbles", 8, LongPacker.getNibbleLength( 0x12345678L ) ); assertEquals( "nibbles", 8, LongPacker.getNibbleLength( 0x87654321L ) ); assertEquals( "nibbles", 9, LongPacker.getNibbleLength( 0x123456789L ) ); assertEquals( "nibbles", 9, LongPacker.getNibbleLength( 0x987654321L ) ); assertEquals( "nibbles", 10, LongPacker.getNibbleLength( 0x123456789aL ) ); assertEquals( "nibbles", 10, LongPacker.getNibbleLength( 0xa987654321L ) ); assertEquals( "nibbles", 11, LongPacker.getNibbleLength( 0x123456789abL ) ); assertEquals( "nibbles", 11, LongPacker.getNibbleLength( 0xba987654321L ) ); assertEquals( "nibbles", 12, LongPacker.getNibbleLength( 0x123456789abcL ) ); assertEquals( "nibbles", 12, LongPacker.getNibbleLength( 0xcba987654321L ) ); assertEquals( "nibbles", 13, LongPacker.getNibbleLength( 0x123456789abcdL ) ); assertEquals( "nibbles", 13, LongPacker.getNibbleLength( 0xdcba987654321L ) ); assertEquals( "nibbles", 14, LongPacker.getNibbleLength( 0x123456789abcdeL ) ); assertEquals( "nibbles", 14, LongPacker.getNibbleLength( 0xedcba987654321L ) ); assertEquals( "nibbles", 15, LongPacker.getNibbleLength( 0x123456789abcdefL ) ); assertEquals( "nibbles", 15, LongPacker.getNibbleLength( 0xfedcba987654321L ) ); assertEquals( "nibbles", 16, LongPacker.getNibbleLength( 0x1234567890abcdefL ) ); assertEquals( "nibbles", 16, LongPacker.getNibbleLength( 0xfedcba0987654321L ) ); } public void testPack() throws IOException { // [0:15] should be packed into one byte. doPackTest( 0x0, new byte[]{(byte)0x10} ); doPackTest( 0x1, new byte[]{(byte)0x11} ); doPackTest( 0x2, new byte[]{(byte)0x12} ); doPackTest( 0xe, new byte[]{(byte)0x1e} ); doPackTest( 0xf, new byte[]{(byte)0x1f} ); /* * 0x10 through 0xfff overflow the lower nibble, so the value is packed * into two bytes. the first byte has the header and the next three * nibbles are the value. This case is good for up to 2^12, since there * are three full nibbles to encode the value. */ doPackTest( 0x10, new byte[]{(byte)0x20, (byte)0x10 }); doPackTest( 0x11, new byte[]{(byte)0x20, (byte)0x11 }); doPackTest( 0x1f, new byte[]{(byte)0x20, (byte)0x1f }); doPackTest( 0x20, new byte[]{(byte)0x20, (byte)0x20 }); doPackTest( 0xff, new byte[]{(byte)0x20, (byte)0xff }); doPackTest( 0x100, new byte[]{(byte)0x21, (byte)0x00 }); doPackTest( 0x101, new byte[]{(byte)0x21, (byte)0x01 }); doPackTest( 0x121, new byte[]{(byte)0x21, (byte)0x21 }); doPackTest( 0x1ee, new byte[]{(byte)0x21, (byte)0xee }); doPackTest( 0x1ff, new byte[]{(byte)0x21, (byte)0xff }); doPackTest( 0xfff, new byte[]{(byte)0x2f, (byte)0xff }); /* * 0x1000 through 0xfffff fit into one more byte. */ doPackTest( 0x1000, new byte[]{(byte)0x30, (byte)0x10, (byte)0x00 }); doPackTest( 0x1234, new byte[]{(byte)0x30, (byte)0x12, (byte)0x34 }); doPackTest( 0x1fff, new byte[]{(byte)0x30, (byte)0x1f, (byte)0xff }); doPackTest( 0x54321, new byte[]{(byte)0x35, (byte)0x43, (byte)0x21 }); doPackTest( 0xfffff, new byte[]{(byte)0x3f, (byte)0xff, (byte)0xff }); } public static final long SIGN_MASK = 1L<<63; public void testHighBit() { assertTrue( "sign bit", ( -1L & SIGN_MASK ) != 0 ); assertFalse( "sign bit", ( 0L & SIGN_MASK ) != 0 ); } private interface LongGenerator { public long nextLong(); } /** * All long values in sequence starting from the given start value * and using the given increment. * @author thompsonbry */ private static class Sequence implements LongGenerator { long _start, _inc, _next; public Sequence( long start, long inc ) { _start = start; _inc = inc; _next = start; } public long nextLong() { long v = _next; _next += _inc; return v; // double d = rnd.nextGaussian(); //// if( d < 0 ) d = -d; // final long expected = (long) ( d * Long.MAX_VALUE ); } } /** * Random long values (32 bits of random long), including negatives, * with a uniform distribution. * * @author thompsonbry */ private static class RandomLong implements LongGenerator { Random _rnd; public RandomLong( Random rnd ) { _rnd = rnd; } public long nextLong() { return _rnd.nextLong(); } } /** * Run a large #of pack/unpack operations on a sequence of long values to * demonstrate correctness in that sequence. The sequence is the long * values from -1 to 1M by one (dense coverage). * * @throws IOException */ public void testStressSequence() throws IOException { // dense coverage of the first 1M values. doStressTest( 1000000, new Sequence( -1, 1 ) ); } /** * Run a large #of random pack/unpack operations to sample the space while * showing correctness on those samples. The amount of compression due to * packing for this test is <em>very</em> small since all bits are equally * likely to be non-zero, so the #of bytes required on average to pack a * long value is 8. * * @throws IOException */ public void testStressRandom() throws IOException { // test on 1M random long values. doStressTest( 1000000, new RandomLong( new Random() ) ); } /** * Run a stress test. Writes some information of possible interest onto * System.err. * * @param ntrials #of trials. * * @param g Generator for the long values. * * @throws IOException */ public void doStressTest( int ntrials, LongGenerator g ) throws IOException { long nwritten = 0L; long packlen = 0L; long minv = Long.MAX_VALUE, maxv = Long.MIN_VALUE; for( int i=0; i<ntrials; i++ ) { long expected = g.nextLong(); if( expected < 0L ) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream( baos ); try { LongPacker.packLong( dos, expected ); fail( "Expecting rejection of negative value: val="+expected ); } catch( IllegalArgumentException ex ) { // System.err.println( "Ingoring expected exception: "+ex ); } } else { if( expected > maxv ) maxv = expected; if( expected < minv ) minv = expected; ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream( baos ); // final int expectedByteLength = getNBytes( expected ); // final int actualByteLength1 = LongPacker.packLong( dos, expected ); byte[] packed = baos.toByteArray(); final int actualByteLength2 = getNBytes( packed[ 0 ] ); ByteArrayInputStream bais = new ByteArrayInputStream( packed ); DataInputStream dis = new DataInputStream( bais ); final long actual = LongPacker.unpackLong( dis ); assertEquals( "trial="+i, expected, actual ); assertEquals( "trial="+i+", v="+expected+", nbytes", actualByteLength1, actualByteLength2 ); packlen += packed.length; // total #of packed bytes. nwritten++; // count #of non-negative random values. } } System.err.println( "\nWrote "+nwritten+" non-negative long values." ); System.err.println( "minv="+minv+", maxv="+maxv ); System.err.println( "#packed bytes ="+packlen ); System.err.println( "#bytes if not packed="+(nwritten * 8)); long nsaved = ( nwritten * 8 ) - packlen; System.err.println ("#bytes saved ="+nsaved); System.err.println( "%saved by packing ="+nsaved/(nwritten*8f)*100+"%"); } public static void assertEquals( String msg, byte[] expected, byte[] actual ) { assertEquals( msg+": length", expected.length, actual.length ); for( int i=0; i<expected.length; i++ ) { assertEquals( msg+": byte[i="+i+"]", expected[i], actual[i] ); } } } |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:15
|
Update of /cvsroot/cweb/extser/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010/xdocs Added Files: navigation.xml Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: navigation.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <project name="Extensible Serialization"> <!-- --> <!-- This navigation model is merged into the generated site. --> <!-- --> <!-- You can also author and reference Anakia (XML) docs using --> <!-- a very similar XML model - in fact the distinctions are --> <!-- pretty blurry. --> <!-- --> <!-- See http://maven.apache.org/start/anakia.html --> <!-- See http://maven.apache.org/site.html --> <!-- See http://maven.apache.org/reference/plugins/xdoc/ --> <!-- See http://jakarta.apache.org/site/jakarta-site-tags.html --> <!-- --> <properties> <author>tho...@us...</author> <title>Extensible Serialization</title> </properties> <body> <!-- horizontal links at top of page. --> <links> <item name="Wiki" href="http://wiki.cognitiveweb.org/ConcurrencyControl" /> <item name="Javadoc" href="/apidocs/index.html" /> </links> <!-- A top-level, hierarchical menu --> <menu name="CognitiveWeb"> <item name="CognitiveWeb" href="http://www.cognitiveweb.org" img="http://www.cognitiveweb.org/Images/tagline.gif" /> <item name="CognitiveWebWiki" href="http://wiki.cognitiveweb.org" img="http://www.cognitiveweb.org/wiki/img/moinmoin.gif" /> </menu> <!-- Architecture. <menu name="Architecture"> <item name="abstract model (PDF of UML)" href="/architecture/tmgraph-abstract-model.pdf" /> <item name="java API (PDF of UML)" href="/architecture/tmgraph-java-interfaces.pdf" /> <item name="UML (Rose)" href="/architecture/architecture.mdl" /> </menu> --> <!-- References, e.g., specifications relevant to the subproject. --> <!-- <menu name="References"> <item name="Rest Topic Maps (Wiki)" href="http://wiki.cognitiveweb.org/RestTopicMaps" /> </menu> --> <!-- Add the google(tm) search widget. There is no way to position where this will appear at present. --> <search/> </body> </project> |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:14
|
Update of /cvsroot/cweb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010 Added Files: maven.xml project.xml .cvsignore LICENSE.txt project.properties Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: .cvsignore --- .classpath .project --- NEW FILE: maven.xml --- <project default="build" xmlns:j="jelly:core" xmlns:artifact="artifact" > <!-- --> <!-- Generate FAQ from xdocs/faq.fml. --> <!-- --> <preGoal name="xdoc:jelly-transform"> <attainGoal name="faq"/> </preGoal> <!-- --> <!-- Conditionally disable linkcheck based on a property. --> <!-- --> <postGoal name="xdoc:register-reports"> <j:if test="${maven.linkcheck.disable}"> <attainGoal name="maven-linkcheck-plugin:deregister"/> <echo>linkcheck is disabled.</echo> </j:if> </postGoal> <!-- --> <!-- Conditionally disable checkstyle based on a property. --> <!-- --> <postGoal name="xdoc:register-reports"> <j:if test="${maven.checkstyle.disable}"> <attainGoal name="maven-checkstyle-plugin:deregister"/> <echo>checkstyle is disabled.</echo> </j:if> </postGoal> <!-- --> <!-- Cause JAR to be built for install goal. --> <!-- --> <goal name="install"> <attainGoal name="jar"/> <artifact:install artifact="${maven.build.dir}/${maven.final.name}.jar" type="jar" project="${pom}" /> </goal> <!-- --> <!-- Copy the architecture directory to generated site. --> <!-- --> <postGoal name="xdoc:init"> <echo>Copying architecture directory into generated site.</echo> <copy todir="${basedir}/target/docs/architecture"> <fileset dir="${basedir}/src/architecture"/> </copy> </postGoal> </project> --- NEW FILE: project.properties --- # The cweb artifacts and artifacts from a few open source projects # that are not already up on ibiblio may be automatically downloaded # from the cweb maven repository on source forge or on # proto.cognitiveweb.org. If the license does not permit # redistrubution, then you will have to get the artifact from its # authoritative source. maven.repo.remote=http://www.ibiblio.org/maven/,http://www.cognitiveweb.org/maven-repository,http://proto.cognitiveweb.org/maven-repository maven.javadoc.links=\ http://java.sun.com/j2se/1.4.2/docs/api maven.javadoc.offlineLinks=\ http://java.sun.com/j2se/1.4.2/docs/api#/j2sdk1.4.1_02/docs/api --- NEW FILE: LICENSE.txt --- The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: --- NEW FILE: project.xml --- <?xml version="1.0" encoding="ISO-8859-1"?> <project> <id>cweb-extser</id> <name>ExtSer</name> <package>org.CognitiveWeb</package> <extends>../cweb/project.xml</extends> <groupId>org.CognitiveWeb</groupId> <currentVersion>0.1-b1-dev</currentVersion> <organization> <name>CognitiveWeb.Org</name> <url>http://www.cognitiveweb.org/</url> <logo>http://www.cognitiveweb.org/Images/cogweb-logo.jpg</logo> </organization> <!-- required per-POM metadata. --> <inceptionYear>2002</inceptionYear> <url>http://www.cognitiveweb.org/</url> <logo>http://www.cognitiveweb.org/Images/tagline.gif</logo> <!-- The short description is used in the JAR manifest. For --> <!-- compatibility reasons, no leading/trailing newlines and --> <!-- 72 character length limit. --> <shortDescription>Extensible Serialization</shortDescription> <description> <![CDATA[ <p> A framework for extensible serialization of objects. Support is provided for both simple object (record at a time) and object graph serialization. Custom serialization handlers may be registered for a Class. Transparent versioning of the serialization format is supported for all objects, including reads of historical versions and a default behavior to write current versions. </p> <p> In order to integrate this serialization framework within a persistent store, you must provide a concrete implementation of the AbstractExtensibleSerializer class. That class is reponsible for managing the persistent state of the serializer, including the serializers and serializer versions. </p> <p> Applications that make use of this framework need only provide implementation of the ISerializer interface and register those implementations with the IExtensibleSerializer provided by their persistence layer. </p> ]]> </description> <versions> </versions> <!-- copy down inheritance applies. --> <siteAddress>www.cognitiveweb.org</siteAddress> <siteDirectory> /home/groups/c/cw/cweb/htdocs/technology/projects/${pom.artifactId} </siteDirectory> <!-- copy down inheritance applies. --> <distributionSite>www.sourceforge.net</distributionSite> <distributionDirectory>/projects/cweb</distributionDirectory> <!-- copy down inheritance applies. --> <issueTrackingUrl> http://jira.cognitiveweb.org/browse/EXTSER </issueTrackingUrl> <!-- copy down inheritance applies. --> <repository> <connection> scm:cvs:pserver:anonymous@${maven.scm.cvs.host}:/cvsroot/cweb:extser </connection> <developerConnection> scm:cvs:ext:user@${maven.scm.cvs.host}:/cvsroot/cweb:extser </developerConnection> <url>http://cvs.sourceforge.net/viewcvs.py/cweb/extser</url> </repository> <!-- copy down inheritance applies. --> <licenses> <license> <name>CognitiveWeb Open Source License</name> <url>http://www.cognitiveweb.org/legal/license/</url> <distribution>manual</distribution> </license> </licenses> <!-- copy down inheritance applies. --> <mailingLists> <mailingList> <name>Announce List</name> <subscribe> http://lists.sourceforge.net/lists/listinfo/cweb-announce </subscribe> <unsubscribe> http://lists.sourceforge.net/lists/listinfo/cweb-announce </unsubscribe> <archive> http://sourceforge.net/mailarchive/forum.php?forum=cweb-announce </archive> </mailingList> <mailingList> <name>Developer List</name> <subscribe> http://lists.sourceforge.net/lists/listinfo/cweb-developer </subscribe> <unsubscribe> http://lists.sourceforge.net/lists/listinfo/cweb-developer </unsubscribe> <archive> http://sourceforge.net/mailarchive/forum.php?forum=cweb-developer </archive> </mailingList> </mailingLists> <!-- copy down inheritance applies. --> <developers> <developer> <name>Bryan Thompson</name> <id>bryan</id> <email>tho...@us...</email> <organization>SAIC</organization> <!-- East coast. --> <timezone>-5</timezone> </developer> <developer> <name>Guy Lukes</name> <id>guy</id> <email>guy...@fr...</email> <organization>Federal Reserve Board</organization> <!-- East coast. --> <timezone>-5</timezone> </developer> <developer> <name>Brad Bebee</name> <id>brad</id> <email>be...@sa...</email> <organization>SAIC</organization> <!-- East coast. --> <timezone>-5</timezone> </developer> </developers> <contributors> <!-- <contributor> <name>...</name> <id>...</id> <email>...</email> <organization>...</organization> </contributor> --> </contributors> <!-- project-specific data. --> <dependencies> <!-- junit extensions. --> <dependency> <id>junit</id> <version>3.8.1</version> <url>http://www.junit.org/</url> </dependency> </dependencies> <build> <nagEmailAddress> tho...@us... </nagEmailAddress> <sourceDirectory>${basedir}/src/java</sourceDirectory> <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> <aspectSourceDirectory/> <!-- Unit test cases --> <unitTest> <includes> <include>org/CognitiveWeb/extser/TestAll.java</include> </includes> <!-- Resources for test cases are declared here. --> <resources> </resources> </unitTest> <!-- J A R R E S O U R C E S --> <resources> <resource> <directory>${basedir}/src/resources/logging</directory> <includes> <include>log4j.properties</include> </includes> </resource> </resources> <jars> </jars> </build> </project> |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:14
|
Update of /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010/src/java/org/CognitiveWeb/extser/profiler Added Files: Profiler.java package.html Statistics.java VersionStatistics.java ClassStatistics.java Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: package.html --- <html> <body> <p>Profiler for the extensible serialization facility. This can be used to identify places where serialization is "fat", to report on the different serializer versions in use for a given class, etc. The profiler has minimal impact on serialization performance and reports automatically when it is finalized.</p> <dl> <dt><b>Version: </b></dt><dd>$Revision: 1.1 $ $Date: 2006/03/09 18:37:09 $</dd> <dt><b>Author: </b></dt><dd><a href="mailto:tho...@us...">Bryan Thompson</a></dd> </dl> </body> </html> --- NEW FILE: Statistics.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser.profiler; import java.io.PrintStream; import org.CognitiveWeb.extser.AbstractExtensibleSerializer; /** * Abstract base class for collecting statistics on (de-)serialization. * * @author thompsonbry */ public abstract class Statistics { private final AbstractExtensibleSerializer serializer; public AbstractExtensibleSerializer getSerializer() { return serializer; } /** * @param serializer */ public Statistics(AbstractExtensibleSerializer serializer) { this.serializer = serializer; } public long nread; public long bytesRead; public long nwritten; public long bytesWritten; public void read( int nbytes ) { nread++; bytesRead += nbytes; } public void write( int nbytes ) { nwritten++; bytesWritten += nbytes; } /** * Write the statistics. * @param ps Where to write the statistics. */ public void writeOn( PrintStream ps ) { long avgPerRead = (nread == 0 ?0 :bytesRead/nread); long avgPerWrite = (nwritten == 0 ?0 :bytesWritten/nwritten); ps.println ( "read("+nread+","+bytesRead+","+avgPerRead+")"+ ", write("+nwritten+","+bytesWritten+","+avgPerWrite+")" ); } /** * Reset the statistics. */ public void reset() { nread = bytesRead = 0L; nwritten = bytesWritten = 0L; } } --- NEW FILE: ClassStatistics.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser.profiler; import java.io.IOException; import java.io.PrintStream; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.CognitiveWeb.extser.AbstractExtensibleSerializer; import org.CognitiveWeb.extser.ISerializer; import org.CognitiveWeb.extser.NativeType; import org.CognitiveWeb.extser.Stateless; /** * Per class statistics. * * @author thompsonbry */ public class ClassStatistics extends Statistics { final public int classId; final public String classname; final public boolean stateless; // iff implements Stateless. public ClassStatistics( AbstractExtensibleSerializer serializer, int classId ) { super( serializer ); this.classId = classId; if( classId >= NativeType.NULL && classId <= NativeType.OBJECT_ARRAY ) { classname = NativeType.asString( classId ); stateless = false; } else { try { classname = getSerializer().getClassName( classId ); } catch( IOException ex ) { throw new RuntimeException( ex ); } try { Class cl = Class.forName( classname ); stateless = Stateless.class.isAssignableFrom( cl ); } catch( ClassNotFoundException ex ) { throw new RuntimeException( ex ); } } reset(); } public VersionStatistics get( short versionId, ISerializer serializer ) { Short versionId2 = new Short( versionId ); VersionStatistics stats = (VersionStatistics) versionStatistics.get( versionId2 ); if( stats == null ) { stats = new VersionStatistics( getSerializer(), versionId, serializer ); versionStatistics.put( versionId2, stats); } return stats; } /** * Members are {@link VersionStatistics}. */ public Map versionStatistics; public void reset() { super.reset(); versionStatistics = new HashMap(); } public void read( ISerializer ser, short version, int nbytes ) { super.read( nbytes ); get( version, ser ).read( nbytes ); } public void write( ISerializer ser, short version, int nbytes ) { super.write( nbytes ); get( version, ser ).write( nbytes ); } public void writeOn( PrintStream ps ) { long avgPerRead = (nread == 0 ?0 :bytesRead/nread); long avgPerWrite = (nwritten == 0 ?0 :bytesWritten/nwritten); ps.println ( "class="+classname+(stateless?"(Stateless)":"")+ ", classId="+classId+ ", read("+nread+","+bytesRead+","+avgPerRead+")"+ ", write("+nwritten+","+bytesWritten+","+avgPerWrite+")" ); Iterator itr = versionStatistics.values().iterator(); while( itr.hasNext() ) { VersionStatistics stats = (VersionStatistics) itr.next(); stats.writeOn( ps ); } } } --- NEW FILE: Profiler.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser.profiler; import java.io.PrintStream; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.CognitiveWeb.extser.AbstractExtensibleSerializer; import org.CognitiveWeb.extser.ISerializer; import org.CognitiveWeb.extser.NativeType; /** * Collects statistics about serialization. You can use this to identify * objects for which serializers are not registered (they will show up as * <code>versionId == 0</code> and * <code>serializer == DefaultSerializer</code>, the versions of the * objects being read or written, etc. Objects wrapping Java primitives, * e.g., {@link Boolean},{@link Integer}, etc., as well as array types * will all have classId values less than {@link NativeType#FIRST_OBJECT_INDEX}. * <p> * * Note: Objects which correspond to compound records (comprised of other * objects) will be double-counted by the profiler. That is, the profiler * will report the serialized size of both the compound record and each * object within that compound record. * <p> * * The profiler is disabled by default. However it imposes a negligable * overhead. It may be enabled using a configuration option, in which case * the profiler will automatically report when it is finalized. Usually this * is not long after the recman is closed. * <p> * * @author thompsonbry */ public class Profiler extends Statistics { private final AbstractExtensibleSerializer serializer; private boolean enabled = false; /** * Enable or disable the profiler. It is disabled by default. * * @param val The new value. * * @return The old value. */ public boolean enable( boolean val ) { boolean tmp = enabled; enabled = val; return tmp; } /** * If the profiler is enabled and there has been at least one read or * write reported, then writes the statistics onto {@link System#err}. * While it is deprecated, you can use * {@link System#runFinalizersOnExit(boolean)} to trigger this * automatically. */ protected void finalize() throws Throwable { super.finalize(); if( enabled && (nread>0 || nwritten>0) ) { writeOn( System.err ); } } public Profiler(AbstractExtensibleSerializer serializer) { super( serializer ); reset(); this.serializer = serializer; } public boolean isEnabled() {return enabled;} /** * Members are {@link ClassStatistics}. */ private Map classStatistics; public ClassStatistics get( int classId ) { Integer classId2 = new Integer( classId ); ClassStatistics stats = (ClassStatistics) classStatistics.get( classId2 ); if( stats == null ) { stats = new ClassStatistics( getSerializer(), classId ); classStatistics.put( classId2, stats); } return stats; } synchronized public void serialized( ISerializer ser, int classId, short versionId, int nbytes ) { if( enabled ) { nread++; bytesRead += nbytes; get( classId ).read( ser, versionId, nbytes ); } } synchronized public void deserialized( ISerializer ser, int classId, short versionId, int nbytes ) { if( enabled ) { nwritten++; bytesWritten += nbytes; get( classId ).write( ser, versionId, nbytes ); } } /** * Write out the collected statistics. * * @param ps * * @todo Change to a tab delimited format so that you can analyze it in a * spreadsheet. */ public void writeOn( PrintStream ps ) { ps.println( "----- serialization statistics -----"); ps.println( "read(#read,#bytesRead,avgPerRead), write(#written,#bytesWritten,avgPerWrite)"); super.writeOn( ps ); Iterator itr = classStatistics.values().iterator(); while( itr.hasNext() ) { ClassStatistics stats = (ClassStatistics) itr.next(); stats.writeOn( ps ); } ps.println( "------------------------------------"); } public void reset() { super.reset(); classStatistics = new HashMap(); } } --- NEW FILE: VersionStatistics.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser.profiler; import java.io.PrintStream; import org.CognitiveWeb.extser.AbstractExtensibleSerializer; import org.CognitiveWeb.extser.ISerializer; /** * Per version statistics (collected on a per class basis). * * @author thompsonbry */ public class VersionStatistics extends Statistics { final public short versionId; final public ISerializer serializer; public VersionStatistics( AbstractExtensibleSerializer serializer, short versionId, ISerializer versionSerializer ) { super( serializer ); this.versionId = versionId; this.serializer = versionSerializer; } public void writeOn( PrintStream ps ) { long avgPerRead = (nread == 0 ?0 :bytesRead/nread); long avgPerWrite = (nwritten == 0 ?0 :bytesWritten/nwritten); ps.println ( " versionId="+versionId+ ", class="+serializer.getClass().getName()+ ", read("+nread+","+bytesRead+","+avgPerRead+")"+ ", write("+nwritten+","+bytesWritten+","+avgPerWrite+")" ); } } |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:13
|
Update of /cvsroot/cweb/extser/src/architecture In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010/src/architecture Added Files: README Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: README --- This directory is for architecture resources (UML models, etc). |
Update of /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22010/src/java/org/CognitiveWeb/extser Added Files: ISimpleSerializer.java SerializerIdProtocol.java LongPacker.java NativeType.java DataOutput.java IStreamSerializer.java AbstractExtensibleSerializer.java DataInput.java package.html ISerializer.java StringSerializer.java AbstractSingleton.java ShortPacker.java IExtensibleSerializer.java Stateless.java Log Message: Initial import. The extensible serialization framework was also contributed to the jdbm project and exists under that license as well. --- NEW FILE: DataInput.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Sep 30, 2005 */ package org.CognitiveWeb.extser; import java.io.IOException; /** * Supports stream-based serialization of objects and packed integer values. * * @author thompsonbry */ public interface DataInput extends java.io.DataInput { /** * Return the logical row id (recid) of the record being (de-)serialized * or zero (0L) iff the record is being inserted into the store. */ public long getRecid(); /** * The serialization handler. */ public IExtensibleSerializer getSerializationHandler(); /** * Applies the serialization handler to deserialize the next object * in the input stream. * * @return The deserialized object. */ public Object deserialize() throws IOException; /** * Unpacks a long value from the input stream. * * @return The long value. * * @throws IOException * * @see DataOutput#writePackedLong(long) */ public long readPackedLong() throws IOException; /** * Reads a packed int value. * * @return The unpacked int value. * * @throws IOException * * @see DataOutput#writePackedInt(int) */ public int readPackedInt() throws IOException; /** * Reads a packed short value. * * @return The unpacked short value. * * @throws IOException * * @see DataOutput#writePackedShort(short) */ public short readPackedShort() throws IOException; } --- NEW FILE: ISimpleSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ package org.CognitiveWeb.extser; import java.io.IOException; import java.io.Serializable; import org.CognitiveWeb.extser.ISerializer; /** * Simple serialization interface. * * @see IStreamSerializer * * @author <a href="mailto:tho...@us...">Bryan Thompson</a> */ public interface ISimpleSerializer extends Serializable, ISerializer { /** * Serialize the persistent state of the object. * * @param obj * The object to be serialized (non-null). * * @return A byte[] containing the persistent state of the object. * * @throws IllegalArgumentException * If <code>obj == null</code>. */ public byte[] serialize( Object obj ) throws IOException; /** * Deserialize the persistent data for some object. * * @param data * A byte[] containing the persistent state of the object. * * @return The object. * * @throws IllegalArgumentException * If <code>data == null</code>. */ public Object deserialize( byte[] data ) throws IOException; } --- NEW FILE: ShortPacker.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 24, 2005 */ package org.CognitiveWeb.extser; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; /** * Packing utility for non-negative <code>short</code> values. * * @author thompsonbry */ public class ShortPacker { public ShortPacker() { super(); } /** * Packs a non-negative short value into one or two bytes and writes them on * <i>os </i>. A short in [0:127] is packed into one byte. Larger values are * packed into two bytes. The high bit of the first byte is set if the value * was packed into two bytes. If the bit is set, clear the high bit, read * the next byte, and interpret the two bytes as a short value. Otherwise * interpret the byte as a short value. * * @return The #of bytes into which the value was packed. */ static public int packShort( DataOutput os, short v ) throws IOException { /* * You can only pack non-negative values with this method. */ if( v < 0 ) { throw new IllegalArgumentException( "negative value: v="+v ); } if( v > 127 ) { // the value requires two bytes. os.write( (byte)((0xff & (v >> 8))|0x80) ); // note: set the high bit. os.write( (byte)(0xff & v) ); return 2; } else { // the value fits in one byte. os.write( (byte)(0xff & v) ); return 1; } } /** * Unpack a non-negative short value from the input stream. * * @param is The input stream. * * @return The short value. * * @throws IOException */ static public short unpackShort( DataInput is ) throws IOException { short b = (short) is.readByte(); short v; if( ( b & 0x80 ) != 0 ) { // high bit is set. v = (short) (( b & 0x7f ) << 8); // clear the high bit and shift over one byte. b = is.readByte(); // read the next byte. v |= ( b & 0xff ); // and combine it together with the high byte. } else { // high bit is clear. v = b; // interpret the byte as a short value. } return (short) v; } /** * Returns the #of bytes into which a short value was packed based on the * first byte. * * @param firstByte The first byte. * * @return The #of bytes (either one (1) or two (2)). */ static public int getNBytes( byte firstByte ) { if( ( firstByte & 0x80 ) != 0 ) { return 2; } else { return 1; } } } --- NEW FILE: IStreamSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 20, 2005 */ package org.CognitiveWeb.extser; import java.io.IOException; /** * Stream-oriented serializer for complex records (not blobs). This interface * MUST be used in conjunction with the {@link AbstractExtensibleSerializer}. * * @author thompsonbry * * @see ExtensibleSerializer */ public interface IStreamSerializer extends ISerializer { /** * Serialize an object. * * @param out Sink for the serialized object. * * @param obj The object to serialize (or null). * * @throws IOException */ public void serialize( DataOutput out, Object obj ) throws IOException; /** * Deserialize an object. * * @param in * Source for the serialized object. * * @param obj * An instance of the appropriate class whose persistent fields * need to be initialized from the input stream. * * @return The deserialized object. If desired, you can replace the <i>obj * </i> with another object by returning a different object here. * * @throws IOException */ public Object deserialize( DataInput in, Object obj ) throws IOException; } --- NEW FILE: ISerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ package org.CognitiveWeb.extser; import java.io.Serializable; /** * Interface used to provide a serialization mechanism other than the normal * Java serialization. * * @author thompsonbry */ public interface ISerializer extends Serializable { } --- NEW FILE: AbstractSingleton.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser; import java.util.Map; import java.util.WeakHashMap; import org.CognitiveWeb.extser.IExtensibleSerializer; import org.CognitiveWeb.extser.Stateless; /** * Abstract base class for a {@link Stateless} singleton serialization handler * wrapping the semantics of a stateful {@link IExtensibleSerializer} * serialization handle. The use of this stateless singleton prevents multiple * copies of the state of the extensible serializer from being written into the * store. * <p> * * @author thompsonbry */ abstract public class AbstractSingleton implements Stateless { /** * Cache map from the persistence layer access object to the {@link * IExtensibleSerializer} instance for that access object. This is a * {@link WeakHashMap} so entries are transparently removed when the * corresponding access object is finalized by the garbage collector. */ static transient final private Map _cache = new WeakHashMap(); /** * Return the {@link IExtensibleSerializer} singleton for the store.<p> * * @exception IllegalStateException if the serializer has not been * set for the store. * * @see #setSerializer( Object obj, IExtensibleSerializer ser ) */ public IExtensibleSerializer getSerializer( Object obj ) throws IllegalStateException { if( obj == null ) { throw new IllegalArgumentException(); } IExtensibleSerializer ser = (IExtensibleSerializer) _cache.get ( obj ); if( ser == null ) { throw new IllegalStateException ( "Not initialized." ); } return ser; } /** * This method must be used to couple the access to the persistence layer * with a specific instance of a stateful {@link IExtensibleSerializer}. * Thereafter the serialization handler reference recovered from a static * transient cache managed by this class. * <p> * * @param accessObject * The access object for the persistence layer. * * @param ser * The serialization handler for the persistence layer. * * @exception IllegalStateException * If the serialization handler has already been set. */ public void setSerializer( Object accessObject, IExtensibleSerializer ser ) throws IllegalStateException { if( accessObject == null || ser == null ) { throw new IllegalArgumentException(); } if( _cache.get( accessObject ) != null ) { throw new IllegalStateException ( "Already initialized." ); } _cache.put( accessObject, ser ); } } --- NEW FILE: package.html --- <html> <body> <p>Extensible stream-based serialization with transparent versioning.</p> <dl> <dt><b>Version: </b></dt><dd>$Revision: 1.1 $ $Date: 2006/03/09 18:37:09 $</dd> <dt><b>Author: </b></dt><dd><a href="mailto:tho...@us...">Bryan Thompson</a></dd> </dl> </body> </html> --- NEW FILE: NativeType.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser; import java.io.IOException; import java.lang.reflect.Array; /** * Used to assign classId codes to Java primitives, to arrays of Java * primitives, and to <code>Object[]</code>. Also provides some utility * methods for converting between a classId, a label for the class, and an * object that is an instance of the class. * * @author thompsonbry */ public class NativeType { /** * A <code>null</code>. */ final public static int NULL = 0x0; /* * Java primitive data types. */ final public static int BOOLEAN = 0x1; final public static int BYTE = 0x2; final public static int CHAR = 0x3; final public static int SHORT = 0x4; final public static int INT = 0x5; final public static int LONG = 0x6; final public static int FLOAT = 0x7; final public static int DOUBLE = 0x8; /* * Array of Java primitives. */ final public static int BOOLEAN_ARRAY = 0x9; final public static int BYTE_ARRAY = 0xa; final public static int CHAR_ARRAY = 0xb; final public static int SHORT_ARRAY = 0xc; final public static int INT_ARRAY = 0xd; final public static int LONG_ARRAY = 0xe; final public static int FLOAT_ARRAY = 0xf; final public static int DOUBLE_ARRAY = 0x10; /** * An array of Java objects (vs an array of primitives). */ final public static int OBJECT_ARRAY = 0x11; /** * The starting classId index assigned to Java Objects. */ final public static int FIRST_OBJECT_INDEX = 0x12; /** * Return true if the <i>classId </i> identifies a Java Object (vs a * Java primitive or an Array type). * * @param classId The classId. */ final public static boolean isJavaObject( int classId ) { return classId >= FIRST_OBJECT_INDEX; } /** * Return true iff the <i>classId </i> corresponds to a * <code>null</code>. * * @param classId The classId. */ final public static boolean isNull( int classId ) { return classId == NULL; } /** * Return true iff the <i>classId </i> corresponds to one of the Java * primitive datatypes {boolean, byte, char, short, int, long, float, or * double}. * * @param classId The classId. */ final public static boolean isPrimitive( int classId ) { return classId >= BOOLEAN && classId <= DOUBLE; } /** * Return true iff the <i>classId </i> corresponds to one of the * primitive array types, eg, <code>byte[]</code>. * * @param classId * The classId. */ final public static boolean isPrimitiveArrayType( int classId ) { return classId >= BOOLEAN_ARRAY && classId <= DOUBLE_ARRAY; } /** * Return true iff the <i>classId </i> corresponds to one of the * primitive array types, eg, <code>byte[]</code> or to an array of * some class, eg, <code>Object[]</code>,<code>String[]</code>, * etc. * * @param classId * The classId. */ final public static boolean isArrayType( int classId ) { return classId >= BOOLEAN_ARRAY && classId <= OBJECT_ARRAY; } /** * A human consumable name for the corresponding class. * * @param classId The classId. */ public static String asString( int classId ) { switch( classId ) { case NULL: return "null"; case BOOLEAN: return java.lang.Boolean.class.getName(); case BYTE: return java.lang.Byte.class.getName(); case CHAR: return java.lang.Character.class.getName(); case SHORT: return java.lang.Short.class.getName(); case INT: return java.lang.Integer.class.getName(); case LONG: return java.lang.Long.class.getName(); case FLOAT: return java.lang.Float.class.getName(); case DOUBLE: return java.lang.Double.class.getName(); case BOOLEAN_ARRAY: return "boolean[]"; case BYTE_ARRAY: return "byte[]"; case CHAR_ARRAY: return "char[]"; case SHORT_ARRAY: return "short[]"; case INT_ARRAY: return "int[]"; case LONG_ARRAY: return "long[]"; case FLOAT_ARRAY: return "float[]"; case DOUBLE_ARRAY: return "double[]"; case OBJECT_ARRAY: return "Object[]"; default: return "Object<"+classId+">"; } } /** * Return the {@link NativeType} for a Java Object. * * @param val * The Java Object (including arrays, nulls, etc.). * * @return The {@link NativeType} * * @exception UnsupportedOperationException * if there is no native type for that Java Object. */ public static int getNativeType( Object val ) { if( val == null ) return NULL; else if( val instanceof Boolean ) return BOOLEAN; else if( val instanceof Character ) return CHAR; else if( val instanceof Number ) { if( val instanceof Byte ) return BYTE; else if( val instanceof Short ) return SHORT; else if( val instanceof Integer ) return INT; else if( val instanceof Long ) return LONG; else if( val instanceof Float ) return FLOAT; else if( val instanceof Double ) return DOUBLE; else return FIRST_OBJECT_INDEX; // Java Object (implements Number). } else if( val.getClass().isArray() ) { // Array types. if( val.getClass().getComponentType().isPrimitive() ) { // Array of Java primitives. Class componentType = val.getClass().getComponentType(); if( componentType.equals( Boolean.TYPE ) ) return BOOLEAN_ARRAY; else if( componentType.equals( Byte.TYPE ) ) return BYTE_ARRAY; else if( componentType.equals( Character.TYPE ) ) return CHAR_ARRAY; else if( componentType.equals( Short.TYPE ) ) return SHORT_ARRAY; else if( componentType.equals( Integer.TYPE ) ) return INT_ARRAY; else if( componentType.equals( Long.TYPE ) ) return LONG_ARRAY; else if( componentType.equals( Float.TYPE ) ) return FLOAT_ARRAY; else if( componentType.equals( Double.TYPE ) ) return DOUBLE_ARRAY; else throw new AssertionError(); } else { // Array of Java Objects. We do not specialize any further than // this. return OBJECT_ARRAY; } } else { // Java Object. return FIRST_OBJECT_INDEX; } } /** * Serialize a null object wrapping a Java primitive or an array type on * the output stream. * * @param dos * @param classId * The classId assigned to that object. * @param obj * The object. * * FIXME Add multi-dimensional array serialization (and test cases). We * need to write out the #of dimensions and the length of each * dimension before we write out the elements in the array. * Traversal itself is difficult (and perhaps even impossible w/in * Java) since we need to cast to a strongly typed array type * before we can index into the array. If we can't support this in * any optimized manner then we need to detect multidimensional * arrays and route them through Java serialization. */ public static void serialize( DataOutput dos, int classId, Object obj ) throws IOException { switch( classId ) { case NULL: return; case BOOLEAN: dos.writeBoolean( ((Boolean)obj).booleanValue() ); return; case BYTE: dos.writeByte( ((Byte)obj).byteValue() ); return; case CHAR: dos.writeChar( ((Character)obj).charValue() ); return; case SHORT: dos.writeShort( ((Short)obj).shortValue() ); return; case INT: dos.writeInt( ((Integer)obj).intValue() ); return; case LONG: dos.writeLong( ((Long)obj).longValue() ); return; case FLOAT: dos.writeFloat( ((Float)obj).floatValue() ); return; case DOUBLE: dos.writeDouble( ((Double)obj).doubleValue() ); return; case BOOLEAN_ARRAY: { final boolean[] ary = (boolean[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeBoolean( ary[ i ] ); } return; } case BYTE_ARRAY: { final byte[] ary = (byte[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeByte( ary[ i ] ); } return; } case CHAR_ARRAY: { final char[] ary = (char[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeChar( ary[ i ] ); } return; } case SHORT_ARRAY: { final short[] ary = (short[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeShort( ary[ i ] ); } return; } case INT_ARRAY: { final int[] ary = (int[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeInt( ary[ i ] ); } return; } case LONG_ARRAY: { final long[] ary = (long[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeLong( ary[ i ] ); } return; } case FLOAT_ARRAY: { final float[] ary = (float[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeFloat( ary[ i ] ); } return; } case DOUBLE_ARRAY: { final double[] ary = (double[]) obj; final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.writeDouble( ary[ i ] ); } return; } case OBJECT_ARRAY: { // Note: The Class of the array component type is also written onto // the stream so that we can re-create the appropriate array type // when the Object[] is deserialized. final Object[] ary = (Object[]) obj; final Class componentType = ary.getClass().getComponentType(); final int componentTypeId = dos.getSerializationHandler().getClassId( componentType ); dos.writePackedInt( componentTypeId ); final int len = ary.length; dos.writePackedInt( len ); for( int i=0; i<len; i++ ) { dos.serialize( ary[ i ] ); } return; } default: throw new AssertionError("classId="+classId); } } /** * Reads a Java primitive or array type from the input stream. * * @param dis * @param classId * @param versionId * @return The deserialized object. * @throws IOException */ public static Object deserialize( DataInput dis, int classId, short versionId ) throws IOException { switch( classId ) { case NULL: return null; case BOOLEAN: { if( dis.readBoolean() ) { return Boolean.TRUE; } else { return Boolean.FALSE; } } case BYTE: return new Byte( dis.readByte() ); case CHAR: return new Character( dis.readChar() ); case SHORT: return new Short( dis.readShort() ); case INT: return new Integer( dis.readInt() ); case LONG: return new Long( dis.readLong() ); case FLOAT: return new Float( dis.readFloat() ); case DOUBLE: return new Double( dis.readDouble() ); case BOOLEAN_ARRAY: { final int len = dis.readPackedInt(); final boolean[] ary = new boolean[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readBoolean(); } return ary; } case BYTE_ARRAY: { final int len = dis.readPackedInt(); final byte[] ary = new byte[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readByte(); } return ary; } case CHAR_ARRAY: { final int len = dis.readPackedInt(); final char[] ary = new char[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readChar(); } return ary; } case SHORT_ARRAY: { final int len = dis.readPackedInt(); final short[] ary = new short[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readShort(); } return ary; } case INT_ARRAY: { final int len = dis.readPackedInt(); final int[] ary = new int[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readInt(); } return ary; } case LONG_ARRAY: { final int len = dis.readPackedInt(); final long[] ary = new long[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readLong(); } return ary; } case FLOAT_ARRAY: { final int len = dis.readPackedInt(); final float[] ary = new float[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readFloat(); } return ary; } case DOUBLE_ARRAY: { final int len = dis.readPackedInt(); final double[] ary = new double[len]; for( int i=0; i<len; i++ ) { ary[ i ] = dis.readDouble(); } return ary; } case OBJECT_ARRAY: { final int componentTypeId = dis.readPackedInt(); final Class componentType = dis.getSerializationHandler().getClass( componentTypeId ); final int len = dis.readPackedInt(); final Object[] ary = (Object[]) Array.newInstance( componentType, len ); for( int i=0; i<len; i++ ) { ary[ i ] = dis.deserialize(); } return ary; } default: throw new AssertionError("classId="+classId); } } } --- NEW FILE: LongPacker.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 24, 2005 */ package org.CognitiveWeb.extser; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; /** * Packing utility for non-negative <code>long</code> values. * * @author thompsonbry */ public class LongPacker { public LongPacker() { super(); } /** * Packs a non-negative long value into the minimum #of bytes in which the * value can be represented and writes those bytes onto the output stream. * The first byte determines whether or not the long value was packed and, * if packed, how many bytes were required to represent the packed long * value. When the high bit of the first byte is a one (1), then the long * value could not be packed and the long value is found by clearing the * high bit and interpreting the first byte plus the next seven (7) bytes as * a long. Otherwise the next three (3) bits are interpreted as an unsigned * integer giving the #of bytes (nbytes) required to represent the packed * long value. To recover the long value the high nibble is cleared and the * first byte together with the next nbytes are interpeted as an unsigned * long value whose leading zero bytes were not written. * * <pre> * * [0|1|2|3|4|5|6|7] * 1 - - - nbytes = 8, clear high bit and interpret this plus the next 7 bytes as a long. * 0 1 1 1 nbytes = 7, clear high nibble and interpret this plus the next 6 bytes as a long. * 0 1 1 0 nbytes = 6, clear high nibble and interpret this plus the next 5 bytes as a long. * 0 1 0 1 nbytes = 5, clear high nibble and interpret this plus the next 4 bytes as a long. * 0 1 0 0 nbytes = 4, clear high nibble and interpret this plus the next 3 bytes as a long. * 0 0 1 1 nbytes = 3, clear high nibble and interpret this plus the next 3 bytes as a long. * 0 0 1 0 nbytes = 2, clear high nibble and interpret this plus the next byte as a long. * 0 0 0 1 nbytes = 1, clear high nibble. value is the low nibble. * * </pre> */ static public int packLong( DataOutput os, long v ) throws IOException { /* * You can only pack non-negative long values with this method. */ if( v < 0 ) { throw new IllegalArgumentException( "negative value: v="+v ); } /* * If the high byte is non-zero then we will write the value as a normal * long and return nbytes == 8. This case handles large positive long * values. */ if( ( v >> 56 ) != 0 ) { os.write( (byte)((0xff & (v >> 56))|0x80) ); // note: set the high bit. os.write( (byte)(0xff & (v >> 48)) ); os.write( (byte)(0xff & (v >> 40)) ); os.write( (byte)(0xff & (v >> 32)) ); os.write( (byte)(0xff & (v >> 24)) ); os.write( (byte)(0xff & (v >> 16)) ); os.write( (byte)(0xff & (v >> 8)) ); os.write( (byte)(0xff & v) ); return 8; } // #of nibbles required to represent the long value. final int nnibbles = getNibbleLength( v ); // Is [nnibbles] even? (If it is even then we need to pad out an extra zero // nibble in the first byte.) final boolean evenNibbleCount = ( nnibbles == ( ( nnibbles >> 1 ) << 1 ) ); // #of bytes required to represent the long value (plus the header nibble). final int nbytes = ( ( nnibbles +1 ) >> 1 ) + (evenNibbleCount?1:0); int nwritten = 0; if( evenNibbleCount ) { /* * An even nibble count requires that we pad the low nibble of the * first byte with zeros. */ // header byte. low nibble is empty. byte b = (byte) ( nbytes << 4 ); os.write( b ); nwritten++; // remaining bytes containing the packed value. for( int i=(nnibbles-2)<<2; i>=0; i-=8 ) { b = (byte) (0xff & (v >> i)); os.write( b ); nwritten++; } } else { /* * An odd nibble count means that we pack the first nibble of the * long value into the low nibble of the header byte. In this case * the first nibble will always be the low nibble of the first * non-zero byte in the long value (the high nibble of that byte * must be zero since there is an odd nibble count). */ byte highByte = (byte) (0xff & (v >> ((nbytes-1)*8) )); byte b = (byte) ( ( nbytes << 4 ) | highByte ); os.write( b ); nwritten++; for( int i=(nnibbles-3)<<2; i>=0; i-=8 ) { b = (byte) (0xff & (v >> i)); os.write( b ); nwritten++; } } return nwritten; } /** * Return the #of non-zero nibbles, counting from the first non-zero nibble * in the long value. A value of <code>0L</code> is considered to be one * nibble for our purposes. * * @param v * The long value. * * @return The #of nibbles in [1:16]. */ static protected int getNibbleLength( long v ) { for( int i=56, j=16; i>=0; i-=8, j-=2 ) { if( (0xf0 & (v >> i)) != 0 ) return j; if( (0x0f & (v >> i)) != 0 ) return j-1; } if( v != 0 ) throw new AssertionError( "v="+v ); return 1; // value is zero, which is considered to be one nibble for our purposes. } /** * Unpack a long value from the input stream. * * @param is The input stream. * * @return The long value. * * @throws IOException */ static public long unpackLong( DataInput is ) throws IOException { int b = is.readByte(); int nbytes; long l; if( ( b & 0x80 ) != 0 ) { // high bit is set. nbytes = 8; // use 8 bytes (this one plus the next 7). l = b & 0x7f; // clear the high bit - the rest of the byte is the start value. } else { // high bit is clear. nbytes = b >> 4; // nbytes is the upper nibble. (right shift one nibble). l = b & 0x0f; // starting value is lower nibble (clear the upper nibble). } for( int i=1; i<nbytes; i++ ) { // Read the next byte. b = is.readByte(); // readByte( is ); // Shift the existing value one byte left and add into the low (unsigned) byte. l = (l << 8) + (0xff & b); } return l; } } --- NEW FILE: StringSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 8, 2005 */ package org.CognitiveWeb.extser; import java.io.IOException; /** * Serializer for Java {@link String}s. * * @author thompsonbry */ final public class StringSerializer implements ISimpleSerializer, Stateless { /** * The character set encoding used to serialize Java {@link String}s (UTF8). */ protected static final transient String charset = "UTF8"; public byte[] serialize(Object obj) throws IOException { return ((String)obj).getBytes(charset); } public Object deserialize(byte[] serialized) throws IOException { return new String( serialized, charset ); } } --- NEW FILE: DataOutput.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Sep 30, 2005 */ package org.CognitiveWeb.extser; import java.io.IOException; /** * Supports stream-based serialization of objects and packed integer values. * * @author thompsonbry */ public interface DataOutput extends java.io.DataOutput { /** * Return the logical row id (recid) of the record being (de-)serialized * or zero (0L) iff the record is being inserted into the store. */ abstract public long getRecid(); /** * The serialization handler. */ abstract public IExtensibleSerializer getSerializationHandler(); /** * Applies the serialization handler to serialize the next object onto the * output stream. * <p> * * @param obj * * @throws IOException */ abstract public void serialize( Object obj ) throws IOException; /** * Pack a non-negative long value onto the output stream. * * @param val * * @throws IOException * * @return The #of bytes in which the long value was packed. */ abstract public int writePackedLong( long val ) throws IOException; /** * Pack a non-negative int value onto the output stream. * * @param val The int value. * * @return The #of bytes written on the output stream. * * @throws IOException */ abstract public int writePackedInt( int val ) throws IOException; /** * Pack a non-negative short value onto the output stream. * * @param val The short value. * * @return The #of bytes written on the output stream. * * @throws IOException */ abstract public int writePackedShort( short val ) throws IOException; } --- NEW FILE: Stateless.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Oct 5, 2005 */ package org.CognitiveWeb.extser; import java.io.Serializable; /** * Classes which implement this interface make a declaration that their * instances have NO persistent state. This makes possible certain * optimizations, e.g., the {@link AbstractExtensibleSerializer} will only write * the <code>classId</code> for such objects rather than using {@link * java.io.ObjectOutput} to serialize their state. * * @author thompsonbry */ public interface Stateless extends Serializable { // marker interface. } --- NEW FILE: AbstractExtensibleSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations [...1580 lines suppressed...] } } else { // We have run out of options. This should never happen since // we managed to serialize the object in the first place. throw new UnsupportedOperationException ( "Do not know how to deserialize: class="+ser.getClassName( classId ) ); } } } } } --- NEW FILE: IExtensibleSerializer.java --- /** The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: The contents of this file are subject to the CognitiveWeb Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License from http://www.CognitiveWeb.org/legal/license/ Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Copyrights: Portions created by or assigned to CognitiveWeb, Inc. are Copyright (c) 2003-2003 CognitiveWeb, Inc. All Rights Reserved. Contact information for CognitiveWeb, Inc. is available at http://www.CognitiveWeb.org Portions Copyright (c) 2002-2003 Bryan Thompson. Acknowledgements: Special thanks to the developers of the Jabber Open Source License 1.0 (JOSL), from which this License was derived. This License contains terms that differ from JOSL. Special thanks to the CognitiveWeb Open Source Contributors for their suggestions and support of the Cognitive Web. Modifications: */ /* * Created on Nov 4, 2005 */ package org.CognitiveWeb.extser; import java.io.Externalizable; import java.io.IOException; import org.CognitiveWeb.extser.profiler.Profiler; /** * Interface for an extensible serialization handler. * <p> * * The extensible serialization handler that figures out how to serialize and * de-serialize objects using a metadata header for for each serialized object. * Tuned serialization is provided for the Java classes corresponding to the * primitive datatypes ({@link Long},{@link String}, etc.), the * {@link Stateless} interface, and the {@link Externalizable} interface. Custom * serializers may be written using either the {@link ISimpleSerializer} or the * {@link IStreamSerializer} interface. Serializer registrations are persistent. * <p> * * A serializer is registered for a Java Class and a versionId. The default * versionId is zero(0). The serializer registered against a given version is * always used to deserialize that version of a class. An instance of a class is * serialized using the default versionId (0) unless a versionId is explicitly * declared using: * * <pre> * static public short SERIAL_VERSION_ID = { versionId }; * </pre> * * <p> * * A persistent serializer may be explicitly specified on a per instance basis * using the {@link SerializerIdProtocol}. * <p> * * @todo Replace field for versionId with VersionIdProtocol interface? This * would let us drop the versionId cache and make it viable to have the * versionId be specified as a class method or an instance method. * * @author thompsonbry */ public interface IExtensibleSerializer extends ISerializer { /** * The name of the optional public field coding the versionId on a class * whose instance is being (de-)serialized. When the field is not present * the versionId is zero (0). When present the field must be a <em>short</em> * value coding the versionId under which the class will be serialized. * * <pre> * SERIAL_VERSION_ID * </pre> */ static public final String VERSION_FIELD_NAME = "SERIAL_VERSION_ID"; /** * Return the versionId used to serialize an instance of <i>cl </i>. A class * denotes the versionId used when it is serialized by making a declaration: * * <pre> * static public short SERIAL_VERSION_ID = { versionId }; * </pre> * * The modifier <em>final</em> is normally used but not strictly required. * <p> * * The versionId associated with a Class is cached. * <p> * * @param cl * The Class whose instance is being serialized (required). * * @return The versionId or zero if the object is unversioned. * * @exception IOException * * @see #VERSION_FIELD_NAME * @see #invalidateVersionIdCache(Class cl) */ public short getVersionId(Class cl) throws IOException; /** * Return the recid of the {@link Serializer}to be fetched and used to * (de-)serialize the object or zero (0L) if there is no serializer instance * to be used. A class may choose to report a non-zero <code>serializerId</code> * by implementing the {@link SerializerIdProtocol} interface. * * @param obj * The object being serialized. (The serializerId is read from a * binary header during deserialization.) * * @return The recid of the {@link Serializer}to be fetched or 0L if there * is no per-instance persistent serializer. * * @exception IOException */ public long getSerializerId(long recid, Object obj) throws IOException; /** * Return the #of registered classes. Classes may be explicitly * registered against one or more serializers or may be implicitly * registered as they are encountered during serialization. * * @return The #of registered classes. */ public int getClassCount(); /** * Return a unique classId for the object. The class name for the classId * may be obtained using {@link #getClassName( int classId)}. If the class * was not already registered, then it is registered now. * * @param cl * The class (required). * * @return A classId. Note that <code>classId == 0</code> is reserved to * indicate a <code>null</code> reference. */ public int getClassId(Class cl) throws IOException; /** * Registers a class. This operation does not affect the serializer(s) * registered for that class. It just assures that a classId has been * assigned for the class. * * @param cl * The class. * * @return true iff the state of the serializer was changed by this * registration. */ public boolean registerClass(Class cl) throws IOException; /** * Registers a serializer against an unversioned class. * * @param cl * The class. * * @param serializer * The class which implements the serializer for <i>cl </i>. This * class MUST have a public zero argument constructor and MUST * NOT have persistent state, i.e., it should declare the * {@link Stateless}interface. * * @return true iff the state of the serializer was changed by this * registration. */ public boolean registerSerializer(Class cl, Class serializerClass) throws IOException; /** * Registers a serializer against a class. When the <i>versionId </i> is * non-zero, then the serializer only applies to that version of the class. * The version information is stored in the data header of the record. An * unversioned class does not store a versionId. A bit is reserved to mark a * record written using a serializer specific to a class version. When the * bit is set, then versionId is read and the correct serialized for that * class version is used to deserialize the record. * * @param cl * The class. * * @param serializer * The class which implements the serializer for <i>cl </i>. This * class MUST have a public zero argument constructor and MUST * NOT have persistent state, i.e., it should declare the * {@link Stateless}interface. * * @param versionId * The versionId begins at one. The value of zero (0) is reserved * to indicate a class that does not have a version (a zero * versionId is exactly equivilent to an unversioned class). An * unversioned class may be promoted to a versioned class at any * time. Likewise, a class may be reverted to an earlier version * or to the "unversioned" version. * * @return true iff the state of the serializer was changed by this * registration. */ public boolean registerSerializer(Class cl, Class serializerClass, short versionId) throws IOException; /** * Decodes a classId into the class name. * * @param classId * A classId. * * @return The name of the class or <code>null</code> iff <i>classId == * {@link NativeType#NULL}</i>. * * @see #getClassId( Class cl ) * * @exception IllegalArgumentException * if <i>classId </i> was not registered. */ public String getClassName(int classId) throws IOException; /** * Return the {@link Class} given the classId. * * @param classId The classId. * * @return The class. * * @throws IOException */ public Class getClass(int classId) throws IOException; /** * Return the {@link ISerializer} registered against <i>classId </i>. * * @param classId * The classId. * * @return The serializer or <code>null</code> if no serializer is * ... [truncated message content] |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:09
|
Update of /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/java/org/CognitiveWeb/extser Log Message: Directory /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:07
|
Update of /cvsroot/cweb/extser/src/test/org/CognitiveWeb/extser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/test/org/CognitiveWeb/extser Log Message: Directory /cvsroot/cweb/extser/src/test/org/CognitiveWeb/extser added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:04
|
Update of /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser/profiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/java/org/CognitiveWeb/extser/profiler Log Message: Directory /cvsroot/cweb/extser/src/java/org/CognitiveWeb/extser/profiler added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:37:02
|
Update of /cvsroot/cweb/extser/src/java/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/java/org Log Message: Directory /cvsroot/cweb/extser/src/java/org added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:36:59
|
Update of /cvsroot/cweb/extser/src/java/org/CognitiveWeb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/java/org/CognitiveWeb Log Message: Directory /cvsroot/cweb/extser/src/java/org/CognitiveWeb added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:36:59
|
Update of /cvsroot/cweb/extser/src/architecture In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/architecture Log Message: Directory /cvsroot/cweb/extser/src/architecture added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:36:58
|
Update of /cvsroot/cweb/extser/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src Log Message: Directory /cvsroot/cweb/extser/src added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:36:58
|
Update of /cvsroot/cweb/extser/src/test/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/test/org Log Message: Directory /cvsroot/cweb/extser/src/test/org added to the repository |
From: Bryan T. <tho...@us...> - 2006-03-09 18:36:55
|
Update of /cvsroot/cweb/extser/src/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21896/src/test Log Message: Directory /cvsroot/cweb/extser/src/test added to the repository |