First commit.
This commit is contained in:
commit
adf0f3a86c
48 changed files with 2418 additions and 0 deletions
25
.classpath
Normal file
25
.classpath
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/junit-4.11.jar"/>
|
||||
<classpathentry kind="lib" path="lib/log4j-1.2.17.jar"/>
|
||||
<classpathentry kind="lib" path="lib/slf4j-api-1.7.5.jar"/>
|
||||
<classpathentry kind="lib" path="lib/slf4j-log4j12-1.7.5.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-codec-1.8.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="jst.utility"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_45">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/devinsy-utils-0.2.4.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
30
.project
Normal file
30
.project
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>SikevaDB</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
11
.settings/org.eclipse.jdt.core.prefs
Normal file
11
.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
6
.settings/org.eclipse.wst.common.component
Normal file
6
.settings/org.eclipse.wst.common.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="SikevaDB">
|
||||
<wb-resource deploy-path="/" source-path="/src"/>
|
||||
<wb-resource deploy-path="/" source-path="/test"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
8
.settings/org.eclipse.wst.common.project.facet.core.xml
Normal file
8
.settings/org.eclipse.wst.common.project.facet.core.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<runtime name="Apache Tomcat v7.0"/>
|
||||
<fixed facet="java"/>
|
||||
<fixed facet="jst.utility"/>
|
||||
<installed facet="java" version="1.6"/>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
</faceted-project>
|
165
LICENSE
Normal file
165
LICENSE
Normal file
|
@ -0,0 +1,165 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
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 that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU 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 as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
3
bin/META-INF/MANIFEST.MF
Normal file
3
bin/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
9
bin/META-INF/context.xml
Normal file
9
bin/META-INF/context.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<Context>
|
||||
|
||||
<Resource name="jdbc/kiwa-devdb" auth="Container" type="javax.sql.DataSource"
|
||||
maxActive="50" maxIdle="30" maxWait="10000"
|
||||
username="kiwa-devdb-admin" password="12345678"
|
||||
driverClassName="com.mysql.jdbc.Driver"
|
||||
url="jdbc:mysql://localhost:3306/kiwa-devdb"/>
|
||||
|
||||
</Context>
|
BIN
bin/fr/devinsy/sikevadb/AlphaTest.class
Normal file
BIN
bin/fr/devinsy/sikevadb/AlphaTest.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/Element.class
Normal file
BIN
bin/fr/devinsy/sikevadb/Element.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/Elements.class
Normal file
BIN
bin/fr/devinsy/sikevadb/Elements.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/FileSikevaDB.class
Normal file
BIN
bin/fr/devinsy/sikevadb/FileSikevaDB.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/SQLSikevaDB.class
Normal file
BIN
bin/fr/devinsy/sikevadb/SQLSikevaDB.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/SikevaDB.class
Normal file
BIN
bin/fr/devinsy/sikevadb/SikevaDB.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/SikevaDBFactory.class
Normal file
BIN
bin/fr/devinsy/sikevadb/SikevaDBFactory.class
Normal file
Binary file not shown.
BIN
bin/fr/devinsy/sikevadb/SikevaDBUtils.class
Normal file
BIN
bin/fr/devinsy/sikevadb/SikevaDBUtils.class
Normal file
Binary file not shown.
3
build.num
Normal file
3
build.num
Normal file
|
@ -0,0 +1,3 @@
|
|||
#Build Number for ANT. Do not edit!
|
||||
#Sat Aug 24 15:54:52 CEST 2013
|
||||
build.number=1
|
3
build.properties
Normal file
3
build.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
product.name=sikevadb
|
||||
product.revision.major=0
|
||||
product.revision.minor=1
|
5
build.xml
Normal file
5
build.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<project default="dist" name="sikevadb">
|
||||
<!-- -->
|
||||
<import file="buildjar.xml" />
|
||||
</project>
|
129
buildjar.xml
Normal file
129
buildjar.xml
Normal file
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<project default="dist" name="jarbuild">
|
||||
<!--ANT 1.7 is required -->
|
||||
<property name="buildjar.version" value="1.1" />
|
||||
<property file="build.properties" />
|
||||
<property name="build.dir" value="${basedir}/build" />
|
||||
<property name="build.src" value="${basedir}/src" />
|
||||
<property name="build.classes" value="${build.dir}/classes" />
|
||||
<property name="build.javadoc" value="${build.dir}/javadoc" />
|
||||
<property name="test.src" value="${basedir}/test" />
|
||||
<property name="test.classes" value="${build.dir}/test-classes" />
|
||||
<property name="debug" value="on" />
|
||||
|
||||
<path id="build.classpath">
|
||||
<fileset dir="lib" includes="**/*.jar" />
|
||||
</path>
|
||||
|
||||
<path id="test.classpath.compile">
|
||||
<path refid="build.classpath" />
|
||||
<pathelement path="${build.classes}" />
|
||||
</path>
|
||||
|
||||
<path id="test.classpath.run">
|
||||
<path refid="test.classpath.compile" />
|
||||
<pathelement path="${test.classes}" />
|
||||
</path>
|
||||
|
||||
|
||||
<!-- ***** Help ***** -->
|
||||
<target name="help" description="Display detailed usage information">
|
||||
<echo>Type ant -p</echo>
|
||||
</target>
|
||||
|
||||
<!-- ***** Clean ***** -->
|
||||
<target name="clean" description="Clean temporary directories">
|
||||
<delete dir="${build.dir}" />
|
||||
</target>
|
||||
|
||||
<!-- ***** Compile ***** -->
|
||||
<target name="compile" description="Compile main code">
|
||||
<mkdir dir="${build.dir}/classes" />
|
||||
<javac srcdir="${build.src}" destdir="${build.classes}" debug="${debug}" deprecation="on" includeantruntime="false">
|
||||
<classpath refid="test.classpath.compile" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<!-- ***** Compile test ***** -->
|
||||
<target name="compile-test" description="Compile test code">
|
||||
<mkdir dir="${test.classes}" />
|
||||
<javac srcdir="${test.src}" destdir="${test.classes}" debug="${debug}" deprecation="on" includeantruntime="false">
|
||||
<classpath refid="test.classpath.compile" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ***** Test ***** -->
|
||||
<target name="test" description="Run unit tests" depends="clean,compile,compile-test">
|
||||
<mkdir dir="${build.dir}/test-reports" />
|
||||
<junit printsummary="yes" haltonfailure="no">
|
||||
<classpath refid="test.classpath.run" />
|
||||
<formatter type="plain" usefile="true" />
|
||||
<batchtest fork="yes" todir="${build.dir}/test-reports/">
|
||||
<fileset dir="test">
|
||||
<include name="**/*Test.java" />
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<!-- ***** JavaDoc ***** -->
|
||||
<target name="javadoc" description="Javadoc construction">
|
||||
<javadoc sourcepath="${build.src}" destdir="${build.javadoc}">
|
||||
<classpath>
|
||||
<fileset dir="lib" includes="**/*.jar" />
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<!-- ***** Dist ***** -->
|
||||
<target name="dist" description="Build distribution" depends="clean,compile,javadoc">
|
||||
<!-- -->
|
||||
<buildnumber file="build.num" description="Id of the build" />
|
||||
<!-- AUTOMATIC MANAGEMENT -->
|
||||
<property name="dist.version" value="${product.revision.major}.${product.revision.minor}.${build.number}" />
|
||||
<property name="dist.name" value="${product.name}-${dist.version}" />
|
||||
<property name="dist.dir" value="${basedir}/dist/${dist.name}" />
|
||||
|
||||
<!-- -->
|
||||
<mkdir dir="${dist.dir}" />
|
||||
|
||||
<!-- -->
|
||||
<copy file="LICENSE" todir="${dist.dir}/" overwrite="true" />
|
||||
|
||||
<!-- Package main -->
|
||||
<property name="dist.jar" value="${dist.dir}/${dist.name}.jar" />
|
||||
<tstamp>
|
||||
<format property="dist.time" pattern="dd/MM/yyyy HH:mm:ss" />
|
||||
<!-- TODAY -->
|
||||
</tstamp>
|
||||
<jar destfile="${dist.jar}">
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name} using ant" />
|
||||
<attribute name="Built-Date" value="${dist.time}" />
|
||||
</manifest>
|
||||
<fileset dir="${build.classes}" />
|
||||
<zipfileset dir="${basedir}/" includes="LICENSE" />
|
||||
</jar>
|
||||
|
||||
<!-- Package sources -->
|
||||
<property name="dist.srczip" value="${dist.dir}/${dist.name}-sources.zip" />
|
||||
<zip destfile="${dist.srczip}" update="true" preserve0permissions="true">
|
||||
<fileset dir="${basedir}/src" />
|
||||
<zipfileset dir="${basedir}/" includes="LICENSE" />
|
||||
</zip>
|
||||
|
||||
<!-- Package Javadoc -->
|
||||
<property name="dist.javadoc.zip" value="${dist.dir}/${dist.name}-javadoc.zip" />
|
||||
<zip destfile="${dist.javadoc.zip}" update="true" preserve0permissions="true">
|
||||
<fileset dir="${build.javadoc}" />
|
||||
<zipfileset dir="${basedir}/" includes="LICENSE" />
|
||||
</zip>
|
||||
|
||||
<!-- Package lib -->
|
||||
<copy todir="${dist.dir}/lib" overwrite="true">
|
||||
<fileset dir="lib" excludes="hamcrest-core*,junit*" />
|
||||
</copy>
|
||||
|
||||
</target>
|
||||
</project>
|
8
lib/README
Normal file
8
lib/README
Normal file
|
@ -0,0 +1,8 @@
|
|||
Description of used libraries:
|
||||
- commons-codec: digest tools
|
||||
- commons-lang: useful tools (StringUtils...)
|
||||
- hamcrest-core: required by junit
|
||||
- junit: unit tests API
|
||||
- log4j: log API
|
||||
- slf4j-api: facade log API
|
||||
- slf4j-log4j12: adaptation layer between slf4j and log4j
|
BIN
lib/commons-codec-1.8-sources.jar
Normal file
BIN
lib/commons-codec-1.8-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-codec-1.8.jar
Normal file
BIN
lib/commons-codec-1.8.jar
Normal file
Binary file not shown.
BIN
lib/commons-lang3-3.1-sources.jar
Normal file
BIN
lib/commons-lang3-3.1-sources.jar
Normal file
Binary file not shown.
BIN
lib/commons-lang3-3.1.jar
Normal file
BIN
lib/commons-lang3-3.1.jar
Normal file
Binary file not shown.
BIN
lib/devinsy-utils-0.2.4-sources.zip
Normal file
BIN
lib/devinsy-utils-0.2.4-sources.zip
Normal file
Binary file not shown.
BIN
lib/devinsy-utils-0.2.4.jar
Normal file
BIN
lib/devinsy-utils-0.2.4.jar
Normal file
Binary file not shown.
BIN
lib/hamcrest-core-1.3-sources.jar
Normal file
BIN
lib/hamcrest-core-1.3-sources.jar
Normal file
Binary file not shown.
BIN
lib/hamcrest-core-1.3.jar
Normal file
BIN
lib/hamcrest-core-1.3.jar
Normal file
Binary file not shown.
BIN
lib/junit-4.11-sources.jar
Normal file
BIN
lib/junit-4.11-sources.jar
Normal file
Binary file not shown.
BIN
lib/junit-4.11.jar
Normal file
BIN
lib/junit-4.11.jar
Normal file
Binary file not shown.
BIN
lib/log4j-1.2.17-source.zip
Normal file
BIN
lib/log4j-1.2.17-source.zip
Normal file
Binary file not shown.
BIN
lib/log4j-1.2.17.jar
Normal file
BIN
lib/log4j-1.2.17.jar
Normal file
Binary file not shown.
BIN
lib/slf4j-api-1.7.5-sources.jar
Normal file
BIN
lib/slf4j-api-1.7.5-sources.jar
Normal file
Binary file not shown.
BIN
lib/slf4j-api-1.7.5.jar
Normal file
BIN
lib/slf4j-api-1.7.5.jar
Normal file
Binary file not shown.
BIN
lib/slf4j-log4j12-1.7.5-sources.jar
Normal file
BIN
lib/slf4j-log4j12-1.7.5-sources.jar
Normal file
Binary file not shown.
BIN
lib/slf4j-log4j12-1.7.5.jar
Normal file
BIN
lib/slf4j-log4j12-1.7.5.jar
Normal file
Binary file not shown.
28
resources/sql/create.sql
Normal file
28
resources/sql/create.sql
Normal file
|
@ -0,0 +1,28 @@
|
|||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
--
|
||||
-- Base de données: `sikevadb-kiwa`
|
||||
--
|
||||
CREATE DATABASE IF NOT EXISTS `sikevadb-test` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
|
||||
USE `sikevadb-kiwa`;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Structure de la table `elements`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `elements`;
|
||||
CREATE TABLE IF NOT EXISTS `elements` (
|
||||
`TOPKEY` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`SUBKEY` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`SIZE` int(11) NOT NULL DEFAULT '0',
|
||||
`DIGEST` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`CREATION_DATE` date NOT NULL,
|
||||
`EDITION_DATE` date NOT NULL,
|
||||
`ARCHIVE_DATE` date DEFAULT NULL,
|
||||
`VALUE` longtext COLLATE utf8_unicode_ci,
|
||||
PRIMARY KEY (`TOPKEY`),
|
||||
KEY `XKEYINDEX` (`TOPKEY`,`SUBKEY`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
3
src/META-INF/MANIFEST.MF
Normal file
3
src/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
9
src/META-INF/context.xml
Normal file
9
src/META-INF/context.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<Context>
|
||||
|
||||
<Resource name="jdbc/kiwa-devdb" auth="Container" type="javax.sql.DataSource"
|
||||
maxActive="50" maxIdle="30" maxWait="10000"
|
||||
username="kiwa-devdb-admin" password="12345678"
|
||||
driverClassName="com.mysql.jdbc.Driver"
|
||||
url="jdbc:mysql://localhost:3306/kiwa-devdb"/>
|
||||
|
||||
</Context>
|
141
src/fr/devinsy/sikevadb/Element.java
Normal file
141
src/fr/devinsy/sikevadb/Element.java
Normal file
|
@ -0,0 +1,141 @@
|
|||
/**
|
||||
* Copyright (C) 2013 DEVINSY & Christian P. MOMON
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class Element {
|
||||
|
||||
private Date creationDate;
|
||||
private Date editionDate;
|
||||
private Date archiveDate;
|
||||
private String key;
|
||||
private String subkey;
|
||||
private long size;
|
||||
private String digest;
|
||||
private String value;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
public Element() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
public Element(final String key, final String subkey, final String value) {
|
||||
updateValue(value);
|
||||
this.creationDate = this.editionDate;
|
||||
this.archiveDate = null;
|
||||
this.key = key;
|
||||
this.subkey = subkey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void archive() {
|
||||
this.archiveDate = new Date();
|
||||
}
|
||||
|
||||
public Date getArchiveDate() {
|
||||
return archiveDate;
|
||||
}
|
||||
|
||||
public Date getCreationDate() {
|
||||
return creationDate;
|
||||
}
|
||||
|
||||
public String getDigest() {
|
||||
return digest;
|
||||
}
|
||||
|
||||
public Date getEditionDate() {
|
||||
return editionDate;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public String getSubkey() {
|
||||
return subkey;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setArchiveDate(final Date archiveDate) {
|
||||
this.archiveDate = archiveDate;
|
||||
}
|
||||
|
||||
public void setCreationDate(final Date creationDate) {
|
||||
this.creationDate = creationDate;
|
||||
}
|
||||
|
||||
public void setDigest(final String digest) {
|
||||
this.digest = digest;
|
||||
}
|
||||
|
||||
public void setEditionDate(final Date editionDate) {
|
||||
this.editionDate = editionDate;
|
||||
}
|
||||
|
||||
public void setKey(final String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public void setSize(final long size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public void setSubkey(final String subkey) {
|
||||
this.subkey = subkey;
|
||||
}
|
||||
|
||||
public void setValue(final String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public void updateValue(final String value) {
|
||||
setValue(value);
|
||||
this.editionDate = new Date();
|
||||
if (value == null) {
|
||||
this.size = 0;
|
||||
this.digest = null;
|
||||
} else {
|
||||
this.size = this.value.length();
|
||||
this.digest = DigestUtils.md5Hex(this.value);
|
||||
}
|
||||
}
|
||||
}
|
43
src/fr/devinsy/sikevadb/Elements.java
Normal file
43
src/fr/devinsy/sikevadb/Elements.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* Copyright (C) 2013 DEVINSY & Christian P. MOMON
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class Elements extends ArrayList<Element> {
|
||||
|
||||
private static final long serialVersionUID = 6298920093179395791L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Elements() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Elements(final int initialCapacity) {
|
||||
super(initialCapacity);
|
||||
}
|
||||
|
||||
}
|
243
src/fr/devinsy/sikevadb/FileSikevaDB.java
Normal file
243
src/fr/devinsy/sikevadb/FileSikevaDB.java
Normal file
|
@ -0,0 +1,243 @@
|
|||
/**
|
||||
* Copyright (C) 2013 DEVINSY & Christian P. MOMON
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
import fr.devinsy.util.StringList;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class FileSikevaDB implements SikevaDB {
|
||||
/**
|
||||
*
|
||||
* @param path
|
||||
*/
|
||||
public FileSikevaDB(final String path) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void archive(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void archive(final String key, final String subkey) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfAllElements() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfAllElements(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfAllElements(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfArchivedElements() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfArchivedElements(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfArchivedElements(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfElements() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfElements(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long countOfElements(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Elements getAllElements(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Elements getAllElements(final String key, final String subkey) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getAllValues(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getAllValues(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getArchivedValues(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getArchivedValues(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Element getElement(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Element getElement(final String key, final String subkey) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Elements getElements(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Elements getElements(final String key, final String subkey) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getValues(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringList getValues(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long memorySize() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long memorySize(final String key) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long memorySize(final String key, final String subkey) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(final Element element) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(final String key, final String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(final String key, final String subkey, final String value) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(final String key) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(final String key, final String subkey) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
1325
src/fr/devinsy/sikevadb/SQLSikevaDB.java
Normal file
1325
src/fr/devinsy/sikevadb/SQLSikevaDB.java
Normal file
File diff suppressed because it is too large
Load diff
98
src/fr/devinsy/sikevadb/SikevaDB.java
Normal file
98
src/fr/devinsy/sikevadb/SikevaDB.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
/**
|
||||
* Copyright (C) 2013 DEVINSY & Christian P. MOMON
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
import fr.devinsy.util.StringList;
|
||||
|
||||
/**
|
||||
* All elements = archived elements + elements.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public interface SikevaDB {
|
||||
|
||||
public void archive(final String key) throws Exception;
|
||||
|
||||
public void archive(final String key, final String subkey) throws Exception;
|
||||
|
||||
public void close() throws Exception;
|
||||
|
||||
public long countOfAllElements() throws Exception;
|
||||
|
||||
public long countOfAllElements(String key) throws Exception;
|
||||
|
||||
public long countOfAllElements(String key, String subkey) throws Exception;
|
||||
|
||||
public long countOfArchivedElements() throws Exception;
|
||||
|
||||
public long countOfArchivedElements(String key) throws Exception;
|
||||
|
||||
public long countOfArchivedElements(String key, String subkey) throws Exception;
|
||||
|
||||
public long countOfElements() throws Exception;
|
||||
|
||||
public long countOfElements(String key) throws Exception;
|
||||
|
||||
public long countOfElements(String key, String subkey) throws Exception;
|
||||
|
||||
public Elements getAllElements(String key) throws Exception;
|
||||
|
||||
public Elements getAllElements(String key, String subkey) throws Exception;
|
||||
|
||||
public StringList getAllValues(String key) throws Exception;
|
||||
|
||||
public StringList getAllValues(String key, String subkey) throws Exception;
|
||||
|
||||
public StringList getArchivedValues(String key) throws Exception;
|
||||
|
||||
public StringList getArchivedValues(String key, String subkey) throws Exception;
|
||||
|
||||
public Element getElement(String key) throws Exception;
|
||||
|
||||
public Element getElement(String key, String subkey) throws Exception;
|
||||
|
||||
public Elements getElements(String key) throws Exception;
|
||||
|
||||
public Elements getElements(String key, String subkey) throws Exception;
|
||||
|
||||
public String getValue(String key) throws Exception;
|
||||
|
||||
public String getValue(String key, String subkey) throws Exception;
|
||||
|
||||
public StringList getValues(String key) throws Exception;
|
||||
|
||||
public StringList getValues(String key, String subkey) throws Exception;
|
||||
|
||||
public long memorySize() throws Exception;
|
||||
|
||||
public long memorySize(String key) throws Exception;
|
||||
|
||||
public long memorySize(String key, String subkey) throws Exception;
|
||||
|
||||
public void open() throws Exception;
|
||||
|
||||
public void put(Element element) throws Exception;
|
||||
|
||||
public void put(String key, String value) throws Exception;
|
||||
|
||||
public void put(String key, String subkey, String value) throws Exception;
|
||||
|
||||
public void remove(final String key) throws Exception;
|
||||
|
||||
public void remove(final String key, final String subkey) throws Exception;
|
||||
}
|
54
src/fr/devinsy/sikevadb/SikevaDBFactory.java
Normal file
54
src/fr/devinsy/sikevadb/SikevaDBFactory.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* Copyright (C) 2013 DEVINSY & Christian P. MOMON
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class SikevaDBFactory {
|
||||
/**
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
public static SikevaDB get(final String path) {
|
||||
SikevaDB result;
|
||||
|
||||
result = new FileSikevaDB(path);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param host
|
||||
* @param port
|
||||
* @param login
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
public static SikevaDB get(final String host, final String port, final String login, final String password) {
|
||||
SikevaDB result;
|
||||
|
||||
result = new SQLSikevaDB(host, port, login, password);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
29
src/fr/devinsy/sikevadb/SikevaDBUtils.java
Normal file
29
src/fr/devinsy/sikevadb/SikevaDBUtils.java
Normal file
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Copyright (C) 2013 KINSOURCES
|
||||
*
|
||||
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3, 29 June
|
||||
* 2007; or any later version you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
package fr.devinsy.sikevadb;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class SikevaDBUtils {
|
||||
public static long now() {
|
||||
return new Date().getTime();
|
||||
}
|
||||
}
|
40
test/fr/devinsy/sikevadb/AlphaTest.java
Normal file
40
test/fr/devinsy/sikevadb/AlphaTest.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package fr.devinsy.sikevadb;
|
||||
|
||||
import org.apache.log4j.BasicConfigurator;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Christian P. Momon
|
||||
*/
|
||||
public class AlphaTest {
|
||||
static protected org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(AlphaTest.class);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Before
|
||||
public void before() {
|
||||
BasicConfigurator.configure();
|
||||
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testFoo01() {
|
||||
//
|
||||
logger.debug("===== test starting...");
|
||||
|
||||
//
|
||||
Assert.assertEquals('a', 'a');
|
||||
|
||||
//
|
||||
logger.debug("===== test done.");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue