dmitri 01/06/03 14:19:58
Added: jpath PROPOSAL.html STATUS.html build.bat
build.properties.sample build.xml
Log:
Initial contribution by PLOTNIX, INC
Revision Changes Path
1.1 jakarta-commons-sandbox/jpath/PROPOSAL.html
Index: PROPOSAL.html
===================================================================
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>Proposal for BeanUtils Package</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
Proposal for <i>JPath</i> Package</h1></center>
<h3>
(0) Rationale</h3>
In heterogenous techologies like Struts, XML documents are combined with
object graphs consisting of JavaBeans, collections, arrays, maps and primitive
values. In such systems there is a need for a consistent way of referencing
both parts of XML documents and elements of object graphs. XPath
is a powerful language introduced by W3C (<a href="http://www.w3.org/TR/xpath">XML
Path Language</a>) as a common format for addressing elements of XML documents.
The proposed <i>JPath </i>component provides a mechanism for applying the
same XPath language to generic object graphs.
<h3>
(1) Scope of the Package</h3>
This proposal is to create a package of Java utility methods for accessing
and modifying the elements of arbitrary graphs consisting of JavaBeans,
collections, arrays, maps and primitive values using the XPath syntax.
This package will (at least initially) depend on an external implementation
of an XPath expression processor.
<p>This package augments BeanUtils, which provides a lighter-weight reference
format.
<h3>
(1.5) Interaction With Other Packages</h3>
JPath relies on
<ul>
<li>
Java Development Kit (Version 1.2 or later)</li>
<li>
A JAXP 1.1 implementation</li>
<li>
An XPath interpreter implementation. Initially the package will only support
the interpreter provided by the Apache Xalan project, but will have an
extensibility mechanism that will allow adding alternative XPath processors
later.</li>
</ul>
No external configuration files are utilized.
<h3>
(2) Initial Source of the Package</h3>
The original source of the component was donated by PLOTNIX, Inc (<a
href="http://www.plotnix.com">www.plotnix.com</a>).
<p>The proposed package names for the new component are
<ul>
<li>
<tt>org.apache.commons.jpath</tt> for the main API package</li>
<li>
<tt>org.apache.commons.jpath.tree </tt>for a light-weight DOM-JavaBeans
API adapter</li>
<li>
<tt>org.apache.commons.jpath.xalan </tt>for a Xalan XPath interpreter adapter</li>
</ul>
<h3>
(3) Required Jakarta-Commons Resources</h3>
<ul>
<li>
CVS Repository - New directory jpath in the <tt>jakarta-commons</tt> CVS
repository. There is a requirement to setup an additional committer: Dmitri
Plotnikov.</li>
<li>
Mailing List - Discussions will take place on the general
<i>[EMAIL PROTECTED]</i>
mailing list. To help list subscribers identify messages of interest, it
is suggested that the message subject of messages about this component
be prefixed with [JPath].</li>
<li>
Bugzilla - New component "JPath" under the "Commons" product category,
with appropriate version identifiers as needed.</li>
<li>
Jyve FAQ - New category "commons-jpath" (when available).</li>
</ul>
<h3>
(4) Initial Committers</h3>
The initial committers on the JPath component shall be Dmitri Plotnikov
and James Strachan.
</body>
</html>
1.1 jakarta-commons-sandbox/jpath/STATUS.html
Index: STATUS.html
===================================================================
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>Status File for Jakarta Commons "BeanUtils" Component</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>
The Jakarta Commons <i>JPath</i> Component</h1></center>
<center>$Id: STATUS.html,v 1.1 2001/06/03 21:19:58 dmitri Exp $
<br><a href="#Introduction">[Introduction]</a><a
href="#Dependencies">[Dependencies]</a><a href="#Release Info">[Release
Info]</a><a href="#Committers">[Committers]</a><a href="#Action Items">[Action
Items]</a></center>
<p><a NAME="Introduction"></a>
<h3>
1. INTRODUCTION</h3>
The <i>JPath</i> Component contains a set of Java classes that provide
static utility methods useful in manipulating Java classes that conform
to the JavaBeans Specification naming patterns for bean properties in a
dynamic fashion using the XPath syntax.
<p>An innovative and unique feature of this component is the unification
of reference syntax between DOM and Java.
<br><a NAME="Dependencies"></a>
<h3>
2. DEPENDENCIES</h3>
The <i>JPath</i> component is dependent upon the following external components
for development and use:
<ul>
<li>
<a href="http://java.sun.com/j2se">Java Development Kit</a> (Version 1.2
or later)</li>
<li>
<a href="http://java.sun.com/xml/xml_jaxp.html">JAXP</a> (Version 1.2 or
later)</li>
<li>
<a href="http://xml.apache.org/xalan-j/index.html">Apache Xalan-J</a> (Version
2.0 or later)</li>
<li>
<a href="http://www.junit.org">JUnit Testing Framework</a> (Version 3.2
or later) - for unit tests only, not required for deployment</li>
</ul>
<a NAME="Release Info"></a>
<h3>
3. RELEASE INFO</h3>
Current Release: <b>Unreleased, CVS Repository Only</b>
<p>Planned Next Release: Version 1.0, by July 1, 2001. See the
<a href="#Action Items">Action
Items</a> list for tasks that need to be completed prior to this release.
<br><a NAME="Committers"></a>
<h3>
4. COMMITTERS</h3>
The following individuals are the primary developers and maintainers of
this component. Developers who plan to use <i>JPath</i> in their own projects
are encouraged to collaborate on the future development of this component
to ensure that it continues to meet a variety of needs.
<ul>
<li>
<a href="mailto:[EMAIL PROTECTED]">Dmitri Plotnikov</a></li>
<li>
<a href="mailto:[EMAIL PROTECTED]">James Strachan</a></li>
</ul>
<a NAME="Action Items"></a>
<h3>
5. ACTION ITEMS</h3>
The following action items need to be completed prior to a Version 1.0
release of this component:
<br>
<table BORDER >
<tr>
<th WIDTH="80%">Action Item</th>
<th WIDTH="20%">Volunteer</th>
</tr>
<tr>
<td><b>Install / Use Documentation</b>. Create simple installation and
User's Guide documentation for this component.</td>
<td ALIGN=CENTER></td>
</tr>
</table>
</body>
</html>
1.1 jakarta-commons-sandbox/jpath/build.bat
Index: build.bat
===================================================================
@echo off
rem SET THESE VARIABLES ACCORDING TO YOUR ENVIRONMENT SETTINGS
set ANT_HOME=c:\tools\ant
set COMPLILER_PATH=C:\jikes\bin\jikes.exe
set JAXP_HOME=C:\jaxp-1.1
set JAVA_HOME=C:\jdk1.3
set JAVACMD=%JAVA_HOME%\bin\java.exe
rem Slurp the command line arguments. This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=
:setupArgs
if %1a==a goto doneArgs
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneArgs
set LOCALCLASSPATH="%CLASSPATH%"
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\tools.jar"
if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\classes.zip"
call "%ANT_HOME%\bin\lcp.bat" "%JAXP_HOME%\jaxp.jar"
call "%ANT_HOME%\bin\lcp.bat" "%JAXP_HOME%\xalan.jar"
if not "%JIKESPATH%" == "" goto runAntWithJikes
:runAnt
%JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS%
org.apache.tools.ant.Main %BUILD_OPTIONS% %ANT_CMD_LINE_ARGS%
goto end
:runAntWithJikes
%JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%"
-Djikes.class.path=%JIKESPATH% %ANT_OPTS% %BUILD_OPTIONS% org.apache.tools.ant.Main
%ANT_CMD_LINE_ARGS%
:end
set LOCALCLASSPATH=
set ANT_CMD_LINE_ARGS=
1.1 jakarta-commons-sandbox/jpath/build.properties.sample
Index: build.properties.sample
===================================================================
# -------------------------------------------------------------------
# build.properties.sample
#
# This is an example "build.properties" file, used to customize
# building various Commons components for your local environment.
# Make any changes you need, and rename this file to
# "build.properties"
#
# $Id: build.properties.sample,v 1.1 2001/06/03 21:19:58 dmitri Exp $
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# EXTERNAL DEPENDENCIES
# -------------------------------------------------------------------
junit.home=c:/junit3.6
jaxp.home=c:/jaxp-1.1
1.1 jakarta-commons-sandbox/jpath/build.xml
Index: build.xml
===================================================================
<project name="JPath" default="compile" basedir=".">
<!--
"JPath" component of the Jakarta Commons Subproject
$Id: build.xml,v 1.1 2001/06/03 21:19:58 dmitri Exp $
-->
<!-- ========== Initialize Properties ===================================== -->
<property file="build.properties"/> <!-- Component local -->
<property file="../build.properties"/> <!-- Commons local -->
<property file="${user.home}/build.properties"/> <!-- User local -->
<!-- ========== External Dependencies ===================================== -->
<!-- The directory containing your binary distribution of JUnit,
version 3.2 or later -->
<property name="junit.home" value="/usr/local/junit3.5"/>
<property name="jaxp.home" value="/usr/local/jaxp1.1"/>
<!-- ========== Derived Values ============================================ -->
<!-- The pathname of the "junit.jar" JAR file -->
<property name="junit.jar" value="${junit.home}/junit.jar"/>
<property name="jaxp.jaxp.jar" value="${jaxp.home}/jaxp.jar"/>
<property name="jaxp.xslt.jar" value="${jaxp.home}/xalan.jar"/>
<!-- ========== Component Declarations ==================================== -->
<!-- The name of this component -->
<property name="component.name" value="jpath"/>
<!-- The title of this component -->
<property name="component.title" value="XPath traversal of JavaBeans"/>
<!-- The current version number of this component -->
<property name="component.version" value="0.1-dev"/>
<!-- The base directory for compilation targets -->
<property name="build.home" value="target"/>
<!-- The base directory for component configuration files -->
<property name="conf.home" value="src/conf"/>
<!-- The base directory for distribution targets -->
<property name="dist.home" value="dist"/>
<!-- The base directory for component sources -->
<property name="source.home" value="src/java"/>
<!-- The base directory for unit test sources -->
<property name="test.home" value="src/test"/>
<!-- ========== Compiler Defaults ========================================= -->
<!-- Should Java compilations set the 'debug' compiler option? -->
<property name="compile.debug" value="true"/>
<!-- Should Java compilations set the 'deprecation' compiler option? -->
<property name="compile.deprecation" value="true"/>
<!-- Should Java compilations set the 'optimize' compiler option? -->
<property name="compile.optimize" value="true"/>
<!-- Construct compile classpath -->
<path id="compile.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${jaxp.jaxp.jar}"/>
<pathelement location="${jaxp.xslt.jar}"/>
</path>
<!-- ========== Test Execution Defaults =================================== -->
<!-- Construct unit test classpath -->
<path id="test.classpath">
<pathelement location="${build.home}/classes"/>
<pathelement location="${build.home}/tests"/>
<pathelement location="${jaxp.jaxp.jar}"/>
<pathelement location="${jaxp.xslt.jar}"/>
<pathelement location="${junit.jar}"/>
</path>
<!-- Should all tests fail if one does? -->
<property name="test.failonerror" value="true"/>
<!-- The test runner to execute -->
<property name="test.runner" value="junit.textui.TestRunner"/>
<!-- ========== Executable Targets ======================================== -->
<target name="init"
description="Initialize and evaluate conditionals">
<echo message="-------- ${component.name} ${component.version} --------"/>
<filter token="name" value="${component.name}"/>
<filter token="version" value="${component.version}"/>
</target>
<target name="prepare" depends="init"
description="Prepare build directory">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
<mkdir dir="${build.home}/tests"/>
</target>
<target name="static" depends="prepare"
description="Copy static files to build directory">
<tstamp/>
<copy todir="${build.home}/conf" filtering="on">
<fileset dir="${conf.home}" includes="*.MF"/>
</copy>
</target>
<target name="compile" depends="static"
description="Compile shareable components">
<javac srcdir="${source.home}"
destdir="${build.home}/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${build.home}/classes" filtering="on">
<fileset dir="${source.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="compile.tests" depends="compile"
description="Compile unit test cases">
<javac srcdir="${test.home}"
destdir="${build.home}/tests"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="test.classpath"/>
</javac>
<copy todir="${build.home}/tests" filtering="on">
<fileset dir="${test.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="clean"
description="Clean build and distribution directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="all" depends="clean,compile"
description="Clean and compile all components"/>
<target name="javadoc" depends="compile"
description="Create component Javadoc documentation">
<mkdir dir="${dist.home}"/>
<mkdir dir="${dist.home}/docs"/>
<mkdir dir="${dist.home}/docs/api"/>
<javadoc sourcepath="${source.home}"
destdir="${dist.home}/docs/api"
packagenames="org.apache.commons.*"
author="true"
private="false"
version="true"
doctitle="<h1>${component.title}</h1>"
windowtitle="${component.title} (Version ${component.version})"
bottom="Copyright (c) 2001 - Apache Software Foundation"/>
</target>
<target name="dist" depends="compile,javadoc"
description="Create binary distribution">
<mkdir dir="${dist.home}"/>
<copy file="../LICENSE"
todir="${dist.home}"/>
<jar jarfile="${dist.home}/commons-${component.name}.jar"
basedir="${build.home}/classes"
manifest="${build.home}/conf/MANIFEST.MF"/>
</target>
<!-- ========== Unit Test Targets ========================================= -->
<target name="test" depends="compile.tests,
test.jpath"
description="Run all unit test cases">
</target>
<target name="test.jpath">
<echo message="Running JPath tests ..."/>
<java classname="${test.runner}" fork="yes"
failonerror="${test.failonerror}">
<arg value="org.apache.commons.jpath.JPathTestCase"/>
<classpath refid="test.classpath"/>
</java>
</target>
</project>