mirror of https://github.com/apache/lucene.git
Initial revision
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
740ff44d60
commit
af3d523dbe
|
@ -0,0 +1,2 @@
|
|||
set CLASSPATH=%CLASSPATH%;%1
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
@echo off
|
||||
|
||||
set OLD_ANT_HOME=%ANT_HOME%
|
||||
set ANT_HOME=tools\antipede
|
||||
|
||||
set OLD_CLASSPATH=%CLASSPATH%
|
||||
set CLASSPATH=
|
||||
for %%i in (.\lib\endorsed\*.jar) do call appendcp.bat %%i
|
||||
|
||||
echo Using classpath: "%CLASSPATH%"
|
||||
call %ANT_HOME%\bin\ant -emacs -logger org.apache.tools.ant.NoBannerLogger %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
||||
set ANT_HOME=%OLD_ANT_HOME%
|
||||
set CLASSPATH=%OLD_CLASSPATH%
|
|
@ -0,0 +1,3 @@
|
|||
#Build Number for ANT. Do not edit!
|
||||
#Sat May 04 11:31:57 EDT 2002
|
||||
build.number=82
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
# ----- Verify and Set Required Environment Variables -------------------------
|
||||
|
||||
if [ "$JAVA_HOME" = "" ] ; then
|
||||
echo You must set JAVA_HOME to point at your Java Development Kit installation
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod u+x ./tools/antipede/bin/antRun
|
||||
chmod u+x ./tools/antipede/bin/ant
|
||||
|
||||
# ----- Verify and Set Required Environment Variables -------------------------
|
||||
|
||||
if [ "$TERM" = "cygwin" ] ; then
|
||||
S=';'
|
||||
else
|
||||
S=':'
|
||||
fi
|
||||
|
||||
# ----- Set Up The Runtime Classpath ------------------------------------------
|
||||
|
||||
OLD_ANT_HOME=$ANT_HOME
|
||||
unset ANT_HOME
|
||||
|
||||
CP=$CLASSPATH
|
||||
export CP
|
||||
unset CLASSPATH
|
||||
|
||||
CLASSPATH="`echo ./lib/endorsed/*.jar | tr ' ' $S`"
|
||||
export CLASSPATH
|
||||
|
||||
echo Using classpath: \"$CLASSPATH\"
|
||||
$PWD/./tools/antipede/bin/ant -emacs -logger org.apache.tools.ant.NoBannerLogger $@
|
||||
|
||||
unset CLASSPATH
|
||||
|
||||
CLASSPATH=$CP
|
||||
export CLASSPATH
|
||||
ANT_HOME=OLD_ANT_HOME
|
||||
export ANT_HOME
|
|
@ -0,0 +1,438 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="./tools/antipede/resources/stylesheets/build.xsl"?>
|
||||
|
||||
<!--<!DOCTYPE project SYSTEM "./tools/antipede/build.dtd" >-->
|
||||
<!DOCTYPE project [
|
||||
<!-- antipede -->
|
||||
<!ENTITY import-antipede SYSTEM "./tools/antipede/build.xtarget">
|
||||
|
||||
]>
|
||||
<project default="interactive" basedir="." name="project build file">
|
||||
|
||||
<description>
|
||||
* ===================================== *
|
||||
| Krysalis Centipede Build System |
|
||||
* ===================================== *
|
||||
by
|
||||
|
||||
Nicola Ken Barozzi (nicolaken@apache.org)
|
||||
Marc Johnson (mjohnson@apache.org)
|
||||
|
||||
|
||||
For a simple interactive build, simply
|
||||
run the build script (build.bar or build.sh)
|
||||
</description>
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Basic build targets for the project -->
|
||||
<!-- =================================================================== -->
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Interactive build -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="interactive" description="Interactive Build" depends="-init">
|
||||
<echo>
|
||||
--------------------------------------------------------------
|
||||
|
||||
${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} [${YEAR}]
|
||||
|
||||
--------------------------------------------------------------
|
||||
Using ${ant.version}
|
||||
Build file ${ant.file}
|
||||
--------------------------------------------------------------
|
||||
These are the most common build targets.
|
||||
You can also invoke them directly; see build.xml for more info.
|
||||
Builds will be in /build directory, distributions in /dist.
|
||||
|
||||
all -------------- creates the jars and the site
|
||||
compile ---------- compiles the source code
|
||||
test ------------- performs the jUnit tests
|
||||
jar -------------- create the jar files
|
||||
docs ------------- generates the html docs - clean not needed
|
||||
javadocs --------- generates the API documentation
|
||||
site ------------- generates the html site (docs+reports)
|
||||
clean ------------ cleans the build directory
|
||||
dist ------------- creates src and bin distributions
|
||||
scratchpad ------- build-run scratchpad code
|
||||
contrib ---------- build-run contributed code
|
||||
|
||||
|
||||
</echo>
|
||||
<property name="input.selection" value="all"/>
|
||||
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="centipede"/>
|
||||
<param name="cent-target" value="splash"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="${input.selection}"/>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Interactive scratchpad builds -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="scratchpad" depends="compile" description="Interactive Scratchpad Build">
|
||||
<echo>
|
||||
--------------------------------------------------------------
|
||||
|
||||
${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} SCRATCHPAD
|
||||
|
||||
--------------------------------------------------------------
|
||||
Building with ${ant.version}
|
||||
using build file ${ant.file}
|
||||
--------------------------------------------------------------
|
||||
|
||||
These are SCRATCHPAD BUILDS. They are not guaranteed to work.
|
||||
You have been warned.
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
</echo>
|
||||
<property name="input.selection" value=""/>
|
||||
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
||||
|
||||
<ant antfile="${xlayout.source.scratchpad.targets.dir}/${input.selection}/xbuild.xml"/>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Interactive contrib builds -->
|
||||
<!-- =================================================================== -->
|
||||
<target name="contrib" depends="compile" description="Interactive Contributors' Build">
|
||||
<echo>
|
||||
--------------------------------------------------------------
|
||||
|
||||
${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} CONTRIB
|
||||
|
||||
--------------------------------------------------------------
|
||||
Building with ${ant.version}
|
||||
using build file ${ant.file}
|
||||
--------------------------------------------------------------
|
||||
|
||||
These are CONTRIB BUILDS. They are not guaranteed to work.
|
||||
You have been warned.
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
</echo>
|
||||
|
||||
<property name="input.selection" value="poibrowser"/>
|
||||
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
||||
|
||||
<ant antfile="${xlayout.source.contributions.targets.dir}/${input.selection}/xbuild.xml"/>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Edit properties -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="edit-status" depends="-init"
|
||||
description="Edit xml property files with a gui editor">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="pollo"/>
|
||||
<param name="cent-target" value="run"/>
|
||||
<param name="file" value="status.xml"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Compile -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="compile" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="compile"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Build jars -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="jar" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="jar"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ====================================== -->
|
||||
<!-- dist target wo single build checks -->
|
||||
<!-- ====================================== -->
|
||||
<target name="dist" depends="-init"
|
||||
description="Build distribution packages wo single build checks">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="dist"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Clean build dir -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="clean" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="clean"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Run Junit tests -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="test" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="test"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Generate project metrics -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="metrics" depends="-init"
|
||||
description="Generate project metrics">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="metrics"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Generates the documentation -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="docs" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="docs"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================================ -->
|
||||
<!-- Generates the documentation with maven too -->
|
||||
<!-- ================================================ -->
|
||||
|
||||
<!-- alpha - testing Maven integration -->
|
||||
|
||||
<target name="mavendocs" depends="-init"
|
||||
description="Generates the documentation to the maven lf">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="maven"/>
|
||||
<param name="cent-target" value="cross-ref"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="centipede"/>
|
||||
<param name="cent-target" value="descriptor-docs"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="umldoclet"/>
|
||||
<param name="cent-target" value="javadocs"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="junit"/>
|
||||
<param name="cent-target" value="failsafe-test"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="junit"/>
|
||||
<param name="cent-target" value="report"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="jdepend"/>
|
||||
<param name="cent-target" value="jdepend-html"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="checkstyle"/>
|
||||
<param name="cent-target" value="check"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="umldoclet"/>
|
||||
<param name="cent-target" value="javadocs"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="umldoclet"/>
|
||||
<param name="cent-target" value="doclet"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="javasrc"/>
|
||||
<param name="cent-target" value="javasrc"/>
|
||||
</antcall>
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="maven"/>
|
||||
<param name="cent-target" value="docs"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Generates the site -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="site"
|
||||
description="Makes all the site doco"
|
||||
depends="-init">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="site"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Generates the java docs -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="javadocs" depends="-init"
|
||||
description="Compile java source code">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="automagic"/>
|
||||
<param name="cent-target" value="javadocs"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Test the main module stuff -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="testmodule"
|
||||
depends="clean, docs, compile, test, jar, metrics, javadocs"
|
||||
description="Testing that all major targets work; useful before a commit"/>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Test the main module stuff 2 -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="testtargets"
|
||||
description="Testing that all major targets work indipendently; useful before a commit">
|
||||
|
||||
<antcall target="clean"/>
|
||||
<antcall target="compile"/>
|
||||
<antcall target="clean"/>
|
||||
<antcall target="test"/>
|
||||
<antcall target="clean"/>
|
||||
<antcall target="jar"/>
|
||||
<antcall target="clean"/>
|
||||
<antcall target="docs"/>
|
||||
<antcall target="clean"/>
|
||||
<antcall target="metrics"/>
|
||||
<antcall target="clean"/>
|
||||
<antcall target="javadocs"/>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Test 4 distribution -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="testall" depends="-init"
|
||||
description="Make big full test">
|
||||
|
||||
<antcall target="gump"/>
|
||||
<antcall target="dist"/>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Target used by Gump -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="gump"
|
||||
depends="testmodule"
|
||||
description="Target used by Gump">
|
||||
|
||||
<antcall target="testtargets"/>
|
||||
<antcall target="testmodule"/>
|
||||
<antcall target="all"/>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ================================== -->
|
||||
<!-- Generate all -->
|
||||
<!-- ================================== -->
|
||||
|
||||
<target name="all"
|
||||
depends="-init, jar, site"
|
||||
description="Generate all"/>
|
||||
|
||||
<!-- =================================================================== -->
|
||||
<!-- Import Ant-Centipede -init targets - sets up basic build stuff -->
|
||||
<!-- =================================================================== -->
|
||||
<!--
|
||||
This is the target that initializes tasks and properties used
|
||||
commonly in every other target.
|
||||
|
||||
Remember to add depends="-init" to every target, so that this
|
||||
target is called before any other.
|
||||
|
||||
This target is internal; to make it unusable from the commandline,
|
||||
its name starts with a hyphen. To make it invisible when
|
||||
using -projecthelp, it lacks a description.
|
||||
-->
|
||||
|
||||
&import-antipede;
|
||||
|
||||
</project>
|
|
@ -0,0 +1,119 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Apache Lucene Application Extensions</title>
|
||||
<style type="text/css">
|
||||
|
||||
body { color: #000000;
|
||||
background-color: #ffffff; }
|
||||
|
||||
a:active { color: #ff0000; }
|
||||
a:visited { color: #551a8b; }
|
||||
a:link { color: #0000bb; }
|
||||
a.title { font-weight: bold; font-size: 110%; }
|
||||
|
||||
h1, h2, h3, h4, h5, h6 { font-family: avantgarde, sans-serif;
|
||||
font-weight: bold }
|
||||
h1 { font-size: 180% }
|
||||
h2 { font-size: 150% }
|
||||
h3, h4 { font-size: 120% }
|
||||
|
||||
ul { margin-left: 1em; padding: 0pt; border: 0pt; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table align="center" height="40" width="100%" cellpadding="0" cellspacing="2">
|
||||
<tr>
|
||||
<td><img src="src/documentation/images/group-logo.gif"/></td>
|
||||
<td align="center" width="100%"></td>
|
||||
<td><img src="src/documentation/images/project-logo.gif"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr hr="hr"/>
|
||||
<div align="center" class="titlepage">
|
||||
<h1>Lucene Application Extensions</h1>
|
||||
|
||||
<p>
|
||||
<strong>Version 1.0-dev</strong>
|
||||
<br br="br"/>
|
||||
<strong><script language="JavaScript">
|
||||
|
||||
<!-- Begin
|
||||
var m = document.lastModified;
|
||||
var p = m.length-8;
|
||||
document.write(m.substring(p, 0));
|
||||
// End -->
|
||||
|
||||
</script></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<table align="center">
|
||||
<tbody>
|
||||
<tr><td>
|
||||
<ul>
|
||||
<li> <a href="status.xml" class="title">status.xml</a>
|
||||
<br br="br"/>(status of the project and community)</li>
|
||||
|
||||
<li> <a href="module.xml" class="title">module.xml</a>
|
||||
<br br="br"/>(extended Gump descriptor of the software module)</li>
|
||||
|
||||
<li> <a href="build.xml" class="title">build.xml</a>
|
||||
<br br="br"/>(main build file)</li>
|
||||
|
||||
<li> <a href="layout.xml" class="title">layout.xml</a>
|
||||
<br br="br"/>(layout of the project directories)</li>
|
||||
|
||||
<li> <a href="properties.xml" class="title">properties.xml</a>
|
||||
<br br="br"/>(properties used for building the project)</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li> <a href="build/docs/index.html" class="title">Documentation</a>
|
||||
<br br="br"/>(run "build docs" first)</li>
|
||||
|
||||
<li> <a href="build/docs/javadocs/index.html" class="title">Javadocs</a>
|
||||
<br br="br"/>(run "build javadocs" first)</li>
|
||||
|
||||
<li> <a href="build/docs/tests/junit/index.html" class="title">Unit test results</a>
|
||||
<br br="br"/>(run "build test" first)</li>
|
||||
|
||||
<li> <a href="build/docs/metrics/jdepend/index.html" class="title">Code metrics</a>
|
||||
<br br="br"/>(run "build metrics" first)</li>
|
||||
|
||||
<li> <a href="build.number" class="title">Local build number</a>
|
||||
<br br="br"/>(how many builds have been done locally)</li>
|
||||
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<br/>
|
||||
<ul>
|
||||
<li> <a href="http://jakarta.apache.org/lucene" class="title"
|
||||
>Project Site</a>
|
||||
<br br="br"/>(online)</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<br/>
|
||||
<ul>
|
||||
<li> <a href="http://www.krysalis.org/centipede/" class="title"
|
||||
>Krysalis Centipede build system site</a>
|
||||
<br br="br"/>(online)</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
||||
<address>
|
||||
<hr hr="hr"/>
|
||||
Copyright ©2002 Apache Software Foundation. All Rights Reserved.
|
||||
</address>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="tools/antipede/resources/stylesheets/layout.xsl"?>
|
||||
<layout dir=".">
|
||||
<legal dir="./legal"/>
|
||||
<library dir="./lib">
|
||||
<endorsed dir="./lib/endorsed"/>
|
||||
<core dir="./lib/core"/>
|
||||
<optional dir="./lib/optional"/>
|
||||
</library>
|
||||
<source dir="./src">
|
||||
<targets dir="./src/targets"/>
|
||||
<java dir="./src/java"/>
|
||||
<test dir="./src/testcases"/>
|
||||
<documentation dir="./src/documentation">
|
||||
<content dir="./src/documentation/xdocs">
|
||||
<xdocs dir="./src/documentation/xdocs"/>
|
||||
</content>
|
||||
<resources dir="./src/documentation/images">
|
||||
<images dir="./src/documentation/images"/>
|
||||
</resources>
|
||||
</documentation>
|
||||
<scratchpad dir="./src/scratchpad">
|
||||
<targets dir="./src/scratchpad/targets"/>
|
||||
<java dir="./src/scratchpad/src"/>
|
||||
<library dir="./src/scratchpad/lib"/>
|
||||
</scratchpad>
|
||||
<contributions dir="./src/contrib">
|
||||
<targets dir="./src/contrib/targets"/>
|
||||
<java dir="./src/contrib/src"/>
|
||||
<library dir="./src/contrib/lib"/>
|
||||
</contributions>
|
||||
<examples dir="./src/examples">
|
||||
<targets dir="./src/examples/targets"/>
|
||||
<java dir="./src/examples/src"/>
|
||||
<library dir="./src/examples/lib"/>
|
||||
</examples>
|
||||
</source>
|
||||
<build dir="./build">
|
||||
<java dir="./build/java"/>
|
||||
<classes dir="./build/classes"/>
|
||||
<test dir="./build/testcases"/>
|
||||
<work dir="./build/work"/>
|
||||
<documentation dir="./build/docs">
|
||||
<javadocs dir="./build/docs/javadocs"/>
|
||||
<test dir="./build/docs/tests"/>
|
||||
<metrics dir="./build/docs/metrics"/>
|
||||
</documentation>
|
||||
<scratchpad dir="./build/scratchpad">
|
||||
<java dir="./build/scratchpad/java"/>
|
||||
<classes dir="./build/scratchpad/classes"/>
|
||||
<library dir="./build/scratchpad/lib"/>
|
||||
</scratchpad>
|
||||
<contributions dir="./build/contrib">
|
||||
<java dir="./build/contrib/java"/>
|
||||
<classes dir="./build/contrib/classes"/>
|
||||
<library dir="./build/contrib/lib"/>
|
||||
</contributions>
|
||||
<examples dir="./build/examples">
|
||||
<java dir="./build/examples/java"/>
|
||||
<classes dir="./build/examples/classes"/>
|
||||
<library dir="./build/examples/lib"/>
|
||||
</examples>
|
||||
</build>
|
||||
<distributions dir="./dist">
|
||||
<source dir="./dist/src"/>
|
||||
<bin dir="./dist/bin">
|
||||
<library dir="./dist/bin/lib">
|
||||
<core dir="./dist/bin/lib"/>
|
||||
<optional dir="./dist/bin/lib/optional"/>
|
||||
</library>
|
||||
<documentation dir="./dist/bin/build/docs"/>
|
||||
<info dir="./dist/bin"/>
|
||||
<build dir="./dist/bin/build"/>
|
||||
<legal dir="./dist/bin/legal"/>
|
||||
</bin>
|
||||
</distributions>
|
||||
</layout>
|
|
@ -0,0 +1,53 @@
|
|||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache POI" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache POI", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* ============================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
* ============================================================================
|
||||
*
|
||||
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, 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 Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself, if
|
||||
* and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Ant" and "Apache Software Foundation" must not be used to
|
||||
* endorse or promote products derived from this software without prior
|
||||
* written permission. For written permission, please contact
|
||||
* apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache", nor may
|
||||
* "Apache" appear in their name, without prior written permission of the
|
||||
* Apache Software Foundation.
|
||||
*
|
||||
* 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 (INCLU-
|
||||
* DING, 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 Apache Software Foundation. For more information on the
|
||||
* Apache Software Foundation, please see <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
SOFTWARE RIGHTS
|
||||
$Id$
|
||||
|
||||
ANTLR 1989-2000 Developed by jGuru.com (MageLang Institute),
|
||||
http://www.ANTLR.org and http://www.jGuru.com
|
||||
|
||||
We reserve no legal rights to the ANTLR--it is fully in the
|
||||
public domain. An individual or company may do whatever
|
||||
they wish with source code distributed with ANTLR or the
|
||||
code generated by ANTLR, including the incorporation of
|
||||
ANTLR, or its output, into commerical software.
|
||||
|
||||
We encourage users to develop software with ANTLR. However,
|
||||
we do ask that credit is given to us for developing
|
||||
ANTLR. By "credit", we mean that if you use ANTLR or
|
||||
incorporate any source code into one of your programs
|
||||
(commercial product, research project, or otherwise) that
|
||||
you acknowledge this fact somewhere in the documentation,
|
||||
research report, etc... If you like ANTLR and have
|
||||
developed a nice tool with the output, please mention that
|
||||
you developed it using ANTLR. In addition, we ask that the
|
||||
headers remain intact in our source code. As long as these
|
||||
guidelines are kept, we expect to continue enhancing this
|
||||
system and expect to make other tools available as they are
|
||||
completed.
|
||||
|
||||
The primary ANTLR guy:
|
||||
|
||||
Terence Parr
|
||||
http://www.jGuru.com
|
||||
parrt@jguru.com
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
|
||||
============================================================================
|
||||
The Apache Software License, Version 1.1
|
||||
============================================================================
|
||||
|
||||
Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modifica-
|
||||
tion, 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 Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
|
||||
used to endorse or promote products derived from this software without
|
||||
prior written permission. For written permission, please contact
|
||||
apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the
|
||||
Apache Software Foundation.
|
||||
|
||||
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 (INCLU-
|
||||
DING, 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 Apache Software Foundation and was originally created by
|
||||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
|
||||
Software Foundation, please see <http://www.apache.org/>.
|
||||
|
||||
*/
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
|
||||
============================================================================
|
||||
The Apache Software License, Version 1.1
|
||||
============================================================================
|
||||
|
||||
Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modifica-
|
||||
tion, 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 Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Jakarta", "Apache Avalon", "Avalon Excalibur", "Avalon
|
||||
Framework" and "Apache Software Foundation" must not be used to endorse
|
||||
or promote products derived from this software without prior written
|
||||
permission. For written permission, please contact apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the
|
||||
Apache Software Foundation.
|
||||
|
||||
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 (INCLU-
|
||||
DING, 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 Apache Software Foundation and was originally created by
|
||||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
|
||||
Software Foundation, please see <http://www.apache.org/>.
|
||||
|
||||
*/
|
|
@ -0,0 +1,45 @@
|
|||
============================================================================
|
||||
The Apache Software License, Version 1.1
|
||||
============================================================================
|
||||
|
||||
Copyright (C) 2000 The Apache Software Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modifica-
|
||||
tion, 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 Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Batik" and "Apache Software Foundation" must not be used to
|
||||
endorse or promote products derived from this software without prior
|
||||
written permission. For written permission, please contact
|
||||
apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the
|
||||
Apache Software Foundation.
|
||||
|
||||
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 (INCLU-
|
||||
DING, 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 Apache Software Foundation. For more information on the
|
||||
Apache Software Foundation, please see <http://www.apache.org/>.
|
|
@ -0,0 +1,504 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* $Header$
|
||||
* $Revision$
|
||||
* $Date$
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2001 The Apache Software Foundation. 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 acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
The "Artistic License"
|
||||
Preamble
|
||||
The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications.
|
||||
|
||||
Definitions
|
||||
"Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification.
|
||||
|
||||
"Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below.
|
||||
|
||||
"Copyright Holder" is whoever is named in the copyright or copyrights for the package.
|
||||
|
||||
"You" is you, if you're thinking about copying or distributing this Package.
|
||||
|
||||
"Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.)
|
||||
|
||||
"Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it.
|
||||
|
||||
|
||||
You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers.
|
||||
|
||||
|
||||
You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version.
|
||||
|
||||
|
||||
You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following:
|
||||
|
||||
|
||||
place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package.
|
||||
use the modified Package only within your corporation or organization.
|
||||
rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version.
|
||||
make other distribution arrangements with the Copyright Holder.
|
||||
|
||||
|
||||
You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following:
|
||||
|
||||
|
||||
distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version.
|
||||
accompany the distribution with the machine-readable source of the Package with your modifications.
|
||||
give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version.
|
||||
make other distribution arrangements with the Copyright Holder.
|
||||
|
||||
|
||||
You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded.
|
||||
|
||||
|
||||
The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package.
|
||||
|
||||
|
||||
C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language.
|
||||
|
||||
|
||||
Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package.
|
||||
|
||||
|
||||
The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
|
||||
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
The End
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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 acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Velocity" nor may "Apache" appear in their names without prior
|
||||
* written permission of the Apache 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999 The Apache Software Foundation. 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 acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
|
@ -0,0 +1,33 @@
|
|||
Copyright (C) 2001 Clarkware Consulting, Inc.
|
||||
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. Neither the name of Clarkware Consulting, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without prior written permission. For written
|
||||
permission, please contact clarkware@clarkware.com.
|
||||
|
||||
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
|
||||
CLARKWARE CONSULTING 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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
Java HTML Tidy - JTidy
|
||||
HTML parser and pretty printer
|
||||
|
||||
Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts
|
||||
Institute of Technology, Institut National de Recherche en
|
||||
Informatique et en Automatique, Keio University). All Rights
|
||||
Reserved.
|
||||
|
||||
Contributing Author(s):
|
||||
|
||||
Dave Raggett <dsr@w3.org>
|
||||
Andy Quick <ac.quick@sympatico.ca> (translation to Java)
|
||||
Gary L Peskin <garyp@firstech.com> (Java development)
|
||||
Sami Lempinen <sami@lempinen.net> (release management)
|
||||
|
||||
The contributing author(s) would like to thank all those who
|
||||
helped with testing, bug fixes, and patience. This wouldn't
|
||||
have been possible without all of you.
|
||||
|
||||
COPYRIGHT NOTICE:
|
||||
|
||||
This software and documentation is provided "as is," and
|
||||
the copyright holders and contributing author(s) make no
|
||||
representations or warranties, express or implied, including
|
||||
but not limited to, warranties of merchantability or fitness
|
||||
for any particular purpose or that the use of the software or
|
||||
documentation will not infringe any third party patents,
|
||||
copyrights, trademarks or other rights.
|
||||
|
||||
The copyright holders and contributing author(s) will not be
|
||||
liable for any direct, indirect, special or consequential damages
|
||||
arising out of any use of the software or documentation, even if
|
||||
advised of the possibility of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute
|
||||
this source code, or portions hereof, documentation and executables,
|
||||
for any purpose, without fee, subject to the following restrictions:
|
||||
|
||||
1. The origin of this source code must not be misrepresented.
|
||||
2. Altered versions must be plainly marked as such and must
|
||||
not be misrepresented as being the original source.
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
The copyright holders and contributing author(s) specifically
|
||||
permit, without fee, and encourage the use of this source code
|
||||
as a component for supporting the Hypertext Markup Language in
|
||||
commercial products. If you use this source code in a product,
|
||||
acknowledgment is not required but would be appreciated.
|
|
@ -0,0 +1,185 @@
|
|||
|
||||
IBM Public License Version 1.0
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM PUBLIC
|
||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE
|
||||
PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
a) in the case of International Business Machines Corporation ("IBM"),
|
||||
the Original Program, and
|
||||
b) in the case of each Contributor,
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
where such changes and/or additions to the Program originate from and
|
||||
are distributed by that particular Contributor. A Contribution
|
||||
'originates' from a Contributor if it was added to the Program by such
|
||||
Contributor itself or anyone acting on such Contributor's behalf.
|
||||
Contributions do not include additions to the Program which: (i) are
|
||||
separate modules of software distributed in conjunction with the Program
|
||||
under their own license agreement, and (ii) are not derivative works of
|
||||
the Program.
|
||||
"Contributor" means IBM and any other entity that distributes the Program.
|
||||
|
||||
"Licensed Patents " mean patent claims licensable by a Contributor which
|
||||
are necessarily infringed by the use or sale of its Contribution alone or
|
||||
when combined with the Program.
|
||||
"Original Program" means the original version of the software accompanying
|
||||
this Agreement as released by IBM, including source code, object code and
|
||||
documentation, if any.
|
||||
"Program" means the Original Program and Contributions.
|
||||
"Recipient" means anyone who receives the Program under this Agreement,
|
||||
including all Contributors.
|
||||
2. GRANT OF RIGHTS
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
||||
license to reproduce, prepare derivative works of, publicly display,
|
||||
publicly perform, distribute and sublicense the Contribution of such
|
||||
Contributor, if any, and such derivative works, in source code and
|
||||
object code form.
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free patent license
|
||||
under Licensed Patents to make, use, sell, offer to sell, import and
|
||||
otherwise transfer the Contribution of such Contributor, if any, in
|
||||
source code and object code form. This patent license shall apply to the
|
||||
combination of the Contribution and the Program if, at the time the
|
||||
Contribution is added by the Contributor, such addition of the
|
||||
Contribution causes such combination to be covered by the Licensed
|
||||
Patents. The patent license shall not apply to any other combinations
|
||||
which include the Contribution. No hardware per se is licensed
|
||||
hereunder.
|
||||
c) Recipient understands that although each Contributor grants the
|
||||
licenses to its Contributions set forth herein, no assurances are
|
||||
provided by any Contributor that the Program does not infringe the
|
||||
patent or other intellectual property rights of any other entity. Each
|
||||
Contributor disclaims any liability to Recipient for claims brought by
|
||||
any other entity based on infringement of intellectual property rights
|
||||
or otherwise. As a condition to exercising the rights and licenses
|
||||
granted hereunder, each Recipient hereby assumes sole responsibility to
|
||||
secure any other intellectual property rights needed, if any. For
|
||||
example, if a third party patent license is required to allow Recipient
|
||||
to distribute the Program, it is Recipient's responsibility to acquire
|
||||
that license before distributing the Program.
|
||||
d) Each Contributor represents that to its knowledge it has sufficient
|
||||
copyright rights in its Contribution, if any, to grant the copyright
|
||||
license set forth in this Agreement.
|
||||
3. REQUIREMENTS
|
||||
A Contributor may choose to distribute the Program in object code form
|
||||
under its own license agreement, provided that:
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
i) effectively disclaims on behalf of all Contributors all warranties
|
||||
and conditions, express and implied, including warranties or conditions
|
||||
of title and non-infringement, and implied warranties or conditions of
|
||||
merchantability and fitness for a particular purpose;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for
|
||||
damages, including direct, indirect, special, incidental and
|
||||
consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are
|
||||
offered by that Contributor alone and not by any other party; and
|
||||
iv) states that source code for the Program is available from such
|
||||
Contributor, and informs licensees how to obtain it in a reasonable
|
||||
manner on or through a medium customarily used for software exchange.
|
||||
When the Program is made available in source code form:
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the
|
||||
Program.
|
||||
Each Contributor must include the following in a conspicuous location in
|
||||
the Program:
|
||||
Copyright © {date here}, International Business Machines Corporation and
|
||||
others. All Rights Reserved.
|
||||
In addition, each Contributor must identify itself as the originator of
|
||||
its Contribution, if any, in a manner that reasonably allows subsequent
|
||||
Recipients to identify the originator of the Contribution.
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
Commercial distributors of software may accept certain responsibilities
|
||||
with respect to end users, business partners and the like. While this
|
||||
license is intended to facilitate the commercial use of the Program, the
|
||||
Contributor who includes the Program in a commercial product offering
|
||||
should do so in a manner which does not create potential liability for
|
||||
other Contributors. Therefore, if a Contributor includes the Program in a
|
||||
commercial product offering, such Contributor ("Commercial Contributor")
|
||||
hereby agrees to defend and indemnify every other Contributor
|
||||
("Indemnified Contributor") against any losses, damages and costs
|
||||
(collectively "Losses") arising from claims, lawsuits and other legal
|
||||
actions brought by a third party against the Indemnified Contributor to
|
||||
the extent caused by the acts or omissions of such Commercial Contributor
|
||||
in connection with its distribution of the Program in a commercial product
|
||||
offering. The obligations in this section do not apply to any claims or
|
||||
Losses relating to any actual or alleged intellectual property
|
||||
infringement. In order to qualify, an Indemnified Contributor must: a)
|
||||
promptly notify the Commercial Contributor in writing of such claim, and
|
||||
b) allow the Commercial Contributor to control, and cooperate with the
|
||||
Commercial Contributor in, the defense and any related settlement
|
||||
negotiations. The Indemnified Contributor may participate in any such
|
||||
claim at its own expense.
|
||||
For example, a Contributor might include the Program in a commercial
|
||||
product offering, Product X. That Contributor is then a Commercial
|
||||
Contributor. If that Commercial Contributor then makes performance claims,
|
||||
or offers warranties related to Product X, those performance claims and
|
||||
warranties are such Commercial Contributor's responsibility alone. Under
|
||||
this section, the Commercial Contributor would have to defend claims
|
||||
against the other Contributors related to those performance claims and
|
||||
warranties, and if a court requires any other Contributor to pay any
|
||||
damages as a result, the Commercial Contributor must pay those damages.
|
||||
5. NO WARRANTY
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
|
||||
ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
|
||||
EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
|
||||
CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
|
||||
PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
|
||||
the appropriateness of using and distributing the Program and assumes all
|
||||
risks associated with its exercise of rights under this Agreement,
|
||||
including but not limited to the risks and costs of program errors,
|
||||
compliance with applicable laws, damage to or loss of data, programs or
|
||||
equipment, and unavailability or interruption of operations.
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
|
||||
WITHOUT LIMITATION LOST PROFITS), 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 OR DISTRIBUTION
|
||||
OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
7. GENERAL
|
||||
If any provision of this Agreement is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of the
|
||||
remainder of the terms of this Agreement, and without further action by
|
||||
the parties hereto, such provision shall be reformed to the minimum extent
|
||||
necessary to make such provision valid and enforceable.
|
||||
If Recipient institutes patent litigation against a Contributor with
|
||||
respect to a patent applicable to software (including a cross-claim or
|
||||
counterclaim in a lawsuit), then any patent licenses granted by that
|
||||
Contributor to such Recipient under this Agreement shall terminate as of
|
||||
the date such litigation is filed. In addition, If Recipient institutes
|
||||
patent litigation against any entity (including a cross-claim or
|
||||
counterclaim in a lawsuit) alleging that the Program itself (excluding
|
||||
combinations of the Program with other software or hardware) infringes
|
||||
such Recipient's patent(s), then such Recipient's rights granted under
|
||||
Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||
comply with any of the material terms or conditions of this Agreement and
|
||||
does not cure such failure in a reasonable period of time after becoming
|
||||
aware of such noncompliance. If all Recipient's rights under this
|
||||
Agreement terminate, Recipient agrees to cease use and distribution of the
|
||||
Program as soon as reasonably practicable. However, Recipient's
|
||||
obligations under this Agreement and any licenses granted by Recipient
|
||||
relating to the Program shall continue and survive.
|
||||
IBM may publish new versions (including revisions) of this Agreement from
|
||||
time to time. Each new version of the Agreement will be given a
|
||||
distinguishing version number. The Program (including Contributions) may
|
||||
always be distributed subject to the version of the Agreement under which
|
||||
it was received. In addition, after a new version of the Agreement is
|
||||
published, Contributor may elect to distribute the Program (including its
|
||||
Contributions) under the new version. No one other than IBM has the right
|
||||
to modify this Agreement. Except as expressly stated in Sections 2(a) and
|
||||
2(b) above, Recipient receives no rights or licenses to the intellectual
|
||||
property of any Contributor under this Agreement, whether expressly, by
|
||||
implication, estoppel or otherwise. All rights in the Program not
|
||||
expressly granted under this Agreement are reserved.
|
||||
This Agreement is governed by the laws of the State of New York and the
|
||||
intellectual property laws of the United States of America. No party to
|
||||
this Agreement will bring a legal action under this Agreement more than
|
||||
one year after the cause of action arose. Each party waives its rights to
|
||||
a jury trial in any resulting litigation.
|
|
@ -0,0 +1,52 @@
|
|||
The Krysalis Patchy Software License, Version 1.1_01
|
||||
Copyright (c) 2002 Nicola Ken Barozzi. All rights reserved.
|
||||
|
||||
This Licence is compatible with the BSD licence as described and
|
||||
approved by http://www.opensource.org/, and is based on the
|
||||
Apache Software Licence Version 1.1.
|
||||
|
||||
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 for project
|
||||
Krysalis (http://www.krysalis.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself,
|
||||
if and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Krysalis" and "Nicola Ken Barozzi" and
|
||||
"Krysalis Centipede" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact krysalis@nicolaken.org.
|
||||
|
||||
5. Products derived from this software may not be called "Krysalis",
|
||||
"Krysalis Centipede", nor may "Krysalis" appear in their name,
|
||||
without prior written permission of Nicola Ken Barozzi.
|
||||
|
||||
6. This software may contain voluntary contributions made by many
|
||||
individuals, who decided to donate the code to this project in
|
||||
respect of this licence.
|
||||
|
||||
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 KRYSALIS PROJECT 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.
|
||||
====================================================================
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
|
||||
============================================================================
|
||||
The Apache Software License, Version 1.1
|
||||
============================================================================
|
||||
|
||||
Copyright (C) 1999-2001 The Apache Software Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modifica-
|
||||
tion, 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 Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "LogKit", "Jakarta" and "Apache Software Foundation" must not
|
||||
be used to endorse or promote products derived from this software without
|
||||
prior written permission. For written permission, please contact
|
||||
apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the
|
||||
Apache Software Foundation.
|
||||
|
||||
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 (INCLU-
|
||||
DING, 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 Apache Software Foundation and was originally created by
|
||||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
|
||||
Software Foundation, please see <http://www.apache.org/>.
|
||||
|
||||
*/
|
|
@ -0,0 +1,153 @@
|
|||
Software License Agreement
|
||||
|
||||
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
|
||||
XML ENTITY AND URI RESOLVERS, VERSION 1.0 SOFTWARE TO YOU
|
||||
ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS
|
||||
CONTAINED IN THIS LICENSE AGREEMENT ("AGREEMENT"). PLEASE
|
||||
READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY.
|
||||
BY INSTALLING THIS SOFTWARE, YOU ACCEPT THE TERMS AND
|
||||
CONDITIONS OF THIS AGREEMENT. IF YOU ARE NOT WILLING TO BE
|
||||
BOUND BY ITS TERMS, SELECT THE "DECLINE" BUTTON AT THE
|
||||
BOTTOM OF THIS PAGE AND THE INSTALLATION PROCESS WILL NOT
|
||||
CONTINUE.
|
||||
|
||||
1.0 DEFINITIONS "Licensed Software" means the XML Entity and
|
||||
URI Resolvers, Version 1.0 Software and any other machine
|
||||
readable materials (including, but not limited to,
|
||||
libraries, source files, header files, and data files) and
|
||||
any user manuals, programming guides and other documentation
|
||||
provided to you by Sun under this Agreement.
|
||||
|
||||
2.0 LIMITED LICENSE 2.1 Sun grants to you, a non-exclusive,
|
||||
non-transferable, royalty-free and limited license to
|
||||
reproduce, modify, and create derivative works of the
|
||||
Licensed Software for the sole purpose of adding value and
|
||||
improving the Licensed Software for the development of
|
||||
applications ("Programs"). No license is granted to you for
|
||||
any other purpose. 2.2 In addition to the license granted
|
||||
in Section 2.1, Sun grants to you, a non-exclusive,
|
||||
non-transferable, royalty-free and limited license to
|
||||
distribute the Licensed Software modified by you as
|
||||
permitted in Section 2.1 ("Modified Software") in source or
|
||||
binary form, provided that; i) the Modified Software is only
|
||||
distributed bundled as a part of your Programs, ii) the
|
||||
Modified Software improves on and adds value to the Licensed
|
||||
Software, and iii) the Programs are only distributed subject
|
||||
to a license agreement that protects Sun's interests
|
||||
consistent with the terms and conditions contained in this
|
||||
Agreement.
|
||||
|
||||
3.0 LICENSE RESTRICTIONS 3.1 You agree to reproduce any
|
||||
copyright and other proprietary right notices on any such
|
||||
copy. 3.2 Except as otherwise provided by Section 2.0, you
|
||||
may not modify or create derivative works of the Licensed
|
||||
Software, or reverse engineer, disassemble or decompile
|
||||
binary portions of the Licensed Software, or otherwise
|
||||
attempt to derive the source code from such portions. 3.3
|
||||
No right, title, or interest in or to Licensed Software, any
|
||||
trademarks, service marks, or trade names of Sun or Sun's
|
||||
licensors is granted under this Agreement.
|
||||
|
||||
4.0 NO SUPPORT Sun is under no obligation to support
|
||||
Licensed Software or to provide you with updates or error
|
||||
corrections (collectively "Software Updates"). If Sun at
|
||||
its sole option, supplies Software Updates to you, the
|
||||
Software Updates will be considered part of Licensed
|
||||
Software, and subject to the terms of this Agreement.
|
||||
|
||||
5.0 TERM AND TERMINATION OF AGREEMENT 5.1 You may terminate
|
||||
this Agreement at any time by destroying all copies of
|
||||
Software. 5.2 Either party may terminate this Agreement
|
||||
immediately should any Software become, or in either party's
|
||||
opinion be likely to become, the subject of a claim of
|
||||
infringement of any intellectual property right. 5.3 This
|
||||
Agreement will terminate immediately without notice from Sun
|
||||
if the you fail to comply with any provision of this
|
||||
Agreement. 5.4 Upon termination or expiration of this
|
||||
Agreement, you shall immediately cease use of and destroy
|
||||
Licensed Software and any copies thereof. 5.5 Rights and
|
||||
obligations under this Agreement which by their nature
|
||||
should survive, will remain in effect after termination or
|
||||
expiration hereof.
|
||||
|
||||
6.0 DISCLAIMER OF WARRANTY 6.1 Licensee acknowledges that
|
||||
Licensed Software may contain errors and is not designed or
|
||||
intended for use in the design, construction, operation or
|
||||
maintenance of any nuclear facility ("High Risk
|
||||
Activities"). Sun disclaims any express or implied warranty
|
||||
of fitness for such uses. You represent and warrant to Sun
|
||||
that you will not use, distribute or license the Licensed
|
||||
Software for High Risk Activities. 6.2 LICENSED SOFTWARE IS
|
||||
PROVIDED "AS IS". ALL EXPRESS OR IMPLIED CONDITIONS,
|
||||
REPRESENTATIONS, AND WARRANTIES, INCLUDING ANY IMPLIED
|
||||
WARRANTY OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
|
||||
DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE
|
||||
HELD TO BE LEGALLY INVALID.
|
||||
|
||||
7.0 LIMITATION OF LIABILITY 7.1 You acknowledge that the
|
||||
Licensed Software is experimental. You acknowledge that the
|
||||
Licensed Software may have defects or deficiencies which
|
||||
cannot or will not be corrected by Sun. You will hold Sun
|
||||
harmless from any claims based on your use or inability to
|
||||
use the Licensed Software for any purpose, and from any
|
||||
claims that later versions or releases of any Licensed
|
||||
Software furnished to you are incompatible with the Licensed
|
||||
Software provided to you under this Agreement. 7.2 You
|
||||
shall have the sole responsibility to protect adequately and
|
||||
backup your data and/or equipment used in connection with
|
||||
the Licensed Software. You shall not claim against Sun for
|
||||
lost data, re-run time, inaccurate output, work delays or
|
||||
lost profits resulting from your use of the Licensed
|
||||
Software. 7.3 Neither party will be liable for any
|
||||
indirect, punitive, special, incidental or consequential
|
||||
damage in connection with or arising out of this Agreement
|
||||
(including loss of business, revenue, profits, use, data or
|
||||
other economic advantage), however it arises, whether for
|
||||
breach or in tort, even if that party has been previously
|
||||
advised of the possibility of such damage.
|
||||
|
||||
8.0 U.S. GOVERNMENT RIGHTS If this Software is being
|
||||
acquired by or on behalf of the U.S. Government or by a
|
||||
U.S. Government prime contractor or subcontractor (at any
|
||||
tier), then the Government's rights in the Software and
|
||||
accompanying documentation shall be only as set forth in
|
||||
this license; this is in accordance with 48 C.F.R. 227.7201
|
||||
through 227.7202-4 (for Department of Defense (DoD)
|
||||
acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for
|
||||
non-DoD acquisitions).
|
||||
|
||||
9.0 GENERAL TERMS 9.1 Any action related to this Agreement
|
||||
will be governed by California law and controlling U.S.
|
||||
federal law. The U.N. Convention for the International
|
||||
Sale of Goods and the choice of law rules of any
|
||||
jurisdiction will not apply. 9.2 Licensed Software and
|
||||
technical data delivered under this Agreement are subject to
|
||||
U.S. export control laws and may be subject to export or
|
||||
import regulations in other countries. You agree to comply
|
||||
strictly with all such laws and regulations and acknowledge
|
||||
that you have the responsibility to obtain such licenses to
|
||||
export, re-export or import as may be required after
|
||||
delivery to you. 9.3 Neither party may assign or otherwise
|
||||
transfer any of its rights or obligations under this
|
||||
Agreement, without the prior written consent of the other
|
||||
party, except that Sun may assign this Agreement to an
|
||||
affiliated company. 9.4 This Agreement is the parties'
|
||||
entire agreement relating to its subject matter. It
|
||||
supersedes all prior or contemporaneous oral or written
|
||||
communications, proposals, conditions, representations and
|
||||
warranties and prevails over any conflicting or additional
|
||||
terms of any quote, order, acknowledgment, or other
|
||||
communication between the parties relating to its subject
|
||||
matter during the term of this Agreement. No modification
|
||||
to this Agreement will be binding, unless in writing and
|
||||
signed by an authorized representative of each party.
|
||||
|
||||
For inquiries please contact: Sun Microsystems, Inc. 901
|
||||
San Antonio Road, Palo Alto, California 94303
|
||||
|
||||
Copyright 2001 Sun Microsystems, Inc., All rights reserved.
|
||||
(LFI# 90748/FORMID#011801)
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999 The Apache Software Foundation. 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 acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
* This source code implements specifications defined by the Java
|
||||
* Community Process. In order to remain compliant with the specification
|
||||
* DO NOT add / change / or delete method signatures!
|
||||
*/
|
|
@ -0,0 +1,10 @@
|
|||
Copyright (C) 1999
|
||||
Eiwa System Management, Inc.
|
||||
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and
|
||||
that both that copyright notice and this permission notice appear
|
||||
in supporting documentation. Eiwa System Management,Inc.
|
||||
makes no representations about the suitability of this software for any
|
||||
purpose. It is provided "AS IS" with NO WARRANTY.
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Xalan" and "Apache Software Foundation" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* nor may "Apache" appear in their name, without prior written
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation and was
|
||||
* originally based on software copyright (c) 1999, Lotus
|
||||
* Development Corporation., http://www.lotus.com. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1999 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Xerces" and "Apache Software Foundation" must
|
||||
* not be used to endorse or promote products derived from this
|
||||
* software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* nor may "Apache" appear in their name, without prior written
|
||||
* permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation and was
|
||||
* originally based on software copyright (c) 1999, International
|
||||
* Business Machines, Inc., http://www.ibm.com. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
|
||||
xml-apis is covered by The Apache Software License, Version 1.1
|
||||
|
||||
|
||||
|
||||
FIXME: Put license text in here once it is available at
|
||||
|
||||
http://cvs.apache.org/viewcvs.cgi/xml-commons/
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
Binary Software License Agreement
|
||||
|
||||
SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE SUN
|
||||
JAVA DOCLET SOFTWARE TO YOU ONLY UPON THE CONDITION THAT YOU
|
||||
ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT
|
||||
("AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS OF THIS
|
||||
AGREEMENT CAREFULLY. BY INSTALLING THIS SOFTWARE, YOU
|
||||
ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU
|
||||
ARE NOT WILLING TO BE BOUND BY ITS TERMS, SELECT THE
|
||||
"DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE AND THE
|
||||
INSTALLATION PROCESS WILL NOT CONTINUE.
|
||||
|
||||
1.0 DEFINITIONS "Licensed Software" means the Sun Java
|
||||
Doclet Software in binary form, any other machine readable
|
||||
materials (including, but not limited to, libraries, source
|
||||
files, header files, and data files) and any user manuals,
|
||||
programming guides and other documentation provided to you
|
||||
by Sun under this Agreement.
|
||||
|
||||
2.0 LIMITED LICENSE 2.1 Sun grants to you, a non-exclusive,
|
||||
non-transferable, royalty-free and limited license to
|
||||
reproduce, modify, and create derivative works of the
|
||||
Licensed Software for the sole purpose of adding value and
|
||||
improving the Licensed Software for the development of
|
||||
applications ("Programs"). No license is granted to you for
|
||||
any other purpose. 2.2 In addition to the license granted
|
||||
in Section 2.1, Sun grants to you, a non-exclusive,
|
||||
non-transferable, royalty-free and limited license to
|
||||
distribute the Licensed Software modified by you as
|
||||
permitted in Section 2.1 ("Modified Software") in source or
|
||||
binary form, provided that; i) the Modified Software is only
|
||||
distributed bundled as a part of your Programs, ii) the
|
||||
Modified Software improves on and adds value to the Licensed
|
||||
Software, and iii) the Programs are only distributed subject
|
||||
to a license agreement that protects Sun's interests
|
||||
consistent with the terms and conditions contained in this
|
||||
Agreement.
|
||||
|
||||
3.0 LICENSE RESTRICTIONS 3.1 You agree to reproduce any
|
||||
copyright and other proprietary right notices on any such
|
||||
copy. 3.2 Except as otherwise provided by Section 2.0, you
|
||||
may not modify or create derivative works of the Licensed
|
||||
Software, or reverse engineer, disassemble or decompile
|
||||
binary portions of the Licensed Software, or otherwise
|
||||
attempt to derive the source code from such portions. 3.3
|
||||
No right, title, or interest in or to Licensed Software, any
|
||||
trademarks, service marks, or trade names of Sun or Sun's
|
||||
licensors is granted under this Agreement.
|
||||
|
||||
4.0 NO SUPPORT Sun is under no obligation to support
|
||||
Licensed Software or to provide you with updates or error
|
||||
corrections (collectively "Software Updates"). If Sun at
|
||||
its sole option, supplies Software Updates to you, the
|
||||
Software Updates will be considered part of Licensed
|
||||
Software, and subject to the terms of this Agreement.
|
||||
|
||||
5.0 TERM AND TERMINATION OF AGREEMENT 5.1 You may terminate
|
||||
this Agreement at any time by destroying all copies of
|
||||
Software. 5.2 Either party may terminate this Agreement
|
||||
immediately should any Software become, or in either party's
|
||||
opinion be likely to become, the subject of a claim of
|
||||
infringement of any intellectual property right. 5.3 This
|
||||
Agreement will terminate immediately without notice from Sun
|
||||
if the you fail to comply with any provision of this
|
||||
Agreement. 5.4 Upon termination or expiration of this
|
||||
Agreement, you shall immediately cease use of and destroy
|
||||
Licensed Software and any copies thereof. 5.5 Rights and
|
||||
obligations under this Agreement which by their nature
|
||||
should survive, will remain in effect after termination or
|
||||
expiration hereof.
|
||||
|
||||
6.0 DISCLAIMER OF WARRANTY 6.1 Licensee acknowledges that
|
||||
Licensed Software may contain errors and is not designed or
|
||||
intended for use in the design, construction, operation or
|
||||
maintenance of any nuclear facility ("High Risk
|
||||
Activities"). Sun disclaims any express or implied warranty
|
||||
of fitness for such uses. You represent and warrant to Sun
|
||||
that you will not use, distribute or license the Licensed
|
||||
Software for High Risk Activities. 6.2 LICENSED SOFTWARE IS
|
||||
PROVIDED "AS IS". ALL EXPRESS OR IMPLIED CONDITIONS,
|
||||
REPRESENTATIONS, AND WARRANTIES, INCLUDING ANY IMPLIED
|
||||
WARRANTY OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
|
||||
DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE
|
||||
HELD TO BE LEGALLY INVALID.
|
||||
|
||||
7.0 LIMITATION OF LIABILITY 7.1 You acknowledge that the
|
||||
Licensed Software is experimental. You acknowledge that the
|
||||
Licensed Software may have defects or deficiencies which
|
||||
cannot or will not be corrected by Sun. You will hold Sun
|
||||
harmless from any claims based on your use or inability to
|
||||
use the Licensed Software for any purpose, and from any
|
||||
claims that later versions or releases of any Licensed
|
||||
Software furnished to you are incompatible with the Licensed
|
||||
Software provided to you under this Agreement. 7.2 You
|
||||
shall have the sole responsibility to protect adequately and
|
||||
backup your data and/or equipment used in connection with
|
||||
the Licensed Software. You shall not claim against Sun for
|
||||
lost data, re-run time, inaccurate output, work delays or
|
||||
lost profits resulting from your use of the Licensed
|
||||
Software. 7.3 Neither party will be liable for any
|
||||
indirect, punitive, special, incidental or consequential
|
||||
damage in connection with or arising out of this Agreement
|
||||
(including loss of business, revenue, profits, use, data or
|
||||
other economic advantage), however it arises, whether for
|
||||
breach or in tort, even if that party has been previously
|
||||
advised of the possibility of such damage.
|
||||
|
||||
8.0 U.S. GOVERNMENT RIGHTS If this Software is being
|
||||
acquired by or on behalf of the U.S. Government or by a
|
||||
U.S. Government prime contractor or subcontractor (at any
|
||||
tier), then the Government's rights in the Software and
|
||||
accompanying documentation shall be only as set forth in
|
||||
this license; this is in accordance with 48 C.F.R. 227.7201
|
||||
through 227.7202-4 (for Department of Defense (DoD)
|
||||
acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for
|
||||
non-DoD acquisitions).
|
||||
|
||||
9.0 GENERAL TERMS 9.1 Any action related to this Agreement
|
||||
will be governed by California law and controlling U.S.
|
||||
federal law. The U.N. Convention for the International
|
||||
Sale of Goods and the choice of law rules of any
|
||||
jurisdiction will not apply. 9.2 Licensed Software and
|
||||
technical data delivered under this Agreement are subject to
|
||||
U.S. export control laws and may be subject to export or
|
||||
import regulations in other countries. You agree to comply
|
||||
strictly with all such laws and regulations and acknowledge
|
||||
that you have the responsibility to obtain such licenses to
|
||||
export, re-export or import as may be required after
|
||||
delivery to you. 9.3 Neither party may assign or otherwise
|
||||
transfer any of its rights or obligations under this
|
||||
Agreement, without the prior written consent of the other
|
||||
party, except that Sun may assign this Agreement to an
|
||||
affiliated company. 9.4 This Agreement is the parties'
|
||||
entire agreement relating to its subject matter. It
|
||||
supersedes all prior or contemporaneous oral or written
|
||||
communications, proposals, conditions, representations and
|
||||
warranties and prevails over any conflicting or additional
|
||||
terms of any quote, order, acknowledgment, or other
|
||||
communication between the parties relating to its subject
|
||||
matter during the term of this Agreement. No modification
|
||||
to this Agreement will be binding, unless in writing and
|
||||
signed by an authorized representative of each party.
|
||||
|
||||
Copyright 2000 Sun Microsystems, All rights reserved. Form
|
||||
ID# 120800
|
|
@ -0,0 +1,2 @@
|
|||
AnyObjectId[8dd6dca2541af1d37ae12c2d185da24a789a1d42] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -0,0 +1,2 @@
|
|||
AnyObjectId[28d3642eeb172d43cea24ee2050c61214dbcb545] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -0,0 +1,2 @@
|
|||
AnyObjectId[2c4275729670603e925c14efc427a761fce48276] was removed in git history.
|
||||
Apache SVN contains full history.
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="tools/antipede/resources/stylesheets/module.xsl"?>
|
||||
<?xml-stylesheet type="text/css" href="tools/antipede/resources/stylesheets/module.css"?>
|
||||
<module name="krysalis-site">
|
||||
|
||||
<url href="http://www.krysalis.org/"/>
|
||||
|
||||
<cvs repository="sourceforge"
|
||||
host-prefix="cvs.krysalis"
|
||||
dir="krysalis"
|
||||
module="krysalis-site"/>
|
||||
|
||||
<mailing-lists>
|
||||
<mailing-list user="user"
|
||||
mail="forrest-dev@xml.apache.org"
|
||||
subscribe="http://lists.sourceforge.net/lists/listinfo/Krysalis-general-user"
|
||||
unsubscribe="http://lists.sourceforge.net/lists/listinfo/Krysalis-general-user"/>
|
||||
<mailing-list user="developer"
|
||||
mail="forrest-dev@xml.apache.org"
|
||||
subscribe="http://lists.sourceforge.net/lists/listinfo/krysalis-devel"
|
||||
unsubscribe="http://lists.sourceforge.net/lists/listinfo/krysalis-devel"/>
|
||||
</mailing-lists>
|
||||
|
||||
<description>
|
||||
Krysalis Centipede is the main Krysalis site module.
|
||||
</description>
|
||||
|
||||
<detailed>
|
||||
Krysalis Centipede is the main Krysalis site module.
|
||||
</detailed>
|
||||
|
||||
<what>
|
||||
<goal>just do it</goal>
|
||||
</what>
|
||||
|
||||
<why>
|
||||
Why not?
|
||||
</why>
|
||||
|
||||
<vendor>Apache Software Foundation</vendor>
|
||||
|
||||
<licence>This software is released under the Apache Software License 1.1.
|
||||
For detailed legal and licensing issues, please read the LICENSE.* files
|
||||
in the /legal directory.
|
||||
</licence>
|
||||
|
||||
<credits>
|
||||
<credit>This software includes software developed by the Krysalis Community Project
|
||||
(http://krysalis.sourceforge.net/).
|
||||
</credit>
|
||||
</credits>
|
||||
|
||||
<project name="LuceneAppExtensions">
|
||||
|
||||
<version major="0"
|
||||
minor="0"
|
||||
fix ="1"
|
||||
tag="0"/>
|
||||
|
||||
<package>search</package>
|
||||
|
||||
<ant target="gump" vm="1.2"/>
|
||||
|
||||
<!-- script name="build"/> -->
|
||||
|
||||
<depend project="jakarta-ant"/>
|
||||
<depend project="xml-xerces"/>
|
||||
<depend project="xml-xalan2"/>
|
||||
<depend project="xml-cocoon2"/>
|
||||
<depend project="jtidy"/>
|
||||
<depend project="junit"/>
|
||||
<depend project="IzPress"/>
|
||||
|
||||
|
||||
<!-- Work dirs to be included in classpath -->
|
||||
<work nested="build/classes"/>
|
||||
<work nested="build/testcases"/>
|
||||
|
||||
<home nested="build"/>
|
||||
|
||||
<nag to="lucene-dev@jakarta.apache.org"
|
||||
from="Sam Ruby <rubys@us.ibm.com>"/>
|
||||
</project>
|
||||
|
||||
</module>
|
|
@ -0,0 +1,83 @@
|
|||
--- build.xml Sat May 4 09:53:42 2002
|
||||
+++ /tmp/krysalis-centipede/build.xml Fri May 3 19:51:37 2002
|
||||
@@ -256,20 +256,73 @@
|
||||
</target>
|
||||
|
||||
|
||||
- <!-- ================================== -->
|
||||
- <!-- Generates the maven documentation -->
|
||||
- <!-- ================================== -->
|
||||
- <!-- alpha - testing Maven integration -->
|
||||
- <target name="maven" depends="-init"
|
||||
- description="Compile java source code">
|
||||
+ <!-- ================================================ -->
|
||||
+ <!-- Generates the documentation with maven too -->
|
||||
+ <!-- ================================================ -->
|
||||
+
|
||||
+ <!-- alpha - testing Maven integration -->
|
||||
+
|
||||
+ <target name="mavendocs" depends="-init"
|
||||
+ description="Generates the documentation to the maven lf">
|
||||
|
||||
<antcall target="call-cent">
|
||||
<param name="cent-name" value="maven"/>
|
||||
- <param name="cent-target" value="docs"/>
|
||||
+ <param name="cent-target" value="cross-ref"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="centipede"/>
|
||||
+ <param name="cent-target" value="descriptor-docs"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="umldoclet"/>
|
||||
+ <param name="cent-target" value="javadocs"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="junit"/>
|
||||
+ <param name="cent-target" value="failsafe-test"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="junit"/>
|
||||
+ <param name="cent-target" value="report"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="jdepend"/>
|
||||
+ <param name="cent-target" value="jdepend-html"/>
|
||||
</antcall>
|
||||
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="checkstyle"/>
|
||||
+ <param name="cent-target" value="check"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="umldoclet"/>
|
||||
+ <param name="cent-target" value="javadocs"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="umldoclet"/>
|
||||
+ <param name="cent-target" value="doclet"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="javasrc"/>
|
||||
+ <param name="cent-target" value="javasrc"/>
|
||||
+ </antcall>
|
||||
+
|
||||
+ <antcall target="call-cent">
|
||||
+ <param name="cent-name" value="maven"/>
|
||||
+ <param name="cent-target" value="docs"/>
|
||||
+ </antcall>
|
||||
+
|
||||
</target>
|
||||
|
||||
+
|
||||
<!-- ================================== -->
|
||||
<!-- Generates the site -->
|
||||
<!-- ================================== -->
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="tools/antipede/resources/stylesheets/properties.xsl"?>
|
||||
<!-- Build properties - these override any property specified in the build -->
|
||||
<properties>
|
||||
|
||||
<!-- Properties of the build -->
|
||||
<build>
|
||||
<!-- What to tell the compiler -->
|
||||
<compiler
|
||||
emacs="on"
|
||||
warnings="true"
|
||||
pedantic="false"
|
||||
depend="true"
|
||||
fulldepend="true"
|
||||
debug="on"
|
||||
optimize="off"
|
||||
deprecation="on"
|
||||
nowarn="off"
|
||||
type="classic"
|
||||
vm="1.2" />
|
||||
</build>
|
||||
|
||||
<centipede>
|
||||
<tools>
|
||||
<cents repository="http://krysalis.org/jars/">
|
||||
<!-- not currently used by POI
|
||||
<antidote/>
|
||||
<xmldoclet/> -->
|
||||
<centipede>
|
||||
<!-- <javadocs group="POIFS org.apache.poi.poifs*,HSSF org.apache.poi.hssf*,HPSF org.apache.poi.hpsf*,"> -->
|
||||
<javadocs group="">
|
||||
<altenative views="uml">
|
||||
<uml prefix="uml-" suffix="" extension="html"/>
|
||||
</altenative>
|
||||
</javadocs>
|
||||
</centipede>
|
||||
<junit/>
|
||||
<jdepend/>
|
||||
<checkstyle/>
|
||||
<javasrc/>
|
||||
<umldoclet/>
|
||||
<forrest>
|
||||
<!-- available skins:
|
||||
|
||||
basic
|
||||
jakarta-site
|
||||
avalon-site
|
||||
scarab-site
|
||||
xml-apache-site
|
||||
forrest-site (Work In Progress)
|
||||
-->
|
||||
<skin
|
||||
name="scarab-site2">
|
||||
<navlinks>
|
||||
<link1
|
||||
href="http://www.apache.org/">apache</link1>
|
||||
|
||||
<link2
|
||||
href="http://jakarta.apache.org/">jakarta</link2>
|
||||
|
||||
<link3
|
||||
href="http://jakarta.apache.org/lucene/">lucene</link3>
|
||||
|
||||
<link4
|
||||
href="http://jakarta.apache.org/lucene/sandbox">sandbox</link4>
|
||||
<link5
|
||||
href="http://jakarta.apache.org/lucene/sandbox/appex">application extensions</link5>
|
||||
</navlinks>
|
||||
|
||||
<logo>
|
||||
<group
|
||||
src="images/group-logo.gif"
|
||||
href="http://jakarta.apache.org" />
|
||||
|
||||
<project
|
||||
src="images/project-logo.gif"
|
||||
href="http://jakarta.apache.org/lucene" />
|
||||
</logo>
|
||||
</skin>
|
||||
</forrest>
|
||||
</cents>
|
||||
</tools>
|
||||
</centipede>
|
||||
</properties>
|
||||
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1,18 @@
|
|||
- build distributions
|
||||
- sign distributions
|
||||
- Generate announcements and HEADER.html
|
||||
- upload distributions to correct dir
|
||||
- tag CVS
|
||||
- generate www pages and upload
|
||||
- bump release ID
|
||||
- send announcements to announcement@apache.org, announcements@xml.apache.org, announcements@jakarta.apache.org
|
||||
- news to newsgroups: comp.lang.java.softwaretools
|
||||
- post stories on
|
||||
*) jakarta news page
|
||||
*) theserverside.com
|
||||
*) freshmeat.net
|
||||
*) www.javaworld.com
|
||||
*) www.javalobby.com
|
||||
*) www.jguru.com
|
||||
*) www.slashdot.org
|
||||
(and follow them up)
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN" "dtd/book-cocoon-v10.dtd">
|
||||
|
||||
<book software="Lucene Application Extensions"
|
||||
title="Lucene Application Extensions"
|
||||
copyright="@year@ Apache Software Foundation"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<menu label="Overview">
|
||||
<menu-item label="Introduction" href="index.html"/>
|
||||
<menu-item label="Lucene" href="http://jakarta.apache.org/lucene"/>
|
||||
</menu>
|
||||
|
||||
<menu label="Specifications">
|
||||
<menu-item label="Proposal"
|
||||
href="http://jakarta.apache.org/lucene/docs/luceneplan.html"/>
|
||||
</menu>
|
||||
|
||||
</book>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN" "dtd/book-cocoon-v10.dtd">
|
||||
|
||||
<book software="Krysalis Centipede"
|
||||
title="Krysalis Centipede"
|
||||
copyright="@year@ Krysalis Project"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<menu label="Centipede Descriptors">
|
||||
<menu-item label="status.xml" href="status.html"/>
|
||||
<menu-item label="module.xml" href="module.html"/>
|
||||
<menu-item label="build.xml" href="build.html"/>
|
||||
<menu-item label="layout.xml" href="layout.html"/>
|
||||
<menu-item label="properties.xml" href="properties.html"/>
|
||||
</menu>
|
||||
</book>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document><header><title>Project Main Build</title></header><body><section title="Build"><p><pre>
|
||||
* ===================================== *
|
||||
| Krysalis Centipede Build System |
|
||||
* ===================================== *
|
||||
by
|
||||
|
||||
Nicola Ken Barozzi (nicolaken@apache.org)
|
||||
Marc Johnson (mjohnson@apache.org)
|
||||
|
||||
|
||||
For a simple interactive build, simply
|
||||
run the build script (build.bar or build.sh)
|
||||
</pre><br/><p><b>interactive</b> -
|
||||
Interactive Build<ul/></p><p><b>scratchpad</b> -
|
||||
Interactive Scratchpad Build<ul/></p><p><b>contrib</b> -
|
||||
Interactive Contributors' Build<ul/></p><p><b>edit-status</b> -
|
||||
Edit xml property files with a gui editor<ul/></p><p><b>compile</b> -
|
||||
Compile java source code<ul/></p><p><b>jar</b> -
|
||||
Compile java source code<ul/></p><p><b>dist</b> -
|
||||
Build distribution packages wo single build checks<ul/></p><p><b>clean</b> -
|
||||
Compile java source code<ul/></p><p><b>test</b> -
|
||||
Compile java source code<ul/></p><p><b>metrics</b> -
|
||||
Generate project metrics<ul/></p><p><b>docs</b> -
|
||||
Compile java source code<ul/></p><p><b>mavendocs</b> -
|
||||
Generates the documentation to the maven lf<ul/></p><p><b>site</b> -
|
||||
Makes all the site doco<ul/></p><p><b>javadocs</b> -
|
||||
Compile java source code<ul/></p><p><b>testmodule</b> -
|
||||
Testing that all major targets work; useful before a commit<ul/></p><p><b>testtargets</b> -
|
||||
Testing that all major targets work indipendently; useful before a commit<ul/></p><p><b>testall</b> -
|
||||
Make big full test<ul/></p><p><b>gump</b> -
|
||||
Target used by Gump<ul/></p><p><b>all</b> -
|
||||
Generate all<ul/></p><p><b>get-needed-cents</b> -
|
||||
<ul/></p><p><b>call-cent</b> -
|
||||
<ul/></p><p><b>cent-target</b> -
|
||||
<ul/></p><p><b>jar-cent</b> -
|
||||
<ul/></p><p><b>update-cent</b> -
|
||||
<ul/></p><p><b>update-all-cents</b> -
|
||||
<ul/></p><p><b>create-dtd</b> -
|
||||
<ul/></p></p></section></body></document>
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document><header><title>Project Layout</title></header><body><section title="Directory layout"><p><table><tr><td><br/>layout
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td></tr></table></p></section></body></document>
|
|
@ -0,0 +1,51 @@
|
|||
<document>
|
||||
<header>
|
||||
<title>Mailing lists of
|
||||
krysalis-site</title>
|
||||
</header>
|
||||
<body>
|
||||
<section title="Mailing lists">
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>user type</th><th>mailing list</th><th>subscribe</th><th>unsubscribe</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>user</td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20forrest-dev@xml.apache.org">forrest-dev@xml.apache.org</a></td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20http://lists.sourceforge.net/lists/listinfo/Krysalis-general-user">
|
||||
|
||||
subscribe</a></td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20http://lists.sourceforge.net/lists/listinfo/Krysalis-general-user">
|
||||
|
||||
unsubscribe</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>developer</td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20forrest-dev@xml.apache.org">forrest-dev@xml.apache.org</a></td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20http://lists.sourceforge.net/lists/listinfo/krysalis-devel">
|
||||
|
||||
subscribe</a></td><td><a href="mailto:%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20http://lists.sourceforge.net/lists/listinfo/krysalis-devel">
|
||||
|
||||
unsubscribe</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</section>
|
||||
<section title="Dependencies">
|
||||
<section title="required">
|
||||
<p>
|
||||
<ul>
|
||||
<li>jakarta-ant</li>
|
||||
<li>xml-xerces</li>
|
||||
<li>xml-xalan2</li>
|
||||
<li>xml-cocoon2</li>
|
||||
<li>jtidy</li>
|
||||
<li>junit</li>
|
||||
<li>IzPress</li>
|
||||
</ul>
|
||||
</p>
|
||||
</section>
|
||||
<section title="optional">
|
||||
<p>
|
||||
<ul></ul>
|
||||
</p>
|
||||
</section>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document><header><title>Project Properties</title></header><body><section title="Project properties"><p><table><tr><td><table><tr><td class="comment"><pre> Build properties - these override any property specified in the build </pre></td></tr></table><table><tr><td class="block">properties</td></tr></table><table><tr><td/><td>
|
||||
|
||||
<table><tr><td class="comment"><pre> Properties of the build </pre></td></tr></table>
|
||||
<table><tr><td class="block">build</td></tr></table><table><tr><td/><td>
|
||||
<table><tr><td class="comment"><pre> What to tell the compiler </pre></td></tr></table>
|
||||
<table><tr><td class="block">compiler<table><tr><td class="name">emacs</td><td class="value">=on</td></tr><tr><td class="name">warnings</td><td class="value">=true</td></tr><tr><td class="name">pedantic</td><td class="value">=false</td></tr><tr><td class="name">depend</td><td class="value">=true</td></tr><tr><td class="name">fulldepend</td><td class="value">=true</td></tr><tr><td class="name">debug</td><td class="value">=on</td></tr><tr><td class="name">optimize</td><td class="value">=off</td></tr><tr><td class="name">deprecation</td><td class="value">=on</td></tr><tr><td class="name">nowarn</td><td class="value">=off</td></tr><tr><td class="name">type</td><td class="value">=classic</td></tr><tr><td class="name">vm</td><td class="value">=1.2</td></tr></table></td></tr></table>
|
||||
</td></tr></table>
|
||||
|
||||
<br/>centipede
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
apache
|
||||
|
||||
jakarta
|
||||
|
||||
lucene
|
||||
|
||||
sandbox
|
||||
application extensions
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td></tr></table></td></tr></table></p></section></body></document>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document><header><title>Project Status</title></header><body><section title="Developers"><p><table><tr><td>Andrew C. Oliver</td><td>acoliver@apache.org</td><td>acoliver</td></tr><tr><td>Glen Stampoultzis</td><td>glens@apache.org</td><td>glens</td></tr><tr><td>Marc Johnson</td><td>mjohnson@apache.org</td><td>mjohnson</td></tr><tr><td>Nicola Ken Barozzi</td><td>nicolaken@apache.org</td><td>nicolaken</td></tr><tr><td>Rainer Klute</td><td>rainer@apache.org</td><td>rainer</td></tr></table></p></section><section title="To do"><section title=" priority:high"><p><table><tr><th>context</th><th>what</th><th>assigned to</th></tr><tr><td>docs</td><td>
|
||||
Finish writing documentation, by simply answering these questions (Leo Simmons):- what is centipede?; how does it work?; what features does it provide? (how, how stable, ...)
|
||||
; which features will it provide? (when, how); which projects does it use? (how, which version, why, ...); what is the project structure?; what is the project architecture?
|
||||
; where's the latest download?; how do I build?; how do I install?; how do I run the sample?; how do I integrate?; which XML files are used?; what are their DTDs and purposes?
|
||||
; what is the relationship between centipede and gump, forrest, ant, maven, ...?
|
||||
</td><td>nicolaken</td></tr></table></p></section></section><section title="Changes"><section title=" release:1.0 of date:20020430"><p><table><tr><th>type</th><th>what</th><th>developer</th></tr><tr><td>add</td><td>
|
||||
Commited first version of 1.0 codebase
|
||||
</td><td>[nicolaken]</td></tr></table></p></section></section></body></document>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "./dtd/document-v11.dtd">
|
||||
|
||||
<document>
|
||||
<header>
|
||||
<title>Lucene Application Extensions</title>
|
||||
<authors>
|
||||
<person id="ACO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
|
||||
</authors>
|
||||
</header>
|
||||
|
||||
<body>
|
||||
<section title="Introduction">
|
||||
<p>
|
||||
The Lucene application extensions project aims to provide a template
|
||||
for creating Lucene based web applications, and a set of libraries for
|
||||
easily using Lucene in your application. Eventually these extensions
|
||||
will move over to the Lucene proper along with full documentation.
|
||||
For more information on these goals please read this <link
|
||||
href="http://jakarta.apache.org/lucene/docs/luceneplan.html">Proposal
|
||||
</link>. TODO: go into more depth here. (does this incompleteness
|
||||
bother you? Well contribute your words here!
|
||||
</p>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
</document>
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1 @@
|
|||
CVS happy
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration>
|
||||
<Search>
|
||||
<WordList>wlist.txt</WordList>
|
||||
<Index>/usr/local/index</Index>
|
||||
<TempFolder>/usr/local/temp</TempFolder>
|
||||
<HitsPerPage>10</HitsPerPage>
|
||||
<ContentHandlers>
|
||||
<ContentHandler name="Zip" extension="zip" handler="search.ZIPHandler"/>
|
||||
<ContentHandler name="Jar" extension="jar" handler="search.ZIPHandler"/>
|
||||
<ContentHandler name="GZip" extension="gz" handler="search.GZipHandler"/>
|
||||
<ContentHandler name="Tar" extension="tar" handler="search.TARHandler"/>
|
||||
<ContentHandler name="Pdf" extension="pdf" handler="search.PDFHandler"/>
|
||||
<ContentHandler name="Htm" extension="htm" handler="search.HTMLHandler"/>
|
||||
<ContentHandler name="Html" extension="html" handler="search.HTMLHandler"/>
|
||||
<ContentHandler name="Text" extension="txt" handler="search.TextHandler"/>
|
||||
<ContentHandler name="MSWord" extension="doc" handler="search.TextHandler"/>
|
||||
<ContentHandler name="MSPowerpoint" extension="ppt" handler="search.TextHandler"/>
|
||||
<ContentHandler name="MSExcel" extension="xls" handler="search.TextHandler"/>
|
||||
</ContentHandlers>
|
||||
<Fields>
|
||||
<Field name="id" type="unindexed"/>
|
||||
<Field name="category" type="text"/>
|
||||
<Field name="description" type="text"/>
|
||||
<Field name="comments" type="text"/>
|
||||
</Fields>
|
||||
<DefaultSearchFields>fileName,fileFormat,fileContents,category,description,comments</DefaultSearchFields>
|
||||
</Search>
|
||||
</Configuration>
|
|
@ -0,0 +1,161 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (C) The Apache Software Foundation. All rights reserved. *
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This software is published under the terms of the Apache Software License *
|
||||
* version 1.1, a copy of which has been included with this distribution in *
|
||||
* the LICENSE file. *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.krysalis.centipede.ant.task;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.zip.*;
|
||||
import org.apache.tools.ant.*;
|
||||
import org.apache.tools.ant.taskdefs.*;
|
||||
import org.apache.tools.ant.types.*;
|
||||
|
||||
/**
|
||||
* Will set the given property if the requested class is available in the
|
||||
* specified classpath. The found class is not loaded!
|
||||
* This class is heavily based on the available task in the ant package:
|
||||
* @author Stefano Mazzocchi <a href="mailto:stefano@apache.org">stefano@apache.org</a>
|
||||
*
|
||||
* This task searches only in the defined path but not in the parents path
|
||||
* unless explicitly overridden by the value of ${build.sysclasspath}
|
||||
* like the original available task does.
|
||||
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
|
||||
* @version CVS $Revision$ $Date$
|
||||
*/
|
||||
|
||||
public class ClassAvailableTask extends Task {
|
||||
|
||||
/**
|
||||
* A hashtable of zip files opened by the classloader
|
||||
*/
|
||||
private Hashtable zipFiles = new Hashtable();
|
||||
|
||||
private String property;
|
||||
private String classname;
|
||||
private Path classpath;
|
||||
private String value = "true";
|
||||
|
||||
public void setClasspath(Path classpath) {
|
||||
createClasspath().append(classpath);
|
||||
}
|
||||
|
||||
public Path createClasspath() {
|
||||
if (this.classpath == null) {
|
||||
this.classpath = new Path(this.project);
|
||||
}
|
||||
return this.classpath.createPath();
|
||||
}
|
||||
|
||||
public void setClasspathRef(Reference r) {
|
||||
createClasspath().setRefid(r);
|
||||
}
|
||||
|
||||
public void setProperty(String property) {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void setClassname(String classname) {
|
||||
if (!"".equals(classname)) {
|
||||
this.classname = classname;
|
||||
}
|
||||
}
|
||||
|
||||
public void execute() throws BuildException {
|
||||
if (property == null) {
|
||||
throw new BuildException("property attribute is required", location);
|
||||
}
|
||||
|
||||
if (eval()) {
|
||||
this.project.setProperty(property, value);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean eval() throws BuildException {
|
||||
if (classname == null) {
|
||||
throw new BuildException("At least one of (classname|file|resource) is required", location);
|
||||
}
|
||||
|
||||
if (classpath != null) {
|
||||
classpath.setProject(project);
|
||||
classpath = classpath.concatSystemClasspath("ignore");
|
||||
}
|
||||
|
||||
if (!findClassInComponents(classname)) {
|
||||
log("Unable to load class " + classname + " to set property " + property, Project.MSG_VERBOSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an inputstream to a given resource in the given file which may
|
||||
* either be a directory or a zip file.
|
||||
*
|
||||
* @param file the file (directory or jar) in which to search for the resource.
|
||||
* @param resourceName the name of the resource for which a stream is required.
|
||||
*
|
||||
* @return a stream to the required resource or null if the resource cannot be
|
||||
* found in the given file object
|
||||
*/
|
||||
private boolean contains(File file, String resourceName) {
|
||||
try {
|
||||
if (!file.exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (file.isDirectory()) {
|
||||
File resource = new File(file, resourceName);
|
||||
|
||||
if (resource.exists()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// is the zip file in the cache
|
||||
ZipFile zipFile = (ZipFile)zipFiles.get(file);
|
||||
if (zipFile == null) {
|
||||
zipFile = new ZipFile(file);
|
||||
zipFiles.put(file, zipFile);
|
||||
}
|
||||
ZipEntry entry = zipFile.getEntry(resourceName);
|
||||
if (entry != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
log("Ignoring Exception " + e.getClass().getName() + ": " + e.getMessage() +
|
||||
" reading resource " + resourceName + " from " + file, Project.MSG_VERBOSE);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a class on the given classpath.
|
||||
*/
|
||||
private boolean findClassInComponents(String name) {
|
||||
// we need to search the components of the path to see if we can find the
|
||||
// class we want.
|
||||
final String classname = name.replace('.', '/') + ".class";
|
||||
final String[] list = classpath.list();
|
||||
boolean found = false;
|
||||
int i = 0;
|
||||
while (i < list.length && found == false) {
|
||||
final File pathComponent = (File)project.resolveFile(list[i]);
|
||||
found = this.contains(pathComponent, classname);
|
||||
i++;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (C) The Krysalis project. All rights reserved. *
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This software is published under the terms of the Krysalis Patchy *
|
||||
* Software License version 1.1_01, a copy of which has been included *
|
||||
* at the bottom of this file. *
|
||||
*****************************************************************************/
|
||||
package org.krysalis.centipede.ant.task;
|
||||
|
||||
import com.izforge.izpress.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.Writer;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
|
||||
import org.w3c.tidy.Tidy;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.Property;
|
||||
|
||||
/**
|
||||
* Task to compress html size.
|
||||
*
|
||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
||||
* @created 14 January 2002
|
||||
*/
|
||||
public class IZPressHtmlCompressTask extends org.apache.tools.ant.Task {
|
||||
|
||||
private String src;
|
||||
private String dest;
|
||||
private Compressor compressor;
|
||||
private CompressorConfig conf;
|
||||
private String wipeComments = "true";
|
||||
private String wipeBorders = "true";
|
||||
private String wipeReturns = "true";
|
||||
private String wipeSpaces = "true";
|
||||
|
||||
PrintWriter pw;
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public IZPressHtmlCompressTask() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the task.
|
||||
*/
|
||||
public void init() {
|
||||
super.init();
|
||||
// Setup an instance of IZCompressor.
|
||||
conf =
|
||||
new CompressorConfig(false,false,true,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the task.
|
||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
||||
*/
|
||||
public void execute() throws org.apache.tools.ant.BuildException {
|
||||
|
||||
try{
|
||||
|
||||
FileInputStream in = new FileInputStream(src);
|
||||
FileOutputStream out = new FileOutputStream(dest);
|
||||
|
||||
compressor = new Compressor(in,out,conf);
|
||||
|
||||
compressor.compress();
|
||||
|
||||
out.flush();
|
||||
in.close();
|
||||
out.close();
|
||||
|
||||
}
|
||||
catch(IOException ioe)
|
||||
{
|
||||
throw new BuildException(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSrc(String src) {
|
||||
this.src = src;
|
||||
}
|
||||
|
||||
public void setDest(String dest) {
|
||||
this.dest = dest;
|
||||
}
|
||||
|
||||
|
||||
public void setWipeComments(String wipeComments) {
|
||||
this.wipeComments = wipeComments;
|
||||
}
|
||||
|
||||
|
||||
public void setWipeBorders(String wipeBorders) {
|
||||
this.wipeBorders = wipeBorders;
|
||||
}
|
||||
|
||||
public void setWipeReturns(String wipeReturns) {
|
||||
this.wipeReturns = wipeReturns;
|
||||
}
|
||||
|
||||
|
||||
public void setWipeSpaces(String wipeSpaces) {
|
||||
this.wipeSpaces = wipeSpaces;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
The Krysalis Patchy Software License, Version 1.1_01
|
||||
Copyright (c) 2002 Nicola Ken Barozzi. All rights reserved.
|
||||
|
||||
This Licence is compatible with the BSD licence as described and
|
||||
approved by http://www.opensource.org/, and is based on the
|
||||
Apache Software Licence Version 1.1.
|
||||
|
||||
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 for project
|
||||
Krysalis (http://www.krysalis.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself,
|
||||
if and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Krysalis" and "Nicola Ken Barozzi" and
|
||||
"Krysalis Centipede" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact krysalis@nicolaken.org.
|
||||
|
||||
5. Products derived from this software may not be called "Krysalis",
|
||||
"Krysalis Centipede", nor may "Krysalis" appear in their name,
|
||||
without prior written permission of Nicola Ken Barozzi.
|
||||
|
||||
6. This software may contain voluntary contributions made by many
|
||||
individuals, who decided to donate the code to this project in
|
||||
respect of this licence.
|
||||
|
||||
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 KRYSALIS PROJECT 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.
|
||||
====================================================================*/
|
|
@ -0,0 +1,280 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (C) The Krysalis project. All rights reserved. *
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This software is published under the terms of the Krysalis Patchy *
|
||||
* Software License version 1.1_01, a copy of which has been included *
|
||||
* at the bottom of this file. *
|
||||
*****************************************************************************/
|
||||
package org.krysalis.centipede.ant.task;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.Writer;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.tidy.Tidy;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.Property;
|
||||
|
||||
/**
|
||||
* Task to ask property values to the user. Uses current value as default.
|
||||
*
|
||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
||||
* @created 14 January 2002
|
||||
*/
|
||||
|
||||
public class JTidyTask
|
||||
extends org.apache.tools.ant.Task
|
||||
{
|
||||
private String src;
|
||||
private String dest;
|
||||
private String log;
|
||||
private Tidy tidy;
|
||||
private String warn = "false";
|
||||
private String summary = "false";
|
||||
PrintWriter pw;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
||||
public JTidyTask()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the task.
|
||||
*/
|
||||
|
||||
public void init()
|
||||
{
|
||||
super.init();
|
||||
|
||||
// Setup an instance of Tidy.
|
||||
tidy = new Tidy();
|
||||
tidy.setXmlOut(true);
|
||||
tidy.setXHTML(true);
|
||||
tidy.setDropFontTags(true);
|
||||
tidy.setLiteralAttribs(true);
|
||||
tidy.setMakeClean(true);
|
||||
tidy.setShowWarnings(Boolean.getBoolean(warn));
|
||||
tidy.setQuiet(!Boolean.getBoolean(summary));
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the task.
|
||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
||||
*/
|
||||
|
||||
public void execute()
|
||||
throws org.apache.tools.ant.BuildException
|
||||
{
|
||||
try
|
||||
{
|
||||
PrintWriter pw = new PrintWriter(new FileWriter(log));
|
||||
|
||||
tidy.setErrout(pw);
|
||||
|
||||
// Extract the document using JTidy and stream it.
|
||||
BufferedInputStream in =
|
||||
new BufferedInputStream(new FileInputStream(src));
|
||||
|
||||
// FileOutputStream out = new FileOutputStream(dest);
|
||||
PrintWriter out =
|
||||
new PrintWriter(new FileWriter(dest));
|
||||
|
||||
// using null as output to get dom so to remove duplicate attributes
|
||||
org.w3c.dom.Document domDoc = tidy.parseDOM(in, null);
|
||||
|
||||
domDoc.normalize();
|
||||
stripDuplicateAttributes(domDoc, null);
|
||||
org.apache.xml.serialize.OutputFormat format =
|
||||
new org.apache.xml.serialize.OutputFormat();
|
||||
|
||||
format.setIndenting(true);
|
||||
format.setEncoding("ISO-8859-1");
|
||||
format.setPreserveSpace(true);
|
||||
format.setLineSeparator("\n");
|
||||
org.apache.xml.serialize.XMLSerializer serializer =
|
||||
new org.apache.xml.serialize.XMLSerializer(out, format);
|
||||
|
||||
serializer.serialize(domDoc);
|
||||
out.flush();
|
||||
out.close();
|
||||
in.close();
|
||||
pw.flush();
|
||||
pw.close();
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
throw new BuildException(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
public void setSrc(String src)
|
||||
{
|
||||
this.src = src;
|
||||
}
|
||||
|
||||
public void setDest(String dest)
|
||||
{
|
||||
this.dest = dest;
|
||||
}
|
||||
|
||||
public void setLog(String log)
|
||||
{
|
||||
this.log = log;
|
||||
}
|
||||
|
||||
public void setWarn(String warn)
|
||||
{
|
||||
this.warn = warn;
|
||||
}
|
||||
|
||||
public void setSummary(String summary)
|
||||
{
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
// using parent because jtidy dom is bugged, cannot get parent or delete child
|
||||
public static void stripDuplicateAttributes(Node node, Node parent)
|
||||
{
|
||||
|
||||
// The output depends on the type of the node
|
||||
switch (node.getNodeType())
|
||||
{
|
||||
|
||||
case Node.DOCUMENT_NODE :
|
||||
{
|
||||
Document doc = ( Document ) node;
|
||||
Node child = doc.getFirstChild();
|
||||
|
||||
while (child != null)
|
||||
{
|
||||
stripDuplicateAttributes(child, node);
|
||||
child = child.getNextSibling();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Node.ELEMENT_NODE :
|
||||
{
|
||||
Element elt = ( Element ) node;
|
||||
NamedNodeMap attrs = elt.getAttributes();
|
||||
ArrayList nodesToRemove = new ArrayList();
|
||||
int nodesToRemoveNum = 0;
|
||||
|
||||
for (int i = 0; i < attrs.getLength(); i++)
|
||||
{
|
||||
Node a = attrs.item(i);
|
||||
|
||||
for (int j = 0; j < attrs.getLength(); j++)
|
||||
{
|
||||
Node b = attrs.item(j);
|
||||
|
||||
// if there are two attributes with same name
|
||||
if ((i != j)
|
||||
&& (a.getNodeName().equals(b.getNodeName())))
|
||||
{
|
||||
nodesToRemove.add(b);
|
||||
nodesToRemoveNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < nodesToRemoveNum; i++)
|
||||
{
|
||||
org.w3c.dom.Attr nodeToDelete =
|
||||
( org.w3c.dom.Attr ) nodesToRemove.get(i);
|
||||
org.w3c.dom.Element nodeToDeleteParent =
|
||||
( org.w3c.dom
|
||||
.Element ) node; // nodeToDelete.getParentNode();
|
||||
|
||||
nodeToDeleteParent.removeAttributeNode(nodeToDelete);
|
||||
}
|
||||
nodesToRemove.clear();
|
||||
Node child = elt.getFirstChild();
|
||||
|
||||
while (child != null)
|
||||
{
|
||||
stripDuplicateAttributes(child, node);
|
||||
child = child.getNextSibling();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default :
|
||||
|
||||
// do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
The Krysalis Patchy Software License, Version 1.1_01
|
||||
Copyright (c) 2002 Nicola Ken Barozzi. All rights reserved.
|
||||
|
||||
This Licence is compatible with the BSD licence as described and
|
||||
approved by http://www.opensource.org/, and is based on the
|
||||
Apache Software Licence Version 1.1.
|
||||
|
||||
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 for project
|
||||
Krysalis (http://www.krysalis.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself,
|
||||
if and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Krysalis" and "Nicola Ken Barozzi" and
|
||||
"Krysalis Centipede" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact krysalis@nicolaken.org.
|
||||
|
||||
5. Products derived from this software may not be called "Krysalis",
|
||||
"Krysalis Centipede", nor may "Krysalis" appear in their name,
|
||||
without prior written permission of Nicola Ken Barozzi.
|
||||
|
||||
6. This software may contain voluntary contributions made by many
|
||||
individuals, who decided to donate the code to this project in
|
||||
respect of this licence.
|
||||
|
||||
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 KRYSALIS PROJECT 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.
|
||||
====================================================================*/
|
|
@ -0,0 +1,92 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (C) The Apache Software Foundation. All rights reserved. *
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This software is published under the terms of the Apache Software License *
|
||||
* version 1.1, a copy of which has been included with this distribution in *
|
||||
* the LICENSE file. *
|
||||
*****************************************************************************/
|
||||
package org.krysalis.centipede.ant.task;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import org.apache.tools.ant.taskdefs.Property;
|
||||
|
||||
/**
|
||||
* Task to ask property values to the user. Uses current value as default.
|
||||
*
|
||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
||||
* @created 14 January 2002
|
||||
* @version CVS $Revision$ $Date$
|
||||
*/
|
||||
public class UserInputTask extends org.apache.tools.ant.Task {
|
||||
|
||||
private String question;
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public UserInputTask() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the task.
|
||||
*/
|
||||
public void init() {
|
||||
super.init();
|
||||
question = "?";
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the task.
|
||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
||||
*/
|
||||
public void execute() throws org.apache.tools.ant.BuildException {
|
||||
value = project.getProperty(name);
|
||||
String defaultvalue = value;
|
||||
|
||||
//if the property exists
|
||||
if (value != null) {
|
||||
|
||||
System.out.println("\n"+question + " ["+value + "] ");
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader (System.in));
|
||||
|
||||
try
|
||||
{
|
||||
value = reader.readLine();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
value = defaultvalue;
|
||||
}
|
||||
|
||||
if (!value.equals("")) {
|
||||
project.setProperty(name, value);
|
||||
} else {
|
||||
project.setProperty(name, defaultvalue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prompt text that will be presented to the user.
|
||||
* @param prompt String
|
||||
*/
|
||||
public void addText(String question) {
|
||||
this.question=question;
|
||||
}
|
||||
|
||||
public void setQuestion(String question) {
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,285 @@
|
|||
/*****************************************************************************
|
||||
* Copyright (C) The Krysalis project. All rights reserved. *
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This software is published under the terms of the Krysalis Patchy *
|
||||
* Software License version 1.1_01, a copy of which has been included *
|
||||
* at the bottom of this file. *
|
||||
*****************************************************************************/
|
||||
package org.krysalis.centipede.ant.task;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.Writer;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.FactoryConfigurationError;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.Property;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.taskdefs.Property;
|
||||
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.Project;
|
||||
import org.apache.tools.ant.AntClassLoader;
|
||||
import org.apache.tools.ant.ProjectHelper;
|
||||
import org.apache.tools.ant.types.Path;
|
||||
import org.apache.tools.ant.types.Reference;
|
||||
|
||||
/**
|
||||
* Task get property values from a valid xml file.
|
||||
* Example:
|
||||
* <root-tag>
|
||||
* <inner-tag>Text</inner-tag>
|
||||
* <2><3><4>false</4></3></2>
|
||||
* </root-tag>
|
||||
*
|
||||
* myattr=true
|
||||
* inner-tag=Text
|
||||
* 2.3.4=false
|
||||
*
|
||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
||||
* @created 14 January 2002
|
||||
*/
|
||||
|
||||
public class XmlPropertyTask extends org.apache.tools.ant.Task
|
||||
{
|
||||
private String src;
|
||||
private String prefix = "";
|
||||
private boolean keepRoot = true;
|
||||
private org.w3c.dom.Document document;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public XmlPropertyTask()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the task.
|
||||
*/
|
||||
|
||||
public void init()
|
||||
{
|
||||
super.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the task.
|
||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
||||
*/
|
||||
public void execute()
|
||||
throws org.apache.tools.ant.BuildException
|
||||
{
|
||||
BufferedInputStream configurationStream = null;
|
||||
|
||||
try
|
||||
{
|
||||
configurationStream =
|
||||
new BufferedInputStream(new FileInputStream(src));
|
||||
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
|
||||
factory.setValidating(false);
|
||||
factory.setNamespaceAware(false);
|
||||
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
document = builder.parse( configurationStream );
|
||||
|
||||
Element topElement = document.getDocumentElement();
|
||||
NodeList topChildren = topElement.getChildNodes();
|
||||
int numChildren = topChildren.getLength();
|
||||
|
||||
log("Using prefix: \""+prefix+"\"", Project.MSG_VERBOSE);
|
||||
|
||||
String prefixToUse = "";
|
||||
|
||||
if(!(prefix.equals("")))
|
||||
{
|
||||
prefixToUse = prefix;
|
||||
}
|
||||
|
||||
log("Prefix to use 1: \""+prefixToUse+"\"", Project.MSG_VERBOSE);
|
||||
|
||||
if((!(prefix.equals("")))&&keepRoot)
|
||||
{
|
||||
prefixToUse += ".";
|
||||
}
|
||||
|
||||
log("Prefix to use 2: \""+prefixToUse+"\"", Project.MSG_VERBOSE);
|
||||
|
||||
if(keepRoot)
|
||||
{
|
||||
prefixToUse += (topElement.getNodeName());
|
||||
}
|
||||
|
||||
log("Prefix to use 3: \""+prefixToUse+"\"", Project.MSG_VERBOSE);
|
||||
|
||||
for(int i=0; i<numChildren; i++)
|
||||
{
|
||||
addNodeRecursively(topChildren.item(i),prefixToUse, 0);
|
||||
}
|
||||
|
||||
} catch (SAXException sxe) {
|
||||
// Error generated during parsing
|
||||
Exception x = sxe;
|
||||
if (sxe.getException() != null)
|
||||
x = sxe.getException();
|
||||
throw new BuildException(x);
|
||||
|
||||
} catch (ParserConfigurationException pce) {
|
||||
// Parser with specified options can't be built
|
||||
throw new BuildException(pce);
|
||||
} catch (IOException ioe) {
|
||||
// I/O error
|
||||
throw new BuildException(ioe);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(configurationStream!=null){
|
||||
try{configurationStream.close();}catch(Exception e){}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void addNodeRecursively(org.w3c.dom.Node node, String text, int index) {
|
||||
|
||||
if (node.hasAttributes()) {
|
||||
org.w3c.dom.NamedNodeMap nodeAttributes = node.getAttributes();
|
||||
for (int i = 0; i < nodeAttributes.getLength(); i++) {
|
||||
Node attributeNode = nodeAttributes.item(i);
|
||||
String attributeName = text+(text.trim().equals("")?"":".")+node.getNodeName()+"."+attributeNode.getNodeName();
|
||||
String attributeValue = attributeNode.getNodeValue();
|
||||
log(attributeName+":"+attributeValue, Project.MSG_VERBOSE);
|
||||
project.setUserProperty(attributeName,attributeValue);
|
||||
}
|
||||
}
|
||||
|
||||
if(node.getNodeType()==Node.TEXT_NODE){
|
||||
String nodeText = node.getNodeValue();
|
||||
if(nodeText.trim().length()!=0)
|
||||
{
|
||||
log(text+":"+nodeText, Project.MSG_VERBOSE);
|
||||
if(index==0){
|
||||
project.setUserProperty(text,nodeText);
|
||||
}
|
||||
|
||||
project.setUserProperty(text+"["+String.valueOf(index)+"]",nodeText);
|
||||
}
|
||||
}
|
||||
|
||||
if (node.hasChildNodes()) {
|
||||
text+=((text.trim().equals("")?"":".")+node.getNodeName());
|
||||
org.w3c.dom.NodeList nodeChildren = node.getChildNodes();
|
||||
|
||||
int numChildren = nodeChildren.getLength();
|
||||
|
||||
StringBuffer childList = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < numChildren; i++) {
|
||||
if(i!=0){childList.append(",");}
|
||||
childList.append(node.getNodeName()+"["+String.valueOf(index)+"]");
|
||||
addNodeRecursively(nodeChildren.item(i), text, i);
|
||||
}
|
||||
|
||||
project.setUserProperty(text+".list",childList.toString());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void setFile(String src)
|
||||
{
|
||||
this.src = src.trim();
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix)
|
||||
{
|
||||
this.prefix = prefix.trim();
|
||||
}
|
||||
|
||||
public void setKeeproot(boolean keepRoot)
|
||||
{
|
||||
this.keepRoot = keepRoot;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
The Krysalis Patchy Software License, Version 1.1_01
|
||||
Copyright (c) 2002 Nicola Ken Barozzi. All rights reserved.
|
||||
|
||||
This Licence is compatible with the BSD licence as described and
|
||||
approved by http://www.opensource.org/, and is based on the
|
||||
Apache Software Licence Version 1.1.
|
||||
|
||||
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 for project
|
||||
Krysalis (http://www.krysalis.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself,
|
||||
if and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Krysalis" and "Nicola Ken Barozzi" and
|
||||
"Krysalis Centipede" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact krysalis@nicolaken.org.
|
||||
|
||||
5. Products derived from this software may not be called "Krysalis",
|
||||
"Krysalis Centipede", nor may "Krysalis" appear in their name,
|
||||
without prior written permission of Nicola Ken Barozzi.
|
||||
|
||||
6. This software may contain voluntary contributions made by many
|
||||
individuals, who decided to donate the code to this project in
|
||||
respect of this licence.
|
||||
|
||||
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 KRYSALIS PROJECT 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.
|
||||
====================================================================*/
|
|
@ -0,0 +1,75 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generic implementation of a datasource.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class AbstractDataSource implements DataSource
|
||||
{
|
||||
protected SearchConfiguration config;
|
||||
|
||||
public AbstractDataSource(SearchConfiguration config)
|
||||
{
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public SearchConfiguration getConfig()
|
||||
{
|
||||
return this.config;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A datasource is any source of data (filesystem, database, URL, etc)
|
||||
* which is indexed by SearchIndexer.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public interface DataSource
|
||||
{
|
||||
public static final String OBJECT_CLASS = "objectClass";
|
||||
public static final String OBJECT_IDENTIFIER = "objectid";
|
||||
|
||||
/**
|
||||
* Retrieve a list of Maps. Each map represents the
|
||||
* a document to be indexed. The key:value pair of the map
|
||||
* is the data of the document.
|
||||
*/
|
||||
public List getData() throws Exception;
|
||||
|
||||
/**
|
||||
* Obtain the SearchConfiguration object used to configure the datasource.
|
||||
*/
|
||||
public SearchConfiguration getConfig();
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
import org.apache.lucene.document.DateField;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import search.util.IOUtils;
|
||||
import search.contenthandler.FileContentHandler;
|
||||
import search.contenthandler.ContentHandlerFactory;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* A document is the atomic unit used for indexing purposes. It consists of
|
||||
* metadata as well as its file contents. File contents are handled by {@link FileContentHandler}.
|
||||
* </p>
|
||||
* <p>
|
||||
* DocumentHandler creates the {@link org.apache.lucene.document.Document},
|
||||
* adds the standard fields to it, delegates to {@link FileContentHandler} to handle
|
||||
* file contents, then adds to the {@link org.apache.lucene.index.IndexWriter}.
|
||||
* </p>
|
||||
* <p>
|
||||
* The standard fields are:<br>
|
||||
* <ul>
|
||||
* <li>filePath : Full filesystem path to the document
|
||||
* <li>fileName : File name of the document
|
||||
* <li>fileLastModifiedDate : Date the file was last modified
|
||||
* <li>fileSize : Size of the file in bytes
|
||||
* <li>fileFormat : Extension of the file {@see com.marketingbright.core.util.IOUtils#getFileExtension}
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class DocumentHandler
|
||||
{
|
||||
public static final String[] STANDARD_SEARCH_FIELDS =
|
||||
{"filePath", "fileName", "fileLastModifiedDate", "fileSize", "fileFormat"};
|
||||
private static Category cat = Category.getInstance(DocumentHandler.class.getName());
|
||||
private static Map customFields;
|
||||
private static final String EMPTY_STRING = "";
|
||||
|
||||
/**
|
||||
* Document object this DocumentHandler is handling.
|
||||
*/
|
||||
private Document doc;
|
||||
|
||||
/**
|
||||
* Parent Document (null if none).
|
||||
*/
|
||||
private Document parentDoc;
|
||||
|
||||
/**
|
||||
* IndexWriter to add this document to.
|
||||
*/
|
||||
private IndexWriter writer;
|
||||
|
||||
public static void setCustomFields(Map aCustomFields)
|
||||
{
|
||||
customFields = aCustomFields;
|
||||
}
|
||||
|
||||
public DocumentHandler(IndexWriter writer)
|
||||
{
|
||||
this.writer = writer;
|
||||
doc = new Document();
|
||||
}
|
||||
|
||||
public DocumentHandler(IndexWriter writer, Document parentDoc)
|
||||
{
|
||||
this(writer);
|
||||
this.parentDoc = parentDoc;
|
||||
}
|
||||
|
||||
public void process(Map metadata) throws IOException
|
||||
{
|
||||
File contentFile = new File((String) metadata.get("filePath"));
|
||||
|
||||
// add the standard fields
|
||||
doc.add(Field.Keyword("filePath", contentFile.toString()));
|
||||
doc.add(Field.Text("fileName", contentFile.getName()));
|
||||
doc.add(Field.Keyword("fileLastModifiedDate", DateField.timeToString(contentFile.lastModified())));
|
||||
doc.add(Field.Keyword("fileSize", String.valueOf(contentFile.length())));
|
||||
doc.add(Field.Text("fileFormat", IOUtils.getFileExtension(contentFile)));
|
||||
|
||||
// check if this is a document from datasource where
|
||||
// custom fields need to be added
|
||||
if (parentDoc == null)
|
||||
{
|
||||
// add the custom fields
|
||||
for (Iterator it = customFields.keySet().iterator(); it.hasNext();)
|
||||
{
|
||||
String field = (String) it.next();
|
||||
String value = (String) metadata.get(field);
|
||||
String type = (String) customFields.get(field);
|
||||
addFieldToDoc(type, field, value);
|
||||
}
|
||||
// Add OBJECT_CLASS_FIELD and OBJECT_IDENTIFIER
|
||||
// to populate the result templates with the proper
|
||||
// objects
|
||||
doc.add(Field.UnIndexed(DataSource.OBJECT_CLASS,
|
||||
(String) metadata.get(DataSource.OBJECT_CLASS)));
|
||||
doc.add(Field.Text(DataSource.OBJECT_IDENTIFIER,
|
||||
(String) metadata.get(DataSource.OBJECT_IDENTIFIER)));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Iterator it = customFields.keySet().iterator(); it.hasNext();)
|
||||
{
|
||||
String field = (String) it.next();
|
||||
String value = parentDoc.get(field);
|
||||
String type = (String) customFields.get(field);
|
||||
addFieldToDoc(type, field, value);
|
||||
}
|
||||
// Add OBJECT_CLASS_FIELD and OBJECT_IDENTIFIER
|
||||
// to populate the result templates with the proper
|
||||
// objects
|
||||
doc.add(Field.UnIndexed(DataSource.OBJECT_CLASS,
|
||||
parentDoc.get(DataSource.OBJECT_CLASS)));
|
||||
doc.add(Field.Text(DataSource.OBJECT_IDENTIFIER,
|
||||
parentDoc.get(DataSource.OBJECT_IDENTIFIER)));
|
||||
}
|
||||
if (!metadata.containsKey("fileContents"))
|
||||
{
|
||||
String extension = IOUtils.getFileExtension(contentFile);
|
||||
FileContentHandler cHandler = ContentHandlerFactory.getContentHandler(extension);
|
||||
if (cHandler != null)
|
||||
{
|
||||
cHandler.parse(doc, contentFile);
|
||||
if (cHandler.isNested())
|
||||
{
|
||||
List nestedData = cHandler.getNestedData();
|
||||
cat.debug("Nested data list size:" + nestedData.size());
|
||||
for (int i = 0; i < nestedData.size(); i++)
|
||||
{
|
||||
Map dataMap = (Map) nestedData.get(i);
|
||||
DocumentHandler handler = new DocumentHandler(writer, doc);
|
||||
handler.process(dataMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cat.warn("FileContentHandler not found for " + contentFile.getName());
|
||||
}
|
||||
}
|
||||
else
|
||||
doc.add(Field.Text("fileContents", (String) metadata.get("fileContents")));
|
||||
addToWriter();
|
||||
}
|
||||
|
||||
public void addToWriter() throws IOException
|
||||
{
|
||||
writer.addDocument(this.doc);
|
||||
}
|
||||
|
||||
private void addFieldToDoc(String type, String field, String value)
|
||||
{
|
||||
if (value == null)
|
||||
value = EMPTY_STRING;
|
||||
if (type.equalsIgnoreCase(SearchConfiguration.TEXT_FIELD_TYPE))
|
||||
doc.add(Field.Text(field, value));
|
||||
else if (type.equalsIgnoreCase(SearchConfiguration.KEYWORD_FIELD_TYPE))
|
||||
doc.add(Field.Keyword(field, value));
|
||||
else if (type.equalsIgnoreCase(SearchConfiguration.UNINDEXED_FIELD_TYPE))
|
||||
doc.add(Field.UnIndexed(field, value));
|
||||
else if (type.equalsIgnoreCase(SearchConfiguration.UNSTORED_FIELD_TYPE))
|
||||
doc.add(Field.UnStored(field, value));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.document.DateField;
|
||||
import org.apache.lucene.document.Field;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A filesystem-based datasource.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class FSDataSource extends AbstractDataSource
|
||||
{
|
||||
private File targetDirectory;
|
||||
|
||||
public FSDataSource(SearchConfiguration config)
|
||||
{
|
||||
super(config);
|
||||
}
|
||||
|
||||
public List getData()
|
||||
{
|
||||
List returnData = new ArrayList();
|
||||
loadDataFromFiles(targetDirectory, returnData);
|
||||
return returnData;
|
||||
}
|
||||
|
||||
public void setTargetDirectory(File targetDirectory)
|
||||
{
|
||||
this.targetDirectory = targetDirectory;
|
||||
}
|
||||
|
||||
private void loadDataFromFiles(File f, List list)
|
||||
{
|
||||
if (f.isDirectory())
|
||||
{
|
||||
File[] directoryTree = f.listFiles();
|
||||
for (int i = 0; i < directoryTree.length; i++)
|
||||
{
|
||||
loadDataFromFiles(directoryTree[i], list);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Map dataMap = new HashMap();
|
||||
dataMap.put("filePath", f.getPath());
|
||||
list.add(dataMap);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Thrown when loading SearchConfiguration.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class IllegalConfigurationException extends Exception
|
||||
{
|
||||
public IllegalConfigurationException(String msg)
|
||||
{
|
||||
super(msg);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Represents a datasource which obtains its data from a database.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class JDBCDataSource extends AbstractDataSource
|
||||
{
|
||||
/**
|
||||
* Columns in the database to index.
|
||||
*/
|
||||
protected String[] fields;
|
||||
static Category cat = Category.getInstance(JDBCDataSource.class.getName());
|
||||
|
||||
public JDBCDataSource(SearchConfiguration config)
|
||||
{
|
||||
super(config);
|
||||
loadFields();
|
||||
}
|
||||
|
||||
protected final void loadFields()
|
||||
{
|
||||
Set fieldSet = config.getCustomFields().keySet();
|
||||
fields = new String[fieldSet.size()];
|
||||
int i = 0;
|
||||
for (Iterator it = fieldSet.iterator(); it.hasNext();)
|
||||
{
|
||||
fields[i] = (String) it.next();
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,257 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.input.SAXBuilder;
|
||||
import search.util.DataUnformatFilter;
|
||||
import search.contenthandler.ContentHandlerFactory;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* Configures the indexing process using an XML file.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class SearchConfiguration
|
||||
{
|
||||
public static final String TEXT_FIELD_TYPE = "text";
|
||||
public static final String KEYWORD_FIELD_TYPE = "keyword";
|
||||
public static final String UNINDEXED_FIELD_TYPE = "unindexed";
|
||||
public static final String UNSTORED_FIELD_TYPE = "unstored";
|
||||
|
||||
/** Log4j category.
|
||||
*/
|
||||
static Category cat = Category.getInstance(SearchConfiguration.class.getName());
|
||||
|
||||
/**
|
||||
* Key in the config file to declare content handlers.
|
||||
*/
|
||||
private static final String CONTENT_HANDLER_KEY = "Search.ContentHandlers";
|
||||
|
||||
/**
|
||||
* Key in the config file to declare custom fields.
|
||||
*/
|
||||
private static final String FIELD_KEY = "Search.Fields";
|
||||
|
||||
/**
|
||||
* Map of content handlers.
|
||||
*/
|
||||
private Map contentHandlers = new HashMap();
|
||||
|
||||
/**
|
||||
* Map of (non-standard) custom fields to index.
|
||||
*/
|
||||
private Map customFields = new HashMap();
|
||||
|
||||
/**
|
||||
* Document object which represents the xml configuration file.
|
||||
*/
|
||||
private Document doc;
|
||||
|
||||
/**
|
||||
* Creates a new SearchConfiguration.
|
||||
*
|
||||
* @param configFile Name of the xml configuration file.
|
||||
*/
|
||||
public SearchConfiguration(String configFile) throws IllegalConfigurationException
|
||||
{
|
||||
try
|
||||
{
|
||||
SAXBuilder builder = new SAXBuilder();
|
||||
DataUnformatFilter format = new DataUnformatFilter();
|
||||
builder.setXMLFilter(format);
|
||||
doc = builder.build(configFile);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
cat.error("Error creating XML parser:" + e.getMessage(), e);
|
||||
}
|
||||
loadContentHandlers();
|
||||
loadCustomFields();
|
||||
}
|
||||
|
||||
public Map getContentHandlers()
|
||||
{
|
||||
return this.contentHandlers;
|
||||
}
|
||||
|
||||
public Map getCustomFields()
|
||||
{
|
||||
return this.customFields;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the content handlers.
|
||||
*/
|
||||
protected void loadContentHandlers() throws IllegalConfigurationException
|
||||
{
|
||||
String[] extensions = getChildPropertyAttributeValues(CONTENT_HANDLER_KEY, "extension");
|
||||
String[] handlers = getChildPropertyAttributeValues(CONTENT_HANDLER_KEY, "handler");
|
||||
if (extensions.length != handlers.length)
|
||||
throw new IllegalConfigurationException(
|
||||
"Illegal configuration of Search Content Handlers!");
|
||||
for (int i = 0; i < extensions.length; i++)
|
||||
{
|
||||
contentHandlers.put(extensions[i], generateObject(handlers[i]));
|
||||
}
|
||||
String[] defaultExtension = getChildPropertyAttributeValues(CONTENT_HANDLER_KEY, "default");
|
||||
for (int i = 0; i < defaultExtension.length; i++)
|
||||
{
|
||||
if (defaultExtension[i] != null && defaultExtension[i].equals("true"))
|
||||
{
|
||||
contentHandlers.put(ContentHandlerFactory.DEFAULT_HANDLER_KEY
|
||||
, generateObject(handlers[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the custom fields to index.
|
||||
*/
|
||||
protected void loadCustomFields() throws IllegalConfigurationException
|
||||
{
|
||||
String[] fields = getChildPropertyAttributeValues(FIELD_KEY, "name");
|
||||
String[] fieldtypes = getChildPropertyAttributeValues(FIELD_KEY, "type");
|
||||
if (fields.length != fieldtypes.length)
|
||||
throw new IllegalConfigurationException(
|
||||
"Illegal configuration of custom search fields!");
|
||||
for (int i = 0; i < fields.length; i++)
|
||||
{
|
||||
customFields.put(fields[i], fieldtypes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return attribute values for all child nodes.
|
||||
*/
|
||||
private String[] getChildPropertyAttributeValues(String parent,
|
||||
String attributeName)
|
||||
{
|
||||
String[] nodeName = parseNodeName(parent);
|
||||
Element element = doc.getRootElement();
|
||||
for (int i = 0; i < nodeName.length; i++)
|
||||
{
|
||||
element = element.getChild(nodeName[i]);
|
||||
if (element == null)
|
||||
{
|
||||
return new String[]{};
|
||||
}
|
||||
}
|
||||
List children = element.getChildren();
|
||||
int childCount = children.size();
|
||||
String[] childrenAttributeValue = new String[childCount];
|
||||
for (int i = 0; i < childCount; i++)
|
||||
{
|
||||
childrenAttributeValue[i] =
|
||||
((Element) children.get(i)).getAttributeValue(attributeName);
|
||||
}
|
||||
return childrenAttributeValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Node names are in the form "x.y.z". Returns a String array
|
||||
* representation of the node elements.
|
||||
*/
|
||||
private String[] parseNodeName(String nodeName)
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(nodeName, ".");
|
||||
String[] nodeElements = new String[st.countTokens()];
|
||||
int i = 0;
|
||||
while (st.hasMoreTokens())
|
||||
{
|
||||
nodeElements[i] = st.nextToken();
|
||||
++i;
|
||||
}
|
||||
return nodeElements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to return an object based on its class name.
|
||||
* The object needs to have a constructor which accepts no parameters.
|
||||
*
|
||||
* @param className Class name of object to be generated
|
||||
* @return Object
|
||||
*/
|
||||
private static Object generateObject(String className)
|
||||
{
|
||||
Object o = null;
|
||||
try
|
||||
{
|
||||
Class c = Class.forName(className);
|
||||
o = c.newInstance();
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
{
|
||||
cat.error(cnfe.getMessage() + " No class named '" + className + "' was found.", cnfe);
|
||||
}
|
||||
catch (InstantiationException ie)
|
||||
{
|
||||
cat.error(ie.getMessage() + " Class named '" + className + "' could not be instantiated.", ie);
|
||||
}
|
||||
catch (IllegalAccessException iae)
|
||||
{
|
||||
cat.error(iae.getMessage() + " No access to class named '" + className + "'.", iae);
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
package search;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.analysis.standard.StandardAnalyzer;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.apache.log4j.Category;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import search.contenthandler.ContentHandlerFactory;
|
||||
|
||||
/**
|
||||
* Entry point for search engine indexing.
|
||||
* <p>
|
||||
* SearchIndexer is responsible for creating the IndexWriter {@see org.apache.lucene.index.IndexWriter}
|
||||
* and passing it to DocumentHandlers {@link DocumentHandler} to index individual documents.
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class SearchIndexer
|
||||
{
|
||||
private static Category cat = Category.getInstance(SearchIndexer.class);
|
||||
|
||||
private IndexWriter writer;
|
||||
private DataSource source;
|
||||
private int indexedDocuments = 0;
|
||||
|
||||
public SearchIndexer() throws IOException
|
||||
{
|
||||
writer = new IndexWriter("/usr/local/lucene/index",
|
||||
new StandardAnalyzer(), true);
|
||||
}
|
||||
|
||||
public void index() throws IOException, Exception
|
||||
{
|
||||
cat.debug("Initiating indexing...");
|
||||
|
||||
init();
|
||||
List dataMapList = source.getData();
|
||||
for (int i = 0; i < dataMapList.size(); i++)
|
||||
{
|
||||
Map map = (Map) dataMapList.get(i);
|
||||
DocumentHandler docHandler = new DocumentHandler(writer);
|
||||
try
|
||||
{
|
||||
docHandler.process(map);
|
||||
++indexedDocuments;
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
cat.error("Error encountered indexing:" + ioe.getMessage(),
|
||||
ioe);
|
||||
}
|
||||
}
|
||||
writer.optimize();
|
||||
writer.close();
|
||||
|
||||
cat.debug(indexedDocuments + " documents were indexed.");
|
||||
}
|
||||
|
||||
public void setSource(DataSource source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public void init()
|
||||
{
|
||||
ContentHandlerFactory.setContentHandlers(source.getConfig().getContentHandlers());
|
||||
DocumentHandler.setCustomFields(source.getConfig().getCustomFields());
|
||||
}
|
||||
|
||||
public int getIndexedDocuments()
|
||||
{
|
||||
return this.indexedDocuments;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Factory responsible for obtaining ContentHandlers.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class ContentHandlerFactory
|
||||
{
|
||||
public static final String DEFAULT_HANDLER_KEY = "DEFAULT";
|
||||
static Category cat = Category.getInstance(ContentHandlerFactory.class.getName());
|
||||
private static Map handlerCache = null;
|
||||
public static FileContentHandler getContentHandler(String extension)
|
||||
{
|
||||
if (handlerCache.containsKey(extension))
|
||||
return (FileContentHandler) ((FileContentHandler) handlerCache.get(extension)).clone();
|
||||
else if (handlerCache.containsKey(DEFAULT_HANDLER_KEY))
|
||||
return (FileContentHandler) ((FileContentHandler) handlerCache.get(DEFAULT_HANDLER_KEY)).clone();
|
||||
else
|
||||
return NullHandler.getInstance();
|
||||
}
|
||||
|
||||
public static void setContentHandlers(Map contentHandlers)
|
||||
{
|
||||
handlerCache = contentHandlers;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A content handler determines how to index a file's contents.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public interface FileContentHandler
|
||||
{
|
||||
/**
|
||||
* Perform filetype-specific actions to index the file's contents and
|
||||
* add it to the {@link org.apache.lucene.document.Document} object.
|
||||
*/
|
||||
public void parse(Document doc, File f);
|
||||
|
||||
/**
|
||||
* Is this a collection of files?
|
||||
*/
|
||||
public boolean isNested();
|
||||
|
||||
/**
|
||||
* Return the collection of files contained within the parent file.
|
||||
*/
|
||||
public List getNestedData();
|
||||
|
||||
public Object clone();
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A no-op implementation to make FileContentHandler creation easier.
|
||||
* <p>
|
||||
* Classes which need to implement the FileContentHandler interface should
|
||||
* extend this class or {@link NestedFileContentHandlerAdapter}.
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class FileContentHandlerAdapter implements FileContentHandler
|
||||
{
|
||||
public void parse(Document doc, File f)
|
||||
{
|
||||
}
|
||||
public List getNestedData()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public abstract Object clone();
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Factory responsible for obtaining ContentHandlers.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class ContentHandlerFactory
|
||||
{
|
||||
public static final String DEFAULT_HANDLER_KEY = "DEFAULT";
|
||||
static Category cat = Category.getInstance(ContentHandlerFactory.class.getName());
|
||||
private static Map handlerCache = null;
|
||||
public static FileContentHandler getContentHandler(String extension)
|
||||
{
|
||||
if (handlerCache.containsKey(extension))
|
||||
return (FileContentHandler) ((FileContentHandler) handlerCache.get(extension)).clone();
|
||||
else if (handlerCache.containsKey(DEFAULT_HANDLER_KEY))
|
||||
return (FileContentHandler) ((FileContentHandler) handlerCache.get(DEFAULT_HANDLER_KEY)).clone();
|
||||
else
|
||||
return NullHandler.getInstance();
|
||||
}
|
||||
|
||||
public static void setContentHandlers(Map contentHandlers)
|
||||
{
|
||||
handlerCache = contentHandlers;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
import org.apache.lucene.document.DateField;
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import search.util.IOUtils;
|
||||
|
||||
/**
|
||||
* Handles GZip content.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class GZipHandler extends NestedFileContentHandlerAdapter
|
||||
{
|
||||
static Category cat = Category.getInstance(GZipHandler.class.getName());
|
||||
|
||||
public void parse(Document doc, File f)
|
||||
{
|
||||
if (!f.exists())
|
||||
return;
|
||||
try
|
||||
{
|
||||
File tempDir = new File(TEMP_FOLDER);
|
||||
tempDir.mkdirs();
|
||||
tempDir.deleteOnExit();
|
||||
String filename = f.getName();
|
||||
File tempFile = new File(tempDir, filename.substring(0, filename.lastIndexOf(".")));
|
||||
tempFile.deleteOnExit();
|
||||
IOUtils.extractGZip(f, tempFile);
|
||||
indexGZipDirectory(tempDir, dataMapList);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
cat.error("IOException ungzipping " + f.toString(), ioe);
|
||||
}
|
||||
}
|
||||
|
||||
// only one file, but let's just treat it like a directory anyway
|
||||
private void indexGZipDirectory(File dir, List dataMapList)
|
||||
{
|
||||
if (dir.isDirectory())
|
||||
{
|
||||
File[] dirContents = dir.listFiles();
|
||||
for (int i = 0; i < dirContents.length; i++)
|
||||
{
|
||||
indexGZipDirectory(dirContents[i], dataMapList);
|
||||
}
|
||||
}
|
||||
else if (dir.isFile())
|
||||
{
|
||||
// here create new DataMap for the gzip entry
|
||||
Map dataMap = new HashMap();
|
||||
dataMap.put("filePath", dir.toString());
|
||||
dataMapList.add(dataMap);
|
||||
}
|
||||
}
|
||||
|
||||
public Object clone()
|
||||
{
|
||||
return new GZipHandler();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A no-op implementation to make FileContentHandler creation easier.
|
||||
* <p>
|
||||
* Classes which need to implement the FileContentHandler interface
|
||||
* and need to handle nested content (example: zip, tar, rar, etc) should
|
||||
* extend this class.
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public abstract class NestedFileContentHandlerAdapter
|
||||
extends FileContentHandlerAdapter
|
||||
{
|
||||
protected final String TEMP_FOLDER = "/usr/temp" + '/'
|
||||
+ Math.random() + '/';
|
||||
|
||||
protected List dataMapList = new ArrayList();
|
||||
|
||||
public abstract void parse(Document doc, File f);
|
||||
|
||||
public boolean isNested()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public List getNestedData()
|
||||
{
|
||||
return this.dataMapList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Do-nothing content handler.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class NullHandler extends FileContentHandlerAdapter
|
||||
{
|
||||
static NullHandler singleton = new NullHandler();
|
||||
|
||||
public static FileContentHandler getInstance()
|
||||
{
|
||||
return singleton;
|
||||
}
|
||||
|
||||
public Object clone()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isNested()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import search.util.IOUtils;
|
||||
import org.apache.log4j.Category;
|
||||
import org.apache.lucene.document.DateField;
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handles Tar files.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class TARHandler extends NestedFileContentHandlerAdapter
|
||||
{
|
||||
static Category cat = Category.getInstance(TARHandler.class.getName());
|
||||
|
||||
public void parse(Document doc, File f)
|
||||
{
|
||||
if (!f.exists())
|
||||
return;
|
||||
try
|
||||
{
|
||||
File tempDir = new File(TEMP_FOLDER);
|
||||
tempDir.deleteOnExit();
|
||||
IOUtils.extractTar(f, tempDir);
|
||||
indexTarDirectory(tempDir, dataMapList);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
cat.error(ioe.getMessage(), ioe);
|
||||
}
|
||||
}
|
||||
|
||||
private void indexTarDirectory(File dir, List dataMapList)
|
||||
{
|
||||
if (dir.isDirectory())
|
||||
{
|
||||
File[] dirContents = dir.listFiles();
|
||||
for (int i = 0; i < dirContents.length; i++)
|
||||
{
|
||||
indexTarDirectory(dirContents[i], dataMapList);
|
||||
}
|
||||
}
|
||||
else if (dir.isFile())
|
||||
{
|
||||
// here create new DataMap for the tarred file
|
||||
Map dataMap = new HashMap();
|
||||
dataMap.put("filePath", dir.toString());
|
||||
dataMapList.add(dataMap);
|
||||
}
|
||||
}
|
||||
|
||||
public Object clone()
|
||||
{
|
||||
return new TARHandler();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.log4j.Category;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import search.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Handles text-based content.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class TextHandler extends FileContentHandlerAdapter
|
||||
{
|
||||
static Category cat = Category.getInstance(TextHandler.class.getName());
|
||||
|
||||
public void parse(Document doc, File f)
|
||||
{
|
||||
if (!f.exists())
|
||||
{
|
||||
cat.error(f.toString() + " doesn't exist! Failing silently...");
|
||||
return;
|
||||
}
|
||||
doc.add(Field.Text("fileContents", getReader(f)));
|
||||
}
|
||||
|
||||
public boolean isNested()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private Reader getReader(File f)
|
||||
{
|
||||
Reader reader = null;
|
||||
try
|
||||
{
|
||||
BufferedReader br = new BufferedReader(new FileReader(f));
|
||||
String s = null;
|
||||
StringBuffer strbf = new StringBuffer();
|
||||
while ((s = br.readLine()) != null)
|
||||
{
|
||||
if (s.trim().length() > 0)
|
||||
{
|
||||
strbf.append(StringUtils.removeUnreadableCharacters(s));
|
||||
}
|
||||
}
|
||||
reader = new StringReader(strbf.toString());
|
||||
}
|
||||
catch (FileNotFoundException nfe)
|
||||
{
|
||||
cat.error("File Not Found Exception:" + f.toString(), nfe);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
cat.error(ioe.getMessage(), ioe);
|
||||
}
|
||||
return reader;
|
||||
}
|
||||
|
||||
public Object clone()
|
||||
{
|
||||
return new TextHandler();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
package search.contenthandler;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import search.util.IOUtils;
|
||||
import org.apache.log4j.Category;
|
||||
import org.apache.lucene.document.Document;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipException;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
* Handles Zip files.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public class ZIPHandler extends NestedFileContentHandlerAdapter
|
||||
{
|
||||
static Category cat = Category.getInstance(ZIPHandler.class.getName());
|
||||
|
||||
public void parse(Document doc, File f)
|
||||
{
|
||||
if (!f.exists())
|
||||
return;
|
||||
try
|
||||
{
|
||||
ZipFile zFile = new ZipFile(f);
|
||||
for (Enumeration e = zFile.entries(); e.hasMoreElements();)
|
||||
{
|
||||
ZipEntry entry = (ZipEntry) e.nextElement();
|
||||
String entryName = entry.getName();
|
||||
IOUtils.writeToTempFile(zFile.getInputStream(entry),
|
||||
TEMP_FOLDER + entryName);
|
||||
if (!entry.isDirectory())
|
||||
{
|
||||
// create a new DataMap for each zip entry
|
||||
Map dataMap = new HashMap();
|
||||
dataMap.put("filePath", TEMP_FOLDER + entryName);
|
||||
dataMapList.add(dataMap);
|
||||
}
|
||||
}
|
||||
zFile.close();
|
||||
}
|
||||
catch (ZipException ze)
|
||||
{
|
||||
cat.error("ZipException parsing zip:" + ze.getMessage(), ze);
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
cat.error("IOException parsing zip:" + ioe.getMessage(), ioe);
|
||||
}
|
||||
}
|
||||
|
||||
public Object clone()
|
||||
{
|
||||
return new ZIPHandler();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,312 @@
|
|||
/*--
|
||||
|
||||
Copyright (C) 2000 Brett McLaughlin & Jason Hunter.
|
||||
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 disclaimer that follows
|
||||
these conditions in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
3. The name "JDOM" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact license@jdom.org.
|
||||
|
||||
4. Products derived from this software may not be called "JDOM", nor
|
||||
may "JDOM" appear in their name, without prior written permission
|
||||
from the JDOM Project Management (pm@jdom.org).
|
||||
|
||||
In addition, we request (but do not require) that you include in the
|
||||
end-user documentation provided with the redistribution and/or in the
|
||||
software itself an acknowledgement equivalent to the following:
|
||||
"This product includes software developed by the
|
||||
JDOM Project (http://www.jdom.org/)."
|
||||
Alternatively, the acknowledgment may be graphical using the logos
|
||||
available at http://www.jdom.org/images/logos.
|
||||
|
||||
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 JDOM AUTHORS OR THE PROJECT
|
||||
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 JDOM Project and was originally
|
||||
created by Brett McLaughlin <brett@jdom.org> and
|
||||
Jason Hunter <jhunter@jdom.org>. For more information on the
|
||||
JDOM Project, please see <http://www.jdom.org/>.
|
||||
|
||||
*/
|
||||
package search.util;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
|
||||
/**
|
||||
* Filter for removing formatting from data- or field-oriented XML.
|
||||
*
|
||||
* <i>Code and comments adapted from DataWriter-0.2, written
|
||||
* by David Megginson and released into the public domain,
|
||||
* without warranty.</i>
|
||||
*
|
||||
* <p>This filter removes leading and trailing whitespace from
|
||||
* field-oriented XML without mixed content. Note that this class will
|
||||
* likely not yield appropriate results for document-oriented XML like
|
||||
* XHTML pages, which mix character data and elements together.</p>
|
||||
*
|
||||
* @see DataFormatFilter
|
||||
*/
|
||||
public class DataUnformatFilter extends XMLFilterBase
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Constructors.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Create a new filter.
|
||||
*/
|
||||
public DataUnformatFilter()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new filter.
|
||||
*
|
||||
* <p>Use the XMLReader provided as the source of events.</p>
|
||||
*
|
||||
* @param xmlreader The parent in the filter chain.
|
||||
*/
|
||||
public DataUnformatFilter(XMLReader xmlreader)
|
||||
{
|
||||
super(xmlreader);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Public methods.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Reset the filter so that it can be reused.
|
||||
*
|
||||
* <p>This method is especially useful if the filter failed
|
||||
* with an exception the last time through.</p>
|
||||
*/
|
||||
public void reset ()
|
||||
{
|
||||
state = SEEN_NOTHING;
|
||||
stateStack = new Stack();
|
||||
whitespace = new StringBuffer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter a start document event.
|
||||
*
|
||||
* <p>Reset state and pass the event on for further processing.</p>
|
||||
*
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startDocument
|
||||
*/
|
||||
public void startDocument ()
|
||||
throws SAXException
|
||||
{
|
||||
reset();
|
||||
super.startDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter a start element event.
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @param qName The element's qualified (prefixed) name.
|
||||
* @param atts The element's attribute list.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
*/
|
||||
public void startElement (String uri, String localName,
|
||||
String qName, Attributes atts)
|
||||
throws SAXException
|
||||
{
|
||||
clearWhitespace();
|
||||
stateStack.push(SEEN_ELEMENT);
|
||||
state = SEEN_NOTHING;
|
||||
super.startElement(uri, localName, qName, atts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter an end element event.
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @param qName The element's qualified (prefixed) name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void endElement (String uri, String localName, String qName)
|
||||
throws SAXException
|
||||
{
|
||||
if (state == SEEN_ELEMENT) {
|
||||
clearWhitespace();
|
||||
} else {
|
||||
emitWhitespace();
|
||||
}
|
||||
state = stateStack.pop();
|
||||
super.endElement(uri, localName, qName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter a character data event.
|
||||
*
|
||||
* @param ch The characters to write.
|
||||
* @param start The starting position in the array.
|
||||
* @param length The number of characters to use.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#characters
|
||||
*/
|
||||
public void characters (char ch[], int start, int length)
|
||||
throws SAXException
|
||||
{
|
||||
if (state != SEEN_DATA) {
|
||||
|
||||
/* Look for non-whitespace. */
|
||||
int end = start + length;
|
||||
while (end-- > start) {
|
||||
if (!isXMLWhitespace(ch[end]))
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If all the characters are whitespace, save them for later.
|
||||
* If we've got some data, emit any saved whitespace and update
|
||||
* our state to show we've seen data.
|
||||
*/
|
||||
if (end < start) {
|
||||
saveWhitespace(ch, start, length);
|
||||
} else {
|
||||
state = SEEN_DATA;
|
||||
emitWhitespace();
|
||||
}
|
||||
}
|
||||
|
||||
/* Pass on everything inside a data field. */
|
||||
if (state == SEEN_DATA) {
|
||||
super.characters(ch, start, length);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter an ignorable whitespace event.
|
||||
*
|
||||
* @param ch The array of characters to write.
|
||||
* @param start The starting position in the array.
|
||||
* @param length The number of characters to write.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#ignorableWhitespace
|
||||
*/
|
||||
public void ignorableWhitespace (char ch[], int start, int length)
|
||||
throws SAXException
|
||||
{
|
||||
emitWhitespace();
|
||||
// ignore
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter a processing instruction event.
|
||||
*
|
||||
* @param target The PI target.
|
||||
* @param data The PI data.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#processingInstruction
|
||||
*/
|
||||
public void processingInstruction (String target, String data)
|
||||
throws SAXException
|
||||
{
|
||||
emitWhitespace();
|
||||
super.processingInstruction(target, data);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Internal methods.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Saves trailing whitespace.
|
||||
*/
|
||||
protected void saveWhitespace (char[] ch, int start, int length) {
|
||||
whitespace.append(ch, start, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes saved whitespace down the filter chain.
|
||||
*/
|
||||
protected void emitWhitespace ()
|
||||
throws SAXException
|
||||
{
|
||||
char[] data = new char[whitespace.length()];
|
||||
if (whitespace.length() > 0) {
|
||||
whitespace.getChars(0, data.length, data, 0);
|
||||
whitespace.setLength(0);
|
||||
super.characters(data, 0, data.length);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Discards saved whitespace.
|
||||
*/
|
||||
protected void clearWhitespace () {
|
||||
whitespace.setLength(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <var>true</var> if character is XML whitespace.
|
||||
*/
|
||||
private boolean isXMLWhitespace (char c)
|
||||
{
|
||||
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Constants.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
private static final Object SEEN_NOTHING = new Object();
|
||||
private static final Object SEEN_ELEMENT = new Object();
|
||||
private static final Object SEEN_DATA = new Object();
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Internal state.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
private Object state = SEEN_NOTHING;
|
||||
private Stack stateStack = new Stack();
|
||||
|
||||
private StringBuffer whitespace = new StringBuffer();
|
||||
}
|
||||
|
||||
// end of DataUnformatFilter.java
|
|
@ -0,0 +1,396 @@
|
|||
package search.util;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
//import com.ice.tar.TarArchive; -dunno where this lives -ACO
|
||||
import org.apache.log4j.Category;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* Utility IO-related methods.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public final class IOUtils
|
||||
{
|
||||
/**
|
||||
* Log4j category.
|
||||
*/
|
||||
static Category cat = Category.getInstance(IOUtils.class.getName());
|
||||
|
||||
/**
|
||||
* Writes data from the inputstream to the outputstream.
|
||||
*
|
||||
* @param in InputStream to read from.
|
||||
* @param out OutputStream to write to.
|
||||
* @throws IOException I/O error.
|
||||
*/
|
||||
public static void transferData(InputStream in, OutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
byte[] data = new byte[10000];
|
||||
int len;
|
||||
while ((len = in.read(data)) != -1)
|
||||
{
|
||||
out.write(data, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
/** To copy the file. (from Java Examples in a Nutshell)
|
||||
* @param from_name source file with full path.
|
||||
* @param to_name target file with full path.
|
||||
*/
|
||||
public static void copyFile(String from_name, String to_name)
|
||||
throws IOException
|
||||
{
|
||||
File from_file = new File(from_name);
|
||||
File to_file = new File(to_name);
|
||||
copyFile(from_file, to_file);
|
||||
}
|
||||
|
||||
/** To copy the file. (from Java Examples in a Nutshell)
|
||||
* @param from_file source file with full path.
|
||||
* @param to_file target file with full path.
|
||||
*/
|
||||
public static void copyFile(File from_file, File to_file)
|
||||
throws IOException
|
||||
{
|
||||
if (!from_file.exists())
|
||||
throw new IOException("FileCopy: no such source file: " + from_file.getName());
|
||||
if (!from_file.isFile())
|
||||
throw new IOException("FileCopy: can't copy directory: " + from_file.getName());
|
||||
if (!from_file.canRead())
|
||||
throw new IOException("FileCopy: source file is unreadable: " + from_file.getName());
|
||||
|
||||
// If we've gotten this far, then everything is okay.
|
||||
// So we copy the file, a buffer of bytes at a time.
|
||||
FileInputStream from = null; // Stream to read from source
|
||||
FileOutputStream to = null; // Stream to write to destination
|
||||
try
|
||||
{
|
||||
from = new FileInputStream(from_file); // Create input stream
|
||||
to = new FileOutputStream(to_file); // Create output stream
|
||||
byte[] buffer = new byte[8192]; // A buffer to hold file contents
|
||||
int bytes_read; // How many bytes in buffer
|
||||
// Read a chunk of bytes into the buffer, then write them out,
|
||||
// looping until we reach the end of the file (when read() returns -1).
|
||||
// Note the combination of assignment and comparison in this while
|
||||
// loop. This is a common I/O programming idiom.
|
||||
while ((bytes_read = from.read(buffer)) != -1) // Read bytes until EOF
|
||||
to.write(buffer, 0, bytes_read); // write bytes
|
||||
}
|
||||
|
||||
// Always close the streams, even if exceptions were thrown
|
||||
finally
|
||||
{
|
||||
if (from != null)
|
||||
try
|
||||
{
|
||||
from.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
;
|
||||
}
|
||||
if (to != null)
|
||||
try
|
||||
{
|
||||
to.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves files from one directory to another. The source directory is not moved.
|
||||
* <br><br>
|
||||
* Implementation note: Only files are moved. Directories within the source
|
||||
* are not moved as well.
|
||||
* @param File Source directory.
|
||||
* @param File Destination directory.
|
||||
*/
|
||||
public static void moveFiles(File source, File destination)
|
||||
throws IOException
|
||||
{
|
||||
InputStream in = null;
|
||||
OutputStream out = null;
|
||||
if (!source.isDirectory())
|
||||
throw new IOException("Expected a directory but "
|
||||
+ source.toString() + " is a file!");
|
||||
if (!destination.isDirectory())
|
||||
throw new IOException("Expected a directory but "
|
||||
+ destination.toString() + " is a file!");
|
||||
File[] farray = source.listFiles();
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < farray.length; i++)
|
||||
{
|
||||
if (farray[i].isFile())
|
||||
{
|
||||
File target = new File(destination, farray[i].getName());
|
||||
if (!target.exists() || target.canWrite())
|
||||
{
|
||||
in = new FileInputStream(farray[i]);
|
||||
out = new FileOutputStream(target);
|
||||
transferData(in, out);
|
||||
in.close();
|
||||
out.close();
|
||||
if (target.exists())
|
||||
farray[i].delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
in = null;
|
||||
out = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (in != null)
|
||||
in.close();
|
||||
if (out != null)
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively deletes a directory.
|
||||
* @param File Directory to delete.
|
||||
*/
|
||||
public static void deleteDirectory(File directory)
|
||||
{
|
||||
File[] fArray = directory.listFiles();
|
||||
for (int i = 0; i < fArray.length; i++)
|
||||
{
|
||||
if (fArray[i].isDirectory())
|
||||
{
|
||||
deleteDirectory(fArray[i]);
|
||||
}
|
||||
fArray[i].delete();
|
||||
}
|
||||
directory.delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an input stream to a temporary file which is set
|
||||
* to delete when the VM exits.
|
||||
* @param Inputstream to read data from
|
||||
* @param Temporary file to write to
|
||||
*/
|
||||
public static void writeToTempFile(InputStream in, String tempfile)
|
||||
throws IOException
|
||||
{
|
||||
OutputStream out = null;
|
||||
try
|
||||
{
|
||||
File f = new File(tempfile);
|
||||
f.deleteOnExit();
|
||||
char lastChar = tempfile.charAt(tempfile.length() - 1);
|
||||
// make no assumptions that java.io.File detects directories
|
||||
// in a cross-platform manner
|
||||
if (f.isDirectory() || lastChar == '\\' || lastChar == '/')
|
||||
f.mkdirs();
|
||||
else
|
||||
{
|
||||
// ensure that all necessary directories are created
|
||||
File parent = f.getParentFile();
|
||||
parent.deleteOnExit();
|
||||
parent.mkdirs();
|
||||
out = new FileOutputStream(tempfile);
|
||||
transferData(in, out);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (out != null)
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an file to a ZipOutputStream.
|
||||
* @param File to read data from
|
||||
* @param Path of the ZipEntry
|
||||
* @param ZipOutputStream to write to
|
||||
*/
|
||||
public static void addToZipOutputStream(String file,
|
||||
String zipPath,
|
||||
ZipOutputStream out)
|
||||
throws FileNotFoundException, IOException
|
||||
{
|
||||
File f = new File(file);
|
||||
byte[] buffer = new byte[8192]; // Create a buffer for copying
|
||||
int bytes_read;
|
||||
FileInputStream in = null;
|
||||
try
|
||||
{
|
||||
in = new FileInputStream(f); // Stream to read file
|
||||
ZipEntry entry = new ZipEntry(zipPath); // Make a ZipEntry
|
||||
out.putNextEntry(entry); // Store entry in zipfile
|
||||
while ((bytes_read = in.read(buffer)) != -1) // Copy bytes to zipfile
|
||||
out.write(buffer, 0, bytes_read);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (in != null)
|
||||
in.close(); // Close input stream
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts a tar file to a directory.
|
||||
* @param Tar file to read data from
|
||||
* @param Directory to write to
|
||||
*/
|
||||
public static void extractTar(File tarFile, File destDir)
|
||||
throws IOException
|
||||
{
|
||||
/*
|
||||
FileInputStream fis = null;
|
||||
try
|
||||
{
|
||||
fis = new FileInputStream(tarFile);
|
||||
TarArchive ta = new TarArchive(fis);
|
||||
ta.extractContents(destDir);
|
||||
ta.closeArchive();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (fis != null)
|
||||
fis.close();
|
||||
}
|
||||
*/
|
||||
throw new RuntimeException("This method has been officially broken "+
|
||||
"by andy who couldn't find TarArchive");
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts a GZip file to a file.
|
||||
* @param GZip file to read data from
|
||||
* @param File to write to
|
||||
*/
|
||||
public static void extractGZip(File f, File destFile) throws IOException
|
||||
{
|
||||
FileOutputStream out = null;
|
||||
FileInputStream fis = null;
|
||||
GZIPInputStream gzin = null;
|
||||
try
|
||||
{
|
||||
out = new FileOutputStream(destFile);
|
||||
fis = new FileInputStream(f);
|
||||
gzin = new GZIPInputStream(fis);
|
||||
byte[] data = new byte[10000];
|
||||
int len;
|
||||
while ((len = gzin.read(data)) != -1)
|
||||
{
|
||||
out.write(data, 0, len);
|
||||
}
|
||||
out.flush();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (gzin != null)
|
||||
gzin.close();
|
||||
if (out != null)
|
||||
out.close();
|
||||
if (fis != null)
|
||||
fis.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* reads all bytes from the given stream
|
||||
* @param is the stream to read from
|
||||
*/
|
||||
public static final byte[] loadBytes(InputStream is) throws IOException
|
||||
{
|
||||
// read in the entry data
|
||||
int count = 0;
|
||||
byte[] buffer = new byte[0];
|
||||
byte[] chunk = new byte[4096];
|
||||
while ((count = is.read(chunk)) >= 0)
|
||||
{
|
||||
byte[] t = new byte[buffer.length + count];
|
||||
System.arraycopy(buffer, 0, t, 0, buffer.length);
|
||||
System.arraycopy(chunk, 0, t, buffer.length, count);
|
||||
buffer = t;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/** Returns the file extension of a file.
|
||||
* @param filename Filename to obtain the file extension.
|
||||
* @return File extension (without the ".").
|
||||
*/
|
||||
public static String getFileExtension(String filename)
|
||||
{
|
||||
return filename.substring(filename.lastIndexOf(".") + 1); // + 1 to remove the "."
|
||||
}
|
||||
|
||||
/** Returns the file extension of a file.
|
||||
* @param f File object to obtain the file extension.
|
||||
* @return File extension (without the ".").
|
||||
*/
|
||||
public static String getFileExtension(File f)
|
||||
{
|
||||
return getFileExtension(f.getName());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package search.util;
|
||||
|
||||
/* ====================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 2001 The Apache Software Foundation. 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
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself,
|
||||
* if and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
||||
* "Apache Turbine" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission. For
|
||||
* written permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache",
|
||||
* "Apache Turbine", nor may "Apache" appear in their name, without
|
||||
* prior written permission of the Apache Software Foundation.
|
||||
*
|
||||
* 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 Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*/
|
||||
|
||||
import org.apache.oro.text.perl.Perl5Util;
|
||||
|
||||
/**
|
||||
* Utility String-related methods.
|
||||
*
|
||||
* @author <a href="mailto:kelvin@relevanz.com">Kelvin Tan</a>
|
||||
*/
|
||||
public final class StringUtils
|
||||
{
|
||||
private static final char[] QUOTE_ENCODE = """.toCharArray();
|
||||
private static final char[] AMP_ENCODE = "&".toCharArray();
|
||||
private static final char[] LT_ENCODE = "<".toCharArray();
|
||||
private static final char[] GT_ENCODE = ">".toCharArray();
|
||||
private static final char[] APOS_ENCODE = "'".toCharArray();
|
||||
// Create a regular expression engine
|
||||
private static Perl5Util perl5Util = new Perl5Util();
|
||||
|
||||
public static final String removeUnreadableCharacters(String s)
|
||||
{
|
||||
if (perl5Util.match("/\\W+/", s))
|
||||
{
|
||||
// replace unreadable characters with a space
|
||||
s = perl5Util.substitute("s#[^a-zA-Z0-9_@]+# #gm", s);
|
||||
// remove any single/double word characters
|
||||
s = perl5Util.substitute("s#\\b[a-zA-Z0-9_]{1,2}\\b##gm", s);
|
||||
}
|
||||
return trimWhitespace(s);
|
||||
}
|
||||
|
||||
public static final String trimWhitespace(String s)
|
||||
{
|
||||
s = perl5Util.substitute("s#[\\s]{3,}# #m", s);
|
||||
return s;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,404 @@
|
|||
/*--
|
||||
|
||||
Copyright (C) 2000 Brett McLaughlin & Jason Hunter.
|
||||
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 disclaimer that follows
|
||||
these conditions in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
3. The name "JDOM" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact license@jdom.org.
|
||||
|
||||
4. Products derived from this software may not be called "JDOM", nor
|
||||
may "JDOM" appear in their name, without prior written permission
|
||||
from the JDOM Project Management (pm@jdom.org).
|
||||
|
||||
In addition, we request (but do not require) that you include in the
|
||||
end-user documentation provided with the redistribution and/or in the
|
||||
software itself an acknowledgement equivalent to the following:
|
||||
"This product includes software developed by the
|
||||
JDOM Project (http://www.jdom.org/)."
|
||||
Alternatively, the acknowledgment may be graphical using the logos
|
||||
available at http://www.jdom.org/images/logos.
|
||||
|
||||
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 JDOM AUTHORS OR THE PROJECT
|
||||
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 JDOM Project and was originally
|
||||
created by Brett McLaughlin <brett@jdom.org> and
|
||||
Jason Hunter <jhunter@jdom.org>. For more information on the
|
||||
JDOM Project, please see <http://www.jdom.org/>.
|
||||
|
||||
*/
|
||||
package search.util;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXNotRecognizedException;
|
||||
import org.xml.sax.SAXNotSupportedException;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.ext.LexicalHandler;
|
||||
import org.xml.sax.helpers.AttributesImpl;
|
||||
import org.xml.sax.helpers.XMLFilterImpl;
|
||||
|
||||
/**
|
||||
* Adds convenience methods to base SAX2 Filter implementation.
|
||||
*
|
||||
* <i>Code and comments adapted from XMLWriter-0.2, written
|
||||
* by David Megginson and released into the public domain,
|
||||
* without warranty.</i>
|
||||
*
|
||||
* <p>The convenience methods are provided so that clients do not have to
|
||||
* create empty attribute lists or provide empty strings as parameters;
|
||||
* for example, the method invocation</p>
|
||||
*
|
||||
* <pre>
|
||||
* w.startElement("foo");
|
||||
* </pre>
|
||||
*
|
||||
* <p>is equivalent to the regular SAX2 ContentHandler method</p>
|
||||
*
|
||||
* <pre>
|
||||
* w.startElement("", "foo", "", new AttributesImpl());
|
||||
* </pre>
|
||||
*
|
||||
* <p>Except that it is more efficient because it does not allocate
|
||||
* a new empty attribute list each time.</p>
|
||||
*
|
||||
* <p>In fact, there is an even simpler convenience method,
|
||||
* <var>dataElement</var>, designed for writing elements that
|
||||
* contain only character data.</p>
|
||||
*
|
||||
* <pre>
|
||||
* w.dataElement("greeting", "Hello, world!");
|
||||
* </pre>
|
||||
*
|
||||
* <p>is equivalent to</p>
|
||||
*
|
||||
* <pre>
|
||||
* w.startElement("greeting");
|
||||
* w.characters("Hello, world!");
|
||||
* w.endElement("greeting");
|
||||
* </pre>
|
||||
*
|
||||
* @see org.xml.sax.helpers.XMLFilterImpl
|
||||
*/
|
||||
class XMLFilterBase extends XMLFilterImpl
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Constructors.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Construct an XML filter with no parent.
|
||||
*
|
||||
* <p>This filter will have no parent: you must assign a parent
|
||||
* before you start a parse or do any configuration with
|
||||
* setFeature or setProperty.</p>
|
||||
*
|
||||
* @see org.xml.sax.XMLReader#setFeature
|
||||
* @see org.xml.sax.XMLReader#setProperty
|
||||
*/
|
||||
public XMLFilterBase()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an XML filter with the specified parent.
|
||||
*
|
||||
* <p>Use the XMLReader provided as the source of events.</p>
|
||||
*
|
||||
* @param xmlreader The parent in the filter chain.
|
||||
*/
|
||||
public XMLFilterBase(XMLReader parent)
|
||||
{
|
||||
super(parent);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Convenience methods.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Start a new element without a qname or attributes.
|
||||
*
|
||||
* <p>This method will provide a default empty attribute
|
||||
* list and an empty string for the qualified name.
|
||||
* It invokes {@link
|
||||
* #startElement(String, String, String, Attributes)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
*/
|
||||
public void startElement (String uri, String localName) throws SAXException
|
||||
{
|
||||
startElement(uri, localName, "", EMPTY_ATTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a new element without a qname, attributes or a Namespace URI.
|
||||
*
|
||||
* <p>This method will provide an empty string for the
|
||||
* Namespace URI, and empty string for the qualified name,
|
||||
* and a default empty attribute list. It invokes
|
||||
* #startElement(String, String, String, Attributes)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
*/
|
||||
public void startElement (String localName) throws SAXException
|
||||
{
|
||||
startElement("", localName, "", EMPTY_ATTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* End an element without a qname.
|
||||
*
|
||||
* <p>This method will supply an empty string for the qName.
|
||||
* It invokes {@link #endElement(String, String, String)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void endElement (String uri, String localName) throws SAXException
|
||||
{
|
||||
endElement(uri, localName, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* End an element without a Namespace URI or qname.
|
||||
*
|
||||
* <p>This method will supply an empty string for the qName
|
||||
* and an empty string for the Namespace URI.
|
||||
* It invokes {@link #endElement(String, String, String)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void endElement (String localName) throws SAXException
|
||||
{
|
||||
endElement("", localName, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an empty element.
|
||||
*
|
||||
* Both a {@link #startElement startElement} and an
|
||||
* {@link #endElement endElement} event will be passed on down
|
||||
* the filter chain.
|
||||
*
|
||||
* @param uri The element's Namespace URI, or the empty string
|
||||
* if the element has no Namespace or if Namespace
|
||||
* processing is not being performed.
|
||||
* @param localName The element's local name (without prefix). This
|
||||
* parameter must be provided.
|
||||
* @param qName The element's qualified name (with prefix), or
|
||||
* the empty string if none is available. This parameter
|
||||
* is strictly advisory: the writer may or may not use
|
||||
* the prefix attached.
|
||||
* @param atts The element's attribute list.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void emptyElement (String uri, String localName, String qName,
|
||||
Attributes atts) throws SAXException
|
||||
{
|
||||
startElement(uri, localName, qName, atts);
|
||||
endElement(uri, localName, qName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an empty element without a qname or attributes.
|
||||
*
|
||||
* <p>This method will supply an empty string for the qname
|
||||
* and an empty attribute list. It invokes
|
||||
* {@link #emptyElement(String, String, String, Attributes)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see #emptyElement(String, String, String, Attributes)
|
||||
*/
|
||||
public void emptyElement (String uri, String localName) throws SAXException
|
||||
{
|
||||
emptyElement(uri, localName, "", EMPTY_ATTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an empty element without a Namespace URI, qname or attributes.
|
||||
*
|
||||
* <p>This method will supply an empty string for the qname,
|
||||
* and empty string for the Namespace URI, and an empty
|
||||
* attribute list. It invokes
|
||||
* {@link #emptyElement(String, String, String, Attributes)}
|
||||
* directly.</p>
|
||||
*
|
||||
* @param localName The element's local name.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see #emptyElement(String, String, String, Attributes)
|
||||
*/
|
||||
public void emptyElement (String localName) throws SAXException
|
||||
{
|
||||
emptyElement("", localName, "", EMPTY_ATTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an element with character data content.
|
||||
*
|
||||
* <p>This is a convenience method to add a complete element
|
||||
* with character data content, including the start tag
|
||||
* and end tag.</p>
|
||||
*
|
||||
* <p>This method invokes
|
||||
* {@link @see org.xml.sax.ContentHandler#startElement},
|
||||
* followed by
|
||||
* {@link #characters(String)}, followed by
|
||||
* {@link @see org.xml.sax.ContentHandler#endElement}.</p>
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @param qName The element's default qualified name.
|
||||
* @param atts The element's attributes.
|
||||
* @param content The character data content.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
* @see #characters(String)
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void dataElement (String uri, String localName, String qName,
|
||||
Attributes atts, String content) throws SAXException
|
||||
{
|
||||
startElement(uri, localName, qName, atts);
|
||||
characters(content);
|
||||
endElement(uri, localName, qName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an element with character data content but no attributes.
|
||||
*
|
||||
* <p>This is a convenience method to add a complete element
|
||||
* with character data content, including the start tag
|
||||
* and end tag. This method provides an empty string
|
||||
* for the qname and an empty attribute list.</p>
|
||||
*
|
||||
* <p>This method invokes
|
||||
* {@link @see org.xml.sax.ContentHandler#startElement},
|
||||
* followed by
|
||||
* {@link #characters(String)}, followed by
|
||||
* {@link @see org.xml.sax.ContentHandler#endElement}.</p>
|
||||
*
|
||||
* @param uri The element's Namespace URI.
|
||||
* @param localName The element's local name.
|
||||
* @param content The character data content.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
* @see #characters(String)
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void dataElement (String uri, String localName, String content)
|
||||
throws SAXException
|
||||
{
|
||||
dataElement(uri, localName, "", EMPTY_ATTS, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an element with character data content but no attributes or
|
||||
* Namespace URI.
|
||||
*
|
||||
* <p>This is a convenience method to add a complete element
|
||||
* with character data content, including the start tag
|
||||
* and end tag. The method provides an empty string for the
|
||||
* Namespace URI, and empty string for the qualified name,
|
||||
* and an empty attribute list.</p>
|
||||
*
|
||||
* <p>This method invokes
|
||||
* {@link @see org.xml.sax.ContentHandler#startElement},
|
||||
* followed by
|
||||
* {@link #characters(String)}, followed by
|
||||
* {@link @see org.xml.sax.ContentHandler#endElement}.</p>
|
||||
*
|
||||
* @param localName The element's local name.
|
||||
* @param content The character data content.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see org.xml.sax.ContentHandler#startElement
|
||||
* @see #characters(String)
|
||||
* @see org.xml.sax.ContentHandler#endElement
|
||||
*/
|
||||
public void dataElement (String localName, String content)
|
||||
throws SAXException
|
||||
{
|
||||
dataElement("", localName, "", EMPTY_ATTS, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a string of character data, with XML escaping.
|
||||
*
|
||||
* <p>This is a convenience method that takes an XML
|
||||
* String, converts it to a character array, then invokes
|
||||
* {@link @see org.xml.sax.ContentHandler#characters}.</p>
|
||||
*
|
||||
* @param data The character data.
|
||||
* @exception org.xml.sax.SAXException If a filter
|
||||
* further down the chain raises an exception.
|
||||
* @see @see org.xml.sax.ContentHandler#characters
|
||||
*/
|
||||
public void characters (String data) throws SAXException
|
||||
{
|
||||
char ch[] = data.toCharArray();
|
||||
characters(ch, 0, ch.length);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Constants.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
protected static final Attributes EMPTY_ATTS = new AttributesImpl();
|
||||
}
|
||||
|
||||
// end of XMLFilterBase.java
|
|
@ -0,0 +1,50 @@
|
|||
# CatalogManager.properties
|
||||
#
|
||||
# This is the default properties file for Apache Cocoon. This facilitates local
|
||||
# configuration of application-specific catalogs. You can also use cocoon.xconf
|
||||
# to over-ride or supplement these settings.
|
||||
#
|
||||
# Apache Cocoon will automatically load a default catalog from
|
||||
# webapps/cocoon/resources/entities/catalog
|
||||
#
|
||||
# See the documentation (catalog.html).
|
||||
|
||||
# verbosity ... level of messages for status/debug (messages go to STDOUT)
|
||||
# The following messages are provided ...
|
||||
# 0 = none
|
||||
# 1 = ?
|
||||
# 2 = 1+, Loading catalog, Resolved public, Resolved system
|
||||
# 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
|
||||
# 10 = 3+, List all catalog entries when loading a catalog
|
||||
# (Cocoon also logs the "Resolved public" messages.)
|
||||
# TODO: determine all messages at each level
|
||||
#
|
||||
verbosity=1
|
||||
|
||||
# catalogs ... list of additional catalogs to load
|
||||
# use full pathnames
|
||||
# pathname separator is always semi-colon (;) regardless of operating system
|
||||
# directory separator is always slash (/) regardless of operating system
|
||||
#
|
||||
#catalogs=/path/to/local/catalog
|
||||
catalogs=
|
||||
|
||||
# prefer ... we prefer to use Public Identifiers for entity resolution
|
||||
#
|
||||
prefer=public
|
||||
|
||||
# static-catalog ... see the Sun doco
|
||||
# TODO: ? what impact does this setting have for Apache Cocoon
|
||||
#
|
||||
static-catalog=yes
|
||||
|
||||
# allow-oasis-xml-catalog-pi ... see the Sun doco
|
||||
# TODO: ? what impact does this setting have for Apache Cocoon
|
||||
#
|
||||
allow-oasis-xml-catalog-pi=yes
|
||||
|
||||
# catalog-class-name ... specify an alternate class name to use
|
||||
# Apache Cocoon does not need this setting - we already have a named class
|
||||
#
|
||||
# catalog-class-name=com.sun.resolver.Resolver
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % ISOdia PUBLIC
|
||||
"ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML">
|
||||
%ISOdia;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 10646 as its document character set.
|
||||
This includes XML documents and ISO HTML documents.
|
||||
This entity set uses hexadecimal numeric character references.
|
||||
|
||||
Creator: Rick Jelliffe, Allette Systems
|
||||
|
||||
Version: 1997-07-07
|
||||
-->
|
||||
|
||||
<!ENTITY acute "´" ><!--=acute accent-->
|
||||
<!ENTITY breve "˘" ><!--=breve-->
|
||||
<!ENTITY caron "ˇ" ><!--=caron-->
|
||||
<!ENTITY cedil "¸" ><!--=cedilla-->
|
||||
<!ENTITY circ "^" ><!--=circumflex accent-->
|
||||
<!ENTITY dblac "˝" ><!--=double acute accent-->
|
||||
<!ENTITY die "¨" ><!--=dieresis-->
|
||||
<!ENTITY dot "˙" ><!--=dot above-->
|
||||
<!ENTITY grave "`" ><!--=grave accent-->
|
||||
<!ENTITY macr "¯" ><!--=macron-->
|
||||
<!ENTITY ogon "˛" ><!--=ogonek-->
|
||||
<!ENTITY ring "˚" ><!--=ring-->
|
||||
<!ENTITY tilde "˜" ><!--=tilde-->
|
||||
<!ENTITY uml "¨" ><!--=umlaut mark-->
|
|
@ -0,0 +1,74 @@
|
|||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
|
||||
Creator: version from ISO 8879:1986
|
||||
|
||||
Version: 0.21 1992-12-04
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % ISOGRK1 PUBLIC
|
||||
"ISO 9573-15:1993//ENTITIES Greek Letters//EN//XML">
|
||||
%ISOGRK1;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 10646 as its document character set.
|
||||
This includes XML documents and ISO HTML documents.
|
||||
|
||||
Creator: Rick Jelliffe, from HTMLlat1
|
||||
|
||||
Version: 1997-07-07
|
||||
-->
|
||||
|
||||
<!ENTITY agr "α" ><!--small alpha, Greek, U03B1 -->
|
||||
<!ENTITY Agr "Α" ><!--capital Alpha, Greek, U0391 -->
|
||||
<!ENTITY bgr "β" ><!--small beta, Greek, U03B2 -->
|
||||
<!ENTITY Bgr "Β" ><!--capital Beta, Greek, U0392 -->
|
||||
<!ENTITY ggr "γ" ><!--small gamma, Greek, U03B3 -->
|
||||
<!ENTITY Ggr "Γ" ><!--capital Gamma, Greek, U0393 -->
|
||||
<!ENTITY dgr "δ" ><!--small delta, Greek, U03B4 -->
|
||||
<!ENTITY Dgr "Δ" ><!--capital Delta, Greek, U0394 -->
|
||||
<!ENTITY egr "ε" ><!--small epsilon, Greek, U03B5 -->
|
||||
<!ENTITY Egr "Ε" ><!--capital Epsilon, Greek, U0395 -->
|
||||
<!ENTITY zgr "ζ" ><!--small zeta, Greek, U03B6 -->
|
||||
<!ENTITY Zgr "Ζ" ><!--capital Zeta, Greek, U0396 -->
|
||||
<!ENTITY eegr "η" ><!--small eta, Greek, U03B7 -->
|
||||
<!ENTITY EEgr "Η" ><!--capital Eta, Greek, U0397 -->
|
||||
<!ENTITY thgr "θ" ><!--small theta, Greek, U03B8 -->
|
||||
<!ENTITY THgr "Θ" ><!--capital Theta, Greek, U0398 -->
|
||||
<!ENTITY igr "ι" ><!--small iota, Greek, U03B9 -->
|
||||
<!ENTITY Igr "Ι" ><!--capital Iota, Greek, U0399 -->
|
||||
<!ENTITY kgr "κ" ><!--small kappa, Greek, U03BA -->
|
||||
<!ENTITY Kgr "Κ" ><!--capital Kappa, Greek, U039A -->
|
||||
<!ENTITY lgr "λ" ><!--small lambda, Greek, U03BB -->
|
||||
<!ENTITY Lgr "Λ" ><!--capital Lambda, Greek, U039B -->
|
||||
<!ENTITY mgr "μ" ><!--small mu, Greek, U03BC -->
|
||||
<!ENTITY Mgr "Μ" ><!--capital Mu, Greek, U039C -->
|
||||
<!ENTITY ngr "ν" ><!--small nu, Greek, U03BD -->
|
||||
<!ENTITY Ngr "Ν" ><!--capital Nu, Greek, U039D -->
|
||||
<!ENTITY xgr "ξ" ><!--small xi, Greek, U03BE -->
|
||||
<!ENTITY Xgr "Ξ" ><!--capital Xi, Greek, U039E -->
|
||||
<!ENTITY ogr "ο" ><!--small omicron, Greek, U03BF -->
|
||||
<!ENTITY Ogr "Ο" ><!--capital Omicron, Greek, U039F -->
|
||||
<!ENTITY pgr "π" ><!--small pi, Greek, U03C0 -->
|
||||
<!ENTITY Pgr "Π" ><!--capital Pi, Greek, U03A0 -->
|
||||
<!ENTITY rgr "ρ" ><!--small rho, Greek, U03C1 -->
|
||||
<!ENTITY Rgr "Ρ" ><!--capital Rho, Greek, U03A1 -->
|
||||
<!ENTITY sfgr "ς" ><!--final small sigma, Greek, U03C2 -->
|
||||
<!ENTITY sgr "σ" ><!--small sigma, Greek, U03C3 -->
|
||||
<!ENTITY Sgr "Σ" ><!--capital Sigma, Greek, U03A3 -->
|
||||
<!ENTITY tgr "τ" ><!--small tau, Greek, U03C4 -->
|
||||
<!ENTITY Tgr "Τ" ><!--capital Tau, Greek, U03A4 -->
|
||||
<!ENTITY ugr "υ" ><!--small upsilon, Greek, U03C5 -->
|
||||
<!ENTITY Ugr "Υ" ><!--capital Upsilon, Greek, U03A5 -->
|
||||
<!ENTITY phgr "φ" ><!--small phi, Greek, U03C6 -->
|
||||
<!ENTITY PHgr "Φ" ><!--capital Phi, Greek, U03A6 -->
|
||||
<!ENTITY khgr "χ" ><!--small chi, Greek, U03C7 -->
|
||||
<!ENTITY KHgr "Χ" ><!--capital Chi, Greek, U03A7 -->
|
||||
<!ENTITY psgr "ψ" ><!--small psi, Greek, U03C8 -->
|
||||
<!ENTITY PSgr "Ψ" ><!--capital Psi, Greek, U03A8 -->
|
||||
<!ENTITY ohgr "ω" ><!--small omega, Greek, U03C9 -->
|
||||
<!ENTITY OHgr "Ω" ><!--capital Omega, Greek, U03A9 -->
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % HTMLlat1 PUBLIC
|
||||
"ISO 8879-1986//ENTITIES Added Latin 1//EN//XML">
|
||||
%ISOlat1;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 8859-1 or ISO 10646 as its document character
|
||||
set. This includes XML documents and ISO HTML documents.
|
||||
-->
|
||||
|
||||
<!ENTITY Agrave "À" ><!-- capital A, grave accent -->
|
||||
<!ENTITY Aacute "Á" ><!-- capital A, acute accent -->
|
||||
<!ENTITY Acirc "Â" ><!-- capital A, circumflex accent -->
|
||||
<!ENTITY Atilde "Ã" ><!-- capital A, tilde -->
|
||||
<!ENTITY Auml "Ä" ><!-- capital A, dieresis or umlaut mark -->
|
||||
<!ENTITY Aring "Å" ><!-- capital A, ring -->
|
||||
<!ENTITY AElig "Æ" ><!-- capital AE diphthong (ligature) -->
|
||||
<!ENTITY Ccedil "Ç" ><!-- capital C, cedilla -->
|
||||
<!ENTITY Egrave "È" ><!-- capital E, grave accent -->
|
||||
<!ENTITY Eacute "É" ><!-- capital E, acute accent -->
|
||||
<!ENTITY Ecirc "Ê" ><!-- capital E, circumflex accent -->
|
||||
<!ENTITY Euml "Ë" ><!-- capital E, dieresis or umlaut mark -->
|
||||
<!ENTITY Igrave "Ì" ><!-- capital I, grave accent -->
|
||||
<!ENTITY Iacute "Í" ><!-- capital I, acute accent -->
|
||||
<!ENTITY Icirc "Î" ><!-- capital I, circumflex accent -->
|
||||
<!ENTITY Iuml "Ï" ><!-- capital I, dieresis or umlaut mark -->
|
||||
<!ENTITY ETH "Ð" ><!-- capital Eth, Icelandic -->
|
||||
<!ENTITY Ntilde "Ñ" ><!-- capital N, tilde -->
|
||||
<!ENTITY Ograve "Ò" ><!-- capital O, grave accent -->
|
||||
<!ENTITY Oacute "Ó" ><!-- capital O, acute accent -->
|
||||
<!ENTITY Ocirc "Ô" ><!-- capital O, circumflex accent -->
|
||||
<!ENTITY Otilde "Õ" ><!-- capital O, tilde -->
|
||||
<!ENTITY Ouml "Ö" ><!-- capital O, dieresis or umlaut mark -->
|
||||
<!ENTITY Oslash "Ø" ><!-- capital O, slash -->
|
||||
<!ENTITY Ugrave "Ù" ><!-- capital U, grave accent -->
|
||||
<!ENTITY Uacute "Ú" ><!-- capital U, acute accent -->
|
||||
<!ENTITY Ucirc "Û" ><!-- capital U, circumflex accent -->
|
||||
<!ENTITY Uuml "Ü" ><!-- capital U, dieresis or umlaut mark -->
|
||||
<!ENTITY Yacute "Ý" ><!-- capital Y, acute accent -->
|
||||
<!ENTITY THORN "Þ" ><!-- capital THORN, Icelandic -->
|
||||
<!ENTITY szlig "ß" ><!-- small sharp s, German (sz ligature) -->
|
||||
<!ENTITY agrave "à" ><!-- small a, grave accent -->
|
||||
<!ENTITY aacute "á" ><!-- small a, acute accent -->
|
||||
<!ENTITY acirc "â" ><!-- small a, circumflex accent -->
|
||||
<!ENTITY atilde "ã" ><!-- small a, tilde -->
|
||||
<!ENTITY auml "ä" ><!-- small a, dieresis or umlaut mark -->
|
||||
<!ENTITY aring "å" ><!-- small a, ring -->
|
||||
<!ENTITY aelig "æ" ><!-- small ae diphthong (ligature) -->
|
||||
<!ENTITY ccedil "ç" ><!-- small c, cedilla -->
|
||||
<!ENTITY egrave "è" ><!-- small e, grave accent -->
|
||||
<!ENTITY eacute "é" ><!-- small e, acute accent -->
|
||||
<!ENTITY ecirc "ê" ><!-- small e, circumflex accent -->
|
||||
<!ENTITY euml "ë" ><!-- small e, dieresis or umlaut mark -->
|
||||
<!ENTITY igrave "ì" ><!-- small i, grave accent -->
|
||||
<!ENTITY iacute "í" ><!-- small i, acute accent -->
|
||||
<!ENTITY icirc "î" ><!-- small i, circumflex accent -->
|
||||
<!ENTITY iuml "ï" ><!-- small i, dieresis or umlaut mark -->
|
||||
<!ENTITY eth "ð" ><!-- small eth, Icelandic -->
|
||||
<!ENTITY ntilde "ñ" ><!-- small n, tilde -->
|
||||
<!ENTITY ograve "ò" ><!-- small o, grave accent -->
|
||||
<!ENTITY oacute "ó" ><!-- small o, acute accent -->
|
||||
<!ENTITY ocirc "ô" ><!-- small o, circumflex accent -->
|
||||
<!ENTITY otilde "õ" ><!-- small o, tilde -->
|
||||
<!ENTITY ouml "ö" ><!-- small o, dieresis or umlaut mark -->
|
||||
|
||||
<!ENTITY oslash "ø" ><!-- small o, slash -->
|
||||
<!ENTITY ugrave "ù" ><!-- small u, grave accent -->
|
||||
<!ENTITY uacute "ú" ><!-- small u, acute accent -->
|
||||
<!ENTITY ucirc "û" ><!-- small u, circumflex accent -->
|
||||
<!ENTITY uuml "ü" ><!-- small u, dieresis or umlaut mark -->
|
||||
<!ENTITY yacute "ý" ><!-- small y, acute accent -->
|
||||
<!ENTITY thorn "þ" ><!-- small thorn, Icelandic -->
|
||||
<!ENTITY yuml "ÿ" ><!-- small y, dieresis or umlaut mark -->
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % ISOnum PUBLIC
|
||||
"ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML">
|
||||
%ISOnum;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 10646 as its document character set.
|
||||
This includes XML documents and ISO HTML documents.
|
||||
This entity set uses hexadecimal numeric character references.
|
||||
|
||||
Creator: Rick Jelliffe, Allette Systems
|
||||
|
||||
Version: 1997-07-07
|
||||
-->
|
||||
|
||||
<!ENTITY half "½" ><!--=fraction one-half-->
|
||||
<!ENTITY frac12 "½" ><!--=fraction one-half-->
|
||||
<!ENTITY frac14 "¼" ><!--=fraction one-quarter-->
|
||||
<!ENTITY frac34 "¾" ><!--=fraction three-quarters-->
|
||||
<!ENTITY frac18 "⅛" >
|
||||
<!-- or "±Ȃ⁄₈" --><!--=fraction one-eighth-->
|
||||
<!ENTITY frac38 "⅜" >
|
||||
<!-- or "³⁄₈" --><!--=fraction three-eighths-->
|
||||
<!ENTITY frac58 "⅝" >
|
||||
<!-- or "⁵⁄₈" --><!--=fraction five-eighths-->
|
||||
<!ENTITY frac78 "⅞" >
|
||||
<!-- or "⁷⁄₈" --><!--=fraction seven-eighths-->
|
||||
|
||||
<!ENTITY sup1 "¹" ><!--=superscript one-->
|
||||
<!ENTITY sup2 "²" ><!--=superscript two-->
|
||||
<!ENTITY sup3 "³" ><!--=superscript three-->
|
||||
|
||||
<!ENTITY plus "+" ><!--=plus sign B:-->
|
||||
<!ENTITY plusmn "±" ><!--/pm B: =plus-or-minus sign-->
|
||||
<!ENTITY lt "&#60;" ><!--=less-than sign R:-->
|
||||
<!ENTITY equals "=" ><!--=equals sign R:-->
|
||||
<!ENTITY gt ">" ><!--=greater-than sign R:-->
|
||||
<!ENTITY divide "÷" ><!--/div B: =divide sign-->
|
||||
<!ENTITY times "×" ><!--/times B: =multiply sign-->
|
||||
|
||||
<!ENTITY curren "¤" ><!--=general currency sign-->
|
||||
<!ENTITY pound "£" ><!--=pound sign-->
|
||||
<!ENTITY dollar "$" ><!--=dollar sign-->
|
||||
<!ENTITY cent "¢" ><!--=cent sign-->
|
||||
<!ENTITY yen "¥" ><!--/yen =yen sign-->
|
||||
|
||||
<!ENTITY num "#" ><!--=number sign-->
|
||||
<!ENTITY percnt "%" ><!--=percent sign-->
|
||||
<!ENTITY amp "&#38;" ><!--=ampersand-->
|
||||
<!ENTITY ast "*" ><!--/ast B: =asterisk-->
|
||||
<!ENTITY commat "@" ><!--=commercial at-->
|
||||
<!ENTITY lsqb "[" ><!--/lbrack O: =left square bracket-->
|
||||
<!ENTITY bsol "\" ><!--/backslash =reverse solidus-->
|
||||
<!ENTITY rsqb "]" ><!--/rbrack C: =right square bracket-->
|
||||
<!ENTITY lcub "{" ><!--/lbrace O: =left curly bracket-->
|
||||
<!ENTITY horbar "―" ><!--=horizontal bar-->
|
||||
<!ENTITY verbar "|" ><!--/vert =vertical bar-->
|
||||
<!ENTITY rcub "}" ><!--/rbrace C: =right curly bracket-->
|
||||
<!ENTITY micro "µ" ><!--=micro sign-->
|
||||
<!ENTITY ohm "ࡎ" ><!--=ohm sign-->
|
||||
<!ENTITY deg "°" ><!--=degree sign-->
|
||||
<!ENTITY ordm "º" ><!--=ordinal indicator, masculine-->
|
||||
<!ENTITY ordf "ª" ><!--=ordinal indicator, feminine-->
|
||||
<!ENTITY sect "§" ><!--=section sign-->
|
||||
<!ENTITY para "¶" ><!--=pilcrow (paragraph sign)-->
|
||||
<!ENTITY middot "·" ><!--/centerdot B: =middle dot-->
|
||||
<!ENTITY larr "←" ><!--/leftarrow /gets A: =leftward arrow-->
|
||||
<!ENTITY rarr "→" ><!--/rightarrow /to A: =rightward arrow-->
|
||||
<!ENTITY uarr "↑" ><!--/uparrow A: =upward arrow-->
|
||||
<!ENTITY darr "↓" ><!--/downarrow A: =downward arrow-->
|
||||
<!ENTITY copy "©" ><!--=copyright sign-->
|
||||
<!ENTITY reg "®" ><!--/circledR =registered sign-->
|
||||
<!ENTITY trade "™" ><!--=trade mark sign-->
|
||||
<!ENTITY brvbar "¦" ><!--=bren (vertical) bar-->
|
||||
<!ENTITY not "¬" ><!--/neg /lnot =not sign-->
|
||||
<!ENTITY sung "♪" ><!--=music note (sung text sign)-->
|
||||
|
||||
<!ENTITY excl "!" ><!--=exclamation mark-->
|
||||
<!ENTITY iexcl "¡" ><!--=inverted exclamation mark-->
|
||||
<!ENTITY quot '"' ><!--=quotation mark-->
|
||||
<!ENTITY apos "'" ><!--=apostrophe-->
|
||||
<!ENTITY lpar "(" ><!--O: =left parenthesis-->
|
||||
<!ENTITY rpar ")" ><!--C: =right parenthesis-->
|
||||
<!ENTITY comma "," ><!--P: =comma-->
|
||||
<!ENTITY lowbar "_" ><!--=low line-->
|
||||
<!ENTITY hyphen "‐" ><!--=hyphen-->
|
||||
<!ENTITY period "." ><!--=full stop, period-->
|
||||
<!ENTITY sol "/" ><!--=solidus-->
|
||||
<!ENTITY colon ":" ><!--/colon P:-->
|
||||
<!ENTITY semi ";" ><!--=semicolon P:-->
|
||||
<!ENTITY quest "?" ><!--=question mark-->
|
||||
<!ENTITY iquest "¿" ><!--=inverted question mark-->
|
||||
<!ENTITY laquo "‹" ><!--=angle quotation mark, left
|
||||
But note that Unicode 1 & Maler & el Andaloussi give « -->
|
||||
<!ENTITY raquo "›" ><!--=angle quotation mark, right
|
||||
But note that Unicode 1 & Maler & el Andaloussi give » -->
|
||||
<!ENTITY lsquo "‘" ><!--=single quotation mark, left-->
|
||||
<!ENTITY rsquo "’" ><!--=single quotation mark, right-->
|
||||
<!ENTITY ldquo "“" ><!--=double quotation mark, left-->
|
||||
<!ENTITY rdquo "”" ><!--=double quotation mark, right-->
|
||||
<!ENTITY nbsp " " ><!--=no break (required) space-->
|
||||
<!ENTITY shy "­" ><!--=soft hyphen-->
|
||||
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % ISOpub PUBLIC
|
||||
"ISO 8879:1986//ENTITIES Publishing//EN//XML">
|
||||
%ISOpub;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 10646 as its document character set.
|
||||
This includes XML documents and ISO HTML documents.
|
||||
This entity set uses hexadecimal numeric character references.
|
||||
|
||||
Creator: Rick Jelliffe, Allette Systems
|
||||
|
||||
Version: 1997-07-07
|
||||
-->
|
||||
<!ENTITY emsp " " ><!--=em space-->
|
||||
<!ENTITY ensp " " ><!--=en space (1/2-em)-->
|
||||
<!ENTITY emsp13 " " ><!--=1/3-em space-->
|
||||
<!ENTITY emsp14 " " ><!--=1/4-em space-->
|
||||
<!ENTITY numsp " " ><!--=digit space (width of a number)-->
|
||||
<!ENTITY puncsp " " ><!--=punctuation space (width of comma)-->
|
||||
<!ENTITY thinsp " " ><!--=thin space (1/6-em)-->
|
||||
<!ENTITY hairsp " " ><!--=hair space-->
|
||||
<!ENTITY mdash "—" ><!--=em dash-->
|
||||
<!ENTITY ndash "–" ><!--=en dash-->
|
||||
<!ENTITY dash "‐" ><!--=hyphen (true graphic)-->
|
||||
<!ENTITY blank "␣" ><!--=significant blank symbol-->
|
||||
<!ENTITY hellip "…" ><!--=ellipsis (horizontal)-->
|
||||
<!ENTITY nldr "‥" ><!--=double baseline dot (en leader)-->
|
||||
<!ENTITY frac13 "⅓" ><!--=fraction one-third-->
|
||||
<!ENTITY frac23 "⅔" ><!--=fraction two-thirds-->
|
||||
<!ENTITY frac15 "⅕" ><!--=fraction one-fifth-->
|
||||
<!ENTITY frac25 "⅖" ><!--=fraction two-fifths-->
|
||||
<!ENTITY frac35 "⅗" ><!--=fraction three-fifths-->
|
||||
<!ENTITY frac45 "⅘" ><!--=fraction four-fifths-->
|
||||
<!ENTITY frac16 "⅙" ><!--=fraction one-sixth-->
|
||||
<!ENTITY frac56 "⅚" ><!--=fraction five-sixths-->
|
||||
<!ENTITY incare "℅" ><!--=in-care-of symbol-->
|
||||
<!ENTITY block "█" ><!--=full block-->
|
||||
<!ENTITY uhblk "▀" ><!--=upper half block-->
|
||||
<!ENTITY lhblk "▄" ><!--=lower half block-->
|
||||
<!ENTITY blk14 "░" ><!--=25% shaded block-->
|
||||
<!ENTITY blk12 "▒" ><!--=50% shaded block-->
|
||||
<!ENTITY blk34 "▓" ><!--=75% shaded block-->
|
||||
<!ENTITY marker "▮" ><!--=histogram marker-->
|
||||
<!ENTITY cir "○" ><!--/circ B: =circle, open-->
|
||||
<!ENTITY squ "□" ><!--=square, open-->
|
||||
<!ENTITY rect "▭" ><!--=rectangle, open-->
|
||||
<!ENTITY utri "▵" ><!--/triangle =up triangle, open-->
|
||||
<!ENTITY dtri "▿" ><!--/triangledown =down triangle, open-->
|
||||
<!ENTITY star "☆" ><!--=star, open-->
|
||||
<!ENTITY bull "•" ><!--/bullet B: =round bullet, filled-->
|
||||
<!ENTITY squf "▪" ><!--/blacksquare =sq bullet, filled-->
|
||||
<!ENTITY utrif "▴" ><!--/blacktriangle =up tri, filled-->
|
||||
<!ENTITY dtrif "▾" ><!--/blacktriangledown =dn tri, filled-->
|
||||
<!ENTITY ltrif "◂" ><!--/blacktriangleleft R: =l tri, filled-->
|
||||
<!ENTITY rtrif "▸" ><!--/blacktriangleright R: =r tri, filled-->
|
||||
<!ENTITY clubs "♣" ><!--/clubsuit =club suit symbol-->
|
||||
<!ENTITY diams "♢" ><!--/diamondsuit =diamond suit symbol-->
|
||||
<!ENTITY hearts "♡" ><!--/heartsuit =heart suit symbol-->
|
||||
<!ENTITY spades "♠" ><!--/spadesuit =spades suit symbol-->
|
||||
<!ENTITY malt "✠" ><!--/maltese =maltese cross-->
|
||||
<!ENTITY dagger "†" ><!--/dagger B: =dagger-->
|
||||
<!ENTITY Dagger "‡" ><!--/ddagger B: =double dagger-->
|
||||
<!ENTITY check "✓" ><!--/checkmark =tick, check mark-->
|
||||
<!ENTITY cross "✗" ><!--=ballot cross-->
|
||||
<!ENTITY sharp "♯" ><!--/sharp =musical sharp-->
|
||||
<!ENTITY flat "♭" ><!--/flat =musical flat-->
|
||||
<!ENTITY male "♂" ><!--=male symbol-->
|
||||
<!ENTITY female "♀" ><!--=female symbol-->
|
||||
<!ENTITY phone "⛠" ><!--=telephone symbol-->
|
||||
<!ENTITY telrec "⌕" ><!--=telephone recorder symbol-->
|
||||
<!ENTITY copysr "℗" ><!--=sound recording copyright sign-->
|
||||
<!ENTITY caret "⁁" ><!--=caret (insertion mark)-->
|
||||
<!ENTITY lsquor "‚" ><!--=rising single quote, left (low)-->
|
||||
<!ENTITY ldquor "„" ><!--=rising dbl quote, left (low)-->
|
||||
|
||||
<!ENTITY fflig "ff" ><!--small ff ligature-->
|
||||
<!ENTITY filig "fi" ><!--small fi ligature-->
|
||||
<!ENTITY fjlig "fj" ><!--small fj ligature-->
|
||||
<!ENTITY ffilig "ffi" ><!--small ffi ligature-->
|
||||
<!ENTITY ffllig "ffl" ><!--small ffl ligature-->
|
||||
<!ENTITY fllig "fl" ><!--small fl ligature-->
|
||||
|
||||
<!ENTITY mldr "‥" ><!--em leader-->
|
||||
<!ENTITY rdquor "”" ><!--rising dbl quote, right (high)-->
|
||||
<!ENTITY rsquor "’" ><!--rising single quote, right (high)-->
|
||||
<!ENTITY vellip "⋮" ><!--vertical ellipsis-->
|
||||
|
||||
<!ENTITY hybull "⁃" ><!--rectangle, filled (hyphen bullet)-->
|
||||
<!ENTITY loz "✧" ><!--/lozenge - lozenge or total mark-->
|
||||
<!ENTITY lozf "✦" ><!--/blacklozenge - lozenge, filled-->
|
||||
<!ENTITY ltri "◃" ><!--/triangleleft B: l triangle, open-->
|
||||
<!ENTITY rtri "▹" ><!--/triangleright B: r triangle, open-->
|
||||
<!ENTITY starf "★" ><!--/bigstar - star, filled-->
|
||||
|
||||
<!ENTITY natur "♮" ><!--/natural - music natural-->
|
||||
<!ENTITY rx "℞" ><!--pharmaceutical prescription (Rx)-->
|
||||
<!ENTITY sext "✶" ><!--sextile (6-pointed star)-->
|
||||
|
||||
<!ENTITY target "⌖" ><!--register mark or target-->
|
||||
<!ENTITY dlcrop "⌍" ><!--downward left crop mark -->
|
||||
<!ENTITY drcrop "⌌" ><!--downward right crop mark -->
|
||||
<!ENTITY ulcrop "⌏" ><!--upward left crop mark -->
|
||||
<!ENTITY urcrop "⌎" ><!--upward right crop mark -->
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
|
||||
<!-- (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
<!-- Character entity set. Typical invocation:
|
||||
<!ENTITY % ISOtech PUBLIC
|
||||
"ISO 8879:1986//ENTITIES General Technical//EN//XML"
|
||||
"ISOtech.pen">
|
||||
%ISOtech;
|
||||
-->
|
||||
<!-- This version of the entity set can be used with any SGML document
|
||||
which uses ISO 10646 as its document character set.
|
||||
This includes XML documents and ISO HTML documents.
|
||||
This entity set uses hexadecimal numeric character references.
|
||||
|
||||
Creator: Rick Jelliffe, Allette Systems
|
||||
|
||||
Version: 1997-07-07
|
||||
-->
|
||||
<!ENTITY aleph "ℵ" ><!--/aleph =aleph, Hebrew-->
|
||||
<!ENTITY and "∧" ><!--/wedge /land B: =logical and-->
|
||||
<!ENTITY ang90 "∟" ><!--=right (90 degree) angle-->
|
||||
<!ENTITY angsph "∢" ><!--/sphericalangle =angle-spherical-->
|
||||
<!ENTITY ap "≉" ><!--/approx R: =approximate-->
|
||||
<!ENTITY becaus "∵" ><!--/because R: =because-->
|
||||
<!ENTITY bottom "⊥" ><!--/bot B: =perpendicular-->
|
||||
<!ENTITY cap "∩" ><!--/cap B: =intersection-->
|
||||
<!ENTITY cong "≅" ><!--/cong R: =congruent with-->
|
||||
<!ENTITY conint "∮" ><!--/oint L: =contour integral operator-->
|
||||
<!ENTITY cup "∪" ><!--/cup B: =union or logical sum-->
|
||||
<!ENTITY equiv "≡" ><!--/equiv R: =identical with-->
|
||||
<!ENTITY exist "∃" ><!--/exists =at least one exists-->
|
||||
<!ENTITY forall "∀" ><!--/forall =for all-->
|
||||
<!ENTITY fnof "ƒ" ><!--=function of (italic small f)-->
|
||||
<!ENTITY ge "≥" ><!--/geq /ge R: =greater-than-or-equal-->
|
||||
<!ENTITY iff "⇔" ><!--/iff =if and only if-->
|
||||
<!ENTITY infin "∞" ><!--/infty =infinity-->
|
||||
<!ENTITY int "∫" ><!--/int L: =integral operator-->
|
||||
<!ENTITY isin "∈" ><!--/in R: =set membership-->
|
||||
<!ENTITY lang "〈" ><!--/langle O: =left angle bracket-->
|
||||
<!ENTITY lArr "⇐" ><!--/Leftarrow A: =is implied by-->
|
||||
<!ENTITY le "≤" ><!--/leq /le R: =less-than-or-equal-->
|
||||
<!ENTITY minus "-" ><!--B: =minus sign-->
|
||||
<!ENTITY mnplus "∓" ><!--/mp B: =minus-or-plus sign-->
|
||||
<!ENTITY nabla "∇" ><!--/nabla =del, Hamilton operator-->
|
||||
<!ENTITY ne "≠" ><!--/ne /neq R: =not equal-->
|
||||
<!ENTITY ni "∋" ><!--/ni /owns R: =contains-->
|
||||
<!ENTITY or "∨" ><!--/vee /lor B: =logical or-->
|
||||
<!ENTITY par "∥" ><!--/parallel R: =parallel-->
|
||||
<!ENTITY part "∂" ><!--/partial =partial differential-->
|
||||
<!ENTITY permil "‰" ><!--=per thousand-->
|
||||
<!ENTITY perp "⊥" ><!--/perp R: =perpendicular-->
|
||||
<!ENTITY prime "′" ><!--/prime =prime or minute-->
|
||||
<!ENTITY Prime "″" ><!--=double prime or second-->
|
||||
<!ENTITY prop "∝" ><!--/propto R: =is proportional to-->
|
||||
<!ENTITY radic "√" ><!--/surd =radical-->
|
||||
<!ENTITY rang "〉" ><!--/rangle C: =right angle bracket-->
|
||||
<!ENTITY rArr "⇒" ><!--/Rightarrow A: =implies-->
|
||||
<!ENTITY sim "∼" ><!--/sim R: =similar-->
|
||||
<!ENTITY sime "≃" ><!--/simeq R: =similar, equals-->
|
||||
<!ENTITY square "□" ><!--/square B: =square-->
|
||||
<!ENTITY sub "⊂" ><!--/subset R: =subset or is implied by-->
|
||||
<!ENTITY sube "⊆" ><!--/subseteq R: =subset, equals-->
|
||||
<!ENTITY sup "⊃" ><!--/supset R: =superset or implies-->
|
||||
<!ENTITY supe "⊇" ><!--/supseteq R: =superset, equals-->
|
||||
<!ENTITY there4 "∴" ><!--/therefore R: =therefore-->
|
||||
<!ENTITY Verbar "‖" ><!--/Vert =dbl vertical bar-->
|
||||
|
||||
<!ENTITY angst "Å" ><!--Angstrom =capital A, ring-->
|
||||
<!ENTITY bernou "ℬ" ><!--Bernoulli function (script capital B)-->
|
||||
<!ENTITY compfn "∘" ><!--B: composite function (small circle)-->
|
||||
<!ENTITY Dot "¨" ><!--=dieresis or umlaut mark-->
|
||||
<!ENTITY DotDot "⃜" ><!--four dots above-->
|
||||
<!ENTITY hamilt "ℋ" ><!--Hamiltonian (script capital H)-->
|
||||
<!ENTITY lagran "ℒ" ><!--Lagrangian (script capital L)-->
|
||||
<!ENTITY lowast "∗" ><!--low asterisk-->
|
||||
<!ENTITY notin "∉" ><!--N: negated set membership-->
|
||||
<!ENTITY order "ℴ" ><!--order of (script small o)-->
|
||||
<!ENTITY phmmat "ℳ" ><!--physics M-matrix (script capital M)-->
|
||||
<!ENTITY tdot "⃛" ><!--three dots above-->
|
||||
<!ENTITY tprime "‴" ><!--triple prime-->
|
||||
<!ENTITY wedgeq "≙" ><!--R: corresponds to (wedge, equals)-->
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
See Apache Cocoon documentation
|
||||
"Entity resolution with catalogs" (catalog.html)
|
||||
|
||||
Note: You must move the CatalogManager.properties file to
|
||||
some filesystem location that is accessible to your classpath.
|
|
@ -0,0 +1,395 @@
|
|||
<!-- DTD for XML Schemas: Part 1: Structures
|
||||
Public Identifier: "-//W3C//DTD XMLSCHEMA 200010//EN"
|
||||
Official Location: http://www.w3.org/2000/10/XMLSchema.dtd -->
|
||||
<!-- $Id$ -->
|
||||
<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
|
||||
<!-- prose copy in the structures REC is the definitive version --> <!--d-->
|
||||
<!-- (which shouldn't differ from this one except for this --> <!--d-->
|
||||
<!-- comment and entity expansions, but just in case) --> <!--d-->
|
||||
<!-- With the exception of cases with multiple namespace
|
||||
prefixes for the XML Schema namespace, any XML document which is
|
||||
not valid per this DTD given redefinitions in its internal subset of the
|
||||
'p' and 's' parameter entities below appropriate to its namespace
|
||||
declaration of the XML Schema namespace is almost certainly not
|
||||
a valid schema. -->
|
||||
|
||||
<!-- The simpleType element and its constituent parts
|
||||
are defined in XML Schema: Part 2: Datatypes -->
|
||||
<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
|
||||
|
||||
<!ENTITY % p ''> <!-- can be overriden in the internal subset of a
|
||||
schema document to establish a namespace prefix -->
|
||||
<!ENTITY % s ''> <!-- if %p is defined (e.g. as foo:) then you must
|
||||
also define %s as the suffix for the appropriate
|
||||
namespace declaration (e.g. :foo) -->
|
||||
<!ENTITY % nds 'xmlns%s;'>
|
||||
|
||||
<!-- Define all the element names, with optional prefix -->
|
||||
<!ENTITY % schema "%p;schema">
|
||||
<!ENTITY % complexType "%p;complexType">
|
||||
<!ENTITY % complexContent "%p;complexContent">
|
||||
<!ENTITY % simpleContent "%p;simpleContent">
|
||||
<!ENTITY % extension "%p;extension">
|
||||
<!ENTITY % element "%p;element">
|
||||
<!ENTITY % unique "%p;unique">
|
||||
<!ENTITY % key "%p;key">
|
||||
<!ENTITY % keyref "%p;keyref">
|
||||
<!ENTITY % selector "%p;selector">
|
||||
<!ENTITY % field "%p;field">
|
||||
<!ENTITY % group "%p;group">
|
||||
<!ENTITY % all "%p;all">
|
||||
<!ENTITY % choice "%p;choice">
|
||||
<!ENTITY % sequence "%p;sequence">
|
||||
<!ENTITY % any "%p;any">
|
||||
<!ENTITY % anyAttribute "%p;anyAttribute">
|
||||
<!ENTITY % attribute "%p;attribute">
|
||||
<!ENTITY % attributeGroup "%p;attributeGroup">
|
||||
<!ENTITY % include "%p;include">
|
||||
<!ENTITY % import "%p;import">
|
||||
<!ENTITY % redefine "%p;redefine">
|
||||
<!ENTITY % notation "%p;notation">
|
||||
|
||||
<!-- annotation elements -->
|
||||
<!ENTITY % annotation "%p;annotation">
|
||||
<!ENTITY % appinfo "%p;appinfo">
|
||||
<!ENTITY % documentation "%p;documentation">
|
||||
|
||||
<!-- Customisation entities for the ATTLIST of each element type.
|
||||
Define one of these if your schema takes advantage of the
|
||||
anyAttribute='##other' in the schema for schemas -->
|
||||
|
||||
<!ENTITY % schemaAttrs ''>
|
||||
<!ENTITY % complexTypeAttrs ''>
|
||||
<!ENTITY % complexContentAttrs ''>
|
||||
<!ENTITY % simpleContentAttrs ''>
|
||||
<!ENTITY % extensionAttrs ''>
|
||||
<!ENTITY % elementAttrs ''>
|
||||
<!ENTITY % groupAttrs ''>
|
||||
<!ENTITY % allAttrs ''>
|
||||
<!ENTITY % choiceAttrs ''>
|
||||
<!ENTITY % sequenceAttrs ''>
|
||||
<!ENTITY % anyAttrs ''>
|
||||
<!ENTITY % anyAttributeAttrs ''>
|
||||
<!ENTITY % attributeAttrs ''>
|
||||
<!ENTITY % attributeGroupAttrs ''>
|
||||
<!ENTITY % uniqueAttrs ''>
|
||||
<!ENTITY % keyAttrs ''>
|
||||
<!ENTITY % keyrefAttrs ''>
|
||||
<!ENTITY % selectorAttrs ''>
|
||||
<!ENTITY % fieldAttrs ''>
|
||||
<!ENTITY % includeAttrs ''>
|
||||
<!ENTITY % importAttrs ''>
|
||||
<!ENTITY % redefineAttrs ''>
|
||||
<!ENTITY % notationAttrs ''>
|
||||
|
||||
<!ENTITY % complexDerivationChoice "(extension|restriction)">
|
||||
<!ENTITY % complexDerivationSet "CDATA">
|
||||
<!-- #all or space-separated list drawn from derivationChoice -->
|
||||
<!ENTITY % blockSet "CDATA">
|
||||
<!-- #all or space-separated list drawn from
|
||||
derivationChoice + 'substitution' -->
|
||||
|
||||
<!ENTITY % mgs '%all; | %choice; | %sequence;'>
|
||||
<!ENTITY % cs '%choice; | %sequence;'>
|
||||
<!ENTITY % formValues '(qualified|unqualified)'>
|
||||
|
||||
|
||||
<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
|
||||
|
||||
<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
|
||||
|
||||
<!-- This is used in part2 -->
|
||||
<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
|
||||
|
||||
%xs-datatypes;
|
||||
|
||||
<!-- the duplication below is to produce an unambiguous content model
|
||||
which allows annotation everywhere -->
|
||||
<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
|
||||
((%simpleType; | %complexType;
|
||||
| %element; | %attribute;
|
||||
| %attributeGroup; | %group;
|
||||
| %notation; ),
|
||||
(%annotation;)*)* )>
|
||||
<!ATTLIST %schema;
|
||||
targetNamespace %URIref; #IMPLIED
|
||||
version CDATA #IMPLIED
|
||||
%nds; %URIref; #FIXED 'http://www.w3.org/2000/10/XMLSchema'
|
||||
finalDefault %complexDerivationSet; ''
|
||||
blockDefault %blockSet; ''
|
||||
id ID #IMPLIED
|
||||
elementFormDefault %formValues; 'unqualified'
|
||||
attributeFormDefault %formValues; 'unqualified'
|
||||
%schemaAttrs;>
|
||||
<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
|
||||
because at the Infoset level where schemas operate,
|
||||
xmlns(:prefix) is NOT an attribute! -->
|
||||
|
||||
<!-- The id attribute here and below is for use in external references
|
||||
from non-schemas using simple fragment identifiers.
|
||||
It is NOT used for schema-to-schema reference, internal or
|
||||
external. -->
|
||||
|
||||
<!-- a type is a named content type specification which allows attribute
|
||||
declarations-->
|
||||
<!-- -->
|
||||
|
||||
<!ELEMENT %complexType; ((%annotation;)?,
|
||||
(%simpleContent;|%complexContent;|
|
||||
%particleAndAttrs;))>
|
||||
|
||||
<!ATTLIST %complexType;
|
||||
name %NCName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
abstract %boolean; 'false'
|
||||
final %complexDerivationSet; #IMPLIED
|
||||
block %complexDerivationSet; ''
|
||||
mixed (true|false) 'false'
|
||||
%complexTypeAttrs;>
|
||||
|
||||
<!-- particleAndAttrs is shorthand for a root type -->
|
||||
<!-- mixed is disallowed if simpleContent, overriden if complexContent
|
||||
has one too. -->
|
||||
|
||||
<!-- If anyAttribute appears in one or more referenced attributeGroups
|
||||
and/or explicitly, the intersection of the permissions is used -->
|
||||
|
||||
<!ELEMENT %complexContent; (%restriction;|%extension;)>
|
||||
<!ATTLIST %complexContent;
|
||||
mixed (true|false) #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%complexContentAttrs;>
|
||||
|
||||
<!-- restriction should use the branch defined above, not the simple
|
||||
one from part2; extension should use the full model -->
|
||||
|
||||
<!ELEMENT %simpleContent; (%restriction;|%extension;)>
|
||||
<!ATTLIST %simpleContent;
|
||||
id ID #IMPLIED
|
||||
%simpleContentAttrs;>
|
||||
|
||||
<!-- restriction should use the simple branch from part2, not the
|
||||
one defined above; extension should have no particle -->
|
||||
|
||||
<!ELEMENT %extension; (%particleAndAttrs;)>
|
||||
<!ATTLIST %extension;
|
||||
base %QName; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%extensionAttrs;>
|
||||
|
||||
<!-- an element is declared by either:
|
||||
a name and a type (either nested or referenced via the type attribute)
|
||||
or a ref to an existing element declaration -->
|
||||
|
||||
<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
|
||||
(%unique; | %key; | %keyref;)*)>
|
||||
<!-- simpleType or complexType only if no type|ref attribute -->
|
||||
<!-- ref not allowed at top level -->
|
||||
<!ATTLIST %element;
|
||||
name %NCName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
ref %QName; #IMPLIED
|
||||
type %QName; #IMPLIED
|
||||
minOccurs %nonNegativeInteger; #IMPLIED
|
||||
maxOccurs CDATA #IMPLIED
|
||||
nullable %boolean; #IMPLIED
|
||||
substitutionGroup %QName; #IMPLIED
|
||||
abstract %boolean; 'false'
|
||||
final %complexDerivationSet; #IMPLIED
|
||||
block %blockSet; #IMPLIED
|
||||
default CDATA #IMPLIED
|
||||
fixed CDATA #IMPLIED
|
||||
form %formValues; #IMPLIED
|
||||
%elementAttrs;>
|
||||
<!-- type and ref are mutually exclusive.
|
||||
name and ref are mutually exclusive, one is required -->
|
||||
<!-- In the absence of type AND ref, type defaults to type of
|
||||
substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
|
||||
<!-- default and fixed are mutually exclusive -->
|
||||
|
||||
<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
|
||||
<!ATTLIST %group;
|
||||
name %NCName; #IMPLIED
|
||||
ref %QName; #IMPLIED
|
||||
minOccurs %nonNegativeInteger; #IMPLIED
|
||||
maxOccurs CDATA #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%groupAttrs;>
|
||||
|
||||
<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
|
||||
<!ATTLIST %all;
|
||||
minOccurs (1) #FIXED '1'
|
||||
maxOccurs (1) #FIXED '1'
|
||||
id ID #IMPLIED
|
||||
%allAttrs;>
|
||||
|
||||
<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
|
||||
<!ATTLIST %choice;
|
||||
minOccurs %nonNegativeInteger; '1'
|
||||
maxOccurs CDATA '1'
|
||||
id ID #IMPLIED
|
||||
%choiceAttrs;>
|
||||
|
||||
<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
|
||||
<!ATTLIST %sequence;
|
||||
minOccurs %nonNegativeInteger; '1'
|
||||
maxOccurs CDATA '1'
|
||||
id ID #IMPLIED
|
||||
%sequenceAttrs;>
|
||||
|
||||
<!-- an anonymous grouping in a model, or
|
||||
a top-level named group definition, or a reference to same -->
|
||||
|
||||
<!-- Note that if order is 'all', group is not allowed inside.
|
||||
If order is 'all' THIS group must be alone (or referenced alone) at
|
||||
the top level of a content model -->
|
||||
<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
|
||||
<!-- Should allow minOccurs=0 inside order='all' . . . -->
|
||||
|
||||
<!ELEMENT %any; (%annotation;)?>
|
||||
<!ATTLIST %any;
|
||||
namespace CDATA '##any'
|
||||
processContents (skip|lax|strict) 'strict'
|
||||
minOccurs %nonNegativeInteger; '1'
|
||||
maxOccurs CDATA '1'
|
||||
id ID #IMPLIED
|
||||
%anyAttrs;>
|
||||
|
||||
<!-- namespace is interpreted as follows:
|
||||
##any - - any non-conflicting WFXML at all
|
||||
|
||||
##other - - any non-conflicting WFXML from namespace other
|
||||
than targetNamespace
|
||||
|
||||
##local - - any unqualified non-conflicting WFXML/attribute
|
||||
one or - - any non-conflicting WFXML from
|
||||
more URI the listed namespaces
|
||||
references
|
||||
|
||||
##targetNamespace ##local may appear in the above list,
|
||||
with the obvious meaning -->
|
||||
|
||||
<!ELEMENT %anyAttribute; (%annotation;)?>
|
||||
<!ATTLIST %anyAttribute;
|
||||
namespace CDATA '##any'
|
||||
processContents (skip|lax|strict) 'strict'
|
||||
id ID #IMPLIED
|
||||
%anyAttributeAttrs;>
|
||||
<!-- namespace is interpreted as for 'any' above -->
|
||||
|
||||
<!-- simpleType only if no type|ref attribute -->
|
||||
<!-- ref not allowed at top level, name iff at top level -->
|
||||
<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
|
||||
<!ATTLIST %attribute;
|
||||
name %NCName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
ref %QName; #IMPLIED
|
||||
type %QName; #IMPLIED
|
||||
use (prohibited|optional|required|fixed|default) #IMPLIED
|
||||
value CDATA #IMPLIED
|
||||
form %formValues; #IMPLIED
|
||||
%attributeAttrs;>
|
||||
<!-- type and ref are mutually exclusive.
|
||||
name and ref are mutually exclusive, one is required -->
|
||||
<!-- value only if use is fixed, required or default, or name -->
|
||||
<!-- name and use are mutually exclusive -->
|
||||
<!-- default for use is optional when nested, none otherwise -->
|
||||
<!-- type attr and simpleType content are mutually exclusive -->
|
||||
|
||||
<!-- an attributeGroup is a named collection of attribute decls, or a
|
||||
reference thereto -->
|
||||
<!ELEMENT %attributeGroup; ((%annotation;)?,
|
||||
(%attribute; | %attributeGroup;)*,
|
||||
(%anyAttribute;)?) >
|
||||
<!ATTLIST %attributeGroup;
|
||||
name %NCName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
ref %QName; #IMPLIED
|
||||
%attributeGroupAttrs;>
|
||||
|
||||
<!-- ref iff no content, no name. ref iff not top level -->
|
||||
|
||||
<!-- better reference mechanisms -->
|
||||
<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
|
||||
<!ATTLIST %unique;
|
||||
name %NCName; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%uniqueAttrs;>
|
||||
|
||||
<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
|
||||
<!ATTLIST %key;
|
||||
name %NCName; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%keyAttrs;>
|
||||
|
||||
<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
|
||||
<!ATTLIST %keyref;
|
||||
name %NCName; #REQUIRED
|
||||
refer %QName; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%keyrefAttrs;>
|
||||
|
||||
<!ELEMENT %selector; ((%annotation;)?)>
|
||||
<!ATTLIST %selector;
|
||||
xpath %XPathExpr; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%selectorAttrs;>
|
||||
<!ELEMENT %field; ((%annotation;)?)>
|
||||
<!ATTLIST %field;
|
||||
xpath %XPathExpr; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%fieldAttrs;>
|
||||
|
||||
<!-- Schema combination mechanisms -->
|
||||
<!ELEMENT %include; (%annotation;)?>
|
||||
<!ATTLIST %include;
|
||||
schemaLocation %URIref; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%includeAttrs;>
|
||||
|
||||
<!ELEMENT %import; (%annotation;)?>
|
||||
<!ATTLIST %import;
|
||||
namespace %URIref; #IMPLIED
|
||||
schemaLocation %URIref; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%importAttrs;>
|
||||
|
||||
<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
|
||||
%attributeGroup; | %group;)*>
|
||||
<!ATTLIST %redefine;
|
||||
schemaLocation %URIref; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
%redefineAttrs;>
|
||||
|
||||
<!ELEMENT %notation; (%annotation;)?>
|
||||
<!ATTLIST %notation;
|
||||
name %NCName; #REQUIRED
|
||||
id ID #IMPLIED
|
||||
public CDATA #REQUIRED
|
||||
system %URIref; #IMPLIED
|
||||
%notationAttrs;>
|
||||
|
||||
<!-- Annotation is either application information or documentation -->
|
||||
<!-- By having these here they are available for datatypes as well
|
||||
as all the structures elements -->
|
||||
|
||||
<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
|
||||
|
||||
<!-- User must define annotation elements in internal subset for this
|
||||
to work -->
|
||||
<!ELEMENT %appinfo; ANY> <!-- too restrictive -->
|
||||
<!ATTLIST %appinfo;
|
||||
source %URIref; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%appinfoAttrs;>
|
||||
<!ELEMENT %documentation; ANY> <!-- too restrictive -->
|
||||
<!ATTLIST %documentation;
|
||||
source %URIref; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
xml:lang CDATA #IMPLIED
|
||||
%documentationAttrs;>
|
||||
|
||||
<!NOTATION XMLSchemaStructures PUBLIC
|
||||
'structures' 'http://www.w3.org/2000/10/XMLSchema.xsd' >
|
||||
<!NOTATION XML PUBLIC
|
||||
'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
|
|
@ -0,0 +1,70 @@
|
|||
<!-- ===================================================================
|
||||
|
||||
Apache Cocoon Documentation Book DTD (Version 1.0)
|
||||
|
||||
PURPOSE:
|
||||
This DTD defines the */book.xml documentation configuration files.
|
||||
|
||||
TYPICAL INVOCATION:
|
||||
|
||||
<!DOCTYPE book PUBLIC
|
||||
"-//APACHE//DTD Cocoon Documentation Book Vx.yz//EN"
|
||||
"http://xml.apache.org/DTD/book-cocoon-vxyz.dtd">
|
||||
|
||||
where
|
||||
|
||||
x := major version
|
||||
y := minor version
|
||||
z := status identifier (optional)
|
||||
|
||||
NOTES:
|
||||
We need to replace this DTD with the proper one.
|
||||
We are only using this DTD to enable validation during "build docs"
|
||||
because every XML instance must declare its ruleset.
|
||||
|
||||
This initial minimal DTD has been reverse-engineered from the structure
|
||||
of the current documents, e.g.
|
||||
docuemntation/xdocs/book.xml
|
||||
|
||||
AUTHORS:
|
||||
David Crossley <crossley@apache.org>
|
||||
|
||||
FIXME:
|
||||
- find the proper DTD for book.xml
|
||||
|
||||
CHANGE HISTORY:
|
||||
20011031 Initial version. (DC)
|
||||
|
||||
COPYRIGHT:
|
||||
Copyright (c) @year@ The Apache Software Foundation.
|
||||
|
||||
Permission to copy in any form is granted provided this notice is
|
||||
included in all copies. Permission to redistribute is granted
|
||||
provided this file is distributed untouched in all its parts and
|
||||
included files.
|
||||
|
||||
==================================================================== -->
|
||||
|
||||
<!ELEMENT book (menu+)>
|
||||
<!ELEMENT menu (menu-item|external)*>
|
||||
<!ELEMENT menu-item EMPTY>
|
||||
<!ELEMENT external EMPTY>
|
||||
<!ATTLIST book software CDATA #REQUIRED
|
||||
title CDATA #REQUIRED
|
||||
copyright CDATA #REQUIRED
|
||||
xmlns:xlink CDATA #IMPLIED
|
||||
>
|
||||
<!ATTLIST menu label CDATA #REQUIRED
|
||||
>
|
||||
<!ATTLIST menu-item label CDATA #REQUIRED
|
||||
href CDATA #REQUIRED
|
||||
type (visible|hidden) "visible"
|
||||
>
|
||||
<!ATTLIST external label CDATA #REQUIRED
|
||||
href CDATA #REQUIRED
|
||||
type (visible|hidden) "visible"
|
||||
>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- End of DTD -->
|
||||
<!-- =============================================================== -->
|
|
@ -0,0 +1,67 @@
|
|||
-- this is the default OASIS catalog for Apache Cocoon --
|
||||
|
||||
OVERRIDE YES
|
||||
|
||||
-- ISO public identifiers for sets of character entities --
|
||||
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//XML"
|
||||
"ISOlat1.pen"
|
||||
PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
|
||||
"ISOlat1.pen"
|
||||
PUBLIC "ISO 9573-15:1993//ENTITIES Greek Letters//EN//XML"
|
||||
"ISOgrk1.pen"
|
||||
PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML"
|
||||
"ISOpub.pen"
|
||||
PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN//XML"
|
||||
"ISOtech.pen"
|
||||
PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
|
||||
"ISOnum.pen"
|
||||
|
||||
-- Document Type Definitions --
|
||||
PUBLIC "-//APACHE//DTD Documentation V1.0//EN"
|
||||
"document-v10.dtd"
|
||||
PUBLIC "-//APACHE//DTD Changes V1.0//EN"
|
||||
"changes-v10.dtd"
|
||||
PUBLIC "-//APACHE//DTD FAQ V1.0//EN"
|
||||
"faq-v10.dtd"
|
||||
PUBLIC "-//APACHE//DTD JavaDoc V1.0//EN"
|
||||
"javadoc-v04draft.dtd"
|
||||
PUBLIC "-//APACHE//DTD Specification V1.0//EN"
|
||||
"specification-v10.dtd"
|
||||
PUBLIC "-//APACHE//DTD Todo V1.0//EN"
|
||||
"todo-v10.dtd"
|
||||
PUBLIC "-//APACHE//DTD Cocoon Sitemap V0.2//EN"
|
||||
"sitemap-v02.dtd"
|
||||
|
||||
-- enabling validation during Cocoon's own "build docs" --
|
||||
-- all *.xml require DTD for validation during "build docs" --
|
||||
PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN"
|
||||
"book-cocoon-v10.dtd"
|
||||
|
||||
-- Cocoon has extra <label/> element for documentation/svg/label-*.xml --
|
||||
-- which breaks validation against official svg10.dtd (why extra label?) --
|
||||
PUBLIC "-//APACHE//DTD Cocoon SVG minimal V1.1//EN"
|
||||
"svg-cocoon-v11.dtd"
|
||||
PUBLIC "-//W3C//DTD SVG 1.0//EN"
|
||||
"svg10.dtd"
|
||||
|
||||
-- other DTDs that are yet without a Public Identifier --
|
||||
-- XMLSchema.dtd .. what is its purpose ? --
|
||||
|
||||
-- Character entity set that is referenced by some DTDs --
|
||||
-- characters.ent --
|
||||
-- ... has no public identifier --
|
||||
-- should be OK because it will be resolved relative to the DTD --
|
||||
-- ... perhaps the DTD should use the ISO*.pen sets instead? --
|
||||
|
||||
-- these entries are used for the catalog-demo sample application --
|
||||
OVERRIDE NO
|
||||
PUBLIC "-//Arbortext//TEXT Test Override//EN"
|
||||
"catalog-demo/override.xml"
|
||||
OVERRIDE YES
|
||||
PUBLIC "-//Arbortext//TEXT Test Public Identifier//EN"
|
||||
"catalog-demo/testpub.xml"
|
||||
SYSTEM "urn:x-arbortext:test-system-identifier"
|
||||
"catalog-demo/testsys.xml"
|
||||
PUBLIC "-//Indexgeo//DTD Catalog Demo v1.0//EN"
|
||||
"catalog-demo/catalog-demo-v10.dtd"
|
||||
-- end of entries for the catalog-demo sample application --
|
|
@ -0,0 +1,14 @@
|
|||
<!--
|
||||
This is the Document Type Definition for the Apache Cocoon sample
|
||||
demonstration "catalog-demo" which explains entity resolution
|
||||
using catalogs. See the Apache Cocoon documentation
|
||||
"Entity resolution with catalogs" (catalog.html).
|
||||
|
||||
Version 1.0 2001-08-09
|
||||
-->
|
||||
|
||||
<!ELEMENT catalog-demo (section+)>
|
||||
<!ELEMENT link (#PCDATA)>
|
||||
<!ATTLIST link href CDATA #IMPLIED>
|
||||
<!ELEMENT para (#PCDATA | link)*>
|
||||
<!ELEMENT section (para+)>
|
|
@ -0,0 +1,4 @@
|
|||
<para>¬e; This is content from the override.xml external file.
|
||||
This content will not actually be included, because the catalog
|
||||
was set with OVERRIDE NO for this public identifier.
|
||||
</para>
|
|
@ -0,0 +1,7 @@
|
|||
<para>¬e; This paragraph is automatically included from the
|
||||
testpub.xml external file.
|
||||
The entity declaration deliberately used a non-existent file
|
||||
as the system identifier. The catalog then used the declared
|
||||
public identifer to resolve to a specific location on the local
|
||||
filesystem.
|
||||
</para>
|
|
@ -0,0 +1,5 @@
|
|||
<para>¬e; This paragraph is automatically included from the
|
||||
testsys.xml external file.
|
||||
The declared SYSTEM identifier was resolved by the catalog to a
|
||||
specific location on the local filesystem.
|
||||
</para>
|
|
@ -0,0 +1,91 @@
|
|||
<!-- ===================================================================
|
||||
|
||||
Apache Changes DTD (Version 1.0)
|
||||
|
||||
PURPOSE:
|
||||
This DTD was developed to create a simple yet powerful document
|
||||
type for software development changes for use with the Apache projects.
|
||||
It is an XML-compliant DTD and it's maintained by the Apache XML
|
||||
project.
|
||||
|
||||
TYPICAL INVOCATION:
|
||||
|
||||
<!DOCTYPE document PUBLIC
|
||||
"-//APACHE//DTD Changes Vx.yz//EN"
|
||||
"http://xml.apache.org/DTD/changes-vxyz.dtd">
|
||||
|
||||
where
|
||||
|
||||
x := major version
|
||||
y := minor version
|
||||
z := status identifier (optional)
|
||||
|
||||
NOTES:
|
||||
It is important, expecially in open developped software projects, to keep
|
||||
track of software changes both to give users indications of bugs that might
|
||||
have been resolved, as well, and not less important, to provide credits
|
||||
for the support given to the project. It is considered vital to provide
|
||||
adequate payback using recognition and credits to let users and developers
|
||||
feel part of the community, thus increasing development power.
|
||||
|
||||
AUTHORS:
|
||||
Stefano Mazzocchi <stefano@apache.org>
|
||||
|
||||
FIXME:
|
||||
|
||||
CHANGE HISTORY:
|
||||
19991129 Initial version. (SM)
|
||||
20000316 Added bugfixing attribute. (SM)
|
||||
|
||||
COPYRIGHT:
|
||||
Copyright (c) @year@ The Apache Software Foundation.
|
||||
|
||||
Permission to copy in any form is granted provided this notice is
|
||||
included in all copies. Permission to redistribute is granted
|
||||
provided this file is distributed untouched in all its parts and
|
||||
included files.
|
||||
|
||||
==================================================================== -->
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Extend the Documentation DTD -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<!-- FIXME (SM): this is hardcoding. Find a better way of doing this
|
||||
possibly using public identifiers -->
|
||||
<!ENTITY % document-dtd SYSTEM "document-v10.dtd">
|
||||
%document-dtd;
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Common entities -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<!ENTITY % types "add|remove|update|fix">
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Document Type Definition -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<!ELEMENT changes (devs, release*)>
|
||||
<!ATTLIST changes %common.att;
|
||||
%title.att;>
|
||||
|
||||
<!ELEMENT devs (person+)>
|
||||
<!ATTLIST devs %common.att;>
|
||||
|
||||
<!ELEMENT release (action+)>
|
||||
<!ATTLIST release %common.att;
|
||||
version CDATA #REQUIRED
|
||||
date CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT action (%content.mix;)*>
|
||||
<!ATTLIST action %common.att;
|
||||
dev IDREF #REQUIRED
|
||||
type (%types;) #IMPLIED
|
||||
due-to CDATA #IMPLIED
|
||||
due-to-email CDATA #IMPLIED
|
||||
fixes-bug CDATA #IMPLIED>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- End of DTD -->
|
||||
<!-- =============================================================== -->
|
|
@ -0,0 +1,290 @@
|
|||
<!--
|
||||
Portions (C) International Organization for Standardization 1986
|
||||
Permission to copy in any form is granted for use with
|
||||
conforming SGML systems and applications as defined in
|
||||
ISO 8879, provided this notice is included in all copies.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Character entity set.
|
||||
-->
|
||||
|
||||
<!-- Latin A -->
|
||||
<!ENTITY nbsp " "> <!-- U+00A0 ISOnum - no-break space = non-breaking space -->
|
||||
<!ENTITY iexcl "¡"> <!-- U+00A1 ISOnum - inverted exclamation mark -->
|
||||
<!ENTITY cent "¢"> <!-- U+00A2 ISOnum - cent sign -->
|
||||
<!ENTITY pound "£"> <!-- U+00A3 ISOnum - pound sign -->
|
||||
<!ENTITY curren "¤"> <!-- U+00A4 ISOnum - currency sign -->
|
||||
<!ENTITY yen "¥"> <!-- U+00A5 ISOnum - yen sign = yuan sign -->
|
||||
<!ENTITY brvbar "¦"> <!-- U+00A6 ISOnum - broken bar = broken vertical bar -->
|
||||
<!ENTITY sect "§"> <!-- U+00A7 ISOnum - section sign -->
|
||||
<!ENTITY uml "¨"> <!-- U+00A8 ISOdia - diaeresis = spacing diaeresis -->
|
||||
<!ENTITY copy "©"> <!-- U+00A9 ISOnum - copyright sign -->
|
||||
<!ENTITY ordf "ª"> <!-- U+00AA ISOnum - feminine ordinal indicator -->
|
||||
<!ENTITY laquo "«"> <!-- U+00AB ISOnum - left-pointing double angle quotation mark = left pointing guillemet -->
|
||||
<!ENTITY not "¬"> <!-- U+00AC ISOnum - not sign -->
|
||||
<!ENTITY shy "­"> <!-- U+00AD ISOnum - soft hyphen = discretionary hyphen -->
|
||||
<!ENTITY reg "®"> <!-- U+00AE ISOnum - registered sign = registered trade mark sign -->
|
||||
<!ENTITY macr "¯"> <!-- U+00AF ISOdia - macron = spacing macron = overline = APL overbar -->
|
||||
<!ENTITY deg "°"> <!-- U+00B0 ISOnum - degree sign -->
|
||||
<!ENTITY plusmn "±"> <!-- U+00B1 ISOnum - plus-minus sign = plus-or-minus sign -->
|
||||
<!ENTITY sup2 "²"> <!-- U+00B2 ISOnum - superscript two = superscript digit two = squared -->
|
||||
<!ENTITY sup3 "³"> <!-- U+00B3 ISOnum - superscript three = superscript digit three = cubed -->
|
||||
<!ENTITY acute "´"> <!-- U+00B4 ISOdia - acute accent = spacing acute -->
|
||||
<!ENTITY micro "µ"> <!-- U+00B5 ISOnum - micro sign -->
|
||||
<!ENTITY para "¶"> <!-- U+00B6 ISOnum - pilcrow sign = paragraph sign -->
|
||||
<!ENTITY middot "·"> <!-- U+00B7 ISOnum - middle dot = Georgian comma = Greek middle dot -->
|
||||
<!ENTITY cedil "¸"> <!-- U+00B8 ISOdia - cedilla = spacing cedilla -->
|
||||
<!ENTITY sup1 "¹"> <!-- U+00B9 ISOnum - superscript one = superscript digit one -->
|
||||
<!ENTITY ordm "º"> <!-- U+00BA ISOnum - masculine ordinal indicator -->
|
||||
<!ENTITY raquo "»"> <!-- U+00BB ISOnum - right-pointing double angle quotation mark = right pointing guillemet -->
|
||||
<!ENTITY frac14 "¼"> <!-- U+00BC ISOnum - vulgar fraction one quarter = fraction one quarter -->
|
||||
<!ENTITY frac12 "½"> <!-- U+00BD ISOnum - vulgar fraction one half = fraction one half -->
|
||||
<!ENTITY frac34 "¾"> <!-- U+00BE ISOnum - vulgar fraction three quarters = fraction three quarters -->
|
||||
<!ENTITY iquest "¿"> <!-- U+00BF ISOnum - inverted question mark = turned question mark -->
|
||||
<!ENTITY Agrave "À"> <!-- U+00C0 ISOlat1 - latin capital letter A with grave = latin capital letter A grave -->
|
||||
<!ENTITY Aacute "Á"> <!-- U+00C1 ISOlat1 - latin capital letter A with acute -->
|
||||
<!ENTITY Acirc "Â"> <!-- U+00C2 ISOlat1 - latin capital letter A with circumflex -->
|
||||
<!ENTITY Atilde "Ã"> <!-- U+00C3 ISOlat1 - latin capital letter A with tilde -->
|
||||
<!ENTITY Auml "Ä"> <!-- U+00C4 ISOlat1 - latin capital letter A with diaeresis -->
|
||||
<!ENTITY Aring "Å"> <!-- U+00C5 ISOlat1 - latin capital letter A with ring above = latin capital letter A ring -->
|
||||
<!ENTITY AElig "Æ"> <!-- U+00C6 ISOlat1 - latin capital letter AE = latin capital ligature AE -->
|
||||
<!ENTITY Ccedil "Ç"> <!-- U+00C7 ISOlat1 - latin capital letter C with cedilla -->
|
||||
<!ENTITY Egrave "È"> <!-- U+00C8 ISOlat1 - latin capital letter E with grave -->
|
||||
<!ENTITY Eacute "É"> <!-- U+00C9 ISOlat1 - latin capital letter E with acute -->
|
||||
<!ENTITY Ecirc "Ê"> <!-- U+00CA ISOlat1 - latin capital letter E with circumflex -->
|
||||
<!ENTITY Euml "Ë"> <!-- U+00CB ISOlat1 - latin capital letter E with diaeresis -->
|
||||
<!ENTITY Igrave "Ì"> <!-- U+00CC ISOlat1 - latin capital letter I with grave -->
|
||||
<!ENTITY Iacute "Í"> <!-- U+00CD ISOlat1 - latin capital letter I with acute -->
|
||||
<!ENTITY Icirc "Î"> <!-- U+00CE ISOlat1 - latin capital letter I with circumflex -->
|
||||
<!ENTITY Iuml "Ï"> <!-- U+00CF ISOlat1 - latin capital letter I with diaeresis -->
|
||||
<!ENTITY ETH "Ð"> <!-- U+00D0 ISOlat1 - latin capital letter ETH -->
|
||||
<!ENTITY Ntilde "Ñ"> <!-- U+00D1 ISOlat1 - latin capital letter N with tilde -->
|
||||
<!ENTITY Ograve "Ò"> <!-- U+00D2 ISOlat1 - latin capital letter O with grave -->
|
||||
<!ENTITY Oacute "Ó"> <!-- U+00D3 ISOlat1 - latin capital letter O with acute -->
|
||||
<!ENTITY Ocirc "Ô"> <!-- U+00D4 ISOlat1 - latin capital letter O with circumflex -->
|
||||
<!ENTITY Otilde "Õ"> <!-- U+00D5 ISOlat1 - latin capital letter O with tilde -->
|
||||
<!ENTITY Ouml "Ö"> <!-- U+00D6 ISOlat1 - latin capital letter O with diaeresis -->
|
||||
<!ENTITY times "×"> <!-- U+00D7 ISOnum - multiplication sign -->
|
||||
<!ENTITY Oslash "Ø"> <!-- U+00D8 ISOlat1 - latin capital letter O with stroke = latin capital letter O slash -->
|
||||
<!ENTITY Ugrave "Ù"> <!-- U+00D9 ISOlat1 - latin capital letter U with grave -->
|
||||
<!ENTITY Uacute "Ú"> <!-- U+00DA ISOlat1 - latin capital letter U with acute -->
|
||||
<!ENTITY Ucirc "Û"> <!-- U+00DB ISOlat1 - latin capital letter U with circumflex -->
|
||||
<!ENTITY Uuml "Ü"> <!-- U+00DC ISOlat1 - latin capital letter U with diaeresis -->
|
||||
<!ENTITY Yacute "Ý"> <!-- U+00DD ISOlat1 - latin capital letter Y with acute -->
|
||||
<!ENTITY THORN "Þ"> <!-- U+00DE ISOlat1 - latin capital letter THORN -->
|
||||
<!ENTITY szlig "ß"> <!-- U+00DF ISOlat1 - latin small letter sharp s = ess-zed -->
|
||||
<!ENTITY agrave "à"> <!-- U+00E0 ISOlat1 - latin small letter a with grave = latin small letter a grave -->
|
||||
<!ENTITY aacute "á"> <!-- U+00E1 ISOlat1 - latin small letter a with acute -->
|
||||
<!ENTITY acirc "â"> <!-- U+00E2 ISOlat1 - latin small letter a with circumflex -->
|
||||
<!ENTITY atilde "ã"> <!-- U+00E3 ISOlat1 - latin small letter a with tilde -->
|
||||
<!ENTITY auml "ä"> <!-- U+00E4 ISOlat1 - latin small letter a with diaeresis -->
|
||||
<!ENTITY aring "å"> <!-- U+00E5 ISOlat1 - latin small letter a with ring above = latin small letter a ring -->
|
||||
<!ENTITY aelig "æ"> <!-- U+00E6 ISOlat1 - latin small letter ae = latin small ligature ae -->
|
||||
<!ENTITY ccedil "ç"> <!-- U+00E7 ISOlat1 - latin small letter c with cedilla -->
|
||||
<!ENTITY egrave "è"> <!-- U+00E8 ISOlat1 - latin small letter e with grave -->
|
||||
<!ENTITY eacute "é"> <!-- U+00E9 ISOlat1 - latin small letter e with acute -->
|
||||
<!ENTITY ecirc "ê"> <!-- U+00EA ISOlat1 - latin small letter e with circumflex -->
|
||||
<!ENTITY euml "ë"> <!-- U+00EB ISOlat1 - latin small letter e with diaeresis -->
|
||||
<!ENTITY igrave "ì"> <!-- U+00EC ISOlat1 - latin small letter i with grave -->
|
||||
<!ENTITY iacute "í"> <!-- U+00ED ISOlat1 - latin small letter i with acute -->
|
||||
<!ENTITY icirc "î"> <!-- U+00EE ISOlat1 - latin small letter i with circumflex -->
|
||||
<!ENTITY iuml "ï"> <!-- U+00EF ISOlat1 - latin small letter i with diaeresis -->
|
||||
<!ENTITY eth "ð"> <!-- U+00F0 ISOlat1 - latin small letter eth -->
|
||||
<!ENTITY ntilde "ñ"> <!-- U+00F1 ISOlat1 - latin small letter n with tilde -->
|
||||
<!ENTITY ograve "ò"> <!-- U+00F2 ISOlat1 - latin small letter o with grave -->
|
||||
<!ENTITY oacute "ó"> <!-- U+00F3 ISOlat1 - latin small letter o with acute -->
|
||||
<!ENTITY ocirc "ô"> <!-- U+00F4 ISOlat1 - latin small letter o with circumflex -->
|
||||
<!ENTITY otilde "õ"> <!-- U+00F5 ISOlat1 - latin small letter o with tilde -->
|
||||
<!ENTITY ouml "ö"> <!-- U+00F6 ISOlat1 - latin small letter o with diaeresis -->
|
||||
<!ENTITY divide "÷"> <!-- U+00F7 ISOnum - division sign -->
|
||||
<!ENTITY oslash "ø"> <!-- U+00F8 ISOlat1 - latin small letter o with stroke = latin small letter o slash -->
|
||||
<!ENTITY ugrave "ù"> <!-- U+00F9 ISOlat1 - latin small letter u with grave -->
|
||||
<!ENTITY uacute "ú"> <!-- U+00FA ISOlat1 - latin small letter u with acute -->
|
||||
<!ENTITY ucirc "û"> <!-- U+00FB ISOlat1 - latin small letter u with circumflex -->
|
||||
<!ENTITY uuml "ü"> <!-- U+00FC ISOlat1 - latin small letter u with diaeresis -->
|
||||
<!ENTITY yacute "ý"> <!-- U+00FD ISOlat1 - latin small letter y with acute -->
|
||||
<!ENTITY thorn "þ"> <!-- U+00FE ISOlat1 - latin small letter thorn -->
|
||||
<!ENTITY yuml "ÿ"> <!-- U+00FF ISOlat1 - latin small letter y with diaeresis -->
|
||||
|
||||
<!-- Latin Extended-A -->
|
||||
<!ENTITY OElig "Œ"> <!-- U+0152 ISOlat2 - latin capital ligature OE -->
|
||||
<!ENTITY oelig "œ"> <!-- U+0153 ISOlat2 - latin small ligature oe -->
|
||||
|
||||
<!-- ligature is a misnomer, this is a separate character in some languages -->
|
||||
<!ENTITY Scaron "Š"> <!-- U+0160 ISOlat2 - latin capital letter S with caron -->
|
||||
<!ENTITY scaron "š"> <!-- U+0161 ISOlat2 - latin small letter s with caron -->
|
||||
<!ENTITY Yuml "Ÿ"> <!-- U+0178 ISOlat2 - latin capital letter Y with diaeresis -->
|
||||
|
||||
<!-- Spacing Modifier Letters -->
|
||||
<!ENTITY circ "ˆ"> <!-- U+02C6 ISOpub - modifier letter circumflex accent -->
|
||||
<!ENTITY tilde "˜"> <!-- U+02DC ISOdia - small tilde -->
|
||||
|
||||
<!-- General Punctuation -->
|
||||
<!ENTITY ensp " "> <!-- U+2002 ISOpub - en space -->
|
||||
<!ENTITY emsp " "> <!-- U+2003 ISOpub - em space -->
|
||||
<!ENTITY thinsp " "> <!-- U+2009 ISOpub - thin space -->
|
||||
<!ENTITY zwnj "‌"> <!-- U+200C RFC 2070 - zero width non-joiner -->
|
||||
<!ENTITY zwj "‍"> <!-- U+200D RFC 2070 - zero width joiner -->
|
||||
<!ENTITY lrm "‎"> <!-- U+200E RFC 2070 - left-to-right mark -->
|
||||
<!ENTITY rlm "‏"> <!-- U+200F RFC 2070 - right-to-left mark -->
|
||||
<!ENTITY ndash "–"> <!-- U+2013 ISOpub - en dash -->
|
||||
<!ENTITY mdash "—"> <!-- U+2014 ISOpub - em dash -->
|
||||
<!ENTITY lsquo "‘"> <!-- U+2018 ISOnum - left single quotation mark -->
|
||||
<!ENTITY rsquo "’"> <!-- U+2019 ISOnum - right single quotation mark -->
|
||||
<!ENTITY sbquo "‚"> <!-- U+201A NEW - single low-9 quotation mark -->
|
||||
<!ENTITY ldquo "“"> <!-- U+201C ISOnum - left double quotation mark -->
|
||||
<!ENTITY rdquo "”"> <!-- U+201D ISOnum - right double quotation mark, -->
|
||||
<!ENTITY bdquo "„"> <!-- U+201E NEW - double low-9 quotation mark -->
|
||||
<!ENTITY dagger "†"> <!-- U+2020 ISOpub - dagger -->
|
||||
<!ENTITY Dagger "‡"> <!-- U+2021 ISOpub - double dagger -->
|
||||
<!ENTITY permil "‰"> <!-- U+2030 ISOtech - per mille sign -->
|
||||
<!ENTITY lsaquo "‹"> <!-- U+2039 ISO prop. - single left-pointing angle quotation mark -->
|
||||
|
||||
<!-- lsaquo is proposed but not yet ISO standardized -->
|
||||
<!ENTITY rsaquo "›"> <!-- U+203A ISO prop. - single right-pointing angle quotation mark -->
|
||||
|
||||
<!-- rsaquo is proposed but not yet ISO standardized -->
|
||||
<!ENTITY euro "€"> <!-- U+20AC NEW - euro sign -->
|
||||
|
||||
<!-- Latin Extended-B -->
|
||||
<!ENTITY fnof "ƒ"> <!-- U+0192 ISOtech - latin small f with hook = function = florin -->
|
||||
|
||||
<!-- Greek -->
|
||||
<!ENTITY Alpha "Α"> <!-- U+0391 - greek capital letter alpha -->
|
||||
<!ENTITY Beta "Β"> <!-- U+0392 - greek capital letter beta -->
|
||||
<!ENTITY Gamma "Γ"> <!-- U+0393 ISOgrk3 - greek capital letter gamma -->
|
||||
<!ENTITY Delta "Δ"> <!-- U+0394 ISOgrk3 - greek capital letter delta -->
|
||||
<!ENTITY Epsilon "Ε"> <!-- U+0395 - greek capital letter epsilon -->
|
||||
<!ENTITY Zeta "Ζ"> <!-- U+0396 - greek capital letter zeta -->
|
||||
<!ENTITY Eta "Η"> <!-- U+0397 - greek capital letter eta -->
|
||||
<!ENTITY Theta "Θ"> <!-- U+0398 ISOgrk3 - greek capital letter theta -->
|
||||
<!ENTITY Iota "Ι"> <!-- U+0399 - greek capital letter iota -->
|
||||
<!ENTITY Kappa "Κ"> <!-- U+039A - greek capital letter kappa -->
|
||||
<!ENTITY Lambda "Λ"> <!-- U+039B ISOgrk3 - greek capital letter lambda -->
|
||||
<!ENTITY Mu "Μ"> <!-- U+039C - greek capital letter mu -->
|
||||
<!ENTITY Nu "Ν"> <!-- U+039D - greek capital letter nu -->
|
||||
<!ENTITY Xi "Ξ"> <!-- U+039E ISOgrk3 - greek capital letter xi -->
|
||||
<!ENTITY Omicron "Ο"> <!-- U+039F - greek capital letter omicron -->
|
||||
<!ENTITY Pi "Π"> <!-- U+03A0 ISOgrk3 - greek capital letter pi -->
|
||||
<!ENTITY Rho "Ρ"> <!-- U+03A1 - greek capital letter rho -->
|
||||
<!ENTITY Sigma "Σ"> <!-- U+03A3 ISOgrk3 - greek capital letter sigma -->
|
||||
<!ENTITY Tau "Τ"> <!-- U+03A4 - greek capital letter tau -->
|
||||
<!ENTITY Upsilon "Υ"> <!-- U+03A5 ISOgrk3 - greek capital letter upsilon -->
|
||||
<!ENTITY Phi "Φ"> <!-- U+03A6 ISOgrk3 - greek capital letter phi -->
|
||||
<!ENTITY Chi "Χ"> <!-- U+03A7 - greek capital letter chi -->
|
||||
<!ENTITY Psi "Ψ"> <!-- U+03A8 ISOgrk3 - greek capital letter psi -->
|
||||
<!ENTITY Omega "Ω"> <!-- U+03A9 ISOgrk3 - greek capital letter omega -->
|
||||
<!ENTITY alpha "α"> <!-- U+03B1 ISOgrk3 - greek small letter alpha -->
|
||||
<!ENTITY beta "β"> <!-- U+03B2 ISOgrk3 - greek small letter beta -->
|
||||
<!ENTITY gamma "γ"> <!-- U+03B3 ISOgrk3 - greek small letter gamma -->
|
||||
<!ENTITY delta "δ"> <!-- U+03B4 ISOgrk3 - greek small letter delta -->
|
||||
<!ENTITY epsilon "ε"> <!-- U+03B5 ISOgrk3 - greek small letter epsilon -->
|
||||
<!ENTITY zeta "ζ"> <!-- U+03B6 ISOgrk3 - greek small letter zeta -->
|
||||
<!ENTITY eta "η"> <!-- U+03B7 ISOgrk3 - greek small letter eta -->
|
||||
<!ENTITY theta "θ"> <!-- U+03B8 ISOgrk3 - greek small letter theta -->
|
||||
<!ENTITY iota "ι"> <!-- U+03B9 ISOgrk3 - greek small letter iota -->
|
||||
<!ENTITY kappa "κ"> <!-- U+03BA ISOgrk3 - greek small letter kappa -->
|
||||
<!ENTITY lambda "λ"> <!-- U+03BB ISOgrk3 - greek small letter lambda -->
|
||||
<!ENTITY mu "μ"> <!-- U+03BC ISOgrk3 - greek small letter mu -->
|
||||
<!ENTITY nu "ν"> <!-- U+03BD ISOgrk3 - greek small letter nu -->
|
||||
<!ENTITY xi "ξ"> <!-- U+03BE ISOgrk3 - greek small letter xi -->
|
||||
<!ENTITY omicron "ο"> <!-- U+03BF NEW - greek small letter omicron -->
|
||||
<!ENTITY pi "π"> <!-- U+03C0 ISOgrk3 - greek small letter pi -->
|
||||
<!ENTITY rho "ρ"> <!-- U+03C1 ISOgrk3 - greek small letter rho -->
|
||||
<!ENTITY sigmaf "ς"> <!-- U+03C2 ISOgrk3 - greek small letter final sigma -->
|
||||
<!ENTITY sigma "σ"> <!-- U+03C3 ISOgrk3 - greek small letter sigma -->
|
||||
<!ENTITY tau "τ"> <!-- U+03C4 ISOgrk3 - greek small letter tau -->
|
||||
<!ENTITY upsilon "υ"> <!-- U+03C5 ISOgrk3 - greek small letter upsilon -->
|
||||
<!ENTITY phi "φ"> <!-- U+03C6 ISOgrk3 - greek small letter phi -->
|
||||
<!ENTITY chi "χ"> <!-- U+03C7 ISOgrk3 - greek small letter chi -->
|
||||
<!ENTITY psi "ψ"> <!-- U+03C8 ISOgrk3 - greek small letter psi -->
|
||||
<!ENTITY omega "ω"> <!-- U+03C9 ISOgrk3 - greek small letter omega -->
|
||||
<!ENTITY thetasym "ϑ"> <!-- U+03D1 NEW - greek small letter theta symbol -->
|
||||
<!ENTITY upsih "ϒ"> <!-- U+03D2 NEW - greek upsilon with hook symbol -->
|
||||
<!ENTITY piv "ϖ"> <!-- U+03D6 ISOgrk3 - greek pi symbol -->
|
||||
|
||||
<!-- General Punctuation -->
|
||||
<!ENTITY bull "•"> <!-- U+2022 ISOpub - bullet = black small circle -->
|
||||
<!ENTITY hellip "…"> <!-- U+2026 ISOpub - horizontal ellipsis = three dot leader -->
|
||||
<!ENTITY prime "′"> <!-- U+2032 ISOtech - prime = minutes = feet -->
|
||||
<!ENTITY Prime "″"> <!-- U+2033 ISOtech - double prime = seconds = inches -->
|
||||
<!ENTITY oline "‾"> <!-- U+203E NEW - overline = spacing overscore -->
|
||||
<!ENTITY frasl "⁄"> <!-- U+2044 NEW - fraction slash -->
|
||||
|
||||
<!-- Letterlike Symbols -->
|
||||
<!ENTITY weierp "℘"> <!-- U+2118 ISOamso - script capital P = power set = Weierstrass p -->
|
||||
<!ENTITY image "ℑ"> <!-- U+2111 ISOamso - blackletter capital I = imaginary part -->
|
||||
<!ENTITY real "ℜ"> <!-- U+211C ISOamso - blackletter capital R = real part symbol -->
|
||||
<!ENTITY trade "™"> <!-- U+2122 ISOnum - trade mark sign -->
|
||||
<!ENTITY alefsym "ℵ"> <!-- U+2135 NEW - alef symbol = first transfinite cardinal -->
|
||||
|
||||
<!-- Arrows -->
|
||||
<!ENTITY larr "←"> <!-- U+2190 ISOnum - leftwards arrow -->
|
||||
<!ENTITY uarr "↑"> <!-- U+2191 ISOnum - upwards arrow -->
|
||||
<!ENTITY rarr "→"> <!-- U+2192 ISOnum - rightwards arrow -->
|
||||
<!ENTITY darr "↓"> <!-- U+2193 ISOnum - downwards arrow -->
|
||||
<!ENTITY harr "↔"> <!-- U+2194 ISOamsa - left right arrow -->
|
||||
<!ENTITY crarr "↵"> <!-- U+21B5 NEW - downwards arrow with corner leftwards = carriage return -->
|
||||
<!ENTITY lArr "⇐"> <!-- U+21D0 ISOtech - leftwards double arrow -->
|
||||
<!ENTITY uArr "⇑"> <!-- U+21D1 ISOamsa - upwards double arrow -->
|
||||
<!ENTITY rArr "⇒"> <!-- U+21D2 ISOtech - rightwards double arrow -->
|
||||
<!ENTITY dArr "⇓"> <!-- U+21D3 ISOamsa - downwards double arrow -->
|
||||
<!ENTITY hArr "⇔"> <!-- U+21D4 ISOamsa - left right double arrow -->
|
||||
|
||||
<!-- Mathematical Operators -->
|
||||
<!ENTITY forall "∀"> <!-- U+2200 ISOtech - for all -->
|
||||
<!ENTITY part "∂"> <!-- U+2202 ISOtech - partial differential -->
|
||||
<!ENTITY exist "∃"> <!-- U+2203 ISOtech - there exists -->
|
||||
<!ENTITY empty "∅"> <!-- U+2205 ISOamso - empty set = null set = diameter -->
|
||||
<!ENTITY nabla "∇"> <!-- U+2207 ISOtech - nabla = backward difference -->
|
||||
<!ENTITY isin "∈"> <!-- U+2208 ISOtech - element of -->
|
||||
<!ENTITY notin "∉"> <!-- U+2209 ISOtech - not an element of -->
|
||||
<!ENTITY ni "∋"> <!-- U+220B ISOtech - contains as member -->
|
||||
<!ENTITY prod "∏"> <!-- U+220F ISOamsb - n-ary product = product sign -->
|
||||
<!ENTITY sum "∑"> <!-- U+2211 ISOamsb - n-ary sumation -->
|
||||
<!ENTITY minus "−"> <!-- U+2212 ISOtech - minus sign -->
|
||||
<!ENTITY lowast "∗"> <!-- U+2217 ISOtech - asterisk operator -->
|
||||
<!ENTITY radic "√"> <!-- U+221A ISOtech - square root = radical sign -->
|
||||
<!ENTITY prop "∝"> <!-- U+221D ISOtech - proportional to -->
|
||||
<!ENTITY infin "∞"> <!-- U+221E ISOtech - infinity -->
|
||||
<!ENTITY ang "∠"> <!-- U+2220 ISOamso - angle -->
|
||||
<!ENTITY and "∧"> <!-- U+2227 ISOtech - logical and = wedge -->
|
||||
<!ENTITY or "∨"> <!-- U+2228 ISOtech - logical or = vee -->
|
||||
<!ENTITY cap "∩"> <!-- U+2229 ISOtech - intersection = cap -->
|
||||
<!ENTITY cup "∪"> <!-- U+222A ISOtech - union = cup -->
|
||||
<!ENTITY int "∫"> <!-- U+222B ISOtech - integral -->
|
||||
<!ENTITY there4 "∴"> <!-- U+2234 ISOtech - therefore -->
|
||||
<!ENTITY sim "∼"> <!-- U+223C ISOtech - tilde operator = varies with = similar to -->
|
||||
<!ENTITY cong "≅"> <!-- U+2245 ISOtech - approximately equal to -->
|
||||
<!ENTITY asymp "≈"> <!-- U+2248 ISOamsr - almost equal to = asymptotic to -->
|
||||
<!ENTITY ne "≠"> <!-- U+2260 ISOtech - not equal to -->
|
||||
<!ENTITY equiv "≡"> <!-- U+2261 ISOtech - identical to -->
|
||||
<!ENTITY le "≤"> <!-- U+2264 ISOtech - less-than or equal to -->
|
||||
<!ENTITY ge "≥"> <!-- U+2265 ISOtech - greater-than or equal to -->
|
||||
<!ENTITY sub "⊂"> <!-- U+2282 ISOtech - subset of -->
|
||||
<!ENTITY sup "⊃"> <!-- U+2283 ISOtech - superset of -->
|
||||
<!ENTITY nsub "⊄"> <!-- U+2284 ISOamsn - not a subset of -->
|
||||
<!ENTITY sube "⊆"> <!-- U+2286 ISOtech - subset of or equal to -->
|
||||
<!ENTITY supe "⊇"> <!-- U+2287 ISOtech - superset of or equal to -->
|
||||
<!ENTITY oplus "⊕"> <!-- U+2295 ISOamsb - circled plus = direct sum -->
|
||||
<!ENTITY otimes "⊗"> <!-- U+2297 ISOamsb - circled times = vector product -->
|
||||
<!ENTITY perp "⊥"> <!-- U+22A5 ISOtech - up tack = orthogonal to = perpendicular -->
|
||||
<!ENTITY sdot "⋅"> <!-- U+22C5 ISOamsb - dot operator -->
|
||||
|
||||
<!-- Miscellaneous Technical -->
|
||||
<!ENTITY lceil "⌈"> <!-- U+2308 ISOamsc - left ceiling = apl upstile -->
|
||||
<!ENTITY rceil "⌉"> <!-- U+2309 ISOamsc - right ceiling -->
|
||||
<!ENTITY lfloor "⌊"> <!-- U+230A ISOamsc - left floor = apl downstile -->
|
||||
<!ENTITY rfloor "⌋"> <!-- U+230B ISOamsc - right floor -->
|
||||
<!ENTITY lang "〈"> <!-- U+2329 ISOtech - left-pointing angle bracket = bra -->
|
||||
<!ENTITY rang "〉"> <!-- U+232A ISOtech - right-pointing angle bracket = ket -->
|
||||
|
||||
<!-- Geometric Shapes -->
|
||||
<!ENTITY loz "◊"> <!-- U+25CA ISOpub - lozenge -->
|
||||
|
||||
<!-- Miscellaneous Symbols -->
|
||||
<!ENTITY spades "♠"> <!-- U+2660 ISOpub - black spade suit -->
|
||||
<!ENTITY clubs "♣"> <!-- U+2663 ISOpub - black club suit = shamrock -->
|
||||
<!ENTITY hearts "♥"> <!-- U+2665 ISOpub - black heart suit = valentine -->
|
||||
<!ENTITY diams "♦"> <!-- U+2666 ISOpub - black diamond suit -->
|
|
@ -0,0 +1,195 @@
|
|||
<!-- DTD for XML Schemas: Part 2: Datatypes -->
|
||||
<!-- Id: datatypes.dtd,v 1.14 2000/10/23 08:58:09 ht Exp -->
|
||||
|
||||
<!-- This DTD cannot be used on its own, it is intended only for incorporation
|
||||
in XMLSchema.dtd, q.v. -->
|
||||
|
||||
<!-- Define all the element names, with optional prefix -->
|
||||
<!ENTITY % simpleType "%p;simpleType">
|
||||
<!ENTITY % restriction "%p;restriction">
|
||||
<!ENTITY % list "%p;list">
|
||||
<!ENTITY % union "%p;union">
|
||||
<!ENTITY % maxExclusive "%p;maxExclusive">
|
||||
<!ENTITY % minExclusive "%p;minExclusive">
|
||||
<!ENTITY % maxInclusive "%p;maxInclusive">
|
||||
<!ENTITY % minInclusive "%p;minInclusive">
|
||||
<!ENTITY % precision "%p;precision">
|
||||
<!ENTITY % scale "%p;scale">
|
||||
<!ENTITY % length "%p;length">
|
||||
<!ENTITY % minLength "%p;minLength">
|
||||
<!ENTITY % maxLength "%p;maxLength">
|
||||
<!ENTITY % enumeration "%p;enumeration">
|
||||
<!ENTITY % whiteSpace "%p;whiteSpace">
|
||||
<!ENTITY % pattern "%p;pattern">
|
||||
<!ENTITY % encoding "%p;encoding">
|
||||
<!ENTITY % period "%p;period">
|
||||
<!ENTITY % duration "%p;duration">
|
||||
|
||||
<!-- Customisation entities for the ATTLIST of each element type.
|
||||
Define one of these if your schema takes advantage of the
|
||||
anyAttribute='##other' in the schema for schemas -->
|
||||
|
||||
<!ENTITY % simpleTypeAttrs "">
|
||||
<!ENTITY % restrictionAttrs "">
|
||||
<!ENTITY % listAttrs "">
|
||||
<!ENTITY % unionAttrs "">
|
||||
<!ENTITY % simpleTypeAttrs "">
|
||||
<!ENTITY % maxExclusiveAttrs "">
|
||||
<!ENTITY % minExclusiveAttrs "">
|
||||
<!ENTITY % maxInclusiveAttrs "">
|
||||
<!ENTITY % minInclusiveAttrs "">
|
||||
<!ENTITY % precisionAttrs "">
|
||||
<!ENTITY % scaleAttrs "">
|
||||
<!ENTITY % lengthAttrs "">
|
||||
<!ENTITY % minLengthAttrs "">
|
||||
<!ENTITY % maxLengthAttrs "">
|
||||
<!ENTITY % enumerationAttrs "">
|
||||
<!ENTITY % whiteSpaceAttrs "">
|
||||
<!ENTITY % patternAttrs "">
|
||||
<!ENTITY % encodingAttrs "">
|
||||
<!ENTITY % periodAttrs "">
|
||||
<!ENTITY % durationAttrs "">
|
||||
<!ENTITY % appinfoAttrs "">
|
||||
<!ENTITY % documentationAttrs "">
|
||||
|
||||
<!-- Define some entities for informative use as attribute types -->
|
||||
<!ENTITY % URIref "CDATA">
|
||||
<!ENTITY % XPathExpr "CDATA">
|
||||
<!ENTITY % QName "NMTOKEN">
|
||||
<!ENTITY % QNames "NMTOKENS">
|
||||
<!ENTITY % NCName "NMTOKEN">
|
||||
<!ENTITY % nonNegativeInteger "NMTOKEN">
|
||||
<!ENTITY % boolean "(true|false)">
|
||||
|
||||
<!-- Note that the use of 'facet' below is less restrictive than is
|
||||
really intended: There should in fact be no more than one of each of
|
||||
minInclusive, minExclusive, maxInclusive, maxExclusive,
|
||||
precision, scale,
|
||||
length, maxLength, minLength, encoding, period within datatype,
|
||||
and the min- and max- variants of Inclusive and Exclusive are
|
||||
mutually exclusive.
|
||||
On the other hand, pattern and enumeration may repeat -->
|
||||
<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
|
||||
<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
|
||||
<!ENTITY % bounds "%minBound; | %maxBound;">
|
||||
<!ENTITY % numeric "%precision; | %scale;">
|
||||
<!ENTITY % ordered "%bounds; | %numeric;">
|
||||
<!ENTITY % unordered
|
||||
"%pattern; | %enumeration; | %whiteSpace; | %length; | %maxLength; | %minLength;
|
||||
| %encoding; | %period; | %duration;">
|
||||
<!ENTITY % facet "%ordered; | %unordered;">
|
||||
<!ENTITY % facetAttr "value CDATA #REQUIRED">
|
||||
<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
|
||||
<!ENTITY % facetModel "(%annotation;)?">
|
||||
<!ELEMENT %simpleType; ((%annotation;)?, (%restriction; | %list; | %union;))>
|
||||
<!ATTLIST %simpleType;
|
||||
name %NCName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%simpleTypeAttrs;>
|
||||
<!-- name is required at top level -->
|
||||
<!ELEMENT %restriction; ((%annotation;)?,
|
||||
(%restriction1; |
|
||||
((%simpleType;)?,(%facet;)*)),
|
||||
(%attrDecls;))>
|
||||
<!ATTLIST %restriction;
|
||||
base %QName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%restrictionAttrs;>
|
||||
<!-- base and simpleType child are mutually exclusive, one is required -->
|
||||
<!-- restriction is shared between simpleType and simpleContent and -->
|
||||
<!-- complexContent (in XMLSchema.xsd). restriction1 is for the latter -->
|
||||
<!-- cases, when this is restricting a complex type, as is attrDecls -->
|
||||
<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
|
||||
<!ATTLIST %list;
|
||||
itemType %QName; #IMPLIED
|
||||
id ID #IMPLIED
|
||||
%listAttrs;>
|
||||
<!-- itemType and simpleType child are mutually exclusive, one is required -->
|
||||
<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
|
||||
<!ATTLIST %union;
|
||||
id ID #IMPLIED
|
||||
memberTypes %QNames; #IMPLIED
|
||||
%unionAttrs;>
|
||||
<!-- At least one item in memberTypes or one simpleType child is required -->
|
||||
|
||||
<!ELEMENT %maxExclusive; %facetModel;>
|
||||
<!ATTLIST %maxExclusive;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%maxExclusiveAttrs;>
|
||||
<!ELEMENT %minExclusive; %facetModel;>
|
||||
<!ATTLIST %minExclusive;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%minExclusiveAttrs;>
|
||||
|
||||
<!ELEMENT %maxInclusive; %facetModel;>
|
||||
<!ATTLIST %maxInclusive;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%maxInclusiveAttrs;>
|
||||
<!ELEMENT %minInclusive; %facetModel;>
|
||||
<!ATTLIST %minInclusive;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%minInclusiveAttrs;>
|
||||
|
||||
<!ELEMENT %precision; %facetModel;>
|
||||
<!ATTLIST %precision;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%precisionAttrs;>
|
||||
<!ELEMENT %scale; %facetModel;>
|
||||
<!ATTLIST %scale;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%scaleAttrs;>
|
||||
|
||||
<!ELEMENT %length; %facetModel;>
|
||||
<!ATTLIST %length;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%lengthAttrs;>
|
||||
<!ELEMENT %minLength; %facetModel;>
|
||||
<!ATTLIST %minLength;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%minLengthAttrs;>
|
||||
<!ELEMENT %maxLength; %facetModel;>
|
||||
<!ATTLIST %maxLength;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%maxLengthAttrs;>
|
||||
|
||||
<!-- This one can be repeated -->
|
||||
<!ELEMENT %enumeration; %facetModel;>
|
||||
<!ATTLIST %enumeration;
|
||||
%facetAttr;
|
||||
%enumerationAttrs;>
|
||||
|
||||
<!ELEMENT %whiteSpace; %facetModel;>
|
||||
<!ATTLIST %whiteSpace;
|
||||
%facetAttr;
|
||||
%whiteSpaceAttrs;>
|
||||
|
||||
<!-- This one can be repeated -->
|
||||
<!ELEMENT %pattern; %facetModel;>
|
||||
<!ATTLIST %pattern;
|
||||
%facetAttr;
|
||||
%patternAttrs;>
|
||||
|
||||
<!ELEMENT %encoding; %facetModel;>
|
||||
<!ATTLIST %encoding;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%encodingAttrs;>
|
||||
<!ELEMENT %period; %facetModel;>
|
||||
<!ATTLIST %period;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%periodAttrs;>
|
||||
<!ELEMENT %duration; %facetModel;>
|
||||
<!ATTLIST %duration;
|
||||
%facetAttr;
|
||||
%fixedAttr;
|
||||
%durationAttrs;>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue