contains all gui elements which are called from beanshells in the workflow.
* text=auto !eol
DataCleaning/README.txt -text
+DataCleaning/java/DCWorkflow/build.xml -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/manifest.mf -text
+DataCleaning/java/DCWorkflow/nbproject/build-impl.xml -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/nbproject/extlibs/json-simple-1.1.1.jar -text svneol=unset#application/zip
+DataCleaning/java/DCWorkflow/nbproject/extlibs/opencsv-2.3.jar -text svneol=unset#application/zip
+DataCleaning/java/DCWorkflow/nbproject/genfiles.properties -text
+DataCleaning/java/DCWorkflow/nbproject/private/config.properties -text
+DataCleaning/java/DCWorkflow/nbproject/private/private.properties -text
+DataCleaning/java/DCWorkflow/nbproject/private/private.xml -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/nbproject/project.properties -text
+DataCleaning/java/DCWorkflow/nbproject/project.xml -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/DCChoiceDialog.form -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/DCChoiceDialog.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/DCSynExpInputDialog.form -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/DCSynExpInputDialog.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/DCSynExpInputParser.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/OccRetrievalTargetDialog.form -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/OccRetrievalTargetDialog.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/SynCheckDialog.form -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/syncheck/SynCheckDialog.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/biostiff/BioSTIFFConstants.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/CheckBoxEditorRenderer.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/DCCBoxTableModel.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/DCNamesTableModel.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/DCSynCellStringRenderer.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/NamesOutputPanel.form -text svneol=unset#application/xml
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/NamesOutputPanel.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/SciName.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/SynCheckConstants.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/SynCheckUtilsFactory.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/datacleaning/utils/syncheck/TableMouseListener.java -text
+DataCleaning/java/DCWorkflow/src/org/bgbm/biovel/utils/CSVFactory.java -text
DataCleaning/workflows/data_cleaning/data_cleaning.t2flow -text
DataCleaning/workflows/data_cleaning/test_input.txt -text
DataCleaning/workflows/nested/grefine/grefine.t2flow -text
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- You may freely edit this file. See commented blocks below for -->\r
+<!-- some examples of how to customize the build. -->\r
+<!-- (If you delete it and reopen the project it will be recreated.) -->\r
+<!-- By default, only the Clean and Build commands use this build script. -->\r
+<!-- Commands such as Run, Debug, and Test only use this build script if -->\r
+<!-- the Compile on Save feature is turned off for the project. -->\r
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->\r
+<!-- in the project's Project Properties dialog box.-->\r
+<project name="DCWorkflow" default="default" basedir=".">\r
+ <description>Builds, tests, and runs the project DCWorkflow.</description>\r
+ <import file="nbproject/build-impl.xml"/>\r
+ <!--\r
+\r
+ There exist several targets which are by default empty and which can be \r
+ used for execution of your tasks. These targets are usually executed \r
+ before and after some main targets. They are: \r
+\r
+ -pre-init: called before initialization of project properties\r
+ -post-init: called after initialization of project properties\r
+ -pre-compile: called before javac compilation\r
+ -post-compile: called after javac compilation\r
+ -pre-compile-single: called before javac compilation of single file\r
+ -post-compile-single: called after javac compilation of single file\r
+ -pre-compile-test: called before javac compilation of JUnit tests\r
+ -post-compile-test: called after javac compilation of JUnit tests\r
+ -pre-compile-test-single: called before javac compilation of single JUnit test\r
+ -post-compile-test-single: called after javac compilation of single JUunit test\r
+ -pre-jar: called before JAR building\r
+ -post-jar: called after JAR building\r
+ -post-clean: called after cleaning build products\r
+\r
+ (Targets beginning with '-' are not intended to be called on their own.)\r
+\r
+ Example of inserting an obfuscator after compilation could look like this:\r
+\r
+ <target name="-post-compile">\r
+ <obfuscate>\r
+ <fileset dir="${build.classes.dir}"/>\r
+ </obfuscate>\r
+ </target>\r
+\r
+ For list of available properties check the imported \r
+ nbproject/build-impl.xml file. \r
+\r
+\r
+ Another way to customize the build is by overriding existing main targets.\r
+ The targets of interest are: \r
+\r
+ -init-macrodef-javac: defines macro for javac compilation\r
+ -init-macrodef-junit: defines macro for junit execution\r
+ -init-macrodef-debug: defines macro for class debugging\r
+ -init-macrodef-java: defines macro for class execution\r
+ -do-jar-with-manifest: JAR building (if you are using a manifest)\r
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)\r
+ run: execution of project \r
+ -javadoc-build: Javadoc generation\r
+ test-report: JUnit report generation\r
+\r
+ An example of overriding the target for project execution could look like this:\r
+\r
+ <target name="run" depends="DCWorkflow-impl.jar">\r
+ <exec dir="bin" executable="launcher.exe">\r
+ <arg file="${dist.jar}"/>\r
+ </exec>\r
+ </target>\r
+\r
+ Notice that the overridden target depends on the jar target and not only on \r
+ the compile target as the regular run target does. Again, for a list of available \r
+ properties which you can use, check the target you are overriding in the\r
+ nbproject/build-impl.xml file. \r
+\r
+ -->\r
+</project>\r
--- /dev/null
+Manifest-Version: 1.0\r
+X-COMMENT: Main-Class will be added automatically by build\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+*** GENERATED FROM project.xml - DO NOT EDIT ***\r
+*** EDIT ../build.xml INSTEAD ***\r
+\r
+For the purpose of easier reading the script\r
+is divided into following sections:\r
+\r
+ - initialization\r
+ - compilation\r
+ - jar\r
+ - execution\r
+ - debugging\r
+ - javadoc\r
+ - junit compilation\r
+ - junit execution\r
+ - junit debugging\r
+ - applet\r
+ - cleanup\r
+\r
+ -->\r
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="DCWorkflow-impl">\r
+ <fail message="Please build using Ant 1.8.0 or higher.">\r
+ <condition>\r
+ <not>\r
+ <antversion atleast="1.8.0"/>\r
+ </not>\r
+ </condition>\r
+ </fail>\r
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>\r
+ <!-- \r
+ ======================\r
+ INITIALIZATION SECTION \r
+ ======================\r
+ -->\r
+ <target name="-pre-init">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="-pre-init" name="-init-private">\r
+ <property file="nbproject/private/config.properties"/>\r
+ <property file="nbproject/private/configs/${config}.properties"/>\r
+ <property file="nbproject/private/private.properties"/>\r
+ </target>\r
+ <target depends="-pre-init,-init-private" name="-init-user">\r
+ <property file="${user.properties.file}"/>\r
+ <!-- The two properties below are usually overridden -->\r
+ <!-- by the active platform. Just a fallback. -->\r
+ <property name="default.javac.source" value="1.4"/>\r
+ <property name="default.javac.target" value="1.4"/>\r
+ </target>\r
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">\r
+ <property file="nbproject/configs/${config}.properties"/>\r
+ <property file="nbproject/project.properties"/>\r
+ </target>\r
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
+ <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>\r
+ <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>\r
+ <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>\r
+ <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>\r
+ <condition property="platform.javac" value="${platform.home}/bin/javac">\r
+ <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>\r
+ </condition>\r
+ <property name="platform.javac" value="${platform.javac.tmp}"/>\r
+ <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>\r
+ <condition property="platform.java" value="${platform.home}/bin/java">\r
+ <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>\r
+ </condition>\r
+ <property name="platform.java" value="${platform.java.tmp}"/>\r
+ <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>\r
+ <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">\r
+ <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>\r
+ </condition>\r
+ <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>\r
+ <condition property="platform.invalid" value="true">\r
+ <or>\r
+ <contains string="${platform.javac}" substring="$${platforms."/>\r
+ <contains string="${platform.java}" substring="$${platforms."/>\r
+ <contains string="${platform.javadoc}" substring="$${platforms."/>\r
+ </or>\r
+ </condition>\r
+ <fail unless="platform.home">Must set platform.home</fail>\r
+ <fail unless="platform.bootcp">Must set platform.bootcp</fail>\r
+ <fail unless="platform.java">Must set platform.java</fail>\r
+ <fail unless="platform.javac">Must set platform.javac</fail>\r
+ <fail if="platform.invalid">\r
+ The J2SE Platform is not correctly set up.\r
+ Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. \r
+ Either open the project in the IDE and setup the Platform with the same name or add it manually.\r
+ For example like this:\r
+ ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file)\r
+ or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) \r
+ </fail>\r
+ <available file="${manifest.file}" property="manifest.available"/>\r
+ <condition property="splashscreen.available">\r
+ <and>\r
+ <not>\r
+ <equals arg1="${application.splash}" arg2="" trim="true"/>\r
+ </not>\r
+ <available file="${application.splash}"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="main.class.available">\r
+ <and>\r
+ <isset property="main.class"/>\r
+ <not>\r
+ <equals arg1="${main.class}" arg2="" trim="true"/>\r
+ </not>\r
+ </and>\r
+ </condition>\r
+ <condition property="manifest.available+main.class">\r
+ <and>\r
+ <isset property="manifest.available"/>\r
+ <isset property="main.class.available"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.archive">\r
+ <not>\r
+ <istrue value="${jar.archive.disabled}"/>\r
+ </not>\r
+ </condition>\r
+ <condition property="do.mkdist">\r
+ <and>\r
+ <isset property="do.archive"/>\r
+ <isset property="libs.CopyLibs.classpath"/>\r
+ <not>\r
+ <istrue value="${mkdist.disabled}"/>\r
+ </not>\r
+ </and>\r
+ </condition>\r
+ <condition property="manifest.available+main.class+mkdist.available">\r
+ <and>\r
+ <istrue value="${manifest.available+main.class}"/>\r
+ <isset property="do.mkdist"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.archive+manifest.available">\r
+ <and>\r
+ <isset property="manifest.available"/>\r
+ <istrue value="${do.archive}"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.archive+main.class.available">\r
+ <and>\r
+ <isset property="main.class.available"/>\r
+ <istrue value="${do.archive}"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.archive+splashscreen.available">\r
+ <and>\r
+ <isset property="splashscreen.available"/>\r
+ <istrue value="${do.archive}"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="do.archive+manifest.available+main.class">\r
+ <and>\r
+ <istrue value="${manifest.available+main.class}"/>\r
+ <istrue value="${do.archive}"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="manifest.available-mkdist.available">\r
+ <or>\r
+ <istrue value="${manifest.available}"/>\r
+ <isset property="do.mkdist"/>\r
+ </or>\r
+ </condition>\r
+ <condition property="manifest.available+main.class-mkdist.available">\r
+ <or>\r
+ <istrue value="${manifest.available+main.class}"/>\r
+ <isset property="do.mkdist"/>\r
+ </or>\r
+ </condition>\r
+ <condition property="have.tests">\r
+ <or>\r
+ <available file="${test.src.dir}"/>\r
+ </or>\r
+ </condition>\r
+ <condition property="have.sources">\r
+ <or>\r
+ <available file="${src.dir}"/>\r
+ </or>\r
+ </condition>\r
+ <condition property="netbeans.home+have.tests">\r
+ <and>\r
+ <isset property="netbeans.home"/>\r
+ <isset property="have.tests"/>\r
+ </and>\r
+ </condition>\r
+ <condition property="no.javadoc.preview">\r
+ <and>\r
+ <isset property="javadoc.preview"/>\r
+ <isfalse value="${javadoc.preview}"/>\r
+ </and>\r
+ </condition>\r
+ <property name="run.jvmargs" value=""/>\r
+ <property name="javac.compilerargs" value=""/>\r
+ <property name="work.dir" value="${basedir}"/>\r
+ <condition property="no.deps">\r
+ <and>\r
+ <istrue value="${no.dependencies}"/>\r
+ </and>\r
+ </condition>\r
+ <property name="javac.debug" value="true"/>\r
+ <property name="javadoc.preview" value="true"/>\r
+ <property name="application.args" value=""/>\r
+ <property name="source.encoding" value="${file.encoding}"/>\r
+ <property name="runtime.encoding" value="${source.encoding}"/>\r
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
+ <and>\r
+ <isset property="javadoc.encoding"/>\r
+ <not>\r
+ <equals arg1="${javadoc.encoding}" arg2=""/>\r
+ </not>\r
+ </and>\r
+ </condition>\r
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>\r
+ <property name="includes" value="**"/>\r
+ <property name="excludes" value=""/>\r
+ <property name="do.depend" value="false"/>\r
+ <condition property="do.depend.true">\r
+ <istrue value="${do.depend}"/>\r
+ </condition>\r
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>\r
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
+ <length length="0" string="${endorsed.classpath}" when="greater"/>\r
+ </condition>\r
+ <property name="jar.index" value="false"/>\r
+ <property name="jar.index.metainf" value="${jar.index}"/>\r
+ <property name="copylibs.rebase" value="true"/>\r
+ <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>\r
+ </target>\r
+ <target name="-post-init">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">\r
+ <fail unless="src.dir">Must set src.dir</fail>\r
+ <fail unless="test.src.dir">Must set test.src.dir</fail>\r
+ <fail unless="build.dir">Must set build.dir</fail>\r
+ <fail unless="dist.dir">Must set dist.dir</fail>\r
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>\r
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>\r
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>\r
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>\r
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>\r
+ <fail unless="dist.jar">Must set dist.jar</fail>\r
+ </target>\r
+ <target name="-init-macrodef-property">\r
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">\r
+ <attribute name="name"/>\r
+ <attribute name="value"/>\r
+ <sequential>\r
+ <property name="@{name}" value="${@{value}}"/>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">\r
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${src.dir}" name="srcdir"/>\r
+ <attribute default="${build.classes.dir}" name="destdir"/>\r
+ <attribute default="${javac.classpath}" name="classpath"/>\r
+ <attribute default="${javac.processorpath}" name="processorpath"/>\r
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
+ <attribute default="${includes}" name="includes"/>\r
+ <attribute default="${excludes}" name="excludes"/>\r
+ <attribute default="${javac.debug}" name="debug"/>\r
+ <attribute default="${empty.dir}" name="sourcepath"/>\r
+ <attribute default="${empty.dir}" name="gensrcdir"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <property location="${build.dir}/empty" name="empty.dir"/>\r
+ <mkdir dir="${empty.dir}"/>\r
+ <mkdir dir="@{apgeneratedsrcdir}"/>\r
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">\r
+ <src>\r
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
+ <include name="*"/>\r
+ </dirset>\r
+ </src>\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <compilerarg line="${javac.compilerargs}"/>\r
+ <compilerarg value="-processorpath"/>\r
+ <compilerarg path="@{processorpath}:${empty.dir}"/>\r
+ <compilerarg line="${ap.processors.internal}"/>\r
+ <compilerarg line="${annotation.processing.processor.options}"/>\r
+ <compilerarg value="-s"/>\r
+ <compilerarg path="@{apgeneratedsrcdir}"/>\r
+ <compilerarg line="${ap.proc.none.internal}"/>\r
+ <customize/>\r
+ </javac>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">\r
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${src.dir}" name="srcdir"/>\r
+ <attribute default="${build.classes.dir}" name="destdir"/>\r
+ <attribute default="${javac.classpath}" name="classpath"/>\r
+ <attribute default="${javac.processorpath}" name="processorpath"/>\r
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
+ <attribute default="${includes}" name="includes"/>\r
+ <attribute default="${excludes}" name="excludes"/>\r
+ <attribute default="${javac.debug}" name="debug"/>\r
+ <attribute default="${empty.dir}" name="sourcepath"/>\r
+ <attribute default="${empty.dir}" name="gensrcdir"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <property location="${build.dir}/empty" name="empty.dir"/>\r
+ <mkdir dir="${empty.dir}"/>\r
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">\r
+ <src>\r
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
+ <include name="*"/>\r
+ </dirset>\r
+ </src>\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <compilerarg line="${javac.compilerargs}"/>\r
+ <customize/>\r
+ </javac>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">\r
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${src.dir}" name="srcdir"/>\r
+ <attribute default="${build.classes.dir}" name="destdir"/>\r
+ <attribute default="${javac.classpath}" name="classpath"/>\r
+ <sequential>\r
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ </depend>\r
+ </sequential>\r
+ </macrodef>\r
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${build.classes.dir}" name="destdir"/>\r
+ <sequential>\r
+ <fail unless="javac.includes">Must set javac.includes</fail>\r
+ <pathconvert pathsep="${line.separator}" property="javac.includes.binary">\r
+ <path>\r
+ <filelist dir="@{destdir}" files="${javac.includes}"/>\r
+ </path>\r
+ <globmapper from="*.java" to="*.class"/>\r
+ </pathconvert>\r
+ <tempfile deleteonexit="true" property="javac.includesfile.binary"/>\r
+ <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>\r
+ <delete>\r
+ <files includesfile="${javac.includesfile.binary}"/>\r
+ </delete>\r
+ <delete>\r
+ <fileset file="${javac.includesfile.binary}"/>\r
+ </delete>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target name="-init-macrodef-junit">\r
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${includes}" name="includes"/>\r
+ <attribute default="${excludes}" name="excludes"/>\r
+ <attribute default="**" name="testincludes"/>\r
+ <sequential>\r
+ <property name="junit.forkmode" value="perTest"/>\r
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}">\r
+ <batchtest todir="${build.test.results.dir}">\r
+ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">\r
+ <filename name="@{testincludes}"/>\r
+ </fileset>\r
+ </batchtest>\r
+ <classpath>\r
+ <path path="${run.test.classpath}"/>\r
+ </classpath>\r
+ <syspropertyset>\r
+ <propertyref prefix="test-sys-prop."/>\r
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <formatter type="brief" usefile="false"/>\r
+ <formatter type="xml"/>\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <jvmarg value="-ea"/>\r
+ <jvmarg line="${run.jvmargs}"/>\r
+ </junit>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>\r
+ <target name="-profile-pre-init">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target name="-profile-post-init">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target name="-profile-init-macrodef-profile">\r
+ <macrodef name="resolve">\r
+ <attribute name="name"/>\r
+ <attribute name="value"/>\r
+ <sequential>\r
+ <property name="@{name}" value="${env.@{value}}"/>\r
+ </sequential>\r
+ </macrodef>\r
+ <macrodef name="profile">\r
+ <attribute default="${main.class}" name="classname"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <property environment="env"/>\r
+ <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>\r
+ <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
+ <jvmarg line="${profiler.info.jvmargs}"/>\r
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
+ <arg line="${application.args}"/>\r
+ <classpath>\r
+ <path path="${run.classpath}"/>\r
+ </classpath>\r
+ <syspropertyset>\r
+ <propertyref prefix="run-sys-prop."/>\r
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <customize/>\r
+ </java>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">\r
+ <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>\r
+ <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>\r
+ </target>\r
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">\r
+ <attribute default="${main.class}" name="name"/>\r
+ <attribute default="${debug.classpath}" name="classpath"/>\r
+ <attribute default="" name="stopclassname"/>\r
+ <sequential>\r
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ <bootclasspath>\r
+ <path path="${platform.bootcp}"/>\r
+ </bootclasspath>\r
+ </nbjpdastart>\r
+ </sequential>\r
+ </macrodef>\r
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">\r
+ <attribute default="${build.classes.dir}" name="dir"/>\r
+ <sequential>\r
+ <nbjpdareload>\r
+ <fileset dir="@{dir}" includes="${fix.classes}">\r
+ <include name="${fix.includes}*.class"/>\r
+ </fileset>\r
+ </nbjpdareload>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target name="-init-debug-args">\r
+ <exec executable="${platform.java}" outputproperty="version-output">\r
+ <arg value="-version"/>\r
+ </exec>\r
+ <condition property="have-jdk-older-than-1.4">\r
+ <or>\r
+ <contains string="${version-output}" substring="java version "1.0"/>\r
+ <contains string="${version-output}" substring="java version "1.1"/>\r
+ <contains string="${version-output}" substring="java version "1.2"/>\r
+ <contains string="${version-output}" substring="java version "1.3"/>\r
+ </or>\r
+ </condition>\r
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">\r
+ <istrue value="${have-jdk-older-than-1.4}"/>\r
+ </condition>\r
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">\r
+ <os family="windows"/>\r
+ </condition>\r
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">\r
+ <isset property="debug.transport"/>\r
+ </condition>\r
+ </target>\r
+ <target depends="-init-debug-args" name="-init-macrodef-debug">\r
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${main.class}" name="classname"/>\r
+ <attribute default="${debug.classpath}" name="classpath"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <jvmarg line="${debug-args-line}"/>\r
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
+ <jvmarg line="${run.jvmargs}"/>\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ <syspropertyset>\r
+ <propertyref prefix="run-sys-prop."/>\r
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <customize/>\r
+ </java>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target name="-init-macrodef-java">\r
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">\r
+ <attribute default="${main.class}" name="classname"/>\r
+ <attribute default="${run.classpath}" name="classpath"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">\r
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
+ <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>\r
+ <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>\r
+ <jvmarg line="${run.jvmargs}"/>\r
+ <classpath>\r
+ <path path="@{classpath}"/>\r
+ </classpath>\r
+ <syspropertyset>\r
+ <propertyref prefix="run-sys-prop."/>\r
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <customize/>\r
+ </java>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target name="-init-macrodef-copylibs">\r
+ <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">\r
+ <attribute default="${manifest.file}" name="manifest"/>\r
+ <element name="customize" optional="true"/>\r
+ <sequential>\r
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+ <pathconvert property="run.classpath.without.build.classes.dir">\r
+ <path path="${run.classpath}"/>\r
+ <map from="${build.classes.dir.resolved}" to=""/>\r
+ </pathconvert>\r
+ <pathconvert pathsep=" " property="jar.classpath">\r
+ <path path="${run.classpath.without.build.classes.dir}"/>\r
+ <chainedmapper>\r
+ <flattenmapper/>\r
+ <globmapper from="*" to="lib/*"/>\r
+ </chainedmapper>\r
+ </pathconvert>\r
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>\r
+ <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">\r
+ <fileset dir="${build.classes.dir}"/>\r
+ <manifest>\r
+ <attribute name="Class-Path" value="${jar.classpath}"/>\r
+ <customize/>\r
+ </manifest>\r
+ </copylibs>\r
+ </sequential>\r
+ </macrodef>\r
+ </target>\r
+ <target name="-init-presetdef-jar">\r
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">\r
+ <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">\r
+ <j2seproject1:fileset dir="${build.classes.dir}"/>\r
+ </jar>\r
+ </presetdef>\r
+ </target>\r
+ <target name="-init-ap-cmdline-properties">\r
+ <property name="annotation.processing.enabled" value="true"/>\r
+ <property name="annotation.processing.processors.list" value=""/>\r
+ <property name="annotation.processing.processor.options" value=""/>\r
+ <property name="annotation.processing.run.all.processors" value="true"/>\r
+ <property name="javac.processorpath" value="${javac.classpath}"/>\r
+ <property name="javac.test.processorpath" value="${javac.test.classpath}"/>\r
+ <condition property="ap.supported.internal" value="true">\r
+ <not>\r
+ <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>\r
+ </not>\r
+ </condition>\r
+ </target>\r
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">\r
+ <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">\r
+ <isfalse value="${annotation.processing.run.all.processors}"/>\r
+ </condition>\r
+ <condition else="" property="ap.proc.none.internal" value="-proc:none">\r
+ <isfalse value="${annotation.processing.enabled}"/>\r
+ </condition>\r
+ </target>\r
+ <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">\r
+ <property name="ap.cmd.line.internal" value=""/>\r
+ </target>\r
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>\r
+ <!--\r
+ ===================\r
+ COMPILATION SECTION\r
+ ===================\r
+ -->\r
+ <target name="-deps-jar-init" unless="built-jar.properties">\r
+ <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>\r
+ <delete file="${built-jar.properties}" quiet="true"/>\r
+ </target>\r
+ <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">\r
+ <echo level="warn" message="Cycle detected: DCWorkflow was already built"/>\r
+ </target>\r
+ <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">\r
+ <mkdir dir="${build.dir}"/>\r
+ <touch file="${built-jar.properties}" verbose="false"/>\r
+ <property file="${built-jar.properties}" prefix="already.built.jar."/>\r
+ <antcall target="-warn-already-built-jar"/>\r
+ <propertyfile file="${built-jar.properties}">\r
+ <entry key="${basedir}" value=""/>\r
+ </propertyfile>\r
+ </target>\r
+ <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>\r
+ <target depends="init" name="-check-automatic-build">\r
+ <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>\r
+ </target>\r
+ <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">\r
+ <antcall target="clean"/>\r
+ </target>\r
+ <target depends="init,deps-jar" name="-pre-pre-compile">\r
+ <mkdir dir="${build.classes.dir}"/>\r
+ </target>\r
+ <target name="-pre-compile">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target if="do.depend.true" name="-compile-depend">\r
+ <pathconvert property="build.generated.subdirs">\r
+ <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+ <include name="*"/>\r
+ </dirset>\r
+ </pathconvert>\r
+ <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>\r
+ </target>\r
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">\r
+ <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>\r
+ <copy todir="${build.classes.dir}">\r
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
+ </copy>\r
+ </target>\r
+ <target if="has.persistence.xml" name="-copy-persistence-xml">\r
+ <mkdir dir="${build.classes.dir}/META-INF"/>\r
+ <copy todir="${build.classes.dir}/META-INF">\r
+ <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>\r
+ </copy>\r
+ </target>\r
+ <target name="-post-compile">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>\r
+ <target name="-pre-compile-single">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
+ <j2seproject3:force-recompile/>\r
+ <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>\r
+ </target>\r
+ <target name="-post-compile-single">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>\r
+ <!--\r
+ ====================\r
+ JAR BUILDING SECTION\r
+ ====================\r
+ -->\r
+ <target depends="init" name="-pre-pre-jar">\r
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>\r
+ <mkdir dir="${dist.jar.dir}"/>\r
+ </target>\r
+ <target name="-pre-jar">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">\r
+ <j2seproject1:jar/>\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">\r
+ <j2seproject1:jar manifest="${manifest.file}"/>\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">\r
+ <j2seproject1:jar manifest="${manifest.file}">\r
+ <j2seproject1:manifest>\r
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>\r
+ </j2seproject1:manifest>\r
+ </j2seproject1:jar>\r
+ <echo level="info">To run this application from the command line without Ant, try:</echo>\r
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>\r
+ <property location="${dist.jar}" name="dist.jar.resolved"/>\r
+ <pathconvert property="run.classpath.with.dist.jar">\r
+ <path path="${run.classpath}"/>\r
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>\r
+ </pathconvert>\r
+ <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>\r
+ </target>\r
+ <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">\r
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
+ <touch file="${tmp.manifest.file}" verbose="false"/>\r
+ </target>\r
+ <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">\r
+ <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>\r
+ <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>\r
+ </target>\r
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">\r
+ <manifest file="${tmp.manifest.file}" mode="update">\r
+ <attribute name="Main-Class" value="${main.class}"/>\r
+ </manifest>\r
+ </target>\r
+ <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">\r
+ <basename file="${application.splash}" property="splashscreen.basename"/>\r
+ <mkdir dir="${build.classes.dir}/META-INF"/>\r
+ <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>\r
+ <manifest file="${tmp.manifest.file}" mode="update">\r
+ <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>\r
+ </manifest>\r
+ </target>\r
+ <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">\r
+ <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>\r
+ <echo level="info">To run this application from the command line without Ant, try:</echo>\r
+ <property location="${dist.jar}" name="dist.jar.resolved"/>\r
+ <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo>\r
+ </target>\r
+ <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">\r
+ <delete>\r
+ <fileset file="${tmp.manifest.file}"/>\r
+ </delete>\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>\r
+ <target name="-post-jar">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>\r
+ <!--\r
+ =================\r
+ EXECUTION SECTION\r
+ =================\r
+ -->\r
+ <target depends="init,compile" description="Run a main class." name="run">\r
+ <j2seproject1:java>\r
+ <customize>\r
+ <arg line="${application.args}"/>\r
+ </customize>\r
+ </j2seproject1:java>\r
+ </target>\r
+ <target name="-do-not-recompile">\r
+ <property name="javac.includes.binary" value=""/>\r
+ </target>\r
+ <target depends="init,compile-single" name="run-single">\r
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
+ <j2seproject1:java classname="${run.class}"/>\r
+ </target>\r
+ <target depends="init,compile-test-single" name="run-test-with-main">\r
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
+ <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
+ </target>\r
+ <!--\r
+ =================\r
+ DEBUGGING SECTION\r
+ =================\r
+ -->\r
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
+ <j2seproject1:nbjpdastart name="${debug.class}"/>\r
+ </target>\r
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
+ </target>\r
+ <target depends="init,compile" name="-debug-start-debuggee">\r
+ <j2seproject3:debug>\r
+ <customize>\r
+ <arg line="${application.args}"/>\r
+ </customize>\r
+ </j2seproject3:debug>\r
+ </target>\r
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>\r
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">\r
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>\r
+ </target>\r
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>\r
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">\r
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
+ <j2seproject3:debug classname="${debug.class}"/>\r
+ </target>\r
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>\r
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
+ <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
+ </target>\r
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
+ <target depends="init" name="-pre-debug-fix">\r
+ <fail unless="fix.includes">Must set fix.includes</fail>\r
+ <property name="javac.includes" value="${fix.includes}.java"/>\r
+ </target>\r
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">\r
+ <j2seproject1:nbjpdareload/>\r
+ </target>\r
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>\r
+ <!--\r
+ =================\r
+ PROFILING SECTION\r
+ =================\r
+ -->\r
+ <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">\r
+ <nbprofiledirect>\r
+ <classpath>\r
+ <path path="${run.classpath}"/>\r
+ </classpath>\r
+ </nbprofiledirect>\r
+ <profile/>\r
+ </target>\r
+ <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">\r
+ <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>\r
+ <nbprofiledirect>\r
+ <classpath>\r
+ <path path="${run.classpath}"/>\r
+ </classpath>\r
+ </nbprofiledirect>\r
+ <profile classname="${profile.class}"/>\r
+ </target>\r
+ <!--\r
+ =========================\r
+ APPLET PROFILING SECTION\r
+ =========================\r
+ -->\r
+ <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">\r
+ <nbprofiledirect>\r
+ <classpath>\r
+ <path path="${run.classpath}"/>\r
+ </classpath>\r
+ </nbprofiledirect>\r
+ <profile classname="sun.applet.AppletViewer">\r
+ <customize>\r
+ <arg value="${applet.url}"/>\r
+ </customize>\r
+ </profile>\r
+ </target>\r
+ <!--\r
+ =========================\r
+ TESTS PROFILING SECTION\r
+ =========================\r
+ -->\r
+ <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">\r
+ <nbprofiledirect>\r
+ <classpath>\r
+ <path path="${run.test.classpath}"/>\r
+ </classpath>\r
+ </nbprofiledirect>\r
+ <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">\r
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
+ <jvmarg line="${profiler.info.jvmargs}"/>\r
+ <test name="${profile.class}"/>\r
+ <classpath>\r
+ <path path="${run.test.classpath}"/>\r
+ </classpath>\r
+ <syspropertyset>\r
+ <propertyref prefix="test-sys-prop."/>\r
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <formatter type="brief" usefile="false"/>\r
+ <formatter type="xml"/>\r
+ </junit>\r
+ </target>\r
+ <!--\r
+ ===============\r
+ JAVADOC SECTION\r
+ ===============\r
+ -->\r
+ <target depends="init" if="have.sources" name="-javadoc-build">\r
+ <mkdir dir="${dist.javadoc.dir}"/>\r
+ <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">\r
+ <and>\r
+ <isset property="endorsed.classpath.cmd.line.arg"/>\r
+ <not>\r
+ <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>\r
+ </not>\r
+ </and>\r
+ </condition>\r
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">\r
+ <classpath>\r
+ <path path="${javac.classpath}"/>\r
+ </classpath>\r
+ <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">\r
+ <filename name="**/*.java"/>\r
+ </fileset>\r
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+ <include name="**/*.java"/>\r
+ <exclude name="*.java"/>\r
+ </fileset>\r
+ <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>\r
+ </javadoc>\r
+ <copy todir="${dist.javadoc.dir}">\r
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
+ <filename name="**/doc-files/**"/>\r
+ </fileset>\r
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
+ <include name="**/doc-files/**"/>\r
+ </fileset>\r
+ </copy>\r
+ </target>\r
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">\r
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>\r
+ </target>\r
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>\r
+ <!--\r
+ =========================\r
+ JUNIT COMPILATION SECTION\r
+ =========================\r
+ -->\r
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">\r
+ <mkdir dir="${build.test.classes.dir}"/>\r
+ </target>\r
+ <target name="-pre-compile-test">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target if="do.depend.true" name="-compile-test-depend">\r
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
+ </target>\r
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">\r
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>\r
+ <copy todir="${build.test.classes.dir}">\r
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
+ </copy>\r
+ </target>\r
+ <target name="-post-compile-test">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>\r
+ <target name="-pre-compile-test-single">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>\r
+ <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>\r
+ <copy todir="${build.test.classes.dir}">\r
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
+ </copy>\r
+ </target>\r
+ <target name="-post-compile-test-single">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>\r
+ <!--\r
+ =======================\r
+ JUNIT EXECUTION SECTION\r
+ =======================\r
+ -->\r
+ <target depends="init" if="have.tests" name="-pre-test-run">\r
+ <mkdir dir="${build.test.results.dir}"/>\r
+ </target>\r
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">\r
+ <j2seproject3:junit testincludes="**/*Test.java"/>\r
+ </target>\r
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
+ </target>\r
+ <target depends="init" if="have.tests" name="test-report"/>\r
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>\r
+ <target depends="init" if="have.tests" name="-pre-test-run-single">\r
+ <mkdir dir="${build.test.results.dir}"/>\r
+ </target>\r
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">\r
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>\r
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>\r
+ </target>\r
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
+ </target>\r
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>\r
+ <!--\r
+ =======================\r
+ JUNIT DEBUGGING SECTION\r
+ =======================\r
+ -->\r
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">\r
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>\r
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>\r
+ <delete file="${test.report.file}"/>\r
+ <mkdir dir="${build.test.results.dir}"/>\r
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">\r
+ <customize>\r
+ <syspropertyset>\r
+ <propertyref prefix="test-sys-prop."/>\r
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
+ </syspropertyset>\r
+ <arg value="${test.class}"/>\r
+ <arg value="showoutput=true"/>\r
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>\r
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>\r
+ </customize>\r
+ </j2seproject3:debug>\r
+ </target>\r
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
+ </target>\r
+ <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">\r
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>\r
+ </target>\r
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>\r
+ <!--\r
+ =========================\r
+ APPLET EXECUTION SECTION\r
+ =========================\r
+ -->\r
+ <target depends="init,compile-single" name="run-applet">\r
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
+ <j2seproject1:java classname="sun.applet.AppletViewer">\r
+ <customize>\r
+ <arg value="${applet.url}"/>\r
+ </customize>\r
+ </j2seproject1:java>\r
+ </target>\r
+ <!--\r
+ =========================\r
+ APPLET DEBUGGING SECTION\r
+ =========================\r
+ -->\r
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">\r
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>\r
+ <j2seproject3:debug classname="sun.applet.AppletViewer">\r
+ <customize>\r
+ <arg value="${applet.url}"/>\r
+ </customize>\r
+ </j2seproject3:debug>\r
+ </target>\r
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>\r
+ <!--\r
+ ===============\r
+ CLEANUP SECTION\r
+ ===============\r
+ -->\r
+ <target name="-deps-clean-init" unless="built-clean.properties">\r
+ <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>\r
+ <delete file="${built-clean.properties}" quiet="true"/>\r
+ </target>\r
+ <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">\r
+ <echo level="warn" message="Cycle detected: DCWorkflow was already built"/>\r
+ </target>\r
+ <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">\r
+ <mkdir dir="${build.dir}"/>\r
+ <touch file="${built-clean.properties}" verbose="false"/>\r
+ <property file="${built-clean.properties}" prefix="already.built.clean."/>\r
+ <antcall target="-warn-already-built-clean"/>\r
+ <propertyfile file="${built-clean.properties}">\r
+ <entry key="${basedir}" value=""/>\r
+ </propertyfile>\r
+ </target>\r
+ <target depends="init" name="-do-clean">\r
+ <delete dir="${build.dir}"/>\r
+ <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>\r
+ </target>\r
+ <target name="-post-clean">\r
+ <!-- Empty placeholder for easier customization. -->\r
+ <!-- You can override this target in the ../build.xml file. -->\r
+ </target>\r
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>\r
+ <target name="-check-call-dep">\r
+ <property file="${call.built.properties}" prefix="already.built."/>\r
+ <condition property="should.call.dep">\r
+ <not>\r
+ <isset property="already.built.${call.subproject}"/>\r
+ </not>\r
+ </condition>\r
+ </target>\r
+ <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">\r
+ <ant antfile="${call.script}" inheritall="false" target="${call.target}">\r
+ <propertyset>\r
+ <propertyref prefix="transfer."/>\r
+ <mapper from="transfer.*" to="*" type="glob"/>\r
+ </propertyset>\r
+ </ant>\r
+ </target>\r
+</project>\r
--- /dev/null
+build.xml.data.CRC32=67e2e263\r
+build.xml.script.CRC32=763cd023\r
+build.xml.stylesheet.CRC32=28e38971@1.50.1.46\r
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.\r
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.\r
+nbproject/build-impl.xml.data.CRC32=67e2e263\r
+nbproject/build-impl.xml.script.CRC32=9557fa0a\r
+nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46\r
--- /dev/null
+compile.on.save=true\r
+do.depend=false\r
+do.jar=true\r
+javac.debug=true\r
+javadoc.preview=true\r
+user.properties.file=C:\\Users\\c.mathew\\.netbeans\\7.1\\build.properties\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">\r
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>\r
+</project-private>\r
--- /dev/null
+annotation.processing.enabled=true\r
+annotation.processing.enabled.in.editor=false\r
+annotation.processing.processors.list=\r
+annotation.processing.run.all.processors=true\r
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output\r
+application.title=DCWorkflow\r
+application.vendor=c.mathew\r
+build.classes.dir=${build.dir}/classes\r
+build.classes.excludes=**/*.java,**/*.form\r
+# This directory is removed when the project is cleaned:\r
+build.dir=build\r
+build.generated.dir=${build.dir}/generated\r
+build.generated.sources.dir=${build.dir}/generated-sources\r
+# Only compile against the classpath explicitly listed here:\r
+build.sysclasspath=ignore\r
+build.test.classes.dir=${build.dir}/test/classes\r
+build.test.results.dir=${build.dir}/test/results\r
+# Uncomment to specify the preferred debugger connection transport:\r
+#debug.transport=dt_socket\r
+debug.classpath=\\r
+ ${run.classpath}\r
+debug.test.classpath=\\r
+ ${run.test.classpath}\r
+# This directory is removed when the project is cleaned:\r
+dist.dir=dist\r
+dist.jar=${dist.dir}/DCWorkflow.jar\r
+dist.javadoc.dir=${dist.dir}/javadoc\r
+endorsed.classpath=\r
+excludes=\r
+file.reference.json-simple-1.1.1.jar=nbproject/extlibs/json-simple-1.1.1.jar\r
+file.reference.opencsv-2.3.jar=nbproject/extlibs/opencsv-2.3.jar\r
+includes=**\r
+jar.compress=false\r
+javac.classpath=\\r
+ ${file.reference.json-simple-1.1.1.jar}:\\r
+ ${file.reference.opencsv-2.3.jar}\r
+# Space-separated list of extra javac options\r
+javac.compilerargs=\r
+javac.deprecation=false\r
+javac.processorpath=\\r
+ ${javac.classpath}\r
+javac.source=1.6\r
+javac.target=1.6\r
+javac.test.classpath=\\r
+ ${javac.classpath}:\\r
+ ${build.classes.dir}\r
+javac.test.processorpath=\\r
+ ${javac.test.classpath}\r
+javadoc.additionalparam=\r
+javadoc.author=false\r
+javadoc.encoding=${source.encoding}\r
+javadoc.noindex=false\r
+javadoc.nonavbar=false\r
+javadoc.notree=false\r
+javadoc.private=false\r
+javadoc.splitindex=true\r
+javadoc.use=true\r
+javadoc.version=false\r
+javadoc.windowtitle=\r
+main.class=\r
+manifest.file=manifest.mf\r
+meta.inf.dir=${src.dir}/META-INF\r
+mkdist.disabled=false\r
+platform.active=JDK_1.6\r
+run.classpath=\\r
+ ${javac.classpath}:\\r
+ ${build.classes.dir}:\\r
+ ${file.reference.json-simple-1.1.1.jar}:\\r
+ ${file.reference.opencsv-2.3.jar}\r
+# Space-separated list of JVM arguments used when running the project\r
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value\r
+# or test-sys-prop.name=value to set system properties for unit tests):\r
+run.jvmargs=\r
+run.test.classpath=\\r
+ ${javac.test.classpath}:\\r
+ ${build.test.classes.dir}\r
+source.encoding=UTF-8\r
+src.dir=src\r
+test.src.dir=test\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project xmlns="http://www.netbeans.org/ns/project/1">\r
+ <type>org.netbeans.modules.java.j2seproject</type>\r
+ <configuration>\r
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">\r
+ <name>DCWorkflow</name>\r
+ <explicit-platform explicit-source-supported="true"/>\r
+ <source-roots>\r
+ <root id="src.dir"/>\r
+ </source-roots>\r
+ <test-roots>\r
+ <root id="test.src.dir"/>\r
+ </test-roots>\r
+ </data>\r
+ </configuration>\r
+</project>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <NonVisualComponents>
+ <Component class="javax.swing.ButtonGroup" name="choiceButtonGrp">
+ </Component>
+ </NonVisualComponents>
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,4,36"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JRadioButton" name="synExpRButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="choiceButtonGrp"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Synonym Expansion/Occurrence retrieval"/>
+ <Property name="enabled" type="boolean" value="false"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="dataSelRButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="choiceButtonGrp"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Geo / Temporal Selection (BioSTIF)"/>
+ <Property name="enabled" type="boolean" value="false"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="dataQualityRButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="choiceButtonGrp"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Data Quality (GRefine)"/>
+ <Property name="enabled" type="boolean" value="false"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="endWFRButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="choiceButtonGrp"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="End Workflow"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="okButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="OK"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose sub-workflow : "/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.bgbm.biovel.datacleaning.syncheck;
+
+import au.com.bytecode.opencsv.CSVReader;
+import java.awt.Color;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.BorderFactory;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+import javax.swing.plaf.ColorUIResource;
+import org.bgbm.biovel.datacleaning.utils.biostiff.BioSTIFFConstants;
+import org.bgbm.biovel.datacleaning.utils.syncheck.SynCheckConstants;
+
+/**
+ *
+ * @author c.mathew
+ */
+public class DCChoiceDialog extends javax.swing.JDialog {
+
+ /**
+ * A return status code - returned if Cancel button has been pressed
+ */
+ public static final int RET_CANCEL = 0;
+ /**
+ * A return status code - returned if OK button has been pressed
+ */
+ public static final int RET_OK = 1;
+
+ private String csvData = "";
+ /**
+ * Creates new form DCChoiceDialog
+ */
+ public DCChoiceDialog(java.awt.Frame parent, boolean modal, String csvData) {
+ super(parent, modal);
+
+ initComponents();
+
+ try {
+
+ List<String> headerList = readHeader(csvData);
+ if(headerList != null) {
+ if(!headerList.contains(BioSTIFFConstants.OCCURRENCEID_HDR) ||
+ !headerList.contains(BioSTIFFConstants.DECLAT_HDR) ||
+ !headerList.contains(BioSTIFFConstants.DECLONG_HDR) ||
+ !headerList.contains(SynCheckConstants.NAMECOMPLETE_HDR)) {
+ dataSelRButton.setToolTipText("Cannot run Data Selection.At least one of the fields : 'occurrenceID', 'decimalLatitude', 'decimalLongitude' or 'nameComplete' does not exist");
+ } else {
+ dataSelRButton.setEnabled(true);
+ }
+
+ if(!headerList.contains(SynCheckConstants.NAMECOMPLETE_HDR)) {
+ synExpRButton.setToolTipText("Cannot run Synonym Expansion.'nameComplete' field does not exist'");
+ } else {
+ synExpRButton.setEnabled(true);
+ }
+
+ if(!headerList.contains(SynCheckConstants.NAMECOMPLETE_HDR)) {
+ dataQualityRButton.setToolTipText("Cannot run Data Quality Checks.'nameComplete' field does not exist'");
+ } else {
+ dataQualityRButton.setEnabled(true);
+ }
+ }
+
+ } catch (IOException ex) {
+ Logger.getLogger(DCChoiceDialog.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ // GRefine not yet implemented
+ //dataQualityRButton.setToolTipText("Data Quality not yet implemented");
+
+ endWFRButton.setSelected(true);
+ }
+
+ private List<String> readHeader(String csv) throws IOException {
+ //String csvTest = "nameComplete\n" + "Ameira divagans\n" + "Boccardia redeki\n" + "Bougainvillia rugosa";
+ //CSVReader reader = new CSVReader(new FileReader("C:\\Development\\BioVeL\\DataCleaning\\workflows\\nested\\synexpansion\\pot_invasive_dc_input.txt"));
+ //CSVReader reader = new CSVReader(new StringReader(csvTest));
+ CSVReader reader = new CSVReader(new StringReader(csv));
+ String [] nextLine = reader.readNext();
+ while (nextLine != null) {
+ if(nextLine.length != 0 && !nextLine[0].equals("")) {
+ return Arrays.asList(nextLine);
+ }
+ nextLine = reader.readNext();
+ }
+ return null;
+ }
+
+ public int getChosenSubWorkflow() {
+ if(synExpRButton.isSelected()) {
+ return SynCheckConstants.SYN_EXP_OCC_RET;
+ }
+ if(dataSelRButton.isSelected()) {
+ return SynCheckConstants.DATA_SEL;
+ }
+ if(dataQualityRButton.isSelected()) {
+ return SynCheckConstants.DATA_QUAL;
+ }
+ return SynCheckConstants.END_WKFLOW;
+ }
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ choiceButtonGrp = new javax.swing.ButtonGroup();
+ synExpRButton = new javax.swing.JRadioButton();
+ dataSelRButton = new javax.swing.JRadioButton();
+ dataQualityRButton = new javax.swing.JRadioButton();
+ endWFRButton = new javax.swing.JRadioButton();
+ okButton = new javax.swing.JButton();
+ jLabel1 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ formWindowClosing(evt);
+ }
+ });
+ getContentPane().setLayout(new java.awt.GridBagLayout());
+
+ choiceButtonGrp.add(synExpRButton);
+ synExpRButton.setText("Synonym Expansion/Occurrence retrieval");
+ synExpRButton.setEnabled(false);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(synExpRButton, gridBagConstraints);
+
+ choiceButtonGrp.add(dataSelRButton);
+ dataSelRButton.setText("Geo / Temporal Selection (BioSTIF)");
+ dataSelRButton.setEnabled(false);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(dataSelRButton, gridBagConstraints);
+
+ choiceButtonGrp.add(dataQualityRButton);
+ dataQualityRButton.setText("Data Quality (GRefine)");
+ dataQualityRButton.setEnabled(false);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(dataQualityRButton, gridBagConstraints);
+
+ choiceButtonGrp.add(endWFRButton);
+ endWFRButton.setText("End Workflow");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(endWFRButton, gridBagConstraints);
+
+ okButton.setText("OK");
+ okButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ okButtonActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(okButton, gridBagConstraints);
+
+ jLabel1.setText("Choose sub-workflow : ");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(jLabel1, gridBagConstraints);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
+ doClose(RET_OK);
+ }//GEN-LAST:event_okButtonActionPerformed
+
+ private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
+ doClose(RET_CANCEL);
+ }//GEN-LAST:event_formWindowClosing
+
+ private void doClose(int retStatus) {
+ returnStatus = retStatus;
+ setVisible(false);
+ dispose();
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ /*
+ * Set the Nimbus look and feel
+ */
+ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+ /*
+ * If Nimbus (introduced in Java SE 6) is not available, stay with the
+ * default look and feel. For details see
+ * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
+ */
+ try {
+ for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
+ if ("Nimbus".equals(info.getName())) {
+ javax.swing.UIManager.setLookAndFeel(info.getClassName());
+ break;
+ }
+ }
+ } catch (ClassNotFoundException ex) {
+ java.util.logging.Logger.getLogger(DCChoiceDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (InstantiationException ex) {
+ java.util.logging.Logger.getLogger(DCChoiceDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (IllegalAccessException ex) {
+ java.util.logging.Logger.getLogger(DCChoiceDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+ java.util.logging.Logger.getLogger(DCChoiceDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ }
+ //</editor-fold>
+
+ /*
+ * Create and display the dialog
+ */
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ public void run() {
+ DCChoiceDialog dialog = new DCChoiceDialog(new javax.swing.JFrame(), true,"");
+ dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+ @Override
+ public void windowClosing(java.awt.event.WindowEvent e) {
+ System.exit(0);
+ }
+ });
+ dialog.setVisible(true);
+ }
+ });
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.ButtonGroup choiceButtonGrp;
+ private javax.swing.JRadioButton dataQualityRButton;
+ private javax.swing.JRadioButton dataSelRButton;
+ private javax.swing.JRadioButton endWFRButton;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JButton okButton;
+ private javax.swing.JRadioButton synExpRButton;
+ // End of variables declaration//GEN-END:variables
+ private int returnStatus = RET_CANCEL;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[600, 1000]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[500, 800]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[500, 800]"/>
+ </Property>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-92,0,0,1,-112"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="chkListLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose Check List to target :"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[140, 30]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[140, 30]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[140, 30]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="chkListScrollPane">
+ <Properties>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[400, 600]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[400, 600]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="chkListPanel">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.bgbm.biovel.datacleaning.syncheck;
+
+import java.util.*;
+import javax.swing.JCheckBox;
+
+import org.bgbm.biovel.datacleaning.utils.syncheck.SynCheckConstants;
+
+/**
+ *
+ * @author c.mathew
+ */
+
+public class DCSynExpInputDialog extends javax.swing.JDialog {
+ List<JCheckBox> stdCBList = new ArrayList<JCheckBox>();
+ Map<JCheckBox,Integer> gbifCBIDMap = new HashMap<JCheckBox,Integer>();
+ int currentGridy = 0;
+
+ JCheckBox colCBox;
+ /**
+ * A return status code - returned if Cancel button has been pressed
+ */
+ public static final int RET_CANCEL = 0;
+ /**
+ * A return status code - returned if OK button has been pressed
+ */
+ public static final int RET_OK = 1;
+
+ private int returnStatus = RET_CANCEL;
+
+ /**
+ * Creates new form DCSynExpInputDialog
+ */
+ public DCSynExpInputDialog(java.awt.Frame parent, boolean modal,List<String> gbifchkdatasets) {
+ super(parent, modal);
+ initComponents();
+ javax.swing.JButton okButton = new javax.swing.JButton();
+ okButton.setText("OK");
+ okButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ okButtonActionPerformed(evt);
+ }
+ });
+
+ addStdChecklists();
+
+ if(gbifchkdatasets != null && !gbifchkdatasets.isEmpty()) {
+ addGBIFChecklistBanks(gbifchkdatasets);
+ }
+
+ java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(okButton, gridBagConstraints);
+ }
+
+ public void addStdChecklists() {
+
+ colCBox = createJCheckBox("Catalogue of Life");
+
+ }
+
+ public void addGBIFChecklistBanks(List<String> gbifchkdatasets) {
+ Iterator itr = gbifchkdatasets.iterator();
+
+ while(itr.hasNext()) {
+ String chkdataset = (String)itr.next();
+ StringTokenizer st = new StringTokenizer(chkdataset, SynCheckConstants.CHECKLIST_BANK_DELIMITER);
+ if(st.countTokens() == 2) {
+ String chklistName = (String)st.nextElement();
+ String datasetID = (String)st.nextElement();
+ JCheckBox jcbox = createJCheckBox("GBIF - " + chklistName);
+ gbifCBIDMap.put(jcbox,new Integer(datasetID));
+ }
+ }
+ }
+
+ private JCheckBox createJCheckBox(String chklistName) {
+ JCheckBox jcbox = new JCheckBox();
+ jcbox.setText(chklistName);
+ java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = currentGridy;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ chkListPanel.add(jcbox, gridBagConstraints);
+ currentGridy++;
+ pack();
+
+ return jcbox;
+ }
+
+ public boolean isColSelected() {
+ return colCBox.isSelected();
+ }
+
+ public List<String> getSelectedGBIFChkList() {
+ List<String> selGBIFStdChkList = new ArrayList<String>();
+ Iterator<Map.Entry<JCheckBox, Integer>> entries = gbifCBIDMap.entrySet().iterator();
+ while (entries.hasNext()) {
+ Map.Entry<JCheckBox, Integer> entry = entries.next();
+ JCheckBox jcbox = (JCheckBox)entry.getKey();
+ if(jcbox.isSelected()) {
+ Integer datasetID = (Integer)entry.getValue();
+ selGBIFStdChkList.add(datasetID.toString());
+ }
+ }
+
+ return selGBIFStdChkList;
+ }
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ chkListLbl = new javax.swing.JLabel();
+ chkListScrollPane = new javax.swing.JScrollPane();
+ chkListPanel = new javax.swing.JPanel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setMaximumSize(new java.awt.Dimension(600, 1000));
+ setMinimumSize(new java.awt.Dimension(500, 800));
+ setPreferredSize(new java.awt.Dimension(500, 800));
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ formWindowClosing(evt);
+ }
+ });
+ getContentPane().setLayout(new java.awt.GridBagLayout());
+
+ chkListLbl.setText("Choose Check List to target :");
+ chkListLbl.setMaximumSize(new java.awt.Dimension(140, 30));
+ chkListLbl.setMinimumSize(new java.awt.Dimension(140, 30));
+ chkListLbl.setPreferredSize(new java.awt.Dimension(140, 30));
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(chkListLbl, gridBagConstraints);
+
+ chkListScrollPane.setMinimumSize(new java.awt.Dimension(400, 600));
+ chkListScrollPane.setPreferredSize(new java.awt.Dimension(400, 600));
+
+ chkListPanel.setLayout(new java.awt.GridBagLayout());
+ chkListScrollPane.setViewportView(chkListPanel);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(chkListScrollPane, gridBagConstraints);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
+ doClose(RET_CANCEL);
+ }//GEN-LAST:event_formWindowClosing
+
+ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {
+ doClose(RET_OK);
+ }
+
+ private void doClose(int retStatus) {
+ returnStatus = retStatus;
+ setVisible(false);
+ dispose();
+ }
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ /*
+ * Set the Nimbus look and feel
+ */
+ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+ /*
+ * If Nimbus (introduced in Java SE 6) is not available, stay with the
+ * default look and feel. For details see
+ * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
+ */
+ try {
+ for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
+ if ("Nimbus".equals(info.getName())) {
+ javax.swing.UIManager.setLookAndFeel(info.getClassName());
+ break;
+ }
+ }
+ } catch (ClassNotFoundException ex) {
+ java.util.logging.Logger.getLogger(DCSynExpInputDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (InstantiationException ex) {
+ java.util.logging.Logger.getLogger(DCSynExpInputDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (IllegalAccessException ex) {
+ java.util.logging.Logger.getLogger(DCSynExpInputDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+ java.util.logging.Logger.getLogger(DCSynExpInputDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ }
+ //</editor-fold>
+
+ /*
+ * Create and display the dialog
+ */
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ public void run() {
+ List<String> stdchecklists = new ArrayList<String>();
+ stdchecklists.add("Catalogue of Life");
+ DCSynExpInputDialog dialog = new DCSynExpInputDialog(new javax.swing.JFrame(), true, null);
+ dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+ @Override
+ public void windowClosing(java.awt.event.WindowEvent e) {
+ System.exit(0);
+ }
+ });
+
+ dialog.setVisible(true);
+
+
+ }
+ });
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JLabel chkListLbl;
+ private javax.swing.JPanel chkListPanel;
+ private javax.swing.JScrollPane chkListScrollPane;
+ // End of variables declaration//GEN-END:variables
+}
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.syncheck;\r
+\r
+import au.com.bytecode.opencsv.CSVReader;\r
+import java.io.BufferedReader;\r
+import java.io.IOException;\r
+import java.io.StringReader;\r
+import java.io.StringWriter;\r
+import java.util.*;\r
+import java.util.logging.Level;\r
+import java.util.logging.Logger;\r
+import javax.xml.stream.XMLOutputFactory;\r
+import javax.xml.stream.XMLStreamException;\r
+import javax.xml.stream.XMLStreamWriter;\r
+import javax.xml.transform.OutputKeys;\r
+import javax.xml.transform.Transformer;\r
+import javax.xml.transform.TransformerException;\r
+import javax.xml.transform.TransformerFactory;\r
+import javax.xml.transform.stream.StreamResult;\r
+import javax.xml.transform.stream.StreamSource;\r
+import org.bgbm.biovel.datacleaning.utils.syncheck.SynCheckConstants;\r
+import org.bgbm.biovel.utils.CSVFactory;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+class SynCheckData {\r
+ public boolean atomised = false;\r
+ public String sciName = "";\r
+ public String authorship = "";\r
+ public String genusPart = "";\r
+ public String infragenericEpithet = "";\r
+ public String specificEpithet = "";\r
+ public String infraspecificEpithet = "";\r
+ public String uninomial = "";\r
+\r
+ public SynCheckData() {\r
+ clear();\r
+ }\r
+\r
+ public void clear() {\r
+ atomised = false;\r
+ sciName = "";\r
+ authorship = "";\r
+ genusPart = "";\r
+ infragenericEpithet = "";\r
+ specificEpithet = "";\r
+ infraspecificEpithet = "";\r
+ uninomial = "";\r
+ }\r
+\r
+ public int hashCode() {\r
+ return sciName.hashCode();\r
+ }\r
+ public boolean equals(Object obj) {\r
+ \r
+ if ( this == obj ) return true;\r
+ \r
+ if ( !(obj instanceof SynCheckData) ) return false;\r
+ \r
+ SynCheckData scd = (SynCheckData) obj;\r
+ \r
+ return scd.sciName.equals(this.sciName);\r
+ }\r
+}\r
+\r
+public class DCSynExpInputParser {\r
+ private static StringBuilder incorrectRecordsBldr = new StringBuilder();\r
+ \r
+ \r
+ public String getIncorrectRecords() {\r
+ return incorrectRecordsBldr.toString();\r
+ }\r
+ public List synReq(HashSet hs) {\r
+ \r
+ if(hs.isEmpty())\r
+ return null;\r
+ List synReqList = new ArrayList();\r
+ \r
+ XMLOutputFactory xof = XMLOutputFactory.newInstance();\r
+ StringWriter out = new StringWriter();\r
+ XMLStreamWriter xtw; \r
+ try {\r
+ xtw = xof.createXMLStreamWriter(out);\r
+ \r
+\r
+ \r
+ Iterator itr = hs.iterator();\r
+ \r
+ while(itr.hasNext()) {\r
+ SynCheckData scd = (SynCheckData)itr.next();\r
+ if(scd.sciName.equals(""))\r
+ continue;\r
+ out = new StringWriter();\r
+ xtw = xof.createXMLStreamWriter(out); \r
+ //xtw.writeStartDocument("utf-8", "1.0"); \r
+ xtw.writeStartElement("synonymRequest");\r
+ xtw.writeAttribute("id", scd.sciName);\r
+\r
+ xtw.writeStartElement("taxonName");\r
+ if(!scd.authorship.equals("")) {\r
+ xtw.writeStartElement(SynCheckConstants.AUTHORSHIP_HDR);\r
+ xtw.writeCharacters(scd.authorship);\r
+ xtw.writeEndElement();\r
+ }\r
+\r
+ xtw.writeStartElement("name");\r
+\r
+ xtw.writeStartElement(SynCheckConstants.NAMECOMPLETE_HDR);\r
+ xtw.writeCharacters(scd.sciName);\r
+ xtw.writeEndElement();\r
+\r
+ \r
+ if(!scd.uninomial.equals("")) {\r
+ xtw.writeStartElement("atomisedName");\r
+\r
+ xtw.writeStartElement(SynCheckConstants.UNINOMIAL_HDR);\r
+ xtw.writeCharacters(scd.uninomial);\r
+ xtw.writeEndElement();\r
+\r
+ xtw.writeEndElement(); // end atomisedName element\r
+ } else if(!scd.genusPart.equals("")){\r
+ xtw.writeStartElement("atomisedName");\r
+ xtw.writeStartElement("subGenus");\r
+\r
+ xtw.writeStartElement(SynCheckConstants.GENUSPART_HDR);\r
+ xtw.writeCharacters(scd.genusPart);\r
+ xtw.writeEndElement();\r
+\r
+ if(!scd.infragenericEpithet.equals("")) {\r
+ xtw.writeStartElement(SynCheckConstants.INFRASPECIFICEPITHET_HDR);\r
+ xtw.writeCharacters(scd.infragenericEpithet);\r
+ xtw.writeEndElement();\r
+ }\r
+ \r
+ if(!scd.specificEpithet.equals("")) {\r
+ xtw.writeStartElement(SynCheckConstants.SPECIFICEPITHET_HDR);\r
+ xtw.writeCharacters(scd.specificEpithet);\r
+ xtw.writeEndElement();\r
+ }\r
+\r
+ if(!scd.infraspecificEpithet.equals("")){\r
+ xtw.writeStartElement(SynCheckConstants.INFRASPECIFICEPITHET_HDR);\r
+ xtw.writeCharacters(scd.infraspecificEpithet);\r
+ xtw.writeEndElement();\r
+ }\r
+\r
+ xtw.writeEndElement(); // end subGenus element\r
+ xtw.writeEndElement(); // end atomisedName element\r
+ }\r
+ \r
+ xtw.writeEndElement(); // end name element\r
+ xtw.writeEndElement(); // end taxonName element\r
+ xtw.writeEndElement(); // end synonymRequest element \r
+ xtw.writeEndDocument(); \r
+ xtw.flush();\r
+\r
+ \r
+ // Transform XML to get new with indentation.\r
+ TransformerFactory factory = TransformerFactory.newInstance();\r
+ \r
+ Transformer transformer = factory.newTransformer();\r
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");\r
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");\r
+ \r
+ StringWriter indented_out = new StringWriter();\r
+ \r
+ transformer.transform(new StreamSource(new StringReader(out.toString())), new StreamResult(indented_out));\r
+ \r
+ synReqList.add(indented_out.toString()); \r
+ out.flush();\r
+ } \r
+ xtw.close();\r
+ } catch (XMLStreamException ex) {\r
+ Logger.getLogger(DCSynExpInputParser.class.getName()).log(Level.SEVERE, null, ex);\r
+ } catch (TransformerException ex) {\r
+ Logger.getLogger(DCSynExpInputParser.class.getName()).log(Level.SEVERE, null, ex);\r
+ } \r
+ return synReqList;\r
+ }\r
+ public HashSet parse(String csvData) {\r
+ int authorship_index = -1;\r
+ int genus_part_index = -1;\r
+ int infrageneric_epithet_index = -1;\r
+ int specific_epithet_index = -1;\r
+ int infraspecific_epithet_index = -1;\r
+ int name_complete_index = -1;\r
+ int uninomial_index = -1;\r
+ int taxon_name_index = -1;\r
+ \r
+ int line_count = 0;\r
+ int nbOfElements = 0;\r
+ \r
+ BufferedReader br = new BufferedReader(new StringReader(csvData));\r
+\r
+ HashSet sci_names_hs = new HashSet();\r
+ SynCheckData scd;\r
+ \r
+ try {\r
+ CSVReader reader = new CSVReader(new StringReader(csvData));\r
+ String [] nextLine;\r
+ while ((nextLine = reader.readNext()) != null) {\r
+ if (nextLine.length != 0) {\r
+ try {\r
+ List<String> headers = Arrays.asList(nextLine);\r
+ \r
+ if(line_count == 0) {\r
+ if(CSVFactory.containsWhitespace(headers)) {\r
+ throw new IOException("Header line contains empty fields which is not allowed");\r
+ }\r
+ \r
+ nbOfElements = headers.size();\r
+ \r
+ authorship_index = headers.indexOf(SynCheckConstants.AUTHORSHIP_HDR);\r
+ \r
+ genus_part_index = headers.indexOf(SynCheckConstants.GENUSPART_HDR);\r
+ \r
+ infrageneric_epithet_index = headers.indexOf(SynCheckConstants.INFRAGENERICEPITHET_HDR);\r
+ \r
+ specific_epithet_index = headers.indexOf(SynCheckConstants.SPECIFICEPITHET_HDR);\r
+ \r
+ infraspecific_epithet_index = headers.indexOf(SynCheckConstants.INFRASPECIFICEPITHET_HDR);\r
+ \r
+ name_complete_index = headers.indexOf(SynCheckConstants.NAMECOMPLETE_HDR);\r
+ \r
+ taxon_name_index = headers.indexOf(SynCheckConstants.TAXONNAME_HDR); \r
+ }\r
+ else {\r
+ if(nextLine.length != nbOfElements) {\r
+ throw new Exception("No. of elements in record does not match no. of header elements");\r
+ }\r
+ scd = new SynCheckData();\r
+ if(genus_part_index >= 0 && !nextLine[genus_part_index].equals("")\r
+ && ((infrageneric_epithet_index >= 0 && !nextLine[infrageneric_epithet_index].equals(""))\r
+ || (specific_epithet_index >= 0 && !nextLine[specific_epithet_index].equals(""))\r
+ || (infraspecific_epithet_index >= 0 && !nextLine[infraspecific_epithet_index].equals("")))) {\r
+ scd.atomised = true;\r
+ scd.genusPart = nextLine[genus_part_index];\r
+ scd.infragenericEpithet = (infrageneric_epithet_index >= 0)?nextLine[infrageneric_epithet_index]:"";\r
+ scd.specificEpithet = (specific_epithet_index >= 0)?nextLine[specific_epithet_index]:"";\r
+ scd.infraspecificEpithet = (infrageneric_epithet_index >= 0)?nextLine[infraspecific_epithet_index]:"";\r
+ \r
+ scd.sciName = scd.genusPart;\r
+ if(!scd.infragenericEpithet.equals(""))\r
+ scd.sciName = scd.sciName + " " + scd.infragenericEpithet;\r
+ if(!scd.specificEpithet.equals(""))\r
+ scd.sciName = scd.sciName + " " + scd.specificEpithet;\r
+ if(!scd.infraspecificEpithet.equals(""))\r
+ scd.sciName = scd.sciName + " " + scd.infraspecificEpithet;\r
+ \r
+ } else if(uninomial_index >=0 && !nextLine[uninomial_index].equals("")) {\r
+ scd.atomised = true;\r
+ scd.uninomial = nextLine[uninomial_index];\r
+ scd.sciName = scd.uninomial;\r
+ } else if(name_complete_index >=0 && !nextLine[name_complete_index].equals("")) {\r
+ scd.sciName = nextLine[name_complete_index];\r
+ } else if(taxon_name_index >= 0 && !nextLine[taxon_name_index].equals("")){\r
+ scd.sciName = nextLine[taxon_name_index];\r
+ }\r
+ if(authorship_index >= 0 && !nextLine[authorship_index].equals("")) {\r
+ scd.authorship = nextLine[authorship_index];\r
+ }\r
+ \r
+ sci_names_hs.add(scd);\r
+ }\r
+ line_count++;\r
+ } catch(Exception e) {\r
+ String csvString = CSVFactory.convertArrayToString(nextLine, SynCheckConstants.DELIMITER);\r
+ incorrectRecordsBldr.append(csvString).append(":").append(e.getMessage()).append("\n");\r
+ }\r
+ }\r
+ }\r
+ } catch (IOException ex) {\r
+ Logger.getLogger(DCSynExpInputParser.class.getName()).log(Level.SEVERE, null, ex);\r
+ }\r
+ return sci_names_hs;\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[300, 300]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[300, 300]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[300, 300]"/>
+ </Property>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="doClose"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,67,0,0,1,-63"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="GBIFCBox">
+ <Properties>
+ <Property name="selected" type="boolean" value="true"/>
+ <Property name="text" type="java.lang.String" value="GBIF"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="SLWCBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="SLW"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="occMessageLbl">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Ooccurrence retrieval targets :"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="okButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="OK"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.bgbm.biovel.datacleaning.syncheck;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author c.mathew
+ */
+public class OccRetrievalTargetDialog extends javax.swing.JDialog {
+
+ /**
+ * A return status code - returned if Cancel button has been pressed
+ */
+ public static final int RET_CANCEL = 0;
+ /**
+ * A return status code - returned if OK button has been pressed
+ */
+ public static final int RET_OK = 1;
+
+ private List<String> occTargetList = new ArrayList<String>();
+ /**
+ * Creates new form OccRetrievalTargetDialog
+ */
+ public OccRetrievalTargetDialog(java.awt.Frame parent, boolean modal) {
+ super(parent, modal);
+ initComponents();
+ }
+
+ public List getOccTargetList() {
+ return occTargetList;
+ }
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ GBIFCBox = new javax.swing.JCheckBox();
+ SLWCBox = new javax.swing.JCheckBox();
+ occMessageLbl = new javax.swing.JLabel();
+ okButton = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setMaximumSize(new java.awt.Dimension(300, 300));
+ setMinimumSize(new java.awt.Dimension(300, 300));
+ setPreferredSize(new java.awt.Dimension(300, 300));
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ doClose(evt);
+ }
+ });
+ getContentPane().setLayout(new java.awt.GridBagLayout());
+
+ GBIFCBox.setSelected(true);
+ GBIFCBox.setText("GBIF");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(GBIFCBox, gridBagConstraints);
+
+ SLWCBox.setText("SLW");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(SLWCBox, gridBagConstraints);
+
+ occMessageLbl.setText("Ooccurrence retrieval targets :");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(occMessageLbl, gridBagConstraints);
+
+ okButton.setText("OK");
+ okButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ okButtonActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(okButton, gridBagConstraints);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
+ if(GBIFCBox.isSelected())
+ occTargetList.add("GBIF");
+ if(SLWCBox.isSelected())
+ occTargetList.add("SLW");
+ doClose(RET_OK);
+ }//GEN-LAST:event_okButtonActionPerformed
+
+ private void doClose(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_doClose
+ doClose(RET_CANCEL);
+ }//GEN-LAST:event_doClose
+
+ private void doClose(int retStatus) {
+ returnStatus = retStatus;
+ setVisible(false);
+ dispose();
+ }
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ /*
+ * Set the Nimbus look and feel
+ */
+ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+ /*
+ * If Nimbus (introduced in Java SE 6) is not available, stay with the
+ * default look and feel. For details see
+ * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
+ */
+ try {
+ for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
+ if ("Nimbus".equals(info.getName())) {
+ javax.swing.UIManager.setLookAndFeel(info.getClassName());
+ break;
+ }
+ }
+ } catch (ClassNotFoundException ex) {
+ java.util.logging.Logger.getLogger(OccRetrievalTargetDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (InstantiationException ex) {
+ java.util.logging.Logger.getLogger(OccRetrievalTargetDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (IllegalAccessException ex) {
+ java.util.logging.Logger.getLogger(OccRetrievalTargetDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+ java.util.logging.Logger.getLogger(OccRetrievalTargetDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ }
+ //</editor-fold>
+
+ /*
+ * Create and display the dialog
+ */
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ public void run() {
+ OccRetrievalTargetDialog dialog = new OccRetrievalTargetDialog(new javax.swing.JFrame(), true);
+ dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+ @Override
+ public void windowClosing(java.awt.event.WindowEvent e) {
+ System.exit(0);
+ }
+ });
+ dialog.setVisible(true);
+ }
+ });
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JCheckBox GBIFCBox;
+ private javax.swing.JCheckBox SLWCBox;
+ private javax.swing.JLabel occMessageLbl;
+ private javax.swing.JButton okButton;
+ // End of variables declaration//GEN-END:variables
+ private int returnStatus = RET_CANCEL;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.6" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[1020, 853]"/>
+ </Property>
+ <Property name="resizable" type="boolean" value="false"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="closeDialog"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,4,59,0,0,4,-37"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="synCheckPanel">
+ <Properties>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[1000, 800]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[1000, 800]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[1000, 800]"/>
+ </Property>
+ <Property name="requestFocusEnabled" type="boolean" value="false"/>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,49,0,0,3,2"/>
+ </AuxValues>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="10" insetsLeft="10" insetsBottom="10" insetsRight="10" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JScrollPane" name="inputScrollPane">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Input"/>
+ </Border>
+ </Property>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.5" weightY="1.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="inputTable">
+ <Properties>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="0" rowCount="0"/>
+ </Property>
+ <Property name="columnSelectionAllowed" type="boolean" value="true"/>
+ <Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
+ <JTableSelectionModel selectionMode="0"/>
+ </Property>
+ <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
+ <TableHeader reorderingAllowed="false" resizingAllowed="true"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JTabbedPane" name="outputTabbedPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="Output"/>
+ </Border>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.5" weightY="1.0"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="okButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="OK"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_AddingCodePost" type="java.lang.String" value="getRootPane().setDefaultButton(okButton);"/>
+ </AuxValues>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.bgbm.biovel.datacleaning.syncheck;
+
+import java.awt.Component;
+import java.awt.Desktop;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.event.*;
+import java.awt.font.TextAttribute;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URISyntaxException;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.*;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableCellEditor;
+import javax.swing.table.TableCellRenderer;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.*;
+import org.bgbm.biovel.datacleaning.utils.syncheck.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import org.bgbm.biovel.datacleaning.utils.syncheck.DCNamesTableModel;
+
+/**
+ *
+ * @author c.mathew
+ */
+public class SynCheckDialog extends javax.swing.JDialog {
+
+ public static final int ROW_HEIGHT = 25;
+ public static final int URL_COLUMN_WIDTH = 50;
+ public static final int SCI_NAME_INDEX = 0;
+ public static final int SOURCE_NAME_INDEX = 1;
+ public static final int SOURCE_URL_INDEX = 2;
+
+
+
+ Set nameSet;
+ List synreqres_list;
+ List exclude_list;
+ Map<String, NamesOutputPanel> panelMap;
+ /**
+ * A return status code - returned if Cancel button has been pressed
+ */
+ public static final int RET_CANCEL = 0;
+ /**
+ * A return status code - returned if OK button has been pressed
+ */
+ public static final int RET_OK = 1;
+
+ /**
+ * Creates new form SynCheckDialog
+ */
+ public SynCheckDialog(java.awt.Frame parent, boolean modal, List srrList) {
+ super(parent, modal);
+ initComponents();
+
+ synreqres_list = srrList;
+ exclude_list = new ArrayList();
+ panelMap = new HashMap<String, NamesOutputPanel>();
+ nameSet = SynCheckUtilsFactory.buildNames(synreqres_list);
+
+
+ if(nameSet != null && nameSet.size() != 0) {
+
+ populateInputTable();
+ inputTable.setRowSelectionInterval(0,0);
+ inputTable.setCellSelectionEnabled(true);
+ inputTable.setRowSelectionInterval(0,0);
+ inputTable.setColumnSelectionInterval(0,0);
+ SciName firstSciName = (SciName)inputTable.getValueAt(0,0);
+ populateAccSynTable(firstSciName);
+
+ }
+
+ inputTable.setRowHeight(ROW_HEIGHT);
+
+
+ // Close the dialog when Esc is pressed
+ String cancelName = "cancel";
+ InputMap inputMap = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
+ inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), cancelName);
+ ActionMap actionMap = getRootPane().getActionMap();
+ actionMap.put(cancelName, new AbstractAction() {
+
+ public void actionPerformed(ActionEvent e) {
+ doClose(RET_CANCEL);
+ }
+ });
+ }
+
+ private NamesOutputPanel getTabPanel(String checklist) {
+
+ if(!panelMap.containsKey(checklist)) {
+
+ NamesOutputPanel nop = NamesOutputPanel.newInstance();
+ nop.getAccNameTable().setRowHeight(ROW_HEIGHT);
+ nop.getSynNamesTable().setRowHeight(ROW_HEIGHT);
+ outputTabbedPanel.addTab(checklist, nop);
+ System.out.println("tabcount : " + outputTabbedPanel.getTabCount());
+ System.out.println("tabname : " + checklist);
+ panelMap.put(checklist, nop);
+ return nop;
+ } else {
+ outputTabbedPanel.addTab(checklist, panelMap.get(checklist));
+ return panelMap.get(checklist);
+ }
+ }
+ public void addToExcludeList(SciName sciName) {
+ sciName.exclude = true;
+ exclude_list.add(sciName.name);
+ }
+
+ public void removeFromExcludeList(SciName sciName) {
+ sciName.exclude = false;
+ exclude_list.remove(sciName.name);
+ }
+
+ public boolean isExcluded(String name){
+ return exclude_list.contains(name);
+ }
+
+ public List getUniqueNameList() {
+ Set uniqueNameSet = new HashSet();
+ Iterator itr = nameSet.iterator();
+
+ while(itr.hasNext()) {
+ SciName inputName = (SciName)itr.next();
+ if(inputName != null && !inputName.name.equals("")) {
+ uniqueNameSet.add(inputName.name);
+ }
+
+ Iterator<Map.Entry<String, SciName>> anentries = inputName.getAccNameMap().entrySet().iterator();
+ while (anentries.hasNext()) {
+ Map.Entry entry = (Map.Entry) anentries.next();
+
+ SciName accName = (SciName)entry.getValue();
+ if(accName != null && !accName.name.equals("") && !isExcluded(accName.name)) {
+ uniqueNameSet.add(accName.name);
+ }
+ }
+
+ Iterator<Map.Entry<String, List<SciName>>> snentries = inputName.getSynMap().entrySet().iterator();
+ while (snentries.hasNext()) {
+ Map.Entry entry = (Map.Entry) snentries.next();
+ List synList = (List)entry.getValue();
+ if(synList != null && synList.size() > 0) {
+ Iterator synListItr = synList.iterator();
+ while(synListItr.hasNext()) {
+ SciName synName= (SciName)synListItr.next();
+ if(synName != null && !synName.name.equals("") && !isExcluded(synName.name)) {
+ uniqueNameSet.add(synName.name);
+ }
+ }
+ }
+ }
+ }
+
+ List uniqueNameList = new ArrayList(uniqueNameSet);
+ itr = uniqueNameList.iterator();
+ while(itr.hasNext()) {
+ String name = (String)itr.next();
+ }
+ return uniqueNameList;
+ }
+
+ private void populateInputTable() {
+
+ SciName[][] inputData = new SciName[nameSet.size()][1];
+ Iterator itr = nameSet.iterator();
+
+ int rowCount = 0;
+ while(itr.hasNext()) {
+ inputData[rowCount][0] = (SciName)itr.next();
+ rowCount++;
+ }
+
+ DCSynCellStringRenderer dcinputstr = new DCSynCellStringRenderer();
+ String[] colNames = new String[]{"Input Name"};
+ DCNamesTableModel dcntm = new DCNamesTableModel(inputData, colNames);
+ TableMouseListener dcsyntml = new TableMouseListener(this,inputTable,true);
+ inputTable.setModel(dcntm);
+ inputTable.addMouseListener(dcsyntml);
+ inputTable.setDefaultRenderer(SciName.class, dcinputstr);
+ }
+
+ public void populateAccSynTable(SciName sciName) {
+
+
+ String[] accColNames = new String[]{"Accepted Name", "Source"};
+ String[] synColNames = new String[]{"Synonym", "Source"};
+
+ for(int i = 0;i < outputTabbedPanel.getTabCount();i++) {
+ System.out.println("settabvisiblefalse");
+ outputTabbedPanel.remove(i);
+
+ }
+
+ if(sciName != null) {
+ DCCBoxTableModel dccbtm;
+ Iterator<Map.Entry<String, SciName>> anentries = sciName.getAccNameMap().entrySet().iterator();
+ while (anentries.hasNext()) {
+ Map.Entry entry = (Map.Entry) anentries.next();
+ String key = (String)entry.getKey();
+ SciName accName = (SciName)entry.getValue();
+ NamesOutputPanel nop = getTabPanel(key);
+
+ if(accName != null && !accName.name.equals("")) {
+
+ Object[][] accData = new Object[1][2];
+ accData[0][0] = accName;
+ accData[0][1] = accName;
+ dccbtm = new DCCBoxTableModel(accData, accColNames);
+ nop.getAccNameTable().setModel(dccbtm);
+ CheckBoxEditorRenderer cber = new CheckBoxEditorRenderer(this,nop.getAccNameTable(),false);
+ nop.getAccNameTable().setDefaultRenderer(SciName.class, cber);
+ nop.getAccNameTable().getColumnModel().getColumn(0).setCellEditor(cber);
+
+ TableMouseListener tml = new TableMouseListener(this,nop.getAccNameTable(),false);
+ nop.getAccNameTable().addMouseListener(tml);
+ } else {
+ Object[][] data = new Object[][]{};
+ dccbtm = new DCCBoxTableModel(data, accColNames);
+ nop.getAccNameTable().setModel(dccbtm);
+ }
+ nop.getAccNameTable().getColumnModel().getColumn(1).setPreferredWidth(URL_COLUMN_WIDTH);
+ nop.getAccNameTable().getColumnModel().getColumn(1).setMaxWidth(URL_COLUMN_WIDTH);
+ }
+
+
+ Iterator<Map.Entry<String, List<SciName>>> snentries = sciName.getSynMap().entrySet().iterator();
+ while (snentries.hasNext()) {
+
+ Map.Entry entry = (Map.Entry) snentries.next();
+ String key = (String)entry.getKey();
+ List synList = (List)entry.getValue();
+ NamesOutputPanel nop = getTabPanel(key);
+ if(synList != null) {
+ System.out.println("syn list for " + key + " is null");
+ Object[][] synData = new Object[synList.size()][2];
+ Iterator itr = synList.iterator();
+ int rowCount = 0;
+ while(itr.hasNext()) {
+ SciName sn = (SciName)itr.next();
+ if(sn != null && !sn.name.equals("")) {
+ synData[rowCount][0] = sn;
+ synData[rowCount][1] = sn;
+ rowCount++;
+ }
+ }
+ dccbtm = new DCCBoxTableModel(synData, synColNames);
+ nop.getSynNamesTable().setModel(dccbtm);
+ CheckBoxEditorRenderer cber = new CheckBoxEditorRenderer(this,nop.getSynNamesTable(),false);
+ nop.getSynNamesTable().setDefaultRenderer(SciName.class, cber);
+ nop.getSynNamesTable().getColumnModel().getColumn(0).setCellEditor(cber);
+ TableMouseListener tml = new TableMouseListener(this,nop.getSynNamesTable(),false);
+ nop.getSynNamesTable().addMouseListener(tml);
+ } else {
+ Object[][] data = new Object[][]{};
+ dccbtm = new DCCBoxTableModel(data, synColNames);
+ nop.getSynNamesTable().setModel(dccbtm);
+ }
+ nop.getSynNamesTable().getColumnModel().getColumn(1).setPreferredWidth(URL_COLUMN_WIDTH);
+ nop.getSynNamesTable().getColumnModel().getColumn(1).setMaxWidth(URL_COLUMN_WIDTH);
+ }
+ }
+ }
+
+
+
+
+
+ /**
+ * @return the return status of this dialog - one of RET_OK or RET_CANCEL
+ */
+ public int getReturnStatus() {
+ return returnStatus;
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ synCheckPanel = new javax.swing.JPanel();
+ inputScrollPane = new javax.swing.JScrollPane();
+ inputTable = new javax.swing.JTable();
+ outputTabbedPanel = new javax.swing.JTabbedPane();
+ okButton = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setMaximumSize(new java.awt.Dimension(1020, 853));
+ setResizable(false);
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ closeDialog(evt);
+ }
+ });
+ getContentPane().setLayout(new java.awt.GridBagLayout());
+
+ synCheckPanel.setMaximumSize(new java.awt.Dimension(1000, 800));
+ synCheckPanel.setMinimumSize(new java.awt.Dimension(1000, 800));
+ synCheckPanel.setPreferredSize(new java.awt.Dimension(1000, 800));
+ synCheckPanel.setRequestFocusEnabled(false);
+ synCheckPanel.setLayout(new java.awt.GridBagLayout());
+
+ inputScrollPane.setBorder(javax.swing.BorderFactory.createTitledBorder("Input"));
+
+ inputTable.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+
+ },
+ new String [] {
+
+ }
+ ));
+ inputTable.setColumnSelectionAllowed(true);
+ inputTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+ inputTable.getTableHeader().setReorderingAllowed(false);
+ inputScrollPane.setViewportView(inputTable);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.weightx = 0.5;
+ gridBagConstraints.weighty = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ synCheckPanel.add(inputScrollPane, gridBagConstraints);
+
+ outputTabbedPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Output"));
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.weightx = 0.5;
+ gridBagConstraints.weighty = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ synCheckPanel.add(outputTabbedPanel, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
+ getContentPane().add(synCheckPanel, gridBagConstraints);
+
+ okButton.setText("OK");
+ okButton.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ okButtonActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
+ getContentPane().add(okButton, gridBagConstraints);
+ getRootPane().setDefaultButton(okButton);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
+
+ doClose(RET_OK);
+ }//GEN-LAST:event_okButtonActionPerformed
+
+ /**
+ * Closes the dialog
+ */
+ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
+ doClose(RET_CANCEL);
+ }//GEN-LAST:event_closeDialog
+
+ private void doClose(int retStatus) {
+ returnStatus = retStatus;
+ setVisible(false);
+ dispose();
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) {
+ /*
+ * Set the Nimbus look and feel
+ */
+ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+ /*
+ * If Nimbus (introduced in Java SE 6) is not available, stay with the
+ * default look and feel. For details see
+ * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
+ */
+ try {
+ for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
+ if ("Nimbus".equals(info.getName())) {
+ javax.swing.UIManager.setLookAndFeel(info.getClassName());
+ break;
+ }
+ }
+ } catch (ClassNotFoundException ex) {
+ java.util.logging.Logger.getLogger(SynCheckDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (InstantiationException ex) {
+ java.util.logging.Logger.getLogger(SynCheckDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (IllegalAccessException ex) {
+ java.util.logging.Logger.getLogger(SynCheckDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ } catch (javax.swing.UnsupportedLookAndFeelException ex) {
+ java.util.logging.Logger.getLogger(SynCheckDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ }
+ //</editor-fold>
+
+ /*
+ * Create and display the dialog
+ */
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ public void run() {
+ List synreqres_list = new ArrayList();
+ synreqres_list.add(srr1);
+ synreqres_list.add(srr2);
+ SynCheckDialog dialog = new SynCheckDialog(new javax.swing.JFrame(), true, synreqres_list);
+ dialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+ @Override
+ public void windowClosing(java.awt.event.WindowEvent e) {
+ System.exit(0);
+ }
+ });
+ dialog.setVisible(true);
+ }
+ });
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JScrollPane inputScrollPane;
+ private javax.swing.JTable inputTable;
+ private javax.swing.JButton okButton;
+ private javax.swing.JTabbedPane outputTabbedPanel;
+ private javax.swing.JPanel synCheckPanel;
+ // End of variables declaration//GEN-END:variables
+ private int returnStatus = RET_CANCEL;
+
+
+
+public static final String srr1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+"<syncheck>" +
+"<query>" +
+"<synonymRequest id=\"Anguilla anguilla\">" +
+"<taxonName>" +
+"<name>" +
+"<nameComplete>Anguilla anguilla</nameComplete>" +
+"</name>" +
+"</taxonName>" +
+"</synonymRequest>" +
+"<synonymResponse checklist=\"Catalogue Of Life\">" +
+"<acceptedName>" +
+"<taxonName>" +
+"<authorship>(Linnaeus, 1758)</authorship>" +
+"<name>" +
+"<nameComplete>Anguilla anguilla</nameComplete>" +
+"<atomisedName>" +
+"<subGenus>" +
+"<genusPart>Anguilla</genusPart>" +
+"<specificEpithet>anguilla</specificEpithet>" +
+"<infraspecificEpithet/>" +
+"</subGenus>" +
+"</atomisedName>" +
+"<nameStatus>accepted name</nameStatus>" +
+"</name>" +
+"<rank>Species</rank>" +
+"</taxonName>" +
+"<source>" +
+"<name>FishBase</name>" +
+"<url>http://www.fishbase.org</url>" +
+"</source>" +
+"<info>" +
+"<url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/10054345</url>" +
+"</info>" +
+"</acceptedName>" +
+"<synonym>" +
+"<taxonName>" +
+"<authorship>(Linnaeus, 1758)</authorship>" +
+"<name>" +
+"<nameComplete>Angill angill</nameComplete>" +
+"<atomisedName>" +
+"<subGenus>" +
+"<genusPart>Angill</genusPart>" +
+"<specificEpithet>angill</specificEpithet>" +
+"<infraspecificEpithet/>" +
+"</subGenus>" +
+"</atomisedName>" +
+"<nameStatus>synonym</nameStatus>" +
+"</name>" +
+"<rank>Species</rank>" +
+"</taxonName>" +
+"<source>" +
+"<name/>" +
+"<url/>" +
+"</source>" +
+"<info>" +
+"<url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/10087934/synonym/10087934</url>" +
+"</info>" +
+"</synonym>" +
+"<synonym>" +
+"<taxonName>" +
+"<authorship>Blanchard, 1866</authorship>" +
+"<name>" +
+"<nameComplete>Anguilla oblongirostris</nameComplete>" +
+"<atomisedName>" +
+"<subGenus>" +
+"<genusPart>Anguilla</genusPart>" +
+"<specificEpithet>oblongirostris</specificEpithet>" +
+"<infraspecificEpithet/>" +
+"</subGenus>" +
+"</atomisedName>" +
+"<nameStatus>synonym</nameStatus>" +
+"</name>" +
+"<rank>Species</rank>" +
+"</taxonName>" +
+"<source>" +
+"<name/>" +
+"<url/>" +
+"</source>" +
+"<info>" +
+"<url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/10087916/synonym/10087916</url>" +
+"</info>" +
+"</synonym>" +
+"<synonym>" +
+"<taxonName>" +
+"<authorship>Kaup, 1856</authorship>" +
+"<name>" +
+"<nameComplete>Anguilla platycephala</nameComplete>" +
+"<atomisedName>" +
+"<subGenus>" +
+"<genusPart>Anguilla</genusPart>" +
+"<specificEpithet>platycephala</specificEpithet>" +
+"<infraspecificEpithet/>" +
+"</subGenus>" +
+"</atomisedName>" +
+"<nameStatus>synonym</nameStatus>" +
+"</name>" +
+"<rank>Species</rank>" +
+"</taxonName>" +
+"<source>" +
+"<name/>" +
+"<url/>" +
+"</source>" +
+"<info>" +
+"<url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/10087915/synonym/10087915</url>" +
+"</info>" +
+"</synonym>" +
+"<otherName>" +
+"<taxonName>" +
+"<authorship>(non Linnaeus, 1758)</authorship>" +
+"<name>" +
+"<nameComplete>Anguilla anguilla</nameComplete>" +
+"<atomisedName>" +
+"<subGenus>" +
+"<genusPart>Anguilla</genusPart>" +
+"<specificEpithet>anguilla</specificEpithet>" +
+"<infraspecificEpithet/>" +
+"</subGenus>" +
+"</atomisedName>" +
+"<nameStatus>misapplied name</nameStatus>" +
+"</name>" +
+"<rank>Species</rank>" +
+"</taxonName>" +
+"<source>" +
+"<name>FishBase</name>" +
+"<url>http://www.fishbase.org</url>" +
+"</source>" +
+"<info>" +
+"<url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/10085475/synonym/10091755</url>" +
+"</info>" +
+"</otherName>" +
+"</synonymResponse>" +
+"</query>" +
+ "</syncheck>";
+
+public static final String srr2 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+" <syncheck> " +
+" <query> " +
+" <synonymRequest id=\"Ameira divagans\"> " +
+" <taxonName> " +
+" <name> " +
+" <nameComplete>Ameira divagans</nameComplete> " +
+" </name> " +
+" </taxonName> " +
+" </synonymRequest> " +
+" <synonymResponse checklist=\"Catalogue Of Life\"> " +
+" <acceptedName> " +
+" <taxonName> " +
+" <authorship>(O. Fabricius, 1788)</authorship> " +
+" <name> " +
+" <nameComplete>Chionoecetes opilio</nameComplete> " +
+" <atomisedName> " +
+" <subGenus> " +
+" <genusPart>Chionoecetes</genusPart> " +
+" <specificEpithet>opilio</specificEpithet> " +
+" <infraspecificEpithet/> " +
+" </subGenus> " +
+" </atomisedName> " +
+" <nameStatus>accepted name</nameStatus> " +
+" </name> " +
+" <rank>Species</rank> " +
+" </taxonName> " +
+" <source> " +
+" <name>WoRMS Brachyura: World List of Marine Brachyura</name> " +
+" <url>http://www.marinespecies.org</url> " +
+" </source> " +
+" <info> " +
+" <url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/9271754</url> " +
+" </info> " +
+" </acceptedName> " +
+" </synonymResponse> " +
+" <synonymResponse checklist=\"WoRMS\"> " +
+" <acceptedName> " +
+" <taxonName> " +
+" <authorship>Nicholls, 1939</authorship> " +
+" <name> " +
+" <nameComplete>Ameira divagans</nameComplete> " +
+" <atomisedName> " +
+" <subGenus> " +
+" <genusPart>Ameira</genusPart> " +
+" <specificEpithet>divagans</specificEpithet> " +
+" <infraspecificEpithet/> " +
+" </subGenus> " +
+" </atomisedName> " +
+" <nameStatus>accepted name</nameStatus> " +
+" </name> " +
+" <rank>Species</rank> " +
+" </taxonName> " +
+" <source> " +
+" <name>ITIS Regional: The Integrated Taxonomic Information System</name> " +
+" <url>http://www.itis.gov;http://www.cbif.gc.ca/itis (Canada);http://siit.conabio.gob.mx (Mexico)</url> " +
+" </source> " +
+" <info> " +
+" <url>http://www.catalogueoflife.org/annual-checklist/col/details/species/id/6983742</url> " +
+" </info> " +
+" </acceptedName> " +
+" </synonymResponse> " +
+" </query> " +
+ " </syncheck> ";
+}
\ No newline at end of file
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.biostiff;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class BioSTIFFConstants {\r
+\r
+ public final static String OCCURRENCEID_HDR = "occurrenceID";\r
+ public final static String DECLAT_HDR = "decimalLatitude";\r
+ public final static String DECLONG_HDR = "decimalLongitude";\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import java.awt.Component;\r
+import java.awt.Font;\r
+import java.awt.event.*;\r
+import java.awt.font.TextAttribute;\r
+import java.util.Map;\r
+import javax.swing.AbstractCellEditor;\r
+import javax.swing.JCheckBox;\r
+import javax.swing.JLabel;\r
+import javax.swing.JTable;\r
+import javax.swing.table.DefaultTableModel;\r
+import javax.swing.table.TableCellEditor;\r
+import javax.swing.table.TableCellRenderer;\r
+import org.bgbm.biovel.datacleaning.syncheck.SynCheckDialog;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+\r
+public class CheckBoxEditorRenderer extends AbstractCellEditor implements TableCellRenderer, TableCellEditor, ActionListener\r
+{\r
+ private JCheckBox checkbox = new JCheckBox();\r
+ private JLabel label = new JLabel();\r
+ SynCheckDialog scdialog;\r
+ JTable table;\r
+ boolean isInput;\r
+ boolean init;\r
+ Map attributes;\r
+\r
+ public CheckBoxEditorRenderer(SynCheckDialog scd, JTable t, boolean ip) {\r
+ super();\r
+\r
+ scdialog = scd;\r
+ table = t; \r
+ isInput = ip;\r
+ init = true;\r
+ \r
+ \r
+ checkbox.setFocusable(true);\r
+ checkbox.addActionListener(this);\r
+ }\r
+ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {\r
+ SciName sciName = (SciName) value;\r
+ if(column == 0) { \r
+ checkbox.setText(sciName.name);\r
+ Map attributes = checkbox.getFont().getAttributes();\r
+ \r
+ checkbox.setSelected(!scdialog.isExcluded(sciName.name)); \r
+ if(!checkbox.isSelected()) { \r
+ attributes.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON);\r
+ checkbox.setFont( new Font(attributes) );\r
+ } else {\r
+ attributes.put(TextAttribute.STRIKETHROUGH, false);\r
+ checkbox.setFont( new Font(attributes) );\r
+ }\r
+ \r
+ return checkbox;\r
+ }\r
+\r
+ label.setText("URL"); \r
+ return label;\r
+ }\r
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {\r
+ SciName sciName = (SciName) value;\r
+ \r
+ checkbox.setText(sciName.name); \r
+\r
+ return checkbox;\r
+ }\r
+ \r
+ public Object getCellEditorValue() {\r
+ int row = table.getSelectedRow();\r
+ int col = table.getSelectedColumn();\r
+ SciName selSciName = (SciName)table.getValueAt(row, col);;\r
+ \r
+ if(checkbox.isSelected()) {\r
+ scdialog.removeFromExcludeList(selSciName);\r
+ } else {\r
+ scdialog.addToExcludeList(selSciName);\r
+ } \r
+\r
+ return selSciName;\r
+ }\r
+\r
+ public void actionPerformed(ActionEvent actionEvent) {\r
+ fireEditingStopped();\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import javax.swing.table.DefaultTableModel;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class DCCBoxTableModel extends DefaultTableModel {\r
+ \r
+ Object[][] data;\r
+ public DCCBoxTableModel(Object[][] d, Object[] columnNames) {\r
+ super(d, columnNames);\r
+ data = d;\r
+ }\r
+ \r
+ Class[] types = new Class [] {SciName.class,SciName.class};\r
+ \r
+ @Override\r
+ public Class getColumnClass(int columnIndex) {\r
+ return types [columnIndex];\r
+ }\r
+ \r
+ @Override \r
+ public boolean isCellEditable(int rowIndex, int columnIndex) {\r
+ if(columnIndex == 0)\r
+ return true;\r
+ \r
+ return false; \r
+ }\r
+ \r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import javax.swing.table.DefaultTableModel;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+/**\r
+ Table Model for an only names table\r
+*/\r
+public class DCNamesTableModel extends DefaultTableModel {\r
+ \r
+ public DCNamesTableModel(Object[][] data, Object[] columnNames) {\r
+ super(data, columnNames);\r
+ }\r
+ \r
+ Class[] types = new Class [] {java.lang.String.class};\r
+ \r
+ @Override\r
+ public Class getColumnClass(int columnIndex) {\r
+ return types [columnIndex];\r
+ }\r
+\r
+ @Override\r
+ public boolean isCellEditable(int row, int column) {\r
+ return false;\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import java.awt.Component;\r
+import javax.swing.JTable;\r
+import javax.swing.table.DefaultTableCellRenderer;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class DCSynCellStringRenderer extends DefaultTableCellRenderer{\r
+ \r
+\r
+ \r
+ @Override\r
+ public Component getTableCellRendererComponent(JTable t, Object value,\r
+ boolean isSelected, boolean hasFocus,\r
+ int row, int column) {\r
+ \r
+ setText(value.toString()); \r
+ return this;\r
+ } \r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.6" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="481" max="32767" attributes="0"/>
+ <Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ <Component id="outputPanel" min="-2" pref="481" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="739" max="32767" attributes="0"/>
+ <Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ <Component id="outputPanel" min="-2" pref="739" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="outputPanel">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JScrollPane" name="accNameScrollPane">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.1"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="accNameTable">
+ <Properties>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="0" rowCount="0"/>
+ </Property>
+ <Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
+ <JTableSelectionModel selectionMode="0"/>
+ </Property>
+ <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
+ <TableHeader reorderingAllowed="false" resizingAllowed="true"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JScrollPane" name="synNamesScrollPane">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="5" insetsLeft="5" insetsBottom="5" insetsRight="5" anchor="18" weightX="1.0" weightY="0.9"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTable" name="synNamesTable">
+ <Properties>
+ <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+ <Table columnCount="0" rowCount="0"/>
+ </Property>
+ <Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
+ <JTableSelectionModel selectionMode="0"/>
+ </Property>
+ <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
+ <TableHeader reorderingAllowed="false" resizingAllowed="true"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
--- /dev/null
+\r
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import javax.swing.JPanel;\r
+import javax.swing.JTable;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class NamesOutputPanel extends javax.swing.JPanel {\r
+\r
+ /**\r
+ * Creates new form NamesOutputPanel\r
+ */\r
+ public NamesOutputPanel() {\r
+ initComponents();\r
+ }\r
+\r
+ /**\r
+ * This method is called from within the constructor to initialize the form.\r
+ * WARNING: Do NOT modify this code. The content of this method is always\r
+ * regenerated by the Form Editor.\r
+ */\r
+ @SuppressWarnings("unchecked")\r
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents\r
+ private void initComponents() {\r
+ java.awt.GridBagConstraints gridBagConstraints;\r
+\r
+ outputPanel = new javax.swing.JPanel();\r
+ accNameScrollPane = new javax.swing.JScrollPane();\r
+ accNameTable = new javax.swing.JTable();\r
+ synNamesScrollPane = new javax.swing.JScrollPane();\r
+ synNamesTable = new javax.swing.JTable();\r
+\r
+ outputPanel.setLayout(new java.awt.GridBagLayout());\r
+\r
+ accNameTable.setModel(new javax.swing.table.DefaultTableModel(\r
+ new Object [][] {\r
+\r
+ },\r
+ new String [] {\r
+\r
+ }\r
+ ));\r
+ accNameTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\r
+ accNameTable.getTableHeader().setReorderingAllowed(false);\r
+ accNameScrollPane.setViewportView(accNameTable);\r
+\r
+ gridBagConstraints = new java.awt.GridBagConstraints();\r
+ gridBagConstraints.gridx = 0;\r
+ gridBagConstraints.gridy = 0;\r
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\r
+ gridBagConstraints.weightx = 1.0;\r
+ gridBagConstraints.weighty = 0.1;\r
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\r
+ outputPanel.add(accNameScrollPane, gridBagConstraints);\r
+\r
+ synNamesTable.setModel(new javax.swing.table.DefaultTableModel(\r
+ new Object [][] {\r
+\r
+ },\r
+ new String [] {\r
+\r
+ }\r
+ ));\r
+ synNamesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\r
+ synNamesTable.getTableHeader().setReorderingAllowed(false);\r
+ synNamesScrollPane.setViewportView(synNamesTable);\r
+\r
+ gridBagConstraints = new java.awt.GridBagConstraints();\r
+ gridBagConstraints.gridx = 0;\r
+ gridBagConstraints.gridy = 1;\r
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\r
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\r
+ gridBagConstraints.weightx = 1.0;\r
+ gridBagConstraints.weighty = 0.9;\r
+ gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\r
+ outputPanel.add(synNamesScrollPane, gridBagConstraints);\r
+\r
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\r
+ this.setLayout(layout);\r
+ layout.setHorizontalGroup(\r
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r
+ .addGap(0, 481, Short.MAX_VALUE)\r
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r
+ .addGroup(layout.createSequentialGroup()\r
+ .addGap(0, 0, Short.MAX_VALUE)\r
+ .addComponent(outputPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 481, javax.swing.GroupLayout.PREFERRED_SIZE)\r
+ .addGap(0, 0, Short.MAX_VALUE)))\r
+ );\r
+ layout.setVerticalGroup(\r
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r
+ .addGap(0, 739, Short.MAX_VALUE)\r
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r
+ .addGroup(layout.createSequentialGroup()\r
+ .addGap(0, 0, Short.MAX_VALUE)\r
+ .addComponent(outputPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 739, javax.swing.GroupLayout.PREFERRED_SIZE)\r
+ .addGap(0, 0, Short.MAX_VALUE)))\r
+ );\r
+ }// </editor-fold>//GEN-END:initComponents\r
+ // Variables declaration - do not modify//GEN-BEGIN:variables\r
+ private javax.swing.JScrollPane accNameScrollPane;\r
+ private javax.swing.JTable accNameTable;\r
+ private javax.swing.JPanel outputPanel;\r
+ private javax.swing.JScrollPane synNamesScrollPane;\r
+ private javax.swing.JTable synNamesTable;\r
+ // End of variables declaration//GEN-END:variables\r
+\r
+ public static NamesOutputPanel newInstance() {\r
+ return new NamesOutputPanel();\r
+ }\r
+\r
+ public JTable getSynNamesTable() {\r
+ return synNamesTable;\r
+ }\r
+\r
+ public JTable getAccNameTable() {\r
+ return accNameTable;\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.ArrayList;\r
+import java.util.Map;\r
+\r
+/**\r
+ Data object to hold name information and links to associated names (if any).\r
+ Used for all kinds of names (input, accepted, synonyms, etc)\r
+*/\r
+public class SciName {\r
+ public String name = "";\r
+ public String source = "";\r
+ public String source_url = "";\r
+ public boolean exclude = false;\r
+\r
+ public Map<String, SciName> accNameMap;\r
+ public Map<String, List<SciName>> synMap;\r
+ public Map<String, List<SciName>> otherNamesMap;\r
+\r
+ public SciName() {\r
+ accNameMap = new HashMap<String, SciName>();\r
+ synMap = new HashMap<String, List<SciName>>();\r
+ otherNamesMap = new HashMap<String, List<SciName>>();\r
+ }\r
+\r
+ @Override\r
+ public String toString() {\r
+ return name;\r
+ }\r
+\r
+ public void setAccName(String checklist, SciName accName) {\r
+ accNameMap.put(checklist, accName);\r
+ }\r
+\r
+ public void addSynName(String checklist, SciName synName) {\r
+ if(synMap.isEmpty() || !synMap.containsKey(checklist)) {\r
+ List<SciName> synList = new ArrayList<SciName>();\r
+ synList.add(synName);\r
+ synMap.put(checklist, synList);\r
+ } else {\r
+ List synList = synMap.get(checklist);\r
+ synList.add(synName);\r
+ }\r
+ }\r
+\r
+ public void setNullSynList(String checklist) {\r
+ synMap.put(checklist, null);\r
+ }\r
+ \r
+ public void addOtherName(String checklist, SciName otherName) {\r
+ if(otherNamesMap.isEmpty() || !otherNamesMap.containsKey(checklist)) {\r
+ List<SciName> otherNamesList = new ArrayList<SciName>();\r
+ otherNamesList.add(otherName);\r
+ otherNamesMap.put(checklist, otherNamesList);\r
+ } else {\r
+ List otherNamesList = otherNamesMap.get(checklist);\r
+ otherNamesList.add(otherName);\r
+ }\r
+ }\r
+\r
+ public Map<String, SciName> getAccNameMap() {\r
+ return accNameMap;\r
+ }\r
+ \r
+ public Map<String, List<SciName>> getSynMap() {\r
+ return synMap;\r
+ }\r
+\r
+ public Map<String, List<SciName>> getOtherNamesMap() {\r
+ return otherNamesMap;\r
+ }\r
+\r
+ public boolean isAccNameEmpty() {\r
+ return accNameMap.isEmpty();\r
+ }\r
+ \r
+\r
+ \r
+ public boolean isOtherNameEmpty() {\r
+ return otherNamesMap.isEmpty();\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class SynCheckConstants {\r
+\r
+ public final static String DELIMITER = ",";\r
+ public final static String NAMECOMPLETE_HDR = "nameComplete"; \r
+ public final static String AUTHORSHIP_HDR = "authorship";\r
+ public final static String GENUSPART_HDR = "genusPart";\r
+ public final static String INFRAGENERICEPITHET_HDR = "infragenericEpithet";\r
+ public final static String SPECIFICEPITHET_HDR = "specificEpithet";\r
+ public final static String INFRASPECIFICEPITHET_HDR = "infraspecificEpithet";\r
+ public final static String UNINOMIAL_HDR = "uninomial";\r
+ public final static String TAXONNAME_HDR = "taxonName";\r
+\r
+ public final static int SYN_EXP_OCC_RET = 0;\r
+ public final static int DATA_SEL = 1;\r
+ public final static int DATA_QUAL = 2;\r
+ public final static int END_WKFLOW = 3;\r
+ \r
+ public final static String CHECKLIST_BANK_DELIMITER = ":";\r
+\r
+\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.StringReader;\r
+import java.io.StringWriter;\r
+import java.util.*;\r
+import java.util.logging.Level;\r
+import java.util.logging.Logger;\r
+import javax.xml.parsers.DocumentBuilder;\r
+import javax.xml.parsers.DocumentBuilderFactory;\r
+import javax.xml.parsers.ParserConfigurationException;\r
+import javax.xml.transform.*;\r
+import javax.xml.transform.dom.DOMSource;\r
+import javax.xml.transform.stream.StreamResult;\r
+import javax.xml.xpath.*;\r
+import org.bgbm.biovel.datacleaning.syncheck.SynCheckDialog;\r
+import org.w3c.dom.Document;\r
+import org.w3c.dom.Node;\r
+import org.w3c.dom.NodeList;\r
+import org.xml.sax.InputSource;\r
+import org.xml.sax.SAXException;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class SynCheckUtilsFactory {\r
+ public static final String INPUT_NAME_XPATH = "/syncheck/query[1]/synonymRequest[1]/taxonName/name/nameComplete/text()";\r
+\r
+ public static final String SYN_RESPONSE_XPATH = "/syncheck/query/synonymResponse";\r
+ public static final String CHKLIST_ATTR_XPATH = "./@checklist";\r
+ public static final String ACC_NAME_XPATH = "./acceptedName[1]";\r
+ public static final String SYN_NAME_XPATH = "./synonym";\r
+\r
+ public static final String NAME_XPATH = "./taxonName/name/nameComplete/text()";\r
+ public static final String SRC_XPATH = "./source/name/text()";\r
+ public static final String SRC_URL_XPATH = "./info/url/text()";\r
+ \r
+ public static Set buildNames(List synreqres_list) {\r
+ \r
+ Iterator itr = synreqres_list.iterator();\r
+ Set nameSet = new HashSet();\r
+ Reader xmlr;\r
+ while(itr.hasNext()) {\r
+ \r
+ try {\r
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r
+ DocumentBuilder builder = factory.newDocumentBuilder();\r
+ xmlr = new StringReader((String)itr.next());\r
+ \r
+ try {\r
+ Document doc = builder.parse(new InputSource(xmlr));\r
+ \r
+ XPathFactory xPathfactory = XPathFactory.newInstance();\r
+ XPath xpath = xPathfactory.newXPath();\r
+ \r
+ SciName inputName = new SciName();\r
+ XPathExpression exprInputName = xpath.compile(INPUT_NAME_XPATH); \r
+ String iname = (String)exprInputName.evaluate(doc, XPathConstants.STRING);\r
+ inputName.name = iname; \r
+ nameSet.add(inputName);\r
+\r
+ XPathExpression exprSynResponse = xpath.compile(SYN_RESPONSE_XPATH); \r
+ NodeList responses = (NodeList)exprSynResponse.evaluate(doc, XPathConstants.NODESET);\r
+\r
+ for(int i = 0;i < responses.getLength();i++) { \r
+\r
+ XPathExpression exprChkListAttr = xpath.compile(CHKLIST_ATTR_XPATH); \r
+ String chklistattr = (String)exprChkListAttr.evaluate(responses.item(i), XPathConstants.STRING);\r
+ \r
+ System.out.println("checklist attr : " + chklistattr);\r
+ \r
+ \r
+ XPathExpression exprAccName = xpath.compile(ACC_NAME_XPATH); \r
+ Node aname = (Node)exprAccName.evaluate(responses.item(i), XPathConstants.NODE);\r
+ \r
+ XPathExpression exprNameStr = xpath.compile(NAME_XPATH);\r
+ \r
+ String name = (String)exprNameStr.evaluate(aname, XPathConstants.STRING);\r
+ SciName acceptedName = new SciName();\r
+ inputName.setAccName(chklistattr, acceptedName);\r
+ acceptedName.name = name;\r
+\r
+ XPathExpression exprNameSrc = xpath.compile(SRC_XPATH); \r
+ String src = (String)exprNameSrc.evaluate(aname, XPathConstants.STRING);\r
+ acceptedName.source = src;\r
+\r
+ XPathExpression exprNameSrcUrl = xpath.compile(SRC_URL_XPATH);\r
+ String srcurl = (String)exprNameSrcUrl.evaluate(aname, XPathConstants.STRING); \r
+ acceptedName.source_url = srcurl;\r
+ \r
+\r
+ XPathExpression exprSynName = xpath.compile(SYN_NAME_XPATH); \r
+ NodeList snames = (NodeList)exprSynName.evaluate(responses.item(i), XPathConstants.NODESET);\r
+ \r
+ if(snames.getLength() == 0) {\r
+ inputName.setNullSynList(chklistattr);\r
+ } else {\r
+ for(int j = 0;j < snames.getLength();j++) {\r
+ try {\r
+ name = (String)exprNameStr.evaluate(snames.item(j), XPathConstants.STRING);\r
+ SciName synName = new SciName();\r
+ synName.name = name;\r
+ inputName.addSynName(chklistattr, synName);\r
+ \r
+ src = (String)exprNameSrc.evaluate(snames.item(j), XPathConstants.STRING);\r
+ synName.source = src;\r
+ \r
+ srcurl = (String)exprNameSrcUrl.evaluate(snames.item(j), XPathConstants.STRING); \r
+ synName.source_url = srcurl; \r
+ } catch(XPathExpressionException xpee) {\r
+ // expression cannot be evaluated.\r
+ }\r
+ } \r
+ }\r
+ }\r
+ } catch(XPathExpressionException xpee) {\r
+ // expression cannot be evaluated.\r
+ }\r
+ xmlr.close();\r
+ } catch(SAXException saxe) {\r
+ } catch(IOException ioe) {\r
+ } catch(ParserConfigurationException pce) {\r
+ }\r
+ }\r
+ return nameSet;\r
+ }\r
+ \r
+ public static void printNode(Node node) {\r
+ try {\r
+ TransformerFactory transFactory = TransformerFactory.newInstance();\r
+ Transformer transformer = transFactory.newTransformer();\r
+ StringWriter buffer = new StringWriter();\r
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");\r
+ transformer.transform(new DOMSource(node),\r
+ new StreamResult(buffer));\r
+ String str = buffer.toString(); \r
+ } catch (TransformerConfigurationException ex) {\r
+ Logger.getLogger(SynCheckDialog.class.getName()).log(Level.SEVERE, null, ex);\r
+ } catch (TransformerException ex) {\r
+ Logger.getLogger(SynCheckDialog.class.getName()).log(Level.SEVERE, null, ex);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.datacleaning.utils.syncheck;\r
+\r
+import java.awt.Desktop;\r
+import java.awt.event.MouseEvent;\r
+import java.awt.event.MouseListener;\r
+import javax.swing.JTable;\r
+import org.bgbm.biovel.datacleaning.syncheck.SynCheckDialog;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class TableMouseListener implements MouseListener {\r
+\r
+ SynCheckDialog scdialog;\r
+ JTable table;\r
+ boolean isInput;\r
+\r
+ public TableMouseListener(SynCheckDialog scd, JTable t, boolean ip) {\r
+ scdialog = scd;\r
+ table = t; \r
+ isInput = ip;\r
+ }\r
+\r
+ @Override public void mouseExited(MouseEvent e) {}\r
+ @Override public void mouseEntered(MouseEvent e) {}\r
+ @Override public void mouseReleased(MouseEvent e) {}\r
+ @Override public void mousePressed(MouseEvent e) {\r
+ int row = table.getSelectedRow();\r
+ int col = table.getSelectedColumn();\r
+ SciName selSciName = null;\r
+\r
+ if(isInput) {\r
+ if(row != -1 && col == 0) { \r
+ selSciName = (SciName)table.getValueAt(row, col);\r
+ if (selSciName != null) { \r
+ if (e.getButton() == MouseEvent.BUTTON1) { \r
+ scdialog.populateAccSynTable(selSciName); \r
+ }\r
+ } \r
+ } \r
+ } \r
+ }\r
+\r
+ @Override public void mouseClicked(MouseEvent e) {\r
+ int row = table.getSelectedRow();\r
+ int col = table.getSelectedColumn();\r
+ SciName selSciName = null;\r
+ String url = "";\r
+ if(!isInput) { \r
+ if(row != -1 && col == 1) { \r
+ selSciName = (SciName)table.getValueAt(row, col); \r
+ if (e.getButton() == MouseEvent.BUTTON1) { \r
+ try{ \r
+ if(selSciName != null && !selSciName.source_url.equals("") && Desktop.isDesktopSupported()) { //> JDK 1.6.0 \r
+ Desktop.getDesktop().browse(new java.net.URI(selSciName.source_url));\r
+ }\r
+ }catch(Exception ex) {\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * To change this template, choose Tools | Templates\r
+ * and open the template in the editor.\r
+ */\r
+package org.bgbm.biovel.utils;\r
+import au.com.bytecode.opencsv.CSVReader;\r
+import java.io.IOException;\r
+import java.io.StringReader;\r
+import java.util.Arrays;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+\r
+/**\r
+ *\r
+ * @author c.mathew\r
+ */\r
+public class CSVFactory {\r
+ \r
+ \r
+ public static boolean containsWhitespace(List<String> elements){\r
+ \r
+ Iterator itr = elements.iterator();\r
+ \r
+ while(itr.hasNext()) {\r
+ String element = (String)itr.next();\r
+ if(element.trim().equals("")) {\r
+ return true;\r
+ }\r
+ }\r
+ return false;\r
+ }\r
+ \r
+ public static String convertArrayToString(String[] fields, String delimiter) {\r
+ StringBuilder csvStringBuilder = new StringBuilder();\r
+ for(int i = 0; i < fields.length; i++) {\r
+ if(i > 0) {\r
+ csvStringBuilder.append(delimiter);\r
+ }\r
+ csvStringBuilder.append(fields[i]);\r
+ }\r
+ return csvStringBuilder.toString();\r
+ }\r
+}\r