You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(157) |
Nov
(121) |
Dec
(19) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(34) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <rga...@us...> - 2003-01-01 23:46:35
|
Update of /cvsroot/csms/csms-core/src/documentation/xdocs In directory sc8-pr-cvs1:/tmp/cvs-serv26102 Removed Files: longTermPlans.xml Log Message: Moving documentation and adding support for Forrest 0.2 --- longTermPlans.xml DELETED --- |
|
From: <rga...@us...> - 2003-01-01 23:46:18
|
Update of /cvsroot/csms/csms-core/src/documentation/content
In directory sc8-pr-cvs1:/tmp/cvs-serv26031
Added Files:
shortTermPlans.xml
Log Message:
Moving documentation and adding support for Forrest 0.2
--- NEW FILE: shortTermPlans.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "./dtd/document-v11.dtd">
<document>
<header>
<title>CSMS - Short Term Plans</title>
<authors>
<person id="rdg" name="Ross D. Gardler" email="ro...@sa..." />
</authors>
</header>
<body>
<section>
<title>Introduction</title>
<p>This document outlines the plans for the CSMS project in the
forseeable future. There is a separate document detailing our
<link href="longTermPlans.html">Long Term Plans</link>
.</p>
</section>
<section>
<title>0.1 release</title>
<dl>
<dt>Additional Error Checking</dt>
<dd>An extra step will be inserted into the events generation process
in the Fantasy Sports Module, this will enable rules to be encoded to
verify the generated scores, for example, total goals scored by a team
should be equal to the number of goals identified in the result
event.</dd>
</dl>
</section>
<section>
<title>0.2.x release</title>
<dl>
<dt>Move to a core/module architecture</dt>
<dd>The core doesn't really exist yet. What we have is a fantasy
sports module. This release will see the introduction of the core.
Instead of the user selecting a game that they want to see the scores
on the core will be aware of all the games due to have been played by
that time and calculate them.</dd>
</dl>
</section>
<section>
<title>0.3.x release</title>
<dl>
<dt>Introduce team management</dt>
<dd>Now that we have a core system and a sports module we can start
thinking about teams and leagues. So in this release we will bring
team management into play. We will support substitutions and transfers
in this release.</dd>
</dl>
</section>
<section>
<title>0.4.x release</title>
<dl>
<dt>League Management Facilities</dt>
<dd>Now that we have the concept of teams we can start to publish
league placings.</dd>
</dl>
</section>
<section>
<title>0.5.x release</title>
<dl>
<dt>Move to a Cocoon Portal based system</dt>
<dd>Move the user interface to a Cocoon web app. This will remove the
need to install any software in order to use the system (although
admittedly it will make it more difficult for people to install it for
themselves should they want to hence the embedded jetty release after
this one).</dd>
<dt>Make available to Fanfoot.com players</dt>
<dd>At this point the application will provide all major team
management facilites. Testing at this point can be performed by the
Fanfoot.com players.</dd>
</dl>
</section>
<section>
<title>0.6.x release</title>
<dl>
<dt>Allow unconfirmed/confirmed event status</dt>
<dd>Events should have a status flag that enables them to be marked as
official or unofficial. There also needs to be a flag to indicate when
an event has been queried by someone. Initially all events are
unofficial, however, they are used to calculate published (unofficial)
results. On a given day and time, all events that have not been
queried are converted to official. The queried flag is used to
indicate that someone thinks the event may be an error. The league
administrator is asked to verify these events before they become
confirmed. This is to allow scores to be gathered from "unnoficial"
sources which will sometimes be faster than the "official" sources
whilst still</dd>
<dt>Embed Jetty server</dt>
<dd>By embedding the jetty server in one of the releases we will be
able to build a distribution that will run in full client/server mode
with only the need to install Java.</dd>
</dl>
</section>
<section>
<title>0.7.x release</title>
<dl>
<dt>Move to (Xindice?) database</dt>
<dd>At present all data is stored in XML files, however they are being
accesses through a URI. Therefore, we can no leverage Cocoons power to
replace these files with a Xindice's XML database without the need to
rewrite any code (theoretically at least)</dd>
</dl>
</section>
<section>
<title>0.8.x release</title>
<dl>
<dt>Refactoring</dt>
<dd>No new features will be added but the design of the system will be
improved.</dd>
</dl>
<p>This release will be the first one that sees an (almost) stable
core/module structure and API. It is this releae that we will start to
really push to other projects for collaboration. Once this core
infrastructure is in place the possible additions to the system are
immense and so opportunities for multiple developers start to
emerge.</p>
</section>
<section>
<title>And onwards...</title>
<p>From here we will plan the featureset to include in the 1.0 release
by revisiting both our
<link href="longTermPlans.html">long</link>
and short term plans.</p>
</section>
</body>
</document>
|
|
From: <rga...@us...> - 2003-01-01 23:46:04
|
Update of /cvsroot/csms/csms-core/src/documentation/xdocs In directory sc8-pr-cvs1:/tmp/cvs-serv25974 Removed Files: shortTermPlans.xml Log Message: Moving documentation and adding support for Forrest 0.2 --- shortTermPlans.xml DELETED --- |
|
From: <rga...@us...> - 2003-01-01 23:45:51
|
Update of /cvsroot/csms/csms-core/src/documentation In directory sc8-pr-cvs1:/tmp/cvs-serv25912 Added Files: skinconf.xml Log Message: Moving documentation and adding support for Forrest 0.2 --- NEW FILE: skinconf.xml --- <?xml version="1.0"?> <!-- Skin configuration file. This file contains details of your project, which will be used to configure the chosen Forrest skin. je...@ap... --> <!DOCTYPE skinconfig [ <!ENTITY % links.att 'name CDATA #REQUIRED'> <!ENTITY % link.att 'name CDATA #REQUIRED href CDATA #REQUIRED'> <!ELEMENT skinconfig (disable-search?, searchsite-domain?, searchsite-name?, project-name, project-url, project-logo, group-name?, group-url?, group-logo?, host-url?, host-logo?, year?, vendor?, trail?, credits?)*> <!ELEMENT credits (credit*)> <!ELEMENT credit (name, url, image, width?, height?)> <!ELEMENT disable-search (#PCDATA)> <!ELEMENT searchsite-domain (#PCDATA)> <!ELEMENT searchsite-name (#PCDATA)> <!ELEMENT project-name (#PCDATA)> <!ELEMENT project-url (#PCDATA)> <!ELEMENT project-logo (#PCDATA)> <!ELEMENT group-name (#PCDATA)> <!ELEMENT group-url (#PCDATA)> <!ELEMENT group-logo (#PCDATA)> <!ELEMENT host-url (#PCDATA)> <!ELEMENT host-logo (#PCDATA)> <!ELEMENT year (#PCDATA)> <!ELEMENT vendor (#PCDATA)> <!ELEMENT trail (link1, link2, link3)> <!ELEMENT link1 EMPTY> <!-- Seems we can't use param entity refs until this is DTDified --> <!ATTLIST link1 name CDATA #REQUIRED href CDATA #IMPLIED> <!ELEMENT link2 EMPTY> <!ATTLIST link2 name CDATA #REQUIRED href CDATA #IMPLIED> <!ELEMENT link3 EMPTY> <!ATTLIST link3 name CDATA #REQUIRED href CDATA #IMPLIED> <!ELEMENT name (#PCDATA)> <!ELEMENT url (#PCDATA)> <!ELEMENT image (#PCDATA)> <!ELEMENT width (#PCDATA)> <!ELEMENT height (#PCDATA)> ]> <skinconfig> <!-- Do we want to disable the Google search box? --> <disable-search>false</disable-search> <searchsite-domain>csms.sf.net</searchsite-domain> <searchsite-name>CSMS</searchsite-name> <!-- mandatory project logo skin: forrest-site renders it at the top --> <project-name>Community Sports Management System (CSMS)</project-name> <project-url>http://csms.sf.net</project-url> <project-logo>images/project-logo.gif</project-logo> <!-- optional group logo skin: forrest-site renders it at the top-left corner --> <group-name>Scalable and Agile Architectures for EBusiness</group-name> <group-url>http://www.saafe.org/</group-url> <group-logo>images/group-logo.gif</group-logo> <!-- optional host logo (e.g. sourceforge logo) skin: forrest-site renders it at the bottom-left corner --> <host-url>http://sourceforge.net</host-url> <host-logo>http://sourceforge.net/sflogo.php?&group_id=65029&type=1</host-logo> <!-- The following are used to construct a copyright statement --> <year>2002-2003</year> <vendor>WkWyW.net</vendor> <!-- Some skins use this to form a 'breadcrumb trail' of links. If you don't want these, set the attributes to blank. The DTD purposefully requires them. --> <trail> <link1 name="" href=""/> <link2 name="" href=""/> <link3 name="" href=""/> </trail> <!-- Credits are typically rendered as a set of small clickable images in the page footer --> <credits> <credit> <name>Built Apache Forrest</name> <url>http://xml.apache.org/forrest/</url> <image>skin/images/built-with-forrest-button.png</image> <width>88</width> <height>31</height> </credit> <credit> <name>Built with Cocoon</name> <url>http://xml.apache.org/cocoon/</url> <image>skin/images/built-with-cocoon.gif</image> <width>88</width> <height>31</height> </credit> <credit> <name>Krysalis Centipede</name> <url>http://www.krysalis.org/centipede/</url> <image>skin/images/centipede-logo-small.gif</image> <width>138</width> <height>31</height> </credit> </credits> </skinconfig> |
|
From: <rga...@us...> - 2003-01-01 23:45:38
|
Update of /cvsroot/csms/csms-core/src/documentation/content
In directory sc8-pr-cvs1:/tmp/cvs-serv25874
Added Files:
tabs.xml
Log Message:
Moving documentation and adding support for Forrest 0.2
--- NEW FILE: tabs.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.0//EN" "tab-cocoon-v10.dtd">
<tabs software="MyProj"
title="MyProj"
copyright="Foo"
xmlns:xlink="http://www.w3.org/1999/xlink">
<tab label="Home" dir=""/>
<!-- Add new tabs here, eg:
<tab label="How-Tos" dir="community/howto/"/>
<tab label="XML Site" dir="xml-site/"/>
-->
</tabs>
|
|
From: <rga...@us...> - 2003-01-01 23:36:39
|
Update of /cvsroot/csms/csms-core/src/documentation/content/downloadAndInstall In directory sc8-pr-cvs1:/tmp/cvs-serv23396/downloadAndInstall Log Message: Directory /cvsroot/csms/csms-core/src/documentation/content/downloadAndInstall added to the repository |
|
From: <rga...@us...> - 2003-01-01 23:35:33
|
Update of /cvsroot/csms/csms-core/src/documentation/content/manual In directory sc8-pr-cvs1:/tmp/cvs-serv23091/manual Log Message: Directory /cvsroot/csms/csms-core/src/documentation/content/manual added to the repository |
|
From: <rga...@us...> - 2003-01-01 23:34:42
|
Update of /cvsroot/csms/csms-core/src/documentation/content In directory sc8-pr-cvs1:/tmp/cvs-serv22836/content Log Message: Directory /cvsroot/csms/csms-core/src/documentation/content added to the repository |
|
From: <rga...@us...> - 2003-01-01 23:33:23
|
Update of /cvsroot/csms/csms-core
In directory sc8-pr-cvs1:/tmp/cvs-serv22399
Modified Files:
status.xml
Log Message:
Changelog update
Index: status.xml
===================================================================
RCS file: /cvsroot/csms/csms-core/status.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** status.xml 30 Dec 2002 23:54:25 -0000 1.13
--- status.xml 1 Jan 2003 23:33:19 -0000 1.14
***************
*** 14,17 ****
--- 14,19 ----
<todo>
<actions priority="high">
+ <action context="docs" assigned-to="all">make docs work with forrest 0.2 cent</action>
+
<action context="design" assigned-to="all">Design the data structures
for team management in the core system.</action>
***************
*** 29,32 ****
--- 31,36 ----
is the Auot Scoring facilites found inthe previous
release.</description>
+
+ <action dev="rdg" type="update">Docs moved to accomodate version 0.2 of Forrest.</action>
<action dev="rdg" type="add">Added basic support for XML database.</action>
|
|
From: <rga...@us...> - 2002-12-31 00:06:44
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv23151
Modified Files:
ControlCentre.java
Log Message:
No functionality changes just adding checks for DB Exceptions
Index: ControlCentre.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/gui/ControlCentre.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ControlCentre.java 20 Nov 2002 12:18:06 -0000 1.14
--- ControlCentre.java 31 Dec 2002 00:06:41 -0000 1.15
***************
*** 35,40 ****
*/
package org.fanfoot.gui;
- import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.io.File;
--- 35,40 ----
*/
package org.fanfoot.gui;
[...1372 lines suppressed...]
}
--- 764,781 ----
* Loaded Commentay file.
*
! *@param e Description of the Parameter
*/
! public void retrievedCommentary( EventObject e ) {
}
/**
! *@param args the command line arguments
*/
! public static void main( String args[] ) {
try {
new ControlCentre().show();
! } catch ( Exception e ) {
! System.out.println( "Unable to load configuration file." );
e.printStackTrace();
}
|
|
From: <rga...@us...> - 2002-12-31 00:00:09
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/scoring
In directory sc8-pr-cvs1:/tmp/cvs-serv20355
Modified Files:
Scores.java
Log Message:
Record the scores in the player record in the database
Index: Scores.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/scoring/Scores.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Scores.java 1 Nov 2002 22:06:16 -0000 1.3
--- Scores.java 31 Dec 2002 00:00:06 -0000 1.4
***************
*** 35,45 ****
*/
package org.fanfoot.scoring;
!
import java.util.logging.Level;
import java.util.logging.Logger;
!
import org.saafe.utils.XMLUtils;
-
import org.w3c.dom.Document;
/**
--- 35,50 ----
*/
package org.fanfoot.scoring;
! import java.util.ArrayList;
! import java.util.Enumeration;
! import java.util.Hashtable;
import java.util.logging.Level;
import java.util.logging.Logger;
! import org.fanfoot.db.DBException;
! import org.fanfoot.db.Players;
! import org.fanfoot.db.UnknownPlayerException;
import org.saafe.utils.XMLUtils;
import org.w3c.dom.Document;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.NodeList;
/**
***************
*** 52,58 ****
public class Scores {
- /** Where to write log information */
- final Logger logger = Logger.getLogger("org.fanfoot.scoring");
-
/** Holds value of property events. */
private Events events;
--- 57,60 ----
***************
*** 63,66 ****
--- 65,74 ----
/** The document holding the scores. */
private Document scoresDocument;
+ /** The players database */
+ // FIXME: we need to ensure there is only one of these per application (Factory pattern?)
+ Players players;
+
+ /** Where to write log information */
+ final Logger logger = Logger.getLogger( "org.fanfoot.scoring" );
***************
*** 72,82 ****
*@exception ScoringConfigurationException Description of the
* Exception
*@throws ScoringConfigurationException if unable to calculate
* scores
*/
! public Scores(Events evts, ScoringConfiguration sc)
! throws ScoringConfigurationException {
! this.setEvents(evts);
! this.setConfiguration(sc);
this.calculate();
}
--- 80,121 ----
*@exception ScoringConfigurationException Description of the
* Exception
+ *@exception DBException Description of the Exception
*@throws ScoringConfigurationException if unable to calculate
* scores
+ *@throws DBEsception if there is a problem connecting to the
+ * database
*/
! public Scores( Events evts, ScoringConfiguration sc )
! throws ScoringConfigurationException, DBException {
!
! // FIXME: we need to ensure there is only one of these per application (Factory pattern?)
! players = new Players();
! this.setEvents( evts );
! this.setConfiguration( sc );
! this.calculate();
! }
!
!
! /**
! * Creates a new instance of calculator
! *
! *@param evts the events to calculate the score from
! *@param sc Description of the Parameter
! *@param db the URI of the DB to use for recording info
! *@exception ScoringConfigurationException Description of the
! * Exception
! *@exception DBException Description of the Exception
! *@throws ScoringConfigurationException if unable to calculate
! * scores
! *@throws DBEsception if there is a problem connecting to the
! * database
! */
! public Scores( Events evts, ScoringConfiguration sc, String db )
! throws ScoringConfigurationException, DBException {
!
! // FIXME: we need to ensure there is only one of these per application (Factory pattern?)
! players = new Players( db );
! this.setEvents( evts );
! this.setConfiguration( sc );
this.calculate();
}
***************
*** 99,103 ****
*@param events New value of property events.
*/
! public void setEvents(Events events) {
this.events = events;
}
--- 138,142 ----
*@param events New value of property events.
*/
! public void setEvents( Events events ) {
this.events = events;
}
***************
*** 120,124 ****
*@param conf New value of property conf.
*/
! public void setConfiguration(ScoringConfiguration conf) {
this.conf = conf;
}
--- 159,163 ----
*@param conf New value of property conf.
*/
! public void setConfiguration( ScoringConfiguration conf ) {
this.conf = conf;
}
***************
*** 138,150 ****
try {
! doc = XMLUtils.transform(getEvents().toXMLDoc(),
! getConfiguration().getXSL());
! } catch(Exception e) {
! logger.log(Level.WARNING, "Unable to calculate scores", e);
! throw new ScoringConfigurationException("Unable to calculate scores",
! e);
}
! setScoresDocument(doc);
return doc;
--- 177,189 ----
try {
! doc = XMLUtils.transform( getEvents().toXMLDoc(),
! getConfiguration().getXSL() );
! } catch ( Exception e ) {
! logger.log( Level.WARNING, "Unable to calculate scores", e );
! throw new ScoringConfigurationException( "Unable to calculate scores",
! e );
}
! setScoresDocument( doc );
return doc;
***************
*** 168,173 ****
*@param scoresDocument New value of property scoresDocument.
*/
! public void setScoresDocument(Document scoresDocument) {
this.scoresDocument = scoresDocument;
}
}
--- 207,236 ----
*@param scoresDocument New value of property scoresDocument.
*/
! public void setScoresDocument( Document scoresDocument ) {
this.scoresDocument = scoresDocument;
+ }
+
+
+ /**
+ * Add the generated scoring events to the player stats.
+ *
+ *@exception DBException If there is a problem accessing the DB
+ *@exception UnknownPlayerException if a score is attributed to an
+ * unkown player
+ */
+ private void recordPlayerScoringEvents()
+ throws DBException, UnknownPlayerException {
+ Hashtable allStats = new Hashtable();
+ Document docPlayerStats;
+ Element elem;
+ ArrayList playerScoreEvts;
+ NodeList ndl = this.getScoresDocument().getDocumentElement().getElementsByTagName( "player" );
+ String strID;
+ // create a hashtable of scoring events for each player
+ for ( int i = 0; i < ndl.getLength(); i++ ) {
+ elem = (Element) ndl.item( i );
+ strID = elem.getAttribute( "id" );
+ players.addScoringEvents( strID, elem );
+ }
}
}
|
|
From: <rga...@us...> - 2002-12-30 23:55:44
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/db
In directory sc8-pr-cvs1:/tmp/cvs-serv18431
Modified Files:
DB.java
Log Message:
Add basic support for XML:DB databases
Index: DB.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/db/DB.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DB.java 21 Nov 2002 22:21:48 -0000 1.2
--- DB.java 30 Dec 2002 23:55:41 -0000 1.3
***************
*** 44,47 ****
--- 44,48 ----
import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.modules.XPathQueryService;
+ import org.xmldb.api.modules.XUpdateQueryService;
/**
* Provides utility methods for accessing the DB
***************
*** 74,79 ****
* Query the indicated collection with the XPath query supplied.
*
- *@param strQuery XPath query to run
*@param strCollection Description of the Parameter
*@return
*@throws DBException if unable to query the database
--- 75,80 ----
* Query the indicated collection with the XPath query supplied.
*
*@param strCollection Description of the Parameter
+ *@param strQuery XPath query to run
*@return
*@throws DBException if unable to query the database
***************
*** 105,108 ****
--- 106,145 ----
return resultSet;
+ }
+
+
+ /**
+ * XUpdate the indicated collection with the XUpdate modificatons
+ * supplied.
+ *
+ *@param strCollection Description of the Parameter
+ *@param strUpdate XUdpate modifications to run
+ *@throws DBException if unable to update the database
+ */
+ public void runXUpdateQuery( String strCollection, String strUpdate )
+ throws DBException {
+ Collection col = getCollection( strCollection );
+ XUpdateQueryService service;
+ ResourceSet resultSet;
+ try {
+ service =
+ (XUpdateQueryService) col.getService( "XUpdateQueryService", "1.0" );
+ } catch ( XMLDBException xde ) {
+ throw new DBException( "Unable to get XUpdateQueryService", xde );
+ }
+ try {
+ service.update( strUpdate );
+ } catch ( XMLDBException xde ) {
+ throw new DBException( "Unable to execute XPath Query", xde );
+ } finally {
+ if ( col != null ) {
+ try {
+ col.close();
+ } catch ( XMLDBException xde ) {
+ // FIXME handle this error, it is not critical but will be a memory leak
+ logger.log( Level.WARNING, "Unable to close connection", xde );
+ }
+ }
+ }
}
|
|
From: <rga...@us...> - 2002-12-30 23:55:30
|
Update of /cvsroot/csms/csms-core/src/test/src/org/fanfoot
In directory sc8-pr-cvs1:/tmp/cvs-serv18327
Modified Files:
Data4Tests.java
Log Message:
Add basic support for XML:DB databases
Index: Data4Tests.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/test/src/org/fanfoot/Data4Tests.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Data4Tests.java 21 Nov 2002 21:57:02 -0000 1.1
--- Data4Tests.java 30 Dec 2002 23:55:27 -0000 1.2
***************
*** 87,111 ****
public void createPlayerCollection() throws DBException {
deletePlayerCollection();
! Collection col = null;
! try {
! String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
! Database database = null;
! try {
! Class c = Class.forName( driver );
! database = (Database) c.newInstance();
! } catch ( ClassNotFoundException cnfe ) {
! throw new DBException( "Cannot find class to connect to DB", cnfe );
! } catch ( InstantiationException ie ) {
! throw new DBException( "Cannot instantiate class to connect to DB", ie );
! } catch ( IllegalAccessException iae ) {
! throw new DBException( "Cannot access class to connect to DB", iae );
! }
! DatabaseManager.registerDatabase( database );
!
! col = DatabaseManager.getCollection( DB_URI );
! if ( col == null ) {
! throw new DBException( "Cannot find the DB collection" );
! }
String strColName = Players.COLLECTION_NAME;
CollectionManager service =
--- 87,93 ----
public void createPlayerCollection() throws DBException {
deletePlayerCollection();
! Collection col = getDBCollection();
+ try {
String strColName = Players.COLLECTION_NAME;
CollectionManager service =
***************
*** 141,165 ****
*/
public void deletePlayerCollection() throws DBException {
! Collection col = null;
! Database database = null;
! try {
! String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
! try {
! Class c = Class.forName( driver );
! database = (Database) c.newInstance();
! } catch ( ClassNotFoundException cnfe ) {
! throw new DBException( "Cannot find class to connect to DB", cnfe );
! } catch ( InstantiationException ie ) {
! throw new DBException( "Cannot instantiate class to connect to DB", ie );
! } catch ( IllegalAccessException iae ) {
! throw new DBException( "Cannot access class to connect to DB", iae );
! }
! DatabaseManager.registerDatabase( database );
!
! col = DatabaseManager.getCollection( DB_URI );
! if ( col == null ) {
! throw new DBException( "Cannot find the db collection" );
! }
CollectionManager service =
(CollectionManager) col.getService( "CollectionManager", "1.0" );
--- 123,129 ----
*/
public void deletePlayerCollection() throws DBException {
! Collection col = getDBCollection();
+ try {
CollectionManager service =
(CollectionManager) col.getService( "CollectionManager", "1.0" );
***************
*** 183,186 ****
--- 147,183 ----
}
+
+
+ private Collection getDBCollection() throws DBException {
+ Collection col = null;
+ String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
+ Database database = null;
+ try {
+ Class c = Class.forName( driver );
+ database = (Database) c.newInstance();
+ } catch ( ClassNotFoundException cnfe ) {
+ throw new DBException( "Cannot find class to connect to DB", cnfe );
+ } catch ( InstantiationException ie ) {
+ throw new DBException( "Cannot instantiate class to connect to DB", ie );
+ } catch ( IllegalAccessException iae ) {
+ throw new DBException( "Cannot access class to connect to DB", iae );
+ }
+ try {
+ DatabaseManager.registerDatabase( database );
+
+ col = DatabaseManager.getCollection( DB_URI );
+ if ( col == null ) {
+ throw new DBException( "Cannot find the DB collection" );
+ }
+ } catch ( XMLDBException e ) {
+ if ( e.errorCode == 201 ) {
+ // collection doesn't exist to delete
+ } else {
+ throw new DBException( "XML:DB Exception occured " + e.errorCode, e );
+ }
+ }
+ return col;
+ }
+
|
|
From: <rga...@us...> - 2002-12-30 23:55:17
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/db
In directory sc8-pr-cvs1:/tmp/cvs-serv18223
Modified Files:
Players.java ID.java
Log Message:
Add basic support for XML:DB databases
Index: Players.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/db/Players.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Players.java 21 Nov 2002 21:59:37 -0000 1.2
--- Players.java 30 Dec 2002 23:55:14 -0000 1.3
***************
*** 37,44 ****
--- 37,48 ----
import java.util.logging.Level;
import java.util.logging.Logger;
+ import javax.xml.transform.TransformerConfigurationException;
+ import javax.xml.transform.TransformerException;
+ import org.apache.commons.jxpath.JXPathContext;
import org.saafe.utils.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+ import org.xmldb.api.base.ResourceIterator;
import org.xmldb.api.base.ResourceSet;
import org.xmldb.api.base.XMLDBException;
***************
*** 135,164 ****
/**
! * Get the scoring events associated with the given game and the
! * given player.
*
! *@param playerID the ID of the player
! *@param gameID the ID of the game
! *@return the Element representing the scoring events from the
! * indicated game. Returns null if no events for that game are
! * recorded
! *@throws DBException if the player cannot be found
*/
! public Element getPlayerScoringEvents( String playerID, String gameID )
throws DBException {
! Element player = getPlayer( playerID );
! NodeList ndl = player.getElementsByTagName( "scoringEvents" );
! Element scoringEvents = (Element) ndl.item( 0 );
! ndl = scoringEvents.getElementsByTagName( "game" );
! Element elem = null;
! for ( int i = 0; i < ndl.getLength(); i++ ) {
! elem = (Element) ndl.item( i );
! if ( elem.getAttribute( "id" ).equals( gameID ) ) {
! break;
! } else {
! elem = null;
! }
! }
! return elem;
}
--- 139,172 ----
/**
! * Get the total score of a player.
*
! *@param id id of player
! *@return total score in the database for the indicated player
! *@throws DBException if there is an error accessing the DB
! *@throws UnknownPlayerException if the player is not found
*/
! public Integer getTotalScore( String id )
! throws DBException, UnknownPlayerException {
! String strScore;
! JXPathContext context;
! context = JXPathContext.newContext( getPlayer( id ) );
! Double dblScore = (Double) context.getValue( "sum(//event/points)" );
!
! return new Integer( dblScore.intValue() );
! }
!
!
! /**
! * Add a scoring event to a player.
! *
! *@param strPlayerID ide of player to add event to
! *@param event an element representing the event
! *@exception DBException Description of the Exception
! *@throws DBExeption if there is a problem updating the DB
! *@fixme ensure that we are not duplicating events
! */
! public void addScoringEvents( String strPlayerID, Element event )
throws DBException {
! addInfo( strPlayerID, event );
}
***************
*** 199,206 ****
--- 207,242 ----
sb.append( position );
sb.append( "</position>" );
+ sb.append( "<scoringEvents/>" );
sb.append( "</player>" );
db.addResource( strID, sb.toString(), COLLECTION_NAME );
}
+
+ /**
+ * Add some info to a pl;ayer record. .
+ *
+ *@param elemInfo the info to be added
+ *@param strPlayerID The feature to be added to the Info attribute
+ *@exception DBException Description of the Exception
+ */
+ public void addInfo( String strPlayerID, Element elemInfo )
+ throws DBException {
+ String update = "//player[@id='" + strPlayerID + "']/scoringEvents";
+ String strInfo;
+ StringBuffer sb = new StringBuffer();
+ try {
+ strInfo = XMLUtils.xmlToString( elemInfo );
+ } catch ( TransformerConfigurationException tce ) {
+ throw new DBException( "Unable to process even element", tce );
+ } catch ( TransformerException te ) {
+ throw new DBException( "Unable to process even element", te );
+ }
+ sb.append( "<xupdate:modifications version=\"1.0\" xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" );
+ sb.append( "<xupdate:append select=\"" + update + "\" >" );
+ sb.append( strInfo );
+ sb.append( "</xupdate:append>" );
+ sb.append( "</xupdate:modifications>" );
+ db.runXUpdateQuery( COLLECTION_NAME, sb.toString() );
+ }
}
Index: ID.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/db/ID.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ID.java 21 Nov 2002 21:59:38 -0000 1.1
--- ID.java 30 Dec 2002 23:55:14 -0000 1.2
***************
*** 51,54 ****
--- 51,64 ----
/**
+ * Set the player ID to the supplied value
+ *
+ *@param id The new playerID value
+ */
+ public static void setPlayerID( int id ) {
+ intPlayerID = id;
+ }
+
+
+ /**
* Create an ID number for a player in the indicated postion
*
|
|
From: <rga...@us...> - 2002-12-30 23:55:03
|
Update of /cvsroot/csms/csms-core/src/test/src/org/fanfoot/db
In directory sc8-pr-cvs1:/tmp/cvs-serv18102
Modified Files:
TestPlayers.java
Log Message:
Add basic support for XML:DB databases
Index: TestPlayers.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/test/src/org/fanfoot/db/TestPlayers.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestPlayers.java 21 Nov 2002 21:58:37 -0000 1.2
--- TestPlayers.java 30 Dec 2002 23:55:00 -0000 1.3
***************
*** 10,13 ****
--- 10,15 ----
import org.custommonkey.xmlunit.XMLUnit;
import org.fanfoot.Data4Tests;
+ import org.saafe.utils.XMLUtils;
+ import org.w3c.dom.Document;
import org.w3c.dom.Node;
***************
*** 50,53 ****
--- 52,56 ----
Data4Tests data = new Data4Tests();
data.createPlayerCollection();
+ ID.setPlayerID( 100 );
varPlayers = new org.fanfoot.db.Players( Data4Tests.DB_URI );
} catch ( DBException dbe ) {
***************
*** 79,82 ****
--- 82,116 ----
}
+
+ public void testAddScoringEvents() {
+ Document evt1 = null;
+ Document evt2 = null;
+ String strEvent1 = "<event gameUID=\"_Saturday, 26 October, 2002_Barclaycard Premiership_Arsenal_Blackburn Rovers\">"
+ + "<points>1</points>"
+ + "<type>Appearance</type>"
+ + "</event>";
+ String strEvent2 = "<event gameUID=\"_Saturday, 26 October, 2002_Barclaycard Premiership_Arsenal_Blackburn Rovers\">"
+ + "<points>2</points>"
+ + "<type>Goal</type>"
+ + "</event>";
+
+ try {
+ evt1 = XMLUtils.stringToXML( strEvent1 );
+ evt2 = XMLUtils.stringToXML( strEvent2 );
+ } catch ( Exception e ) {
+ fail( "Unable to create events document" );
+ }
+
+ try {
+ varPlayers.addPlayer( "firstname", "surname", "regTeam", "team", "Goalkeeper" );
+ assertNotNull( "Should have a player with ID " + 100, varPlayers.getPlayer( "100" ) );
+ varPlayers.addScoringEvents( "100", evt1.getDocumentElement() );
+ varPlayers.addScoringEvents( "100", evt2.getDocumentElement() );
+ assertEquals( "Player 100 total points incorrect", new Integer( 3 ), varPlayers.getTotalScore( "100" ) );
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ fail( "Unable to get scores from database: " + e.getMessage() );
+ }
+ }
|
|
From: <rga...@us...> - 2002-12-30 23:54:51
|
Update of /cvsroot/csms/csms-core/src/test/src/org/fanfoot/scoring In directory sc8-pr-cvs1:/tmp/cvs-serv18026 Removed Files: TestScores.java Log Message: Add basic support for XML:DB databases --- TestScores.java DELETED --- |
|
From: <rga...@us...> - 2002-12-30 23:54:40
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/db In directory sc8-pr-cvs1:/tmp/cvs-serv17931 Added Files: UnknownPlayerException.java Log Message: Add basic support for XML:DB databases --- NEW FILE: UnknownPlayerException.java --- /* * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * 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. * * The Original Code is Community Sports Management System. * * The Initial Developer of the Original Code is * We know What you Want.net * * Portions created by the Initial Developer are Copyright (C) 2002 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Ross Gardler <ross [at] saafe.org> * Mike Lever <mikel [at] fanfoot.com> * Stuart Gardler <stuart [at] wkwyw.net> * * ***** END LICENSE BLOCK ***** */ /* * UnknownPlayerException.java * */ package org.fanfoot.db; /** * Thrown when there is an attempt to manipulate a player that does * not exist in the databae. *@author rgardler */ public class UnknownPlayerException extends java.lang.Exception { /** * Creates a new instance of <code>UnknownPlayerException</code> without * detail message. */ public UnknownPlayerException() { } /** * Constructs an instance of <code>UnknownPlayerException</code> with the * specified detail message. * *@param msg the detail message. */ public UnknownPlayerException( String msg ) { super( msg ); } } |
|
From: <rga...@us...> - 2002-12-30 23:54:28
|
Update of /cvsroot/csms/csms-core
In directory sc8-pr-cvs1:/tmp/cvs-serv17834
Modified Files:
status.xml module.xml
Log Message:
Add basic support for XML:DB databases
Index: status.xml
===================================================================
RCS file: /cvsroot/csms/csms-core/status.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** status.xml 21 Nov 2002 22:15:42 -0000 1.12
--- status.xml 30 Dec 2002 23:54:25 -0000 1.13
***************
*** 30,33 ****
--- 30,35 ----
release.</description>
+ <action dev="rdg" type="add">Added basic support for XML database.</action>
+
<action dev="rdg" type="update">System now reports errors in creating the
event parser to the user through the GUI as well as through the log.</action>
Index: module.xml
===================================================================
RCS file: /cvsroot/csms/csms-core/module.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** module.xml 21 Nov 2002 21:56:19 -0000 1.8
--- module.xml 30 Dec 2002 23:54:25 -0000 1.9
***************
*** 76,81 ****
<depend project="xalan" version="supplied" export="true"/>
<depend project="xindice" version="supplied" export="true"/>
! <depend project="xmldb" version="supplied" export="true"/>
<depend project="xmlrpc" version="supplied" export="true"/>
<depend project="commons-logging" version="supplied" export="true"/>
--- 76,84 ----
<depend project="xalan" version="supplied" export="true"/>
<depend project="xindice" version="supplied" export="true"/>
! <depend project="xmldb-api" version="supplied" export="true"/>
! <depend project="xmldb-common" version="supplied" export="true"/>
<depend project="xmlrpc" version="supplied" export="true"/>
+ <depend project="xmldb-xupdate" version="supplied" export="true"/>
+ <depend project="infozone-tools" version="supplied" export="true"/>
<depend project="commons-logging" version="supplied" export="true"/>
|
|
From: <rga...@us...> - 2002-12-30 22:59:13
|
Update of /cvsroot/csms/csms-core/lib In directory sc8-pr-cvs1:/tmp/cvs-serv25302 Added Files: junit-3.7.jar Log Message: JUnit for running Unit tests independantly of Centipede --- NEW FILE: junit-3.7.jar --- (This appears to be a binary file; contents omitted.) |
|
From: <rga...@us...> - 2002-12-30 22:56:56
|
Update of /cvsroot/csms/csms-core/lib In directory sc8-pr-cvs1:/tmp/cvs-serv24461 Added Files: infozone-tools.jar Log Message: Xindice XML database --- NEW FILE: infozone-tools.jar --- (This appears to be a binary file; contents omitted.) |
|
From: <rga...@us...> - 2002-12-30 22:56:32
|
Update of /cvsroot/csms/csms-core/legal In directory sc8-pr-cvs1:/tmp/cvs-serv24379 Added Files: infozone.LICENSE Log Message: Xindice XML database --- NEW FILE: infozone.LICENSE --- /* * The Infozone Software License, Version 2.0 * * * Copyright (c) 1999-2000 The Infozone Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Infozone Group (http://www.infozone-group.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Infozone" and "Infozone Group" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact inf...@in.... * * 5. Products derived from this software may not be called "Infozone", * nor may "Infozone" appear in their name, without prior written * permission of the Infozone Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Infozone Group. For more * information on the Infozone Group, please see * <http://www.infozone-group.org/>. */ |
Update of /cvsroot/csms/csms-core/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22878 Modified Files: xindice-1.1b.jar Added Files: xmldb-common.jar xmldb-api-20021118.jar xml-apis-2.2.1.jar Removed Files: xmldb-api-20021026.jar xml-apis.jar Log Message: Xindice XML database --- NEW FILE: xmldb-common.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xmldb-api-20021118.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xml-apis-2.2.1.jar --- (This appears to be a binary file; contents omitted.) Index: xindice-1.1b.jar =================================================================== RCS file: /cvsroot/csms/csms-core/lib/xindice-1.1b.jar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs6zAxMu and /tmp/cvsYziE6R differ --- xmldb-api-20021026.jar DELETED --- --- xml-apis.jar DELETED --- |
|
From: <rga...@us...> - 2002-12-30 22:53:04
|
Update of /cvsroot/csms/csms-core/legal
In directory sc8-pr-cvs1:/tmp/cvs-serv22758
Added Files:
xmldb-xupdate.LICENSE
Log Message:
Xindice XML database
--- NEW FILE: xmldb-xupdate.LICENSE ---
The XML:DB Initiative Software License, Version 1.0
Copyright (c) 2000-2001 The XML:DB Initiative. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The end-user documentation included with the redistribution,
if any, must include the following acknowledgment:
"This product includes software developed by the
XML:DB Initiative (http://www.xmldb.org/)."
Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.
4. The name "XML:DB Initiative" must not be used to endorse or
promote products derived from this software without prior written
permission. For written permission, please contact in...@xm....
5. Products derived from this software may not be called "XML:DB",
nor may "XML:DB" appear in their name, without prior written
permission of the XML:DB Initiative.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
====================================================================
This software consists of voluntary contributions made by many
individuals on behalf of the XML:DB Initiative. For more information
on the XML:DB Initiative, please see <http://www.xmldb.org/>.
|
|
From: <rga...@us...> - 2002-12-30 22:52:52
|
Update of /cvsroot/csms/csms-core/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22501 Added Files: xmldb-xupdate.jar Log Message: Xindice XML database --- NEW FILE: xmldb-xupdate.jar --- (This appears to be a binary file; contents omitted.) |
|
From: <rga...@us...> - 2002-12-30 22:51:56
|
Update of /cvsroot/csms/csms-core/lib In directory sc8-pr-cvs1:/tmp/cvs-serv22010 Added Files: saafe-commons-0.1.0-dev-20021227.jar Removed Files: saafe-commons-0.1.0-dev-20021028.jar Log Message: Upgrading to newer version --- NEW FILE: saafe-commons-0.1.0-dev-20021227.jar --- (This appears to be a binary file; contents omitted.) --- saafe-commons-0.1.0-dev-20021028.jar DELETED --- |