Four essential Software development support systems :
Wiki/Blog/CMS/Forum/Documentation system.
Source code repository.
Bugtracking system.
Mailinglist server system.
Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.
Thursday, November 04, 2004
Wednesday, November 03, 2004
#!/bin/bash
# This script can be executed by root to rapidly create a cvs repository on RedHat Linux 8 or later. Author: Philip Mark Donaghy
# Adapted from http://www7b.software.ibm.com/wsdd/library/techarticles/0209_yu/yu.html Article by Colin Yu
# The user cvs and the Users required to have access to cvs.
useradd cvs
useradd -G cvs penguin
useradd -G cvs tiger
# CVS environment
mkdir /home/cvs/anoncvs
chmod -R 770 /home/cvs
chown -R cvs /home/cvs
chgrp -R cvs /home/cvs
chmod g+s /home/cvs/anoncvs
cvs -d /home/cvs/anoncvs init
# Daemon process. CVS Service
printf "# default : off\n# description : A cvs server.\nservice cvspserver\n{\n disable = no\n socket_type = stream\n protocol = tcp\n user = root\n wait = no\n server = /usr/bin/cvs\n server_args = -f --allow-root=/home/cvs/anoncvs pserver\n log_on_success += USERID\n log_on_failure += USERID\n}\n" > /etc/xinetd.d/cvspserver
service xinetd restart
# Users environment for localhost
printf "export CVSROOT=\":pserver:\$USER@localhost:/home/cvs/anoncvs\"\n" >> /etc/profile
# Manual configuration
# User the following command to initialize a project
# cvs import -m "New Project" ProjectName group release1_0
# This script can be executed by root to rapidly create a cvs repository on RedHat Linux 8 or later. Author: Philip Mark Donaghy
# Adapted from http://www7b.software.ibm.com/wsdd/library/techarticles/0209_yu/yu.html Article by Colin Yu
# The user cvs and the Users required to have access to cvs.
useradd cvs
useradd -G cvs penguin
useradd -G cvs tiger
# CVS environment
mkdir /home/cvs/anoncvs
chmod -R 770 /home/cvs
chown -R cvs /home/cvs
chgrp -R cvs /home/cvs
chmod g+s /home/cvs/anoncvs
cvs -d /home/cvs/anoncvs init
# Daemon process. CVS Service
printf "# default : off\n# description : A cvs server.\nservice cvspserver\n{\n disable = no\n socket_type = stream\n protocol = tcp\n user = root\n wait = no\n server = /usr/bin/cvs\n server_args = -f --allow-root=/home/cvs/anoncvs pserver\n log_on_success += USERID\n log_on_failure += USERID\n}\n" > /etc/xinetd.d/cvspserver
service xinetd restart
# Users environment for localhost
printf "export CVSROOT=\":pserver:\$USER@localhost:/home/cvs/anoncvs\"\n" >> /etc/profile
# Manual configuration
# User the following command to initialize a project
# cvs import -m "New Project" ProjectName group release1_0
How can a database model implement versioning of data? Flags perhaps, though not the best solution. Meta data seems to be the key. Each table maintains the following meta data. DATE_CREATED, DATE_CANCELLED, DATE_UPDATED, DATE_EXPORTED, DATE_VALIDATED (The last two implement export functions telling us when data was exported and when this data was validated by some authority), DATE_START, DATE_END (Dates that indicate a period during which the date is valid).
Inserting a version :
DATE_CANCELLED is initialized to the end of time for us that is the 31st of December 9999.
DATE_CREATED and DATE_UPDATED are set to SYSTIME
DATE_EXPORTED, DATE_VALIDATED is initialized to the beginning of time for us that is the 1st of January 1972.
Deleting versions set DATE_CANCELLED and DATE_UPDATED to the system time.
Senario 1 : (DCR, DCA, DUP, DEX, DVA, DST, DEN are abriviations for the above meta data)
t0 t1 t2 t3 t4 t5 t6
|------------------------------------------------> Version one was inserted at time t1, so version one has the following values.
DCR, DCA, DUP, DEX, DVA, DST, DEN
t1, te, t1, tb, tb, t0, t6
Inserting a version :
DATE_CANCELLED is initialized to the end of time for us that is the 31st of December 9999.
DATE_CREATED and DATE_UPDATED are set to SYSTIME
DATE_EXPORTED, DATE_VALIDATED is initialized to the beginning of time for us that is the 1st of January 1972.
Deleting versions set DATE_CANCELLED and DATE_UPDATED to the system time.
Senario 1 : (DCR, DCA, DUP, DEX, DVA, DST, DEN are abriviations for the above meta data)
t0 t1 t2 t3 t4 t5 t6
|------------------------------------------------> Version one was inserted at time t1, so version one has the following values.
DCR, DCA, DUP, DEX, DVA, DST, DEN
t1, te, t1, tb, tb, t0, t6
Tuesday, October 12, 2004
Friday, September 24, 2004
The xsi:type attribute of a complexType implies that the complexType has been extended to contain new properties. See Doing More With XML Schemas (part 1): "xsi:type"
This article recommends naming(typing) all xsd:complexTypes maximizing the ability to reuse the type. Doing More With XML Schemas (part 1)
Tuesday, September 21, 2004
I have been looking for cvs firewall and I just found it.
Access cvs using http proxy.
CVS from behind a firewall.
Of all places I found this on msdn.
http://blogs.msdn.com/robmen/archive/2004/08/09/211126.aspx
Access cvs using http proxy.
CVS from behind a firewall.
Of all places I found this on msdn.
http://blogs.msdn.com/robmen/archive/2004/08/09/211126.aspx
Monday, September 20, 2004
Thursday, August 05, 2004
The difference between a Statement and a PreparedStatement is that the PreparedStatement is precompiled, therefore faster.
Monday, August 02, 2004
The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 107. I would really like this to be used in a Tomcat session cache.
Thursday, July 29, 2004
Thursday, July 22, 2004
Tuesday, July 06, 2004
Up until now I am putting in practice XMLBeans, Ojb, and Castor. Let's just say I like diversity. So from the bottom up it would be described this way. We have a database schema which I need to represent in xml. So I use Ojb 1.0.0 ReverseDB tool (org.apache.ojb.tools.mapping.reversedb.Main in the db-ojb-1.0.0-tools.jar) to create a xml and all the JavaBeans that I need for Castor. This xml is very nice, it describes all the tables, columns, primary and foreign keys, relations, collections that exist in our database schema. This will help me when using Castor.
I need a mapping file for Castor so I wrote a small xslt to convert my database xml into a mapping xml. Here it is :
<?xml version="1.0" encoding="UTF-8"?>
<!-- Warning the key-generator="SEQ" has to be added manually to mapping.xml -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<mapping>
<key-generator name="SEQUENCE" alias="SEQ">
<param name="sequence" value="seq_id"/>
</key-generator>
<xsl:apply-templates/>
</mapping>
</xsl:template>
<xsl:template match="class-descriptor">
<xsl:if test="field-descriptor[@primarykey='true']">
<class>
<xsl:attribute name="identity"><xsl:for-each select="field-descriptor[@primarykey='true']"><xsl:value-of select="concat(@name, ' ')"/></xsl:for-each></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="concat('db.finaixm.', @class)"/></xsl:attribute>
<map-to>
<xsl:attribute name="table"><xsl:value-of select="@table"/></xsl:attribute>
</map-to>
<xsl:apply-templates/>
</class>
</xsl:if>
</xsl:template>
<xsl:template match="field-descriptor">
<field>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:attribute name="type"><xsl:choose><xsl:when test="@jdbc-type = 'DECIMAL'">long</xsl:when><xsl:when test="@jdbc-type = 'VARCHAR'">string</xsl:when><xsl:when test="@jdbc-type = 'TIMESTAMP'">timestamp</xsl:when></xsl:choose></xsl:attribute>
<sql>
<xsl:attribute name="name"><xsl:value-of select="@column"/></xsl:attribute>
</sql>
</field>
</xsl:template>
</xsl:stylesheet>
Here is a quick Ant task to run it,
<target name="finaixm-mapping">
<echo>Building Castor mapping file</echo>
<xslt style="xslt/oracle2mapping.xslt" in="oracle.xml" out="etc/mapping.xml" />
</target>
I also want to manipulate xml files that conform to a given xml schema. So I use XMLBeans to read the schema and create a parser and custom API for the given schema. Practical! So I've got JavaBeans on both sides, all I need to do now is apply business logic to some Velocity templates that can import xml to the database and export from the database to xml. Thanks to the Open Source community.
I need a mapping file for Castor so I wrote a small xslt to convert my database xml into a mapping xml. Here it is :
<?xml version="1.0" encoding="UTF-8"?>
<!-- Warning the key-generator="SEQ" has to be added manually to mapping.xml -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<mapping>
<key-generator name="SEQUENCE" alias="SEQ">
<param name="sequence" value="seq_id"/>
</key-generator>
<xsl:apply-templates/>
</mapping>
</xsl:template>
<xsl:template match="class-descriptor">
<xsl:if test="field-descriptor[@primarykey='true']">
<class>
<xsl:attribute name="identity"><xsl:for-each select="field-descriptor[@primarykey='true']"><xsl:value-of select="concat(@name, ' ')"/></xsl:for-each></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="concat('db.finaixm.', @class)"/></xsl:attribute>
<map-to>
<xsl:attribute name="table"><xsl:value-of select="@table"/></xsl:attribute>
</map-to>
<xsl:apply-templates/>
</class>
</xsl:if>
</xsl:template>
<xsl:template match="field-descriptor">
<field>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
<xsl:attribute name="type"><xsl:choose><xsl:when test="@jdbc-type = 'DECIMAL'">long</xsl:when><xsl:when test="@jdbc-type = 'VARCHAR'">string</xsl:when><xsl:when test="@jdbc-type = 'TIMESTAMP'">timestamp</xsl:when></xsl:choose></xsl:attribute>
<sql>
<xsl:attribute name="name"><xsl:value-of select="@column"/></xsl:attribute>
</sql>
</field>
</xsl:template>
</xsl:stylesheet>
Here is a quick Ant task to run it,
<target name="finaixm-mapping">
<echo>Building Castor mapping file</echo>
<xslt style="xslt/oracle2mapping.xslt" in="oracle.xml" out="etc/mapping.xml" />
</target>
I also want to manipulate xml files that conform to a given xml schema. So I use XMLBeans to read the schema and create a parser and custom API for the given schema. Practical! So I've got JavaBeans on both sides, all I need to do now is apply business logic to some Velocity templates that can import xml to the database and export from the database to xml. Thanks to the Open Source community.
Friday, July 02, 2004
Hierarchial database inserts can be made using Castor. The difficulty becomes creating the hierachial object.
Subscribe to:
Posts (Atom)
