-<?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="SimDeCS" default="default" basedir=".">\r
- <description>Builds, tests, and runs the project SimDeCS.</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-dist: called before archive building \r
- -post-dist: called after archive building \r
- -post-clean: called after cleaning build products \r
- -pre-run-deploy: called before deploying\r
- -post-run-deploy: called after deploying\r
-\r
- Example of pluging an obfuscator after the compilation could look like \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
- Other way how to customize the build is by overriding existing main targets.\r
- The target 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
- do-dist: archive building\r
- run: execution of project \r
- javadoc-build: javadoc generation \r
-\r
- Example of overriding the target for project execution could look like \r
-\r
- <target name="run" depends="<PROJNAME>-impl.jar">\r
- <exec dir="bin" executable="launcher.exe">\r
- <arg file="${dist.jar}"/>\r
- </exec>\r
- </target>\r
-\r
- Notice that overridden target depends on jar target and not only on \r
- compile target as regular run target does. Again, for list of available \r
- properties which you can use check the target you are overriding in \r
- nbproject/build-impl.xml file. \r
-\r
- -->\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="SimDeCS" default="default" basedir=".">
+ <description>Builds, tests, and runs the project SimDeCS.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-dist: called before archive building
+ -post-dist: called after archive building
+ -post-clean: called after cleaning build products
+ -pre-run-deploy: called before deploying
+ -post-run-deploy: called after deploying
+
+ Example of pluging an obfuscator after the compilation could look like
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Other way how to customize the build is by overriding existing main targets.
+ The target of interest are:
+
+ init-macrodef-javac: defines macro for javac compilation
+ init-macrodef-junit: defines macro for junit execution
+ init-macrodef-debug: defines macro for class debugging
+ do-dist: archive building
+ run: execution of project
+ javadoc-build: javadoc generation
+
+ Example of overriding the target for project execution could look like
+
+ <target name="run" depends="<PROJNAME>-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that overridden target depends on jar target and not only on
+ compile target as regular run target does. Again, for list of available
+ properties which you can use check the target you are overriding in
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
-<?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
- - initialization\r
- - compilation\r
- - dist\r
- - execution\r
- - debugging\r
- - javadoc\r
- - junit compilation\r
- - junit execution\r
- - junit debugging\r
- - cleanup\r
-\r
- -->\r
-<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="SimDeCS-impl">\r
- <import file="ant-deploy.xml"/>\r
- <fail message="Please build using Ant 1.7.1 or higher.">\r
- <condition>\r
- <not>\r
- <antversion atleast="1.7.1"/>\r
- </not>\r
- </condition>\r
- </fail>\r
- <target depends="dist,javadoc" description="Build whole project." name="default"/>\r
- <!--\r
- INITIALIZATION SECTION\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/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/project.properties"/>\r
- </target>\r
- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>\r
- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\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
- <isfalse value="${javadoc.preview}"/>\r
- </condition>\r
- <property name="javac.compilerargs" value=""/>\r
- <condition property="no.deps">\r
- <and>\r
- <istrue value="${no.dependencies}"/>\r
- </and>\r
- </condition>\r
- <condition property="no.dist.ear.dir">\r
- <not>\r
- <isset property="dist.ear.dir"/>\r
- </not>\r
- </condition>\r
- <property name="build.web.excludes" value="${build.classes.excludes}"/>\r
- <condition property="do.compile.jsps">\r
- <istrue value="${compile.jsps}"/>\r
- </condition>\r
- <condition property="do.debug.server">\r
- <or>\r
- <not>\r
- <isset property="debug.server"/>\r
- </not>\r
- <istrue value="${debug.server}"/>\r
- <and>\r
- <not>\r
- <istrue value="${debug.server}"/>\r
- </not>\r
- <not>\r
- <istrue value="${debug.client}"/>\r
- </not>\r
- </and>\r
- </or>\r
- </condition>\r
- <condition property="do.debug.client">\r
- <istrue value="${debug.client}"/>\r
- </condition>\r
- <condition property="do.display.browser">\r
- <istrue value="${display.browser}"/>\r
- </condition>\r
- <condition property="do.display.browser.debug">\r
- <and>\r
- <isset property="do.display.browser"/>\r
- <not>\r
- <isset property="do.debug.client"/>\r
- </not>\r
- </and>\r
- </condition>\r
- <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>\r
- <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>\r
- <condition property="do.war.package.with.custom.manifest">\r
- <isset property="has.custom.manifest"/>\r
- </condition>\r
- <condition property="do.war.package.without.custom.manifest">\r
- <not>\r
- <isset property="has.custom.manifest"/>\r
- </not>\r
- </condition>\r
- <condition property="do.tmp.war.package.with.custom.manifest">\r
- <and>\r
- <isset property="has.custom.manifest"/>\r
- <or>\r
- <isfalse value="${directory.deployment.supported}"/>\r
- <isset property="dist.ear.dir"/>\r
- </or>\r
- </and>\r
- </condition>\r
- <condition property="do.tmp.war.package.without.custom.manifest">\r
- <and>\r
- <not>\r
- <isset property="has.custom.manifest"/>\r
- </not>\r
- <or>\r
- <isfalse value="${directory.deployment.supported}"/>\r
- <isset property="dist.ear.dir"/>\r
- </or>\r
- </and>\r
- </condition>\r
- <condition property="do.tmp.war.package">\r
- <or>\r
- <isfalse value="${directory.deployment.supported}"/>\r
- <isset property="dist.ear.dir"/>\r
- </or>\r
- </condition>\r
- <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>\r
- <condition else="" property="application.args.param" value="${application.args}">\r
- <and>\r
- <isset property="application.args"/>\r
- <not>\r
- <equals arg1="${application.args}" arg2="" trim="true"/>\r
- </not>\r
- </and>\r
- </condition>\r
- <property name="source.encoding" value="${file.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="runmain.jvmargs" value=""/>\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
- <and>\r
- <isset property="endorsed.classpath"/>\r
- <length length="0" string="${endorsed.classpath}" when="greater"/>\r
- </and>\r
- </condition>\r
- <condition else="false" property="jdkBug6558476">\r
- <and>\r
- <matches pattern="1\.[56]" string="${java.specification.version}"/>\r
- <not>\r
- <os family="unix"/>\r
- </not>\r
- </and>\r
- </condition>\r
- <property name="javac.fork" value="${jdkBug6558476}"/>\r
- </target>\r
- <target depends="init" name="-init-cos" unless="deploy.on.save">\r
- <condition property="deploy.on.save" value="true">\r
- <or>\r
- <istrue value="${j2ee.deploy.on.save}"/>\r
- <istrue value="${j2ee.compile.on.save}"/>\r
- </or>\r
- </condition>\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="build.web.dir">Must set build.web.dir</fail>\r
- <fail unless="build.generated.dir">Must set build.generated.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.war">Must set dist.war</fail>\r
- <condition property="missing.j2ee.server.home">\r
- <and>\r
- <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>\r
- <not>\r
- <isset property="j2ee.server.home"/>\r
- </not>\r
- </and>\r
- </condition>\r
- <fail if="missing.j2ee.server.home">\r
-The Java EE server classpath is not correctly set up - server home directory is missing.\r
-Either open the project in the IDE and assign the server or setup the server classpath manually.\r
-For example like this:\r
- ant -Dj2ee.server.home=<app_server_installation_directory>\r
- </fail>\r
- <fail unless="j2ee.platform.classpath">\r
-The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.\r
-Either open the project in the IDE and assign the server or setup the server classpath manually.\r
-For example like this:\r
- ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)\r
-or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)\r
- </fail>\r
- </target>\r
- <target name="-init-macrodef-property">\r
- <macrodef name="property" uri="http://www.netbeans.org/ns/web-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/web-project/2">\r
- <attribute default="${src.dir}" name="srcdir"/>\r
- <attribute default="${build.classes.dir}" name="destdir"/>\r
- <attribute default="${javac.classpath}:${j2ee.platform.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="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}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">\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 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/web-project/2">\r
- <attribute default="${src.dir}" name="srcdir"/>\r
- <attribute default="${build.classes.dir}" name="destdir"/>\r
- <attribute default="${javac.classpath}:${j2ee.platform.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="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}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">\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/web-project/2">\r
- <attribute default="${src.dir}" name="srcdir"/>\r
- <attribute default="${build.classes.dir}" name="destdir"/>\r
- <attribute default="${javac.classpath}:${j2ee.platform.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/web-project/2">\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 file="${javac.includesfile.binary}"/>\r
- </sequential>\r
- </macrodef>\r
- </target>\r
- <target name="-init-macrodef-junit">\r
- <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">\r
- <attribute default="${includes}" name="includes"/>\r
- <attribute default="${excludes}" name="excludes"/>\r
- <attribute default="**" name="testincludes"/>\r
- <sequential>\r
- <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">\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}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.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="${runmain.jvmargs}"/>\r
- </junit>\r
- </sequential>\r
- </macrodef>\r
- </target>\r
- <target name="-init-macrodef-java">\r
- <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">\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}" fork="true">\r
- <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
- <jvmarg line="${runmain.jvmargs}"/>\r
- <classpath>\r
- <path path="@{classpath}:${j2ee.platform.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-nbjsdebug">\r
- <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">\r
- <attribute default="${client.url}" name="webUrl"/>\r
- <sequential>\r
- <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>\r
- </sequential>\r
- </macrodef>\r
- </target>\r
- <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
- <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">\r
- <attribute default="${main.class}" name="name"/>\r
- <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
- <sequential>\r
- <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">\r
- <classpath>\r
- <path path="@{classpath}"/>\r
- </classpath>\r
- </nbjpdastart>\r
- </sequential>\r
- </macrodef>\r
- <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-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
- <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">\r
- <sequential>\r
- <nbjpdaappreloaded/>\r
- </sequential>\r
- </macrodef>\r
- </target>\r
- <target name="-init-debug-args">\r
- <property name="version-output" value="java version "${ant.java.version}"/>\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/web-project/1">\r
- <attribute default="${main.class}" name="classname"/>\r
- <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
- <attribute default="${application.args.param}" name="args"/>\r
- <element name="customize" optional="true"/>\r
- <sequential>\r
- <java classname="@{classname}" fork="true">\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 line="${runmain.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
- <arg line="@{args}"/>\r
- <customize/>\r
- </java>\r
- </sequential>\r
- </macrodef>\r
- </target>\r
- <target name="-init-taskdefs">\r
- <fail unless="libs.CopyLibs.classpath">\r
-The libs.CopyLibs.classpath property is not set up.\r
-This property must point to \r
-org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part\r
-of NetBeans IDE installation and is usually located at \r
-<netbeans_installation>/java<version>/ant/extra folder.\r
-Either open the project in the IDE and make sure CopyLibs library\r
-exists or setup the property manually. For example like this:\r
- ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar\r
- </fail>\r
- <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>\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.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="-profile-pre-init, init, -profile-post-init, -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 depends="-profile-pre-init, init, -profile-post-init" 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="-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-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>\r
- <!--\r
- COMPILATION SECTION\r
- -->\r
- <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>\r
- <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>\r
- <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>\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 name="-copy-webdir">\r
- <copy todir="${build.web.dir}">\r
- <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>\r
- </copy>\r
- <copy todir="${build.web.dir}/WEB-INF">\r
- <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>\r
- </copy>\r
- </target>\r
- <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">\r
- <webproject2:javac destdir="${build.classes.dir}" 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.custom.manifest" name="-copy-manifest">\r
- <mkdir dir="${build.meta.inf.dir}"/>\r
- <copy todir="${build.meta.inf.dir}">\r
- <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>\r
- </copy>\r
- </target>\r
- <target if="has.persistence.xml" name="-copy-persistence-xml">\r
- <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>\r
- <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">\r
- <fileset dir="${persistence.xml.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,-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
- <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>\r
- <copy todir="${build.classes.dir}">\r
- <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
- </copy>\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,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>\r
- <property name="jspc.schemas" value="/resources/schemas/"/>\r
- <property name="jspc.dtds" value="/resources/dtds/"/>\r
- <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">\r
- <mkdir dir="${build.generated.dir}/src"/>\r
- <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">\r
- <arg value="-uriroot"/>\r
- <arg file="${basedir}/${build.web.dir}"/>\r
- <arg value="-d"/>\r
- <arg file="${basedir}/${build.generated.dir}/src"/>\r
- <arg value="-die1"/>\r
- <arg value="-schemas ${jspc.schemas}"/>\r
- <arg value="-dtds ${jspc.dtds}"/>\r
- <arg value="-compilerSourceVM ${javac.source}"/>\r
- <arg value="-compilerTargetVM ${javac.target}"/>\r
- <arg value="-javaEncoding ${source.encoding}"/>\r
- <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>\r
- <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>\r
- </java>\r
- <mkdir dir="${build.generated.dir}/classes"/>\r
- <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>\r
- </target>\r
- <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">\r
- <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>\r
- <mkdir dir="${build.generated.dir}/src"/>\r
- <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">\r
- <arg value="-uriroot"/>\r
- <arg file="${basedir}/${build.web.dir}"/>\r
- <arg value="-d"/>\r
- <arg file="${basedir}/${build.generated.dir}/src"/>\r
- <arg value="-die1"/>\r
- <arg value="-schemas ${jspc.schemas}"/>\r
- <arg value="-dtds ${jspc.dtds}"/>\r
- <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>\r
- <arg value="-jspc.files"/>\r
- <arg path="${jsp.includes}"/>\r
- <arg value="-compilerSourceVM ${javac.source}"/>\r
- <arg value="-compilerTargetVM ${javac.target}"/>\r
- <arg value="-javaEncoding ${source.encoding}"/>\r
- <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>\r
- </java>\r
- <mkdir dir="${build.generated.dir}/classes"/>\r
- <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">\r
- <customize>\r
- <patternset includes="${javac.jsp.includes}"/>\r
- </customize>\r
- </webproject2:javac>\r
- </target>\r
- <target name="compile-single-jsp">\r
- <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>\r
- <antcall target="-do-compile-single-jsp"/>\r
- </target>\r
- <!--\r
- DIST BUILDING SECTION\r
- -->\r
- <target name="-pre-dist">\r
- <!-- Empty placeholder for easier customization. -->\r
- <!-- You can override this target in the ../build.xml file. -->\r
- </target>\r
- <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">\r
- <dirname file="${dist.war}" property="dist.jar.dir"/>\r
- <mkdir dir="${dist.jar.dir}"/>\r
- <jar compress="${jar.compress}" jarfile="${dist.war}">\r
- <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>\r
- </jar>\r
- </target>\r
- <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">\r
- <dirname file="${dist.war}" property="dist.jar.dir"/>\r
- <mkdir dir="${dist.jar.dir}"/>\r
- <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">\r
- <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>\r
- </jar>\r
- </target>\r
- <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">\r
- <dirname file="${dist.war}" property="dist.jar.dir"/>\r
- <mkdir dir="${dist.jar.dir}"/>\r
- <jar compress="${jar.compress}" jarfile="${dist.war}">\r
- <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>\r
- </jar>\r
- </target>\r
- <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">\r
- <dirname file="${dist.war}" property="dist.jar.dir"/>\r
- <mkdir dir="${dist.jar.dir}"/>\r
- <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">\r
- <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>\r
- </jar>\r
- </target>\r
- <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>\r
- <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">\r
- <copyfiles files="${libs.hibernate-support.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.primefaces-3.1-SNAPSHOT.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.commons-fileupload-1.2.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.commons-io-2.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.commons-lang3-3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.commons-logging-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.icu4j-3.8.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.javahelp-2.0.02.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jpf-1.5.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.junit-4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.log4j-1.2.12.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.logkit-1.0.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.xalan-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <copyfiles files="${file.reference.jade.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
- <mkdir dir="${build.web.dir}/META-INF"/>\r
- <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>\r
- </target>\r
- <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">\r
- <copyfiles files="${libs.hibernate-support.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.primefaces-3.1-SNAPSHOT.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.commons-fileupload-1.2.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.commons-io-2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.commons-lang3-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.icu4j-3.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.javahelp-2.0.02.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jpf-1.5.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.junit-4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.log4j-1.2.12.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.logkit-1.0.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.xalan-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- <copyfiles files="${file.reference.jade.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
- </target>\r
- <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">\r
- <delete dir="${build.web.dir}/WEB-INF/lib"/>\r
- </target>\r
- <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">\r
- <dirname file="${dist.ear.war}" property="dist.jar.dir"/>\r
- <mkdir dir="${dist.jar.dir}"/>\r
- <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">\r
- <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>\r
- </jar>\r
- </target>\r
- <target name="-post-dist">\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-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>\r
- <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>\r
- <!--\r
- EXECUTION SECTION\r
- -->\r
- <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>\r
- <target name="-pre-run-deploy">\r
- <!-- Empty placeholder for easier customization. -->\r
- <!-- You can override this target in the ../build.xml file. -->\r
- </target>\r
- <target name="-post-run-deploy">\r
- <!-- Empty placeholder for easier customization. -->\r
- <!-- You can override this target in the ../build.xml file. -->\r
- </target>\r
- <target name="-pre-nbmodule-run-deploy">\r
- <!-- Empty placeholder for easier customization. -->\r
- <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->\r
- </target>\r
- <target name="-post-nbmodule-run-deploy">\r
- <!-- Empty placeholder for easier customization. -->\r
- <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->\r
- </target>\r
- <target name="-run-deploy-am">\r
- <!-- Task to deploy to the Access Manager runtime. -->\r
- </target>\r
- <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/>\r
- <target if="netbeans.home" name="-run-deploy-nb">\r
- <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>\r
- </target>\r
- <target name="-init-deploy-ant" unless="netbeans.home">\r
- <property name="deploy.ant.archive" value="${dist.war}"/>\r
- <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>\r
- <property name="deploy.ant.resource.dir" value="${resource.dir}"/>\r
- <property name="deploy.ant.enabled" value="true"/>\r
- </target>\r
- <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>\r
- <target if="netbeans.home" name="-run-undeploy-nb">\r
- <fail message="Undeploy is not supported from within the IDE"/>\r
- </target>\r
- <target depends="init,-pre-dist,dist,-post-dist" name="verify">\r
- <nbverify file="${dist.war}"/>\r
- </target>\r
- <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>\r
- <target if="do.display.browser" name="-init-display-browser">\r
- <condition property="do.display.browser.nb">\r
- <isset property="netbeans.home"/>\r
- </condition>\r
- <condition property="do.display.browser.cl">\r
- <isset property="deploy.ant.enabled"/>\r
- </condition>\r
- </target>\r
- <target if="do.display.browser.nb" name="-display-browser-nb">\r
- <nbbrowse url="${client.url}"/>\r
- </target>\r
- <target if="do.display.browser.cl" name="-get-browser" unless="browser">\r
- <condition property="browser" value="rundll32">\r
- <os family="windows"/>\r
- </condition>\r
- <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">\r
- <os family="windows"/>\r
- </condition>\r
- <condition property="browser" value="/usr/bin/open">\r
- <os family="mac"/>\r
- </condition>\r
- <property environment="env"/>\r
- <condition property="browser" value="${env.BROWSER}">\r
- <isset property="env.BROWSER"/>\r
- </condition>\r
- <condition property="browser" value="/usr/bin/firefox">\r
- <available file="/usr/bin/firefox"/>\r
- </condition>\r
- <condition property="browser" value="/usr/local/firefox/firefox">\r
- <available file="/usr/local/firefox/firefox"/>\r
- </condition>\r
- <condition property="browser" value="/usr/bin/mozilla">\r
- <available file="/usr/bin/mozilla"/>\r
- </condition>\r
- <condition property="browser" value="/usr/local/mozilla/mozilla">\r
- <available file="/usr/local/mozilla/mozilla"/>\r
- </condition>\r
- <condition property="browser" value="/usr/sfw/lib/firefox/firefox">\r
- <available file="/usr/sfw/lib/firefox/firefox"/>\r
- </condition>\r
- <condition property="browser" value="/opt/csw/bin/firefox">\r
- <available file="/opt/csw/bin/firefox"/>\r
- </condition>\r
- <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">\r
- <available file="/usr/sfw/lib/mozilla/mozilla"/>\r
- </condition>\r
- <condition property="browser" value="/opt/csw/bin/mozilla">\r
- <available file="/opt/csw/bin/mozilla"/>\r
- </condition>\r
- </target>\r
- <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">\r
- <fail unless="browser">\r
- Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.\r
- </fail>\r
- <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>\r
- <echo>Launching ${browse.url}</echo>\r
- <exec executable="${browser}" spawn="true">\r
- <arg line="${browser.args} ${browse.url}"/>\r
- </exec>\r
- </target>\r
- <target depends="init,-init-cos,compile-single" name="run-main">\r
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
- <webproject1:java classname="${run.class}"/>\r
- </target>\r
- <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">\r
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
- <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
- </target>\r
- <target depends="init" if="netbeans.home" name="-do-update-breakpoints">\r
- <webproject1:nbjpdaappreloaded/>\r
- </target>\r
- <!--\r
- DEBUGGING SECTION\r
- -->\r
- <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">\r
- <nbstartserver debugmode="true"/>\r
- <antcall target="connect-debugger"/>\r
- <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>\r
- <antcall target="debug-display-browser"/>\r
- <antcall target="connect-client-debugger"/>\r
- </target>\r
- <target if="do.debug.server" name="connect-debugger" unless="is.debugged">\r
- <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">\r
- <classpath>\r
- <path path="${debug.classpath}:${j2ee.platform.classpath}"/>\r
- </classpath>\r
- <sourcepath>\r
- <path path="${web.docbase.dir}"/>\r
- </sourcepath>\r
- </nbjpdaconnect>\r
- </target>\r
- <target if="do.display.browser.debug" name="debug-display-browser">\r
- <nbbrowse url="${client.url}"/>\r
- </target>\r
- <target if="do.debug.client" name="connect-client-debugger">\r
- <webproject1:nbjsdebugstart webUrl="${client.url}"/>\r
- </target>\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
- <webproject1: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,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>\r
- <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
- <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
- </target>\r
- <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
- <webproject1:nbjpdastart name="${debug.class}"/>\r
- </target>\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
- <webproject1: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-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
- <webproject1: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 description="Profile a J2EE project in the IDE." name="profile">\r
- <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">\r
- <isset property="profiler.info.jvmargs.extra"/>\r
- </condition>\r
- <antcall target="${profiler.startserver.target}"/>\r
- <antcall target="run"/>\r
- <antcall target="start-loadgen"/>\r
- </target>\r
- <target name="start-profiled-server">\r
- <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">\r
- <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
- <jvmarg value="${profiler.j2ee.agentID}"/>\r
- </nbstartprofiledserver>\r
- </target>\r
- <target name="start-profiled-server-extraargs">\r
- <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">\r
- <jvmarg value="${profiler.info.jvmargs.extra}"/>\r
- <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
- <jvmarg value="${profiler.j2ee.agentID}"/>\r
- </nbstartprofiledserver>\r
- </target>\r
- <target if="profiler.loadgen.path" name="start-loadgen">\r
- <loadgenstart path="${profiler.loadgen.path}"/>\r
- </target>\r
- <!--\r
- JAVADOC SECTION\r
- -->\r
- <target depends="init" if="have.sources" name="javadoc-build">\r
- <mkdir dir="${dist.javadoc.dir}"/>\r
- <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" 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}:${j2ee.platform.classpath}"/>\r
- </classpath>\r
- <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
- <filename name="**/*.java"/>\r
- </fileset>\r
- <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
- <include name="**/*.java"/>\r
- </fileset>\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
- <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">\r
- <mkdir dir="${build.test.classes.dir}"/>\r
- <property name="j2ee.platform.embeddableejb.classpath" value=""/>\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 depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">\r
- <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.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">\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,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
- <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" 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
- <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
- <webproject2: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
- <webproject2: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
- <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
- <!-- must exist, otherwise the XML formatter would fail -->\r
- <mkdir dir="${build.test.results.dir}"/>\r
- <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">\r
- <customize>\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
- </webproject1:debug>\r
- </target>\r
- <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
- <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
- </target>\r
- <target depends="init,compile-test,-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
- <webproject1: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
- 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
- <path path="${j2ee.platform.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
- <path path="${j2ee.platform.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
- CLEANUP SECTION\r
- -->\r
- <target depends="init" name="deps-clean" unless="no.deps"/>\r
- <target depends="init" name="do-clean">\r
- <condition property="build.dir.to.clean" value="${build.web.dir}">\r
- <isset property="dist.ear.dir"/>\r
- </condition>\r
- <property name="build.dir.to.clean" value="${build.web.dir}"/>\r
- <delete includeEmptyDirs="true" quiet="true">\r
- <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>\r
- </delete>\r
- <delete dir="${build.dir}"/>\r
- <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>\r
- <delete dir="${dist.dir}"/>\r
- </target>\r
- <target depends="do-clean" if="status.clean-failed" name="check-clean">\r
- <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>\r
- <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>\r
- </target>\r
- <target depends="init" if="netbeans.home" name="undeploy-clean">\r
- <nbundeploy failOnError="false" startServer="false"/>\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,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>\r
- <target depends="clean" description="Clean build products." name="clean-ear"/>\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *** GENERATED FROM project.xml - DO NOT EDIT ***
+ *** EDIT ../build.xml INSTEAD ***
+
+ For the purpose of easier reading the script
+ is divided into following sections:
+ - initialization
+ - compilation
+ - dist
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - cleanup
+
+ -->
+<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="SimDeCS-impl">
+ <import file="ant-deploy.xml"/>
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
+ <target depends="dist,javadoc" description="Build whole project." name="default"/>
+ <!--
+ INITIALIZATION SECTION
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private" name="-init-user">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <condition property="have.tests">
+ <or>
+ <available file="${test.src.dir}"/>
+ </or>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="javac.compilerargs" value=""/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <condition property="no.dist.ear.dir">
+ <not>
+ <isset property="dist.ear.dir"/>
+ </not>
+ </condition>
+ <property name="build.web.excludes" value="${build.classes.excludes}"/>
+ <condition property="do.compile.jsps">
+ <istrue value="${compile.jsps}"/>
+ </condition>
+ <condition property="do.debug.server">
+ <or>
+ <not>
+ <isset property="debug.server"/>
+ </not>
+ <istrue value="${debug.server}"/>
+ <and>
+ <not>
+ <istrue value="${debug.server}"/>
+ </not>
+ <not>
+ <istrue value="${debug.client}"/>
+ </not>
+ </and>
+ </or>
+ </condition>
+ <condition property="do.debug.client">
+ <istrue value="${debug.client}"/>
+ </condition>
+ <condition property="do.display.browser">
+ <istrue value="${display.browser}"/>
+ </condition>
+ <condition property="do.display.browser.debug">
+ <and>
+ <isset property="do.display.browser"/>
+ <not>
+ <isset property="do.debug.client"/>
+ </not>
+ </and>
+ </condition>
+ <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
+ <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
+ <condition property="do.war.package.with.custom.manifest">
+ <isset property="has.custom.manifest"/>
+ </condition>
+ <condition property="do.war.package.without.custom.manifest">
+ <not>
+ <isset property="has.custom.manifest"/>
+ </not>
+ </condition>
+ <condition property="do.tmp.war.package.with.custom.manifest">
+ <and>
+ <isset property="has.custom.manifest"/>
+ <or>
+ <isfalse value="${directory.deployment.supported}"/>
+ <isset property="dist.ear.dir"/>
+ </or>
+ </and>
+ </condition>
+ <condition property="do.tmp.war.package.without.custom.manifest">
+ <and>
+ <not>
+ <isset property="has.custom.manifest"/>
+ </not>
+ <or>
+ <isfalse value="${directory.deployment.supported}"/>
+ <isset property="dist.ear.dir"/>
+ </or>
+ </and>
+ </condition>
+ <condition property="do.tmp.war.package">
+ <or>
+ <isfalse value="${directory.deployment.supported}"/>
+ <isset property="dist.ear.dir"/>
+ </or>
+ </condition>
+ <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
+ <condition else="" property="application.args.param" value="${application.args}">
+ <and>
+ <isset property="application.args"/>
+ <not>
+ <equals arg1="${application.args}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="runmain.jvmargs" value=""/>
+ <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+ <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+ <and>
+ <isset property="endorsed.classpath"/>
+ <length length="0" string="${endorsed.classpath}" when="greater"/>
+ </and>
+ </condition>
+ <condition else="false" property="jdkBug6558476">
+ <and>
+ <matches pattern="1\.[56]" string="${java.specification.version}"/>
+ <not>
+ <os family="unix"/>
+ </not>
+ </and>
+ </condition>
+ <property name="javac.fork" value="${jdkBug6558476}"/>
+ </target>
+ <target depends="init" name="-init-cos" unless="deploy.on.save">
+ <condition property="deploy.on.save" value="true">
+ <or>
+ <istrue value="${j2ee.deploy.on.save}"/>
+ <istrue value="${j2ee.compile.on.save}"/>
+ </or>
+ </condition>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="build.web.dir">Must set build.web.dir</fail>
+ <fail unless="build.generated.dir">Must set build.generated.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.war">Must set dist.war</fail>
+ <condition property="missing.j2ee.server.home">
+ <and>
+ <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>
+ <not>
+ <isset property="j2ee.server.home"/>
+ </not>
+ </and>
+ </condition>
+ <fail if="missing.j2ee.server.home">
+The Java EE server classpath is not correctly set up - server home directory is missing.
+Either open the project in the IDE and assign the server or setup the server classpath manually.
+For example like this:
+ ant -Dj2ee.server.home=<app_server_installation_directory>
+ </fail>
+ <fail unless="j2ee.platform.classpath">
+The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
+Either open the project in the IDE and assign the server or setup the server classpath manually.
+For example like this:
+ ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file)
+or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used)
+ </fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <mkdir dir="@{apgeneratedsrcdir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <compilerarg value="-processorpath"/>
+ <compilerarg path="@{processorpath}:${empty.dir}"/>
+ <compilerarg line="${ap.processors.internal}"/>
+ <compilerarg value="-s"/>
+ <compilerarg path="@{apgeneratedsrcdir}"/>
+ <compilerarg line="${ap.proc.none.internal}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
+ <attribute default="${javac.processorpath}" name="processorpath"/>
+ <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="${empty.dir}" name="gensrcdir"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <property location="${build.dir}/empty" name="empty.dir"/>
+ <mkdir dir="${empty.dir}"/>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
+ <src>
+ <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+ <include name="*"/>
+ </dirset>
+ </src>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+ <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
+ <delete>
+ <files includesfile="${javac.includesfile.binary}"/>
+ </delete>
+ <delete file="${javac.includesfile.binary}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
+ <sequential>
+ <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
+ <batchtest todir="${build.test.results.dir}">
+ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+ <filename name="@{testincludes}"/>
+ </fileset>
+ </batchtest>
+ <classpath>
+ <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg value="-ea"/>
+ <jvmarg line="${runmain.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg line="${runmain.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjsdebug">
+ <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute default="${client.url}" name="webUrl"/>
+ <sequential>
+ <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
+ <sequential>
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute default="${build.classes.dir}" name="dir"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset dir="@{dir}" includes="${fix.classes}">
+ <include name="${fix.includes}*.class"/>
+ </fileset>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
+ <sequential>
+ <nbjpdaappreloaded/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+ <os family="windows"/>
+ </condition>
+ <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+ <isset property="debug.transport"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
+ <attribute default="${application.args.param}" name="args"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" fork="true">
+ <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
+ <jvmarg line="${runmain.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg line="@{args}"/>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-taskdefs">
+ <fail unless="libs.CopyLibs.classpath">
+The libs.CopyLibs.classpath property is not set up.
+This property must point to
+org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
+of NetBeans IDE installation and is usually located at
+<netbeans_installation>/java<version>/ant/extra folder.
+Either open the project in the IDE and make sure CopyLibs library
+exists or setup the property manually. For example like this:
+ ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
+ </fail>
+ <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
+ </target>
+ <target name="-init-ap-cmdline-properties">
+ <property name="annotation.processing.enabled" value="true"/>
+ <property name="annotation.processing.processors.list" value=""/>
+ <property name="annotation.processing.run.all.processors" value="true"/>
+ <property name="javac.processorpath" value="${javac.classpath}"/>
+ <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
+ <condition property="ap.supported.internal" value="true">
+ <not>
+ <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
+ </not>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
+ <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
+ <isfalse value="${annotation.processing.run.all.processors}"/>
+ </condition>
+ <condition else="" property="ap.proc.none.internal" value="-proc:none">
+ <isfalse value="${annotation.processing.enabled}"/>
+ </condition>
+ </target>
+ <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
+ <property name="ap.cmd.line.internal" value=""/>
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
+ <target name="-profile-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-profile-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
+ <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+ <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+ </target>
+ <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-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>
+ <!--
+ COMPILATION SECTION
+ -->
+ <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
+ <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
+ <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-copy-webdir">
+ <copy todir="${build.web.dir}">
+ <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ <copy todir="${build.web.dir}/WEB-INF">
+ <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
+ </copy>
+ </target>
+ <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
+ <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target if="has.custom.manifest" name="-copy-manifest">
+ <mkdir dir="${build.meta.inf.dir}"/>
+ <copy todir="${build.meta.inf.dir}">
+ <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
+ </copy>
+ </target>
+ <target if="has.persistence.xml" name="-copy-persistence-xml">
+ <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
+ <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
+ <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <property name="jspc.schemas" value="/resources/schemas/"/>
+ <property name="jspc.dtds" value="/resources/dtds/"/>
+ <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
+ <mkdir dir="${build.generated.dir}/src"/>
+ <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
+ <arg value="-uriroot"/>
+ <arg file="${basedir}/${build.web.dir}"/>
+ <arg value="-d"/>
+ <arg file="${basedir}/${build.generated.dir}/src"/>
+ <arg value="-die1"/>
+ <arg value="-schemas ${jspc.schemas}"/>
+ <arg value="-dtds ${jspc.dtds}"/>
+ <arg value="-compilerSourceVM ${javac.source}"/>
+ <arg value="-compilerTargetVM ${javac.target}"/>
+ <arg value="-javaEncoding ${source.encoding}"/>
+ <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
+ <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
+ </java>
+ <mkdir dir="${build.generated.dir}/classes"/>
+ <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
+ </target>
+ <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
+ <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
+ <mkdir dir="${build.generated.dir}/src"/>
+ <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
+ <arg value="-uriroot"/>
+ <arg file="${basedir}/${build.web.dir}"/>
+ <arg value="-d"/>
+ <arg file="${basedir}/${build.generated.dir}/src"/>
+ <arg value="-die1"/>
+ <arg value="-schemas ${jspc.schemas}"/>
+ <arg value="-dtds ${jspc.dtds}"/>
+ <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>
+ <arg value="-jspc.files"/>
+ <arg path="${jsp.includes}"/>
+ <arg value="-compilerSourceVM ${javac.source}"/>
+ <arg value="-compilerTargetVM ${javac.target}"/>
+ <arg value="-javaEncoding ${source.encoding}"/>
+ <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>
+ </java>
+ <mkdir dir="${build.generated.dir}/classes"/>
+ <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
+ <customize>
+ <patternset includes="${javac.jsp.includes}"/>
+ </customize>
+ </webproject2:javac>
+ </target>
+ <target name="compile-single-jsp">
+ <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
+ <antcall target="-do-compile-single-jsp"/>
+ </target>
+ <!--
+ DIST BUILDING SECTION
+ -->
+ <target name="-pre-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
+ <dirname file="${dist.war}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar compress="${jar.compress}" jarfile="${dist.war}">
+ <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
+ </jar>
+ </target>
+ <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
+ <dirname file="${dist.war}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
+ <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
+ </jar>
+ </target>
+ <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
+ <dirname file="${dist.war}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar compress="${jar.compress}" jarfile="${dist.war}">
+ <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
+ </jar>
+ </target>
+ <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
+ <dirname file="${dist.war}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
+ <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
+ </jar>
+ </target>
+ <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
+ <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
+ <copyfiles files="${libs.hibernate-support.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.primefaces-3.1-SNAPSHOT.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.commons-fileupload-1.2.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.commons-io-2.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.commons-lang3-3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.commons-logging-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.icu4j-3.8.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.javahelp-2.0.02.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jpf-1.5.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.junit-4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.log4j-1.2.12.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.logkit-1.0.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.xalan-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <copyfiles files="${file.reference.jade.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+ <mkdir dir="${build.web.dir}/META-INF"/>
+ <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
+ </target>
+ <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
+ <copyfiles files="${libs.hibernate-support.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.primefaces-3.1-SNAPSHOT.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.commons-fileupload-1.2.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.commons-io-2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.commons-lang3-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.icu4j-3.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.javahelp-2.0.02.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jpf-1.5.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.junit-4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.log4j-1.2.12.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.logkit-1.0.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.xalan-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ <copyfiles files="${file.reference.jade.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+ </target>
+ <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
+ <delete dir="${build.web.dir}/WEB-INF/lib"/>
+ </target>
+ <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
+ <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
+ <fileset dir="${build.web.dir}" excludes="WEB-INF/classes/.netbeans_*"/>
+ </jar>
+ </target>
+ <target name="-post-dist">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
+ <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
+ <!--
+ EXECUTION SECTION
+ -->
+ <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
+ <target name="-pre-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-post-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-pre-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
+ </target>
+ <target name="-post-nbmodule-run-deploy">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
+ </target>
+ <target name="-run-deploy-am">
+ <!-- Task to deploy to the Access Manager runtime. -->
+ </target>
+ <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/>
+ <target if="netbeans.home" name="-run-deploy-nb">
+ <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
+ </target>
+ <target name="-init-deploy-ant" unless="netbeans.home">
+ <property name="deploy.ant.archive" value="${dist.war}"/>
+ <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
+ <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
+ <property name="deploy.ant.enabled" value="true"/>
+ </target>
+ <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
+ <target if="netbeans.home" name="-run-undeploy-nb">
+ <fail message="Undeploy is not supported from within the IDE"/>
+ </target>
+ <target depends="init,-pre-dist,dist,-post-dist" name="verify">
+ <nbverify file="${dist.war}"/>
+ </target>
+ <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
+ <target if="do.display.browser" name="-init-display-browser">
+ <condition property="do.display.browser.nb">
+ <isset property="netbeans.home"/>
+ </condition>
+ <condition property="do.display.browser.cl">
+ <isset property="deploy.ant.enabled"/>
+ </condition>
+ </target>
+ <target if="do.display.browser.nb" name="-display-browser-nb">
+ <nbbrowse url="${client.url}"/>
+ </target>
+ <target if="do.display.browser.cl" name="-get-browser" unless="browser">
+ <condition property="browser" value="rundll32">
+ <os family="windows"/>
+ </condition>
+ <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/open">
+ <os family="mac"/>
+ </condition>
+ <property environment="env"/>
+ <condition property="browser" value="${env.BROWSER}">
+ <isset property="env.BROWSER"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/firefox">
+ <available file="/usr/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/local/firefox/firefox">
+ <available file="/usr/local/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/bin/mozilla">
+ <available file="/usr/bin/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/local/mozilla/mozilla">
+ <available file="/usr/local/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
+ <available file="/usr/sfw/lib/firefox/firefox"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/firefox">
+ <available file="/opt/csw/bin/firefox"/>
+ </condition>
+ <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
+ <available file="/usr/sfw/lib/mozilla/mozilla"/>
+ </condition>
+ <condition property="browser" value="/opt/csw/bin/mozilla">
+ <available file="/opt/csw/bin/mozilla"/>
+ </condition>
+ </target>
+ <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
+ <fail unless="browser">
+ Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
+ </fail>
+ <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
+ <echo>Launching ${browse.url}</echo>
+ <exec executable="${browser}" spawn="true">
+ <arg line="${browser.args} ${browse.url}"/>
+ </exec>
+ </target>
+ <target depends="init,-init-cos,compile-single" name="run-main">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <webproject1:java classname="${run.class}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
+ </target>
+ <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
+ <webproject1:nbjpdaappreloaded/>
+ </target>
+ <!--
+ DEBUGGING SECTION
+ -->
+ <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
+ <nbstartserver debugmode="true"/>
+ <antcall target="connect-debugger"/>
+ <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
+ <antcall target="debug-display-browser"/>
+ <antcall target="connect-client-debugger"/>
+ </target>
+ <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
+ <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
+ <classpath>
+ <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <path path="${web.docbase.dir}"/>
+ </sourcepath>
+ </nbjpdaconnect>
+ </target>
+ <target if="do.display.browser.debug" name="debug-display-browser">
+ <nbbrowse url="${client.url}"/>
+ </target>
+ <target if="do.debug.client" name="connect-client-debugger">
+ <webproject1:nbjsdebugstart webUrl="${client.url}"/>
+ </target>
+ <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
+ <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
+ <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
+ </target>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+ <webproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <webproject1:debug classname="${debug.class}"/>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
+ <target depends="init" name="-pre-debug-fix">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+ <webproject1:nbjpdareload/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+ <!--
+ =================
+ PROFILING SECTION
+ =================
+ -->
+ <target description="Profile a J2EE project in the IDE." name="profile">
+ <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
+ <isset property="profiler.info.jvmargs.extra"/>
+ </condition>
+ <antcall target="${profiler.startserver.target}"/>
+ <antcall target="run"/>
+ <antcall target="start-loadgen"/>
+ </target>
+ <target name="start-profiled-server">
+ <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg value="${profiler.j2ee.agentID}"/>
+ </nbstartprofiledserver>
+ </target>
+ <target name="start-profiled-server-extraargs">
+ <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
+ <jvmarg value="${profiler.info.jvmargs.extra}"/>
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg value="${profiler.j2ee.agentID}"/>
+ </nbstartprofiledserver>
+ </target>
+ <target if="profiler.loadgen.path" name="start-loadgen">
+ <loadgenstart path="${profiler.loadgen.path}"/>
+ </target>
+ <!--
+ JAVADOC SECTION
+ -->
+ <target depends="init" if="have.sources" name="javadoc-build">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" 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}">
+ <classpath>
+ <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
+ </classpath>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ <copy todir="${dist.javadoc.dir}">
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/doc-files/**"/>
+ </fileset>
+ <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+ <include name="**/doc-files/**"/>
+ </fileset>
+ </copy>
+ </target>
+ <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
+ <!--
+
+ JUNIT COMPILATION SECTION
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+ <mkdir dir="${build.test.classes.dir}"/>
+ <property name="j2ee.platform.embeddableejb.classpath" value=""/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
+ <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
+ <copy todir="${build.test.classes.dir}">
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+ <!--
+
+ JUNIT EXECUTION SECTION
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <webproject2:junit testincludes="**/*Test.java"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <webproject2:junit excludes="" includes="${test.includes}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+ <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+ </target>
+ <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"/>
+ <!--
+
+ JUNIT DEBUGGING SECTION
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <!-- must exist, otherwise the XML formatter would fail -->
+ <mkdir dir="${build.test.results.dir}"/>
+ <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
+ <customize>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
+ </customize>
+ </webproject1:debug>
+ </target>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+ </target>
+ <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+ <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+ <!--
+ =========================
+ TESTS PROFILING SECTION
+ =========================
+ -->
+ <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
+ <nbprofiledirect>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ <path path="${j2ee.platform.classpath}"/>
+ </classpath>
+ </nbprofiledirect>
+ <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
+ <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+ <jvmarg value="${profiler.info.jvmargs.agent}"/>
+ <jvmarg line="${profiler.info.jvmargs}"/>
+ <test name="${profile.class}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ <path path="${j2ee.platform.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ </junit>
+ </target>
+ <!--
+
+ CLEANUP SECTION
+ -->
+ <target depends="init" name="deps-clean" unless="no.deps"/>
+ <target depends="init" name="do-clean">
+ <condition property="build.dir.to.clean" value="${build.web.dir}">
+ <isset property="dist.ear.dir"/>
+ </condition>
+ <property name="build.dir.to.clean" value="${build.web.dir}"/>
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
+ </delete>
+ <delete dir="${build.dir}"/>
+ <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target depends="do-clean" if="status.clean-failed" name="check-clean">
+ <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
+ <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
+ </target>
+ <target depends="init" if="netbeans.home" name="undeploy-clean">
+ <nbundeploy failOnError="false" startServer="false"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
+ <target depends="clean" description="Clean build products." name="clean-ear"/>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Scene Scope="Project" version="2">
+ <Scope Scope="Faces Configuration Only"/>
+ <Scope Scope="Project">
+ <Node id="editarcasos/selecioneCaso.xhtml" x="650" y="150" zoom="true"/>
+ <Node id="rede/tabelaRespostas.xhtml" x="150" y="150" zoom="true"/>
+ <Node id="editarcasos/editarCaso.xhtml" x="400" y="150" zoom="true"/>
+ <Node id="login.xhtml" x="900" y="150" zoom="true"/>
+ <Node id="rede/index.xhtml" x="1150" y="150" zoom="true"/>
+ <Node id="teste2.xhtml" x="900" y="300" zoom="true"/>
+ <Node id="simulador/index.html" x="400" y="300" zoom="true"/>
+ <Node id="rede/tabelaNodos.xhtml" x="650" y="300" zoom="true"/>
+ <Node id="rede/editarRede.xhtml" x="150" y="450" zoom="true"/>
+ <Node id="rede/tabelaRede.xhtml" x="150" y="600" zoom="true"/>
+ <Node id="teste.jsp" x="150" y="300" zoom="true"/>
+ <Node id="rede/tabelaPerguntas.xhtml" x="400" y="450" zoom="true"/>
+ </Scope>
+ <Scope Scope="All Faces Configurations"/>
+</Scene>
-build.xml.data.CRC32=9cef979c\r
-build.xml.script.CRC32=9f680c47\r
-build.xml.stylesheet.CRC32=651128d4@1.36.1.1\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=9cef979c\r
-nbproject/build-impl.xml.script.CRC32=9fe94479\r
-nbproject/build-impl.xml.stylesheet.CRC32=b7883b1f@1.36.1.1\r
+build.xml.data.CRC32=9cef979c
+build.xml.script.CRC32=9f680c47
+build.xml.stylesheet.CRC32=651128d4@1.36.1.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=9cef979c
+nbproject/build-impl.xml.script.CRC32=9fe94479
+nbproject/build-impl.xml.stylesheet.CRC32=b7883b1f@1.36.1.1
j2ee.compile.on.save=true
j2ee.deploy.on.save=true
j2ee.platform=1.6-web
-j2ee.platform.classpath=${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/jstl-impl.jar
+j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.home}/modules/javax.jms.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.el-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.faces.jar
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.ejb.jar
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project xmlns="http://www.netbeans.org/ns/project/1">\r
- <type>org.netbeans.modules.web.project</type>\r
- <configuration>\r
- <data xmlns="http://www.netbeans.org/ns/web-project/3">\r
- <name>SimDeCS</name>\r
- <minimum-ant-version>1.6.5</minimum-ant-version>\r
- <web-module-libraries>\r
- <library dirs="200">\r
- <file>${libs.hibernate-support.classpath}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.primefaces-3.1-SNAPSHOT.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.avalon-framework-4.1.3.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.commons-fileupload-1.2.2.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.commons-io-2.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.commons-lang3-3.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.commons-logging-1.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.icu4j-3.8.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.javahelp-2.0.02.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jaxme2-0.5.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jaxme2-rt-0.5.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jaxmeapi-0.5.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jaxmejs-0.5.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jaxmexs-0.5.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jpf-1.5.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.junit-4.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.log4j-1.2.12.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.logkit-1.0.1.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.unbbayes-4.10.4-1s.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.xalan-2.7.0.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.xml-apis-1.0.b2.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- <library dirs="200">\r
- <file>${file.reference.jade.jar}</file>\r
- <path-in-war>WEB-INF/lib</path-in-war>\r
- </library>\r
- </web-module-libraries>\r
- <web-module-additional-libraries/>\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
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.web.project</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/web-project/3">
+ <name>SimDeCS</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <web-module-libraries>
+ <library dirs="200">
+ <file>${libs.hibernate-support.classpath}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.primefaces-3.1-SNAPSHOT.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.avalon-framework-4.1.3.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.commons-fileupload-1.2.2.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.commons-io-2.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.commons-lang3-3.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.commons-logging-1.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.icu4j-3.8.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.javahelp-2.0.02.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jaxme2-0.5.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jaxme2-rt-0.5.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jaxmeapi-0.5.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jaxmejs-0.5.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jaxmexs-0.5.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jpf-1.5.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.junit-4.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.log4j-1.2.12.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.logkit-1.0.1.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.unbbayes-4.10.4-1s.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.xalan-2.7.0.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.xml-apis-1.0.b2.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ <library dirs="200">
+ <file>${file.reference.jade.jar}</file>
+ <path-in-war>WEB-INF/lib</path-in-war>
+ </library>
+ </web-module-libraries>
+ <web-module-additional-libraries/>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots>
+ <root id="test.src.dir"/>
+ </test-roots>
+ </data>
+ </configuration>
+</project>
<class>org.ufcspa.simdecs.entities.TipoEventoLog</class>
<class>org.ufcspa.simdecs.entities.Usuario</class>
<class>org.ufcspa.simdecs.entities.TaticaPedagogica</class>
+ <class>org.ufcspa.simdecs.entities.IntervencaoPedagogica</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
+ <shared-cache-mode>NONE</shared-cache-mode>
<properties>
- <property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
+ <property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence>
out.println("<xml>" );
out.println(" <execucao sucesso=\"nao\" />" );
out.println(" <erro metodo=\"" + this.getServletName() + "\">" );
- out.println(" <parametros>");
Map paramsError = request.getParameterMap();
Iterator iError = paramsError.keySet().iterator();
-
+ StringBuilder parametros = new StringBuilder();
while ( iError.hasNext() )
{
String key = (String) iError.next();
String value = ((String[]) paramsError.get( key ))[ 0 ];
- out.println(" <parametro nome=\"" + key + "\" valor=\"" + value + "\">");
+ parametros.append(";");
+ parametros.append(key);
+ parametros.append(":");
+ parametros.append(value);
}
- out.println(" </parametros>");
- out.println(" <mensagem>");
- out.println(" " + stack2string(e));
- out.println(" </mensagem>");
+ out.println(" <parametros descricao=\"" + parametros.substring(1) + "\" />");
+ out.println(" <mensagem erro=\"" + stack2string(e) + "\" />");
out.println(" </erro>" );
out.println("</xml>" );
out.println("<xml>");
out.println(" <nivel_confianca registrado=\"sim\" />");
- out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+// out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+ out.println(" <resposta_acao_mediador acao=\"nao\" />");
+
out.println(" <execucao sucesso=\"sim\" />" );
-// out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println("</xml>");
}
out.println("<xml>");
out.println(" <nivel_confianca registrado=\"sim\" />");
- out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+// out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+ out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println(" <execucao sucesso=\"sim\" />" );
-// out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println("</xml>");
}
out.println("<xml>");
// out.println(" <grava_historico registrado=\"sim\" />");
- out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+// out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
out.println(" <execucao sucesso=\"sim\" />" );
-// out.println(" <resposta_acao_mediador acao=\"nao\" />");
+ out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println("</xml>");
}
return Long.parseLong(id);
}
- private void registraLog(EntityManager em, SessaoUsuario sessaoUsuario, String pUID, boolean desmarcado) {
+ private String registraLog(EntityManager em, SessaoUsuario sessaoUsuario, String pUID, boolean desmarcado) {
+ String taticaPedagogica=null;
+
// Sintoma vindo de NodoPaciente
if (pUID.toLowerCase().startsWith("sintoma-np-")) {
NodoPaciente nodoPaciente = em.find(NodoPaciente.class, getIdFromUID(pUID, "sintoma-np-"));
log.setPaciente(nodoPaciente.getPaciente());
log.setRede(nodoPaciente.getPaciente().getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.PERGUNTA_SINAL_SINTOMA));
- log.setDescricao("CLICOU SOBRE SINAL/SINTOMA INDICADO PELO PROFESSOR!");
em.persist(log);
em.getTransaction().commit();
+
+ if (nodoPaciente.getNodo().getTaticaPedagogica() != null && nodoPaciente.getNodo().getTaticaPedagogica() != "")
+ taticaPedagogica = nodoPaciente.getNodo().getTaticaPedagogica();
}
// Sintoma vindo de Nodo
log.setRede(paciente.getRede());
log.setPaciente(paciente);
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.PERGUNTA_SINAL_SINTOMA));
- log.setDescricao("CLICOU SOBRE SINAL/SINTOMA NAO INDICADO PELO PROFESSOR!");
em.persist(log);
+ if (nodo.getTaticaPedagogica() != null && nodo.getTaticaPedagogica() != "")
+ taticaPedagogica = nodo.getTaticaPedagogica();
+
em.getTransaction().commit();
}
log.setPaciente(nodoPaciente.getPaciente());
log.setRede(nodoPaciente.getPaciente().getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.SOLICITA_EXAME_FISICO));
- log.setDescricao("CLICOU SOBRE EXAME FISICO INDICADO PELO PROFESSOR!");
em.persist(log);
em.getTransaction().commit();
+
+ if (nodoPaciente.getNodo().getTaticaPedagogica() != null && nodoPaciente.getNodo().getTaticaPedagogica() != "")
+ taticaPedagogica = nodoPaciente.getNodo().getTaticaPedagogica();
}
log.setPaciente(nodoPaciente.getPaciente());
log.setRede(nodoPaciente.getPaciente().getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.SOLICITA_EXAME_COMPLEMENTAR));
- log.setDescricao("CLICOU SOBRE EXAME COMPLEMENTAR INDICADO PELO PROFESSOR!");
em.persist(log);
em.getTransaction().commit();
+
+ if (nodoPaciente.getNodo().getTaticaPedagogica() != null && nodoPaciente.getNodo().getTaticaPedagogica() != "")
+ taticaPedagogica = nodoPaciente.getNodo().getTaticaPedagogica();
}
// Historico médico
if (pUID.toLowerCase().startsWith("historico-medico-")) {
log.setPaciente(paciente);
log.setRede(paciente.getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.PERGUNTA_HISTORICO));
- log.setDescricao("CLICOU SOBRE O HISTORICO INDICADO PELO PROFESSOR!");
em.persist(log);
em.getTransaction().commit();
log.setPaciente(paciente);
log.setRede(paciente.getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.SELECIONA_DIAGNOSTICO));
- log.setDescricao("SELECIONOU O DIAGNOSTICO");
em.persist(log);
em.getTransaction().commit();
+ if (nodo.getTaticaPedagogica() != null && nodo.getTaticaPedagogica() != "")
+ taticaPedagogica = nodo.getTaticaPedagogica();
}
// Conduta
log.setPaciente(paciente);
log.setRede(paciente.getRede());
log.setTipo(em.find(TipoEventoLog.class, TipoEventoLog.SELECIONA_CONDUTA));
- log.setDescricao("SELECIONOU A CONDUTA");
em.persist(log);
em.getTransaction().commit();
+ if (nodo.getTaticaPedagogica() != null && nodo.getTaticaPedagogica() != "")
+ taticaPedagogica = nodo.getTaticaPedagogica();
}
+ return taticaPedagogica;
}
@Override
String pDesmarcado = request.getParameter("desmarcado");
boolean desmarcado = false;
- if (pDesmarcado != null && !pDesmarcado.equals("")) {
+ if (pDesmarcado != null && pDesmarcado.equals("true")) {
desmarcado = true;
}
return;
}
- registraLog(em, sessaoUsuario, pUID, desmarcado);
+ String taticaPedagocica = registraLog(em, sessaoUsuario, pUID, desmarcado);
out.println("<xml>");
//if (isPar)
// out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA ORIGINADO PELO MEDIADOR\" mensagem=\"MENSAGEM A CADA ACAO VINDA DO MEDIADOR\" />");
//else
- out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+ if (taticaPedagocica != null && !taticaPedagocica.equals(""))
+ out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"Problema\" mensagem=\"" + taticaPedagocica + "\" />");
+ else
+ out.println(" <resposta_acao_mediador acao=\"nao\" />");
+
out.println(" <execucao sucesso=\"sim\" />" );
-// out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println("</xml>");
}
import javax.servlet.http.HttpServletResponse;
import org.ufcspa.simdecs.entities.*;
import org.ufcspa.simdecs.util.DbUtil;
-import org.ufcspa.simdecs.util.NodoBean;
-import org.ufcspa.simdecs.util.UnBUtil;
+import org.ufcspa.simdecs.util.UnBBayesUtil;
import unbbayes.prs.bn.ProbabilisticNode;
+import unbbayes.prs.bn.TreeVariable;
/**
*
}
- private String getRespostaNodo(Nodo nodo, Paciente paciente) {
+ private String getRespostaNodo(Nodo nodo, Paciente paciente) throws Exception {
EntityManager em = DbUtil.getInstance().getEntityManager();
- UnBUtil unBUtil = UnBUtil.getInstance(paciente.getRede());
+
+ UnBBayesUtil unBUtil = new UnBBayesUtil(paciente.getRede());
unBUtil.abreRede(paciente.getRede());
Iterator<NodoPaciente> it = em.createQuery("From NodoPaciente Where paciente.id=:pIdPaciente")
continue;
}
- ProbabilisticNode pn = unBUtil.getNodeByName(nodoPac.getNodo().getNome());
- unBUtil.ativarNodo(pn);
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName(nodoPac.getNodo().getNome());
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
}
pcProbabilidade = (int) (1+Math.random()*50);
}
else {
- NodoBean nodoBean = unBUtil.getNodoBeanByNodo(nodo);
- pcProbabilidade = nodoBean.getPercentualProbabilidade();
+ pcProbabilidade = unBUtil.getProbabilidadeByState((TreeVariable) unBUtil.getNodeByName(nodo.getNome()), "Yes") * 100;
}
List <RespostaNodo> respostas = em.createQuery("From RespostaNodo where nodo.id=:pIdNodo")
NegociacaoPedagogica negociacaoPedagogica = new NegociacaoPedagogica(pIdSessao, paciente);
out.println("<xml>");
- out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
-// out.println(" <resposta_acao_mediador acao=\"nao\" />");
+// out.println(" <resposta_acao_mediador acao=\"sim\" problema=\"PROBLEMA: " + this.getClass() + "\" mensagem=\"MENSAGEM:" + this.getClass() + "\" />");
+ out.println(" <resposta_acao_mediador acao=\"nao\" />");
out.println(" <execucao sucesso=\"sim\" />" );
out.println("</xml>");
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Caso)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DependenciaNodo)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof IntervaloTabelaResposta)) {
return false;
}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.ufcspa.simdecs.entities;
+
+import java.io.Serializable;
+import java.util.Date;
+import javax.persistence.*;
+
+/**
+ *
+ * @author maroni
+ */
+@Entity
+@Table(name="Intervencao_Pedagogica", uniqueConstraints={@UniqueConstraint(columnNames={"sessao_id", "estrategia", "resultado"})})
+public class IntervencaoPedagogica implements Serializable {
+
+ @Id
+ @SequenceGenerator(name="seqIntervencaoPedagogica", sequenceName="SQ_INTERVENCAO_PEDAGOGICA")
+ @GeneratedValue(strategy=GenerationType.AUTO, generator="seqIntervencaoPedagogica")
+ private Long id;
+
+ @ManyToOne
+ @JoinColumn(name="sessao_id", nullable=false)
+ private SessaoUsuario sessaoUsuario;
+
+ @Column(length=30, nullable=false)
+ private String estrategia;
+
+ @Column(length=30, nullable=false)
+ private String resultado;
+
+ @ManyToOne
+ @JoinColumn(name="tatica_id", nullable=false)
+ private TaticaPedagogica tatica;
+
+ @Temporal(TemporalType.TIMESTAMP)
+ @Column(nullable=false)
+ private Date dataGeracao;
+
+ @Column(nullable=false)
+ private boolean aplicada;
+
+ public boolean isAplicada() {
+ return aplicada;
+ }
+
+ public void setAplicada(boolean aplicada) {
+ this.aplicada = aplicada;
+ }
+
+ public Date getDataGeracao() {
+ return dataGeracao;
+ }
+
+ public void setDataGeracao(Date dataGeracao) {
+ this.dataGeracao = dataGeracao;
+ }
+
+ public String getEstrategia() {
+ return estrategia;
+ }
+
+ public void setEstrategia(String estrategia) {
+ this.estrategia = estrategia;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getResultado() {
+ return resultado;
+ }
+
+ public void setResultado(String resultado) {
+ this.resultado = resultado;
+ }
+
+ public SessaoUsuario getSessaoUsuario() {
+ return sessaoUsuario;
+ }
+
+ public void setSessaoUsuario(SessaoUsuario sessaoUsuario) {
+ this.sessaoUsuario = sessaoUsuario;
+ }
+
+ public TaticaPedagogica getTatica() {
+ return tatica;
+ }
+
+ public void setTatica(TaticaPedagogica tatica) {
+ this.tatica = tatica;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final IntervencaoPedagogica other = (IntervencaoPedagogica) obj;
+ if (this.sessaoUsuario != other.sessaoUsuario && (this.sessaoUsuario == null || !this.sessaoUsuario.equals(other.sessaoUsuario))) {
+ return false;
+ }
+ if ((this.estrategia == null) ? (other.estrategia != null) : !this.estrategia.equals(other.estrategia)) {
+ return false;
+ }
+ if ((this.resultado == null) ? (other.resultado != null) : !this.resultado.equals(other.resultado)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 5;
+ hash = 43 * hash + (this.sessaoUsuario != null ? this.sessaoUsuario.hashCode() : 0);
+ hash = 43 * hash + (this.estrategia != null ? this.estrategia.hashCode() : 0);
+ hash = 43 * hash + (this.resultado != null ? this.resultado.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public String toString() {
+ return "IntervencaoPedagogica{" + "id=" + id + ", sessaoUsuario=" + sessaoUsuario + ", estrategia=" + estrategia + ", resultado=" + resultado + ", tatica=" + tatica + ", dataGeracao=" + dataGeracao + ", aplicada=" + aplicada + '}';
+ }
+
+ public IntervencaoPedagogica() {
+ }
+
+
+}
@SequenceGenerator(name="seqLog", sequenceName="SQLOG")\r
@GeneratedValue(strategy=GenerationType.AUTO, generator="seqLog")\r
@Column(name = "idlog", nullable=false)\r
- private Integer id;\r
+ private Long id;\r
\r
@Column(nullable=false)\r
@Temporal(TemporalType.TIMESTAMP)\r
this.descricao = descricao;\r
}\r
\r
- public Integer getId() {\r
+ public Long getId() {\r
return id;\r
}\r
\r
- public void setId(Integer id) {\r
+ public void setId(Long id) {\r
this.id = id;\r
}\r
\r
* @author maroni
*/
@Entity
+@NamedQueries( {
+ @NamedQuery(name="Nodo.all", query="From Nodo"),
+ @NamedQuery(name="Nodo.getByTipo", query="From Nodo where tipo=:pTipo")
+ })
public class Nodo implements Serializable, IdHolder, Comparable<Nodo> {
public static final String SINAL_SINTOMA = "SINAL_SINTOMA";
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof NodoPaciente)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Paciente)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Rede)) {
return false;
}
\r
@Override\r
public boolean equals(Object object) {\r
- // TODO: Warning - this method won't work in the case the id fields are not set\r
if (!(object instanceof RedeAluno)) {\r
return false;\r
}\r
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SessaoUsuario)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SinonimoResposta)) {
return false;
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TabelaResposta)) {
return false;
}
package org.ufcspa.simdecs.entities;
import java.io.Serializable;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
+import javax.persistence.*;
/**
*
* @author maroni
*/
@Entity
+@Table(name="Tatica_Pedagogica", uniqueConstraints={@UniqueConstraint(columnNames={"estrategia", "resultado"})})
public class TaticaPedagogica implements Serializable {
private static final long serialVersionUID = 1L;
this.id = id;
}
- @Column(length=10, nullable=false)
- private String problema;
+ @Column(length=30, nullable=false)
+ private String resultado;
- @Column(length=10, nullable=false)
+ @Column(length=30, nullable=false)
private String estrategia;
@Column(length=200, nullable=false)
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TaticaPedagogica)) {
return false;
}
this.mensagem = mensagem;
}
- public String getProblema() {
- return problema;
+ public String getResultado() {
+ return resultado;
}
- public void setProblema(String problema) {
- this.problema = problema;
+ public void setResultado(String resultado) {
+ this.resultado = resultado;
}
-
-
}
@Override
public boolean equals(Object object) {
- // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Usuario)) {
return false;
}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.ufcspa.simdecs.exceptions;
+
+/**
+ *
+ * @author maroni
+ */
+public class InvalidNodeState extends Exception {
+
+ public InvalidNodeState(String string) {
+ super(string);
+ }
+
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.ufcspa.simdecs.exceptions;
+
+/**
+ *
+ * @author maroni
+ */
+public class InvalidParameterException extends Exception {
+
+ public InvalidParameterException(String string) {
+ super(string);
+ }
+
+}
*/
package org.ufcspa.simdecs.mb.editarcasos;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import org.ufcspa.simdecs.util.NodoBean;
+import java.util.*;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.primefaces.component.commandbutton.CommandButton;
import org.ufcspa.simdecs.entities.PerguntaNodo;
import org.ufcspa.simdecs.entities.Rede;
import org.ufcspa.simdecs.mb.DefaultManagedBean;
-import org.ufcspa.simdecs.util.NodoBean;
-import org.ufcspa.simdecs.util.UnBUtil;
+import org.ufcspa.simdecs.util.ProbabilisticBean;
+import org.ufcspa.simdecs.util.UnBBayesUtil;
+import unbbayes.prs.Node;
import unbbayes.prs.bn.ProbabilisticNode;
+import unbbayes.prs.bn.TreeVariable;
/**
*
addInfoMessage("Salvo com Sucesso!", "Caso clÃnico salvo com sucesso!");
}
- public void processaRede() {
+ public void processaRede() throws Exception {
idPaciente = Long.valueOf(getTextParameter("pIdPaciente"));
Paciente paciente = em.find(Paciente.class, idPaciente);
- UnBUtil unBUtil = UnBUtil.getInstance(paciente.getRede());
- unBUtil.abreRede(paciente.getRede());
+ UnBBayesUtil unBUtil = new UnBBayesUtil(paciente.getRede());
// Sinais e Sintomas
Iterator it = sinaisSintomas.getSource().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.desativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 0, "Not", 1);
}
it = sinaisSintomas.getTarget().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.ativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
}
// Historicos
it = historicos.getSource().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.desativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 0, "Not", 1);
}
it = historicos.getTarget().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.ativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
}
// Exames FÃsicos
it = examesFisicos.getSource().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.desativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 0, "Not", 1);
}
it = examesFisicos.getTarget().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.ativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
}
// Exames Complementares
it = examesComplementares.getSource().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.desativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 0, "Not", 1);
}
it = examesComplementares.getTarget().iterator();
while(it.hasNext()) {
- ProbabilisticNode pn = unBUtil.getNodeByName((String) it.next());
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName((String) it.next());
if (pn != null)
- unBUtil.ativarNodo(pn);
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
}
- diagnosticos = unBUtil.getProbabilidadeDiagnosticos();
- condutas = unBUtil.getProbabilidadeCondutas();
+ populaProbabilidadeDiagnosticos(unBUtil);
+ populaProbabilidadeCondutas(unBUtil);
+ }
+
+
+ private void populaProbabilidadeCondutas(UnBBayesUtil unBUtil) {
+ Iterator<Nodo> itConds = em.createNamedQuery("Nodo.getByTipo")
+ .setParameter("pTipo", Nodo.CONDUTA)
+ .getResultList().iterator();
+
+ condutas = new ArrayList<NodoBean>();
+
+ while(itConds.hasNext()) {
+ Nodo nodo = itConds.next();
+ NodoBean nodoBean = new NodoBean(nodo, (Float) unBUtil.getProbabilidadeByState((TreeVariable) unBUtil.getNodeByName(nodo.getNome()), "Yes"));
+ condutas.add(nodoBean);
+ }
+
+ Collections.sort(condutas, new Comparator() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ NodoBean nodo1 = (NodoBean) o1;
+ NodoBean nodo2 = (NodoBean) o2;
+
+ if (nodo1.getProbabilidade() > nodo2.getProbabilidade())
+ return -1;
+ else if (nodo1.getProbabilidade() < nodo2.getProbabilidade())
+ return 1;
+ else
+ return 0;
+ }
+ });
}
+ private void populaProbabilidadeDiagnosticos(UnBBayesUtil unBUtil) {
+ Iterator<Nodo> itDiags = em.createNamedQuery("Nodo.getByTipo")
+ .setParameter("pTipo", Nodo.DIAGNOSTICO)
+ .getResultList().iterator();
+
+ diagnosticos = new ArrayList<NodoBean>();
+
+ while(itDiags.hasNext()) {
+ Nodo nodo = itDiags.next();
+ NodoBean nodoBean = new NodoBean(nodo, (Float) unBUtil.getProbabilidadeByState((TreeVariable) unBUtil.getNodeByName(nodo.getNome()), "Yes"));
+ diagnosticos.add(nodoBean);
+ }
+
+ Collections.sort(diagnosticos, new Comparator() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ NodoBean nodo1 = (NodoBean) o1;
+ NodoBean nodo2 = (NodoBean) o2;
+
+ if (nodo1.getProbabilidade() > nodo2.getProbabilidade())
+ return -1;
+ else if (nodo1.getProbabilidade() < nodo2.getProbabilidade())
+ return 1;
+ else
+ return 0;
+ }
+ });
+ }
private String getPerguntaNodo(Long idNodo) {
List <PerguntaNodo> perguntas = em.createQuery("From PerguntaNodo where nodo.id=:pIdNodo")
populate();
}
- public void selecionaPaciente() {
+ public void selecionaPaciente() throws Exception {
Paciente paciente = em.find(Paciente.class, Long.valueOf(getTextParameter("pIdPaciente")));
idPaciente = paciente.getId();
examesFisicos = new DualListModel<Nodo>(origemExamesFisicos, destinoExamesFisicos);
examesComplementares = new DualListModel<Nodo>(origemExamesComplementares, destinoExamesComplementares);
- UnBUtil unBUtil = UnBUtil.getInstance(paciente.getRede());
+ // UnBBayesUtil unBUtil = new UnBBayesUtil(paciente.getRede());
- diagnosticos = unBUtil.getProbabilidadeDiagnosticos();
- condutas = unBUtil.getProbabilidadeCondutas();
+ // populaProbabilidadeDiagnosticos(unBUtil);
+ // populaProbabilidadeCondutas(unBUtil);
}
public Caso getCaso() {
*
* @author maroni
*/
-@ManagedBean
+@ManagedBean(name="loginBean")
@RequestScoped
public class LoginBean extends DefaultManagedBean {
*/
package org.ufcspa.simdecs.mediador;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import javax.persistence.EntityManager;
import org.ufcspa.simdecs.entities.Log;
private String confiancaAtual;
private boolean abriuFichaPaciente;
- private int perguntasRealizadas;
- private int perguntasDisponiveis;
- private int perguntasProfessor;
- private int perguntasBogusRealizadas;
- private int examesFisicosRealizados;
- private int examesFisicosProfessor;
- private int examesFisicosDisponiveis;
- private int examesComplementaresRealizados;
- private int examesComplementaresProfessor;
- private int examesComplementaresDisponiveis;
- private int desmarcacoesDiagnostico;
- private int desmarcacoesConduta;
+ private float perguntasRealizadas;
+ private float perguntasDisponiveis;
+ private float perguntasProfessor;
+ private float perguntasBogusRealizadas;
+ private float examesFisicosRealizados;
+ private float examesFisicosProfessor;
+ private float examesFisicosDisponiveis;
+ private float examesComplementaresRealizados;
+ private float examesComplementaresProfessor;
+ private float examesComplementaresDisponiveis;
+ private float desmarcacoesDiagnostico;
+ private float desmarcacoesConduta;
private float examesComplementaresCustoTotal;
private float examesComplementaresCustoProfessor;
private float examesComplementaresCustoRealizado;
- private int examesComplementaresTempoTotal;
- private int examesComplementaresTempoProfessor;
- private int examesComplementaresTempoRealizado;
+ private float examesComplementaresTempoTotal;
+ private float examesComplementaresTempoProfessor;
+ private float examesComplementaresTempoRealizado;
private float examesFisicosCustoTotal;
private float examesFisicosCustoProfessor;
private float examesFisicosCustoRealizado;
- private int examesFisicosTempoTotal;
- private int examesFisicosTempoProfessor;
- private int examesFisicosTempoRealizado;
+ private float examesFisicosTempoTotal;
+ private float examesFisicosTempoProfessor;
+ private float examesFisicosTempoRealizado;
private boolean concluiuInvestigacao;
private boolean concluiuDiagnostico;
private Nodo diagnostico;
private Map<Long, Nodo> condutas;
+ private List<Nodo> nodosInvestigacao;
private EntityManager em;
confiancaAtual = "";
concluiuInvestigacao = concluiuDiagnostico = concluiuConduta = encerrouCaso = abriuFichaPaciente = false;
+ nodosInvestigacao = new ArrayList<Nodo>();
em = DbUtil.getInstance().getEntityManager();
if (log.getNodo().getBogus())
perguntasBogusRealizadas+=1;
- else
+ else {
perguntasRealizadas+=1;
+ nodosInvestigacao.add(log.getNodo());
+ }
}
// Registra encerramento de etapas
examesFisicosRealizados+=1;
examesFisicosCustoRealizado+=log.getNodo().getCusto();
examesFisicosTempoRealizado+=log.getNodo().getTempo();
+ nodosInvestigacao.add(log.getNodo());
}
// Soma os exames complementares perguntados pelo aluno
examesComplementaresRealizados+=1;
examesComplementaresCustoRealizado+=log.getNodo().getCusto();
examesComplementaresTempoRealizado+=log.getNodo().getTempo();
+ nodosInvestigacao.add(log.getNodo());
}
// Soma as desmarcações de diagnósticos
return abriuFichaPaciente;
}
- public String getConfiancaAtual() {
- return confiancaAtual;
- }
-
- public int getDesmarcacoesConduta() {
- return desmarcacoesConduta;
- }
-
- public int getDesmarcacoesDiagnostico() {
- return desmarcacoesDiagnostico;
- }
-
- public EntityManager getEm() {
- return em;
- }
-
- public int getExamesComplementaresDisponiveis() {
- return examesComplementaresDisponiveis;
- }
-
- public int getExamesComplementaresProfessor() {
- return examesComplementaresProfessor;
- }
-
- public int getExamesComplementaresRealizados() {
- return examesComplementaresRealizados;
- }
-
- public int getExamesFisicosDisponiveis() {
- return examesFisicosDisponiveis;
- }
-
- public int getExamesFisicosProfessor() {
- return examesFisicosProfessor;
+ public boolean isConcluiuConduta() {
+ return concluiuConduta;
}
- public int getExamesFisicosRealizados() {
- return examesFisicosRealizados;
+ public boolean isConcluiuDiagnostico() {
+ return concluiuDiagnostico;
}
- public int getPerguntasBogusRealizadas() {
- return perguntasBogusRealizadas;
+ public boolean isConcluiuInvestigacao() {
+ return concluiuInvestigacao;
}
- public int getPerguntasDisponiveis() {
- return perguntasDisponiveis;
+ public Map<Long, Nodo> getCondutas() {
+ return condutas;
}
- public int getPerguntasProfessor() {
- return perguntasProfessor;
+ public String getConfiancaAtual() {
+ return confiancaAtual;
}
- public int getPerguntasRealizadas() {
- return perguntasRealizadas;
+ public float getDesmarcacoesConduta() {
+ return desmarcacoesConduta;
}
- public Map<Long, Nodo> getCondutas() {
- return condutas;
+ public float getDesmarcacoesDiagnostico() {
+ return desmarcacoesDiagnostico;
}
public Nodo getDiagnostico() {
return diagnostico;
}
- public boolean isConcluiuConduta() {
- return concluiuConduta;
- }
-
- public boolean isConcluiuDiagnostico() {
- return concluiuDiagnostico;
- }
-
- public boolean isConcluiuInvestigacao() {
- return concluiuInvestigacao;
+ public EntityManager getEm() {
+ return em;
}
public boolean isEncerrouCaso() {
return examesComplementaresCustoTotal;
}
- public int getExamesComplementaresTempoProfessor() {
+ public float getExamesComplementaresDisponiveis() {
+ return examesComplementaresDisponiveis;
+ }
+
+ public float getExamesComplementaresProfessor() {
+ return examesComplementaresProfessor;
+ }
+
+ public float getExamesComplementaresRealizados() {
+ return examesComplementaresRealizados;
+ }
+
+ public float getExamesComplementaresTempoProfessor() {
return examesComplementaresTempoProfessor;
}
- public int getExamesComplementaresTempoRealizado() {
+ public float getExamesComplementaresTempoRealizado() {
return examesComplementaresTempoRealizado;
}
- public int getExamesComplementaresTempoTotal() {
+ public float getExamesComplementaresTempoTotal() {
return examesComplementaresTempoTotal;
}
return examesFisicosCustoTotal;
}
- public int getExamesFisicosTempoProfessor() {
+ public float getExamesFisicosDisponiveis() {
+ return examesFisicosDisponiveis;
+ }
+
+ public float getExamesFisicosProfessor() {
+ return examesFisicosProfessor;
+ }
+
+ public float getExamesFisicosRealizados() {
+ return examesFisicosRealizados;
+ }
+
+ public float getExamesFisicosTempoProfessor() {
return examesFisicosTempoProfessor;
}
- public int getExamesFisicosTempoRealizado() {
+ public float getExamesFisicosTempoRealizado() {
return examesFisicosTempoRealizado;
}
- public int getExamesFisicosTempoTotal() {
+ public float getExamesFisicosTempoTotal() {
return examesFisicosTempoTotal;
}
+ public List<Nodo> getNodosInvestigacao() {
+ return nodosInvestigacao;
+ }
+
+ public float getPerguntasBogusRealizadas() {
+ return perguntasBogusRealizadas;
+ }
+
+ public float getPerguntasDisponiveis() {
+ return perguntasDisponiveis;
+ }
+
+ public float getPerguntasProfessor() {
+ return perguntasProfessor;
+ }
+
+ public float getPerguntasRealizadas() {
+ return perguntasRealizadas;
+ }
+
+
+
@Override
public String toString() {
return "LogExecucao{" + "confiancaAtual=" + confiancaAtual + "\nabriuFichaPaciente=" + abriuFichaPaciente + "\nperguntasRealizadas=" + perguntasRealizadas + "\nperguntasDisponiveis=" + perguntasDisponiveis + "\nperguntasProfessor=" + perguntasProfessor + "\nperguntasBogusRealizadas=" + perguntasBogusRealizadas + "\nexamesFisicosRealizados=" + examesFisicosRealizados + "\nexamesFisicosProfessor=" + examesFisicosProfessor + "\nexamesFisicosDisponiveis=" + examesFisicosDisponiveis + "\nexamesComplementaresRealizados=" + examesComplementaresRealizados + "\nexamesComplementaresProfessor=" + examesComplementaresProfessor + "\nexamesComplementaresDisponiveis=" + examesComplementaresDisponiveis + "\ndesmarcacoesDiagnostico=" + desmarcacoesDiagnostico + "\ndesmarcacoesConduta=" + desmarcacoesConduta + "\nexamesComplementaresCustoTotal=" + examesComplementaresCustoTotal + "\nexamesComplementaresCustoProfessor=" + examesComplementaresCustoProfessor + "\nexamesComplementaresCustoRealizado=" + examesComplementaresCustoRealizado + "\nexamesComplementaresTempoTotal=" + examesComplementaresTempoTotal + "\nexamesComplementaresTempoProfessor=" + examesComplementaresTempoProfessor + "\nexamesComplementaresTempoRealizado=" + examesComplementaresTempoRealizado + "\nexamesFisicosCustoTotal=" + examesFisicosCustoTotal + "\nexamesFisicosCustoProfessor=" + examesFisicosCustoProfessor + "\nexamesFisicosCustoRealizado=" + examesFisicosCustoRealizado + "\nexamesFisicosTempoTotal=" + examesFisicosTempoTotal + "\nexamesFisicosTempoProfessor=" + examesFisicosTempoProfessor + "\nexamesFisicosTempoRealizado=" + examesFisicosTempoRealizado + "\nconcluiuInvestigacao=" + concluiuInvestigacao + "\nconcluiuDiagnostico=" + concluiuDiagnostico + "\nconcluiuConduta=" + concluiuConduta + "\nencerrouCaso=" + encerrouCaso + "\ndiagnostico=" + diagnostico + "\ncondutas=" + condutas + '}';
*/
package org.ufcspa.simdecs.mediador;
-import org.ufcspa.simdecs.entities.Paciente;
+import java.util.*;
+import javax.persistence.EntityManager;
+import org.ufcspa.simdecs.entities.*;
+import org.ufcspa.simdecs.util.DbUtil;
+import org.ufcspa.simdecs.util.NodoBean;
+import org.ufcspa.simdecs.util.ProbabilisticBean;
+import org.ufcspa.simdecs.util.UnBBayesUtil;
+import unbbayes.prs.bn.ProbabilisticNode;
+import unbbayes.prs.bn.TreeVariable;
+import unbbayes.prs.id.DecisionNode;
/**
*
*/
public class NegociacaoPedagogica {
-
-
+ public static final String NAO_ABRIU_FICHA_PACIENTE = "NAO_ABRIU_FICHA_PACIENTE";
+
+ public static final String INVESTIGACAO_ADEQUADA = "INVESTIGACAO_ADEQUADA";
public static final String INVESTIGACAO_INSUFICIENTE = "INVESTIGACAO_INSUFICIENTE";
- public static final String INVESTIGACAO_EXCESSIVA = "INVESTIGACAO_EXCESSIVA";
- public static final String INVESTIGACAO_BOGUS = "INVESTIGACAO_BOGUS";
- public static final String INVESTIGACAO_DISPENDIOSA = "INVESTIGACAO_DISPENDIOSA";
- public static final String INVESTIGACAO_DEMORADA = "INVESTIGACAO_DEMORADA";
+ public static final String INVESTIGACAO_EXCESSIVA = "INVESTIGACAO_EXCESSIVA";
+ public static final String INVESTIGACAO_BOGUS = "INVESTIGACAO_BOGUS";
+ public static final String INVESTIGACAO_DISPENDIOSA = "INVESTIGACAO_DISPENDIOSA";
+ public static final String INVESTIGACAO_DEMORADA = "INVESTIGACAO_DEMORADA";
- public static final String DIAGNOSTICO_INCORRETO_IMPLAUSIVEL = "DIAGNOSTICO_INCORRETO_IMPLAUSIVEL";
- public static final String DIAGNOSTICO_INCORRETO_PLAUSIVEL = "DIAGNOSTICO_INCORRETO_PLAUSIVEL";
+ public static final String DIAGNOSTICO_ADEQUADO = "DIAGNOSTICO_ADEQUADO";
+ public static final String DIAGNOSTICO_INCORRETO_IMPLAUSIVEL= "DIAGNOSTICO_INCORRETO_IMPLAUSIVEL";
+ public static final String DIAGNOSTICO_INCORRETO_PLAUSIVEL = "DIAGNOSTICO_INCORRETO_PLAUSIVEL";
- public static final String CONDUTA_INCORRETA_COERENTE = "CONDUTA_INCORRETA_COERENTE";
+ public static final String CONDUTA_ADEQUADA = "CONDUTA_ADEQUADA";
+ public static final String CONDUTA_INCORRETA_COERENTE = "CONDUTA_INCORRETA_COERENTE";
public static final String CONDUTA_INCORRETA_INCOERENTE = "CONDUTA_INCORRETA_INCOERENTE";
- public static final String CONDUTA_INSUFICIENTE = "CONDUTA_INSUFICIENTE";
- public static final String CONDUTA_EXCESSIVA = "CONDUTA_EXCESSIVA";
- public static final String CONDUTA_DEMORADA = "CONDUTA_DEMORADA";
- public static final String CONDUTA_DISPENDIOSA = "CONDUTA_DISPENDIOSA";
+ public static final String CONDUTA_INSUFICIENTE = "CONDUTA_INSUFICIENTE";
+ public static final String CONDUTA_EXCESSIVA = "CONDUTA_EXCESSIVA";
+ public static final String CONDUTA_DEMORADA = "CONDUTA_DEMORADA";
+ public static final String CONDUTA_DISPENDIOSA = "CONDUTA_DISPENDIOSA";
+
+
+ private LogExecucao logExecucao;
+ private EntityManager em;
- // Anamnese
- float anamneseInsuficiente;
- float anamneseSuficiente;
- float anamneseExcessiva;
-
- // Exame FÃsico
- float exameFisicoInsuficiente;
- float exameFisicoSuficiente;
- float exameFisicoExcessiva;
-
- // Exame Complementar
- float exameComplementarInsuficiente;
- float exameComplementarSuficiente;
- float exameComplementarExcessiva;
+ private String estrategia;
+ private List<String> resultadosSimulacao;
+
+
+ private boolean anamneseInsuficiente = false;
+ private boolean anamneseExcessiva = false;
+ private boolean exameFisicoInsuficiente = false;
+ private boolean exameFisicoExcessivo = false;
+ private boolean exameComplementarInsuficiente = false;
+ private boolean exameComplementarExcessivo = false;
+ private boolean perguntouBogus = false;
- // Abertura da Ficha do Paciente
- float abriuFichaPacienteSim;
- float abriuFichaPacienteNao;
- // Bogus
- float bogusPresente;
- float bogusAusente;
+ private void populaEstrategia() throws Exception {
+ // Carrega o endereço do diagrama de influencia do banco e abre a rede no disco
+ Rede redeDI = em.find(Rede.class, 1000L);
+ UnBBayesUtil diagramaInfluencia = new UnBBayesUtil(redeDI);
+
+ anamneseInsuficiente = false;
+ anamneseExcessiva = false;
+ exameFisicoInsuficiente = false;
+ exameFisicoExcessivo = false;
+ exameComplementarInsuficiente = false;
+ exameComplementarExcessivo = false;
+ perguntouBogus = false;
+
+
+ // Define a probabilidade do nodo Anamnese
+ {
+ if (logExecucao.getPerguntasDisponiveis() > 0) {
+ ProbabilisticNode nodoAnamnese = (ProbabilisticNode) diagramaInfluencia.getNodeByName("Anamnese");
+ float pcPerguntasAnamnese = logExecucao.getPerguntasRealizadas() / logExecucao.getPerguntasDisponiveis() * 100;
+System.out.println("PERCENTUAL ANAMNESE: " + pcPerguntasAnamnese);
+ if (pcPerguntasAnamnese <= 20) {
+ diagramaInfluencia.setNodeState(nodoAnamnese, "Insuficiente", 1, "Suficiente", 0, "Excessiva", 0);
+ anamneseInsuficiente = true;
+ }
+ else if (pcPerguntasAnamnese > 20 && pcPerguntasAnamnese <= 80)
+ diagramaInfluencia.setNodeState(nodoAnamnese, "Insuficiente", 0, "Suficiente", 1, "Excessiva", 0);
+ else {
+ diagramaInfluencia.setNodeState(nodoAnamnese, "Insuficiente", 0, "Suficiente", 0, "Excessiva", 1);
+ anamneseExcessiva = true;
+ }
+ }
+ }
- // Hesitação no Diagnóstico
- float hesitacaoDiagnosticoPresente;
- float hesitacaoDiagnosticoAusente;
+ // Define a probabilidade do nodo Exame Fisico
+ {
+ if (logExecucao.getExamesFisicosDisponiveis() > 0) {
+ ProbabilisticNode nodoExameFisico = (ProbabilisticNode) diagramaInfluencia.getNodeByName("ExameFisico");
+ float pcExameFisico = logExecucao.getExamesFisicosRealizados() / logExecucao.getExamesFisicosDisponiveis() * 100;
+System.out.println("PERCENTUAL EXAME FISICO: " + pcExameFisico);
+
+ if (pcExameFisico <= 20) {
+ diagramaInfluencia.setNodeState(nodoExameFisico, "Insuficiente", 1, "Suficiente", 0, "Excessiva", 0);
+ exameFisicoInsuficiente = true;
+ }
+ else if (pcExameFisico > 20 && pcExameFisico <= 80)
+ diagramaInfluencia.setNodeState(nodoExameFisico, "Insuficiente", 0, "Suficiente", 1, "Excessiva", 0);
+ else {
+ diagramaInfluencia.setNodeState(nodoExameFisico, "Insuficiente", 0, "Suficiente", 0, "Excessiva", 1);
+ exameFisicoExcessivo = true;
+ }
+ }
+ }
+
+ // Define a probabilidade do nodo Exame Complementar
+ {
+ if (logExecucao.getExamesComplementaresProfessor() > 0) {
+ ProbabilisticNode nodoExameComplementar = (ProbabilisticNode) diagramaInfluencia.getNodeByName("ExameComplementar");
+ float pcExameComplementar = logExecucao.getExamesComplementaresRealizados() / logExecucao.getExamesComplementaresProfessor() * 100;
+System.out.println("PERCENTUAL EXAME COMPLEMENTAR: " + pcExameComplementar);
+
+ if (pcExameComplementar <= 20) {
+ diagramaInfluencia.setNodeState(nodoExameComplementar, "Insuficiente", 1, "Suficiente", 0, "Excessiva", 0);
+ exameComplementarInsuficiente = true;
+ }
+ else if (pcExameComplementar > 20 && pcExameComplementar <= 80)
+ diagramaInfluencia.setNodeState(nodoExameComplementar, "Insuficiente", 0, "Suficiente", 1, "Excessiva", 0);
+ else {
+ diagramaInfluencia.setNodeState(nodoExameComplementar, "Insuficiente", 0, "Suficiente", 0, "Excessiva", 1);
+ exameFisicoExcessivo = true;
+ }
+ }
+ }
+
+ // Define a probabilidade do nodo abriu ficha do paciente
+ {
+ ProbabilisticNode nodoAbriuFichaPaciente = (ProbabilisticNode) diagramaInfluencia.getNodeByName("AbriuFichaPaciente");
+
+ if (logExecucao.isAbriuFichaPaciente())
+ diagramaInfluencia.setNodeState(nodoAbriuFichaPaciente, "Sim", 1, "Nao", 0);
+ else
+ diagramaInfluencia.setNodeState(nodoAbriuFichaPaciente, "Sim", 0, "Nao", 1);
+ }
+
+ // Define a probabilidade do nodo Bogus
+ {
+ if (logExecucao.getPerguntasDisponiveis() > 0) {
+ ProbabilisticNode nodoBogus = (ProbabilisticNode) diagramaInfluencia.getNodeByName("Bogus");
+ float pcNodoBogus = logExecucao.getPerguntasBogusRealizadas() / logExecucao.getPerguntasDisponiveis() * 100;
+System.out.println("PERCENTUAL BOGUS: " + pcNodoBogus);
- // Hesitação na Conduta
- float hesitacaoCondutaPresente;
- float hesitacaoCondutaAusente;
+ if (pcNodoBogus <= 10)
+ diagramaInfluencia.setNodeState(nodoBogus, "Presente", 0, "Ausente", 1);
+ else if (pcNodoBogus > 10 && pcNodoBogus <= 30) {
+ diagramaInfluencia.setNodeState(nodoBogus, "Presente", 0.4f, "Ausente", 0.6f);
+ perguntouBogus = true;
+ }
+ else {
+ diagramaInfluencia.setNodeState(nodoBogus, "Presente", 1, "Ausente", 0);
+ perguntouBogus = true;
+ }
+ }
+ }
+
+ // Define a probabilidade de hesitação diagnostica
+ {
+ ProbabilisticNode nodoHestiacaoDiagnostico = (ProbabilisticNode) diagramaInfluencia.getNodeByName("HesitacaoDiagnostico");
+
+ if (logExecucao.getDesmarcacoesDiagnostico() == 0)
+ diagramaInfluencia.setNodeState(nodoHestiacaoDiagnostico, "Presente", 0, "Ausente", 1);
+ else if (logExecucao.getDesmarcacoesDiagnostico() == 1)
+ diagramaInfluencia.setNodeState(nodoHestiacaoDiagnostico, "Presente", 0.6f, "Ausente", 0.4f);
+ else
+ diagramaInfluencia.setNodeState(nodoHestiacaoDiagnostico, "Presente", 1, "Ausente", 0);
+ }
+
+ // Define a probabilidade de hesitação na conduta
+ {
+ ProbabilisticNode nodoHestiacaoConduta = (ProbabilisticNode) diagramaInfluencia.getNodeByName("HesitacaoConduta");
+
+ if (logExecucao.getDesmarcacoesConduta() == 0)
+ diagramaInfluencia.setNodeState(nodoHestiacaoConduta, "Presente", 0, "Ausente", 1);
+ else if (logExecucao.getDesmarcacoesConduta() == 1)
+ diagramaInfluencia.setNodeState(nodoHestiacaoConduta, "Presente", 0.6f, "Ausente", 0.4f);
+ else
+ diagramaInfluencia.setNodeState(nodoHestiacaoConduta, "Presente", 1, "Ausente", 0);
+ }
+
+ // Define a probabilidade de hesitação na conduta
+ {
+ ProbabilisticNode nodoConfianca = (ProbabilisticNode) diagramaInfluencia.getNodeByName("Confianca");
+
+ if (logExecucao.getConfiancaAtual().equals(Log.CONFIANCA_BAIXA))
+ diagramaInfluencia.setNodeState(nodoConfianca, "Baixa", 1, "Media", 0, "Alta", 0);
+ else if (logExecucao.getConfiancaAtual().equals(Log.CONFIANCA_MEDIA))
+ diagramaInfluencia.setNodeState(nodoConfianca, "Baixa", 0, "Media", 1, "Alta", 0);
+ else if (logExecucao.getConfiancaAtual().equals(Log.CONFIANCA_ALTA))
+ diagramaInfluencia.setNodeState(nodoConfianca, "Baixa", 0, "Media", 0, "Alta", 1);
+ }
+
+ // Mostra o resultado do diagrama de influencia
+ DecisionNode nodoTatica = (DecisionNode) diagramaInfluencia.getNodeByName("Tatica");
+ List<ProbabilisticBean> probs = diagramaInfluencia.getProbabilidadesDescOrder(nodoTatica);
+
+ for (ProbabilisticBean prob : probs) {
+ estrategia = prob.getState().toUpperCase();
+ break;
+ }
+ }
+
+ public UnBBayesUtil processaRedeAluno(Paciente paciente) throws Exception {
+
+ UnBBayesUtil unBUtil = new UnBBayesUtil(paciente.getRede());
+
+ List<NodoPaciente> nodosPaciente = em.createQuery("From NodoPaciente np Where np.paciente.id=:pPaciente")
+ .setParameter("pPaciente", paciente.getId())
+ .getResultList();
+
+ for(NodoPaciente nodo : nodosPaciente) {
+ ProbabilisticNode pn = (ProbabilisticNode) unBUtil.getNodeByName(nodo.getNodo().getNome());
+ if (pn != null)
+ unBUtil.setNodeState(pn, "Yes", 1, "Not", 0);
+ }
+
+ return unBUtil;
+
+ }
+
+ private List<NodoBean> getProbabilidades(UnBBayesUtil unBUtil, String tipoNodo) {
+ Iterator<Nodo> itNodos = em.createNamedQuery("Nodo.getByTipo")
+ .setParameter("pTipo", tipoNodo)
+ .getResultList().iterator();
+
+ ArrayList nodos = new ArrayList<NodoBean>();
+
+ while(itNodos.hasNext()) {
+ Nodo nodo = itNodos.next();
+ NodoBean nodoBean = new NodoBean(nodo, (Float) unBUtil.getProbabilidadeByState((TreeVariable) unBUtil.getNodeByName(nodo.getNome()), "Yes"));
+ nodos.add(nodoBean);
+ }
+
+ Collections.sort(nodos, new Comparator() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ NodoBean nodo1 = (NodoBean) o1;
+ NodoBean nodo2 = (NodoBean) o2;
+
+ if (nodo1.getProbabilidade() > nodo2.getProbabilidade())
+ return -1;
+ else if (nodo1.getProbabilidade() < nodo2.getProbabilidade())
+ return 1;
+ else
+ return 0;
+ }
+ });
+
+ return nodos;
+ }
- // Confiança
- float confiancaBaixa;
- float confiancaMedia;
- float confiancaAlta;
-
- private LogExecucao logExecucao;
- public NegociacaoPedagogica(long idSessao, Paciente paciente) {
+ private void populaResultadoSimulacao(Paciente paciente) throws Exception {
+ resultadosSimulacao = new ArrayList<String>();
+
+ if (logExecucao.isConcluiuInvestigacao()) {
+ // Verifica se abriu a ficha do paciente
+ if (!logExecucao.isAbriuFichaPaciente())
+ resultadosSimulacao.add(NAO_ABRIU_FICHA_PACIENTE);
+
+ // Verifica se a investigação é insuficiente ou excessiva
+ int fatorInsuficiente = 0;
+ if (anamneseInsuficiente)
+ fatorInsuficiente++;
+ if (exameComplementarInsuficiente)
+ fatorInsuficiente++;
+ if (exameFisicoInsuficiente)
+ fatorInsuficiente++;
+
+ int fatorExcessivo = 0;
+ if (anamneseExcessiva)
+ fatorExcessivo++;
+ if (exameComplementarExcessivo)
+ fatorExcessivo++;
+ if (exameFisicoExcessivo)
+ fatorExcessivo++;
+
+ if (fatorExcessivo != 0 || fatorInsuficiente != 0) {
+ if (fatorInsuficiente > fatorExcessivo)
+ resultadosSimulacao.add(INVESTIGACAO_INSUFICIENTE);
+ else
+ resultadosSimulacao.add(INVESTIGACAO_EXCESSIVA);
+ }
+
+ // Verifica se é bogus
+ if (perguntouBogus)
+ resultadosSimulacao.add(INVESTIGACAO_BOGUS);
+
+ // Verifica se a anamnese teve alto custo!
+ if (logExecucao.getExamesComplementaresCustoProfessor() > 0) {
+ float pcCusto = logExecucao.getExamesComplementaresCustoRealizado() / logExecucao.getExamesComplementaresCustoProfessor() * 100;
+ if (pcCusto > 150)
+ resultadosSimulacao.add(INVESTIGACAO_DISPENDIOSA);
+ }
+
+ // Verifica se a anamnese foi demorada!
+ if (logExecucao.getExamesComplementaresTempoProfessor() > 0 || logExecucao.getExamesFisicosTempoProfessor() > 0) {
+ float pcTempo = (logExecucao.getExamesComplementaresTempoRealizado() + logExecucao.getExamesFisicosTempoRealizado()) /
+ (logExecucao.getExamesComplementaresTempoProfessor() + logExecucao.getExamesFisicosTempoProfessor()) * 100;
+
+ if (pcTempo > 150)
+ resultadosSimulacao.add(INVESTIGACAO_DEMORADA);
+ }
+ }
+
+ boolean diagnosticoCorreto = false;
+
+
+ // Verifica se o diagnóstico foi adequado
+ if (logExecucao.isConcluiuDiagnostico()) {
+ UnBBayesUtil redeAluno = processaRedeAluno(paciente);
+ List<NodoBean> diagnosticos = getProbabilidades(redeAluno, Nodo.DIAGNOSTICO);
+ Nodo primeiroDiagnostico=null;
+ Nodo segundoDiagnostico=null;
+ int i=0;
+ for(NodoBean nodo : diagnosticos) {
+ if (i == 0)
+ primeiroDiagnostico = nodo.getNodo();
+ else if (i == 1)
+ segundoDiagnostico = nodo.getNodo();
+
+ if (++i == 2)
+ break;
+ }
+
+System.out.println("PRIMEIRO: " + primeiroDiagnostico);
+System.out.println("LOG: " + logExecucao.getDiagnostico());
+ // Nao selecionou o primeiro diagnostico
+ if (primeiroDiagnostico != null && !logExecucao.getDiagnostico().equals(primeiroDiagnostico))
+ if (segundoDiagnostico != null && logExecucao.getDiagnostico().equals(segundoDiagnostico))
+ resultadosSimulacao.add(DIAGNOSTICO_INCORRETO_PLAUSIVEL);
+ else
+ resultadosSimulacao.add(DIAGNOSTICO_INCORRETO_IMPLAUSIVEL);
+
+ // Registra se o diagnóstico está correto
+ if (primeiroDiagnostico.equals(logExecucao.getDiagnostico()))
+ diagnosticoCorreto = true;
+ }
+
+
+ // Ativa condutas do diagnostico proposto
+ if (logExecucao.isConcluiuConduta()) {
+ UnBBayesUtil unBUtil = new UnBBayesUtil(paciente.getRede());
+ unBUtil.setNodeState((ProbabilisticNode)unBUtil.getNodeByName(logExecucao.getDiagnostico().getNome()), "Yes", 1, "Not", 0);
+ List<NodoBean> condutas = getProbabilidades(unBUtil, Nodo.CONDUTA);
+
+
+ // Se o diagnóstico for incorreto verifica o tipo da conduta
+ if (!diagnosticoCorreto) {
+
+ // Neste caso (diagnóstico incorreto) avalia somente a primeira conduta.
+ for(NodoBean nodo : condutas) {
+ if (logExecucao.getCondutas().containsValue(nodo.getNodo())) {
+ resultadosSimulacao.add(CONDUTA_INCORRETA_COERENTE);
+ return;
+ }
+ else {
+ resultadosSimulacao.add(CONDUTA_INCORRETA_INCOERENTE);
+ return;
+ }
+ }
+ } else {
+ // Caso o diagnostico esteja incorreto verifica se a conduta foi suficiente ou insuficiente
+ int i=1;
+ int condutasAdotadas=0;
+ int condutasPossiveis=0;
+ for(NodoBean nodo : condutas) {
+ condutasPossiveis++;
+
+ if (!logExecucao.getCondutas().containsValue(nodo.getNodo())) {
+ if (i == 1) {
+ resultadosSimulacao.add(CONDUTA_INCORRETA_INCOERENTE);
+ return;
+ }
+ } else
+ condutasAdotadas++;
+
+ if (i++ == 2)
+ break;
+ }
+
+ if (condutasAdotadas < condutasPossiveis)
+ resultadosSimulacao.add(CONDUTA_INSUFICIENTE);
+ else if (condutasAdotadas > condutasPossiveis)
+ resultadosSimulacao.add(CONDUTA_EXCESSIVA);
+ }
+
+
+ // AVALIAR O TEMPO E CUSTO DA CONDUTA
+ int c=1;
+ float custoTotalCondutas=0;
+ int tempoTotalConudtas=0;
+ for(NodoBean nodo : condutas) {
+ custoTotalCondutas+=nodo.getNodo().getCusto();
+ tempoTotalConudtas+=nodo.getNodo().getTempo();
+ if (c++ == 2)
+ break;
+ }
+
+ float custoRealizadoCondutas=0;
+ int tempoRealizadoCondutas=0;
+ for(Nodo nodoConduta : logExecucao.getCondutas().values()) {
+ custoRealizadoCondutas+=nodoConduta.getCusto();
+ tempoRealizadoCondutas+=nodoConduta.getTempo();
+ }
+
+ if (custoTotalCondutas > 0) {
+ float pcCustoConduta = custoRealizadoCondutas / custoTotalCondutas * 100;
+ if (pcCustoConduta >= 150)
+ resultadosSimulacao.add(CONDUTA_DISPENDIOSA);
+ }
+
+
+ if (tempoRealizadoCondutas > 0) {
+ float pcTempoConduta = tempoRealizadoCondutas / tempoTotalConudtas * 100;
+ if (pcTempoConduta >= 150)
+ resultadosSimulacao.add(CONDUTA_DEMORADA);
+ }
+
+ }
+ }
+
+ public NegociacaoPedagogica(long idSessao, Paciente paciente) throws Exception {
+ em = DbUtil.getInstance().getEntityManager();
+
+ // Busca o log de execução
logExecucao = new LogExecucao(idSessao, paciente.getCaso().getId(), paciente.getRede().getId());
System.out.println(logExecucao);
+
+ populaEstrategia();
+ populaResultadoSimulacao(paciente);
+
+ System.out.println("ESTRATÉGIA: " + estrategia);
+ System.out.println("RESULTADOS:");
+
+ for(String resultado : resultadosSimulacao) {
+ System.out.println(resultado);
+/*
+ IntervencaoPedagogica intervencao = new IntervencaoPedagogica();
+
+ if (!em.getTransaction().isActive())
+ em.getTransaction().begin();
+
+ intervencao.setAplicada(false);
+ intervencao.setDataGeracao(new Date());
+ intervencao.setEstrategia(estrategia);
+ intervencao.setResultado(resultado);
+ intervencao.setSessaoUsuario(em.find(SessaoUsuario.class, idSessao));
+
+ TaticaPedagogica tatica = (TaticaPedagogica) em.createQuery("From TaticaPedagogica where resultado=:pResultado and estrategia=:pEstrategia")
+ .setParameter("pResultado", resultado)
+ .setParameter("pEstrategia", estrategia)
+ .getSingleResult();
+ intervencao.setTatica(tatica);
+
+ em.persist(intervencao);
+ em.getTransaction().commit();
+
+*/
+ }
+
+
}
}
*/
package org.ufcspa.simdecs.util;
+import java.util.ArrayList;
import org.ufcspa.simdecs.entities.Nodo;
-import unbbayes.prs.bn.ProbabilisticNode;
/**
*
public class NodoBean {
private Nodo nodo;
- private ProbabilisticNode probabilisticNode;
+ private float probabilidade;
- public NodoBean(Nodo nodo, ProbabilisticNode probabilisticNode) {
- this.nodo = nodo;
- this.probabilisticNode = probabilisticNode;
+ public NodoBean() {
}
+
+ public NodoBean(Nodo nodo, float probabilidade) {
+ this.nodo = nodo;
+ this.probabilidade = probabilidade;
+ }
+
public Nodo getNodo() {
return nodo;
}
this.nodo = nodo;
}
- public ProbabilisticNode getProbabilisticNode() {
- return probabilisticNode;
+ public float getProbabilidade() {
+ return probabilidade;
}
- public void setProbabilisticNode(ProbabilisticNode probabilisticNode) {
- this.probabilisticNode = probabilisticNode;
- }
-
- public float getProbabilidade() {
- for (int pb = 0; pb < probabilisticNode.getStatesSize(); pb++) {
- if (probabilisticNode.getStateAt(pb).toLowerCase().equals("yes"))
- return probabilisticNode.getMarginalAt(pb);
- }
- return 0;
+ public void setProbabilidade(float probabilidade) {
+ this.probabilidade = probabilidade;
}
public float getPercentualProbabilidade() {
return Math.round(getProbabilidade() * 100);
}
}
+
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.ufcspa.simdecs.util;
+
+/**
+ *
+ * @author maroni
+ */
+public class ProbabilisticBean {
+
+ private String state;
+ private Float probability;
+
+ public ProbabilisticBean(String state, Float probability) {
+ this.state = state;
+ this.probability = probability;
+ }
+
+ public Float getProbability() {
+ return probability;
+ }
+
+ public void setProbability(Float probability) {
+ this.probability = probability;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.ufcspa.simdecs.util;
+
+import java.io.File;
+import java.security.InvalidParameterException;
+import java.util.*;
+import org.ufcspa.simdecs.entities.Rede;
+import org.ufcspa.simdecs.exceptions.InvalidNodeState;
+import unbbayes.io.xmlbif.version6.XMLBIFIO;
+import unbbayes.prs.Node;
+import unbbayes.prs.bn.JunctionTreeAlgorithm;
+import unbbayes.prs.bn.ProbabilisticNetwork;
+import unbbayes.prs.bn.ProbabilisticNode;
+import unbbayes.prs.bn.TreeVariable;
+
+/**
+ *
+ * @author maroni
+ */
+public class UnBBayesUtil {
+
+
+ private ProbabilisticNetwork rede;
+
+ public UnBBayesUtil(Rede redeEntity) throws Exception {
+ abreRede(redeEntity);
+ }
+
+ public final void abreRede(Rede redeEntity) throws Exception {
+ // required to run unbbayes gui classes on server
+ System.setProperty("java.awt.headless", "false");
+ rede = new ProbabilisticNetwork(null);
+ XMLBIFIO.loadXML(new File(redeEntity.getArquivo()), rede);
+
+ compilar();
+ }
+
+ public void compilar() {
+ JunctionTreeAlgorithm jt = new JunctionTreeAlgorithm();
+ jt.setNet(rede);
+ jt.run();
+ }
+
+
+ public Node getNodeByName(String nodeName) {
+ for(Node node : rede.getNodes()) {
+ if (node.getName().toLowerCase().equals(nodeName.toLowerCase()))
+ return node;
+ }
+
+ return null;
+ }
+
+
+ public void setNodeState(ProbabilisticNode node, Object ... stateProbs) throws Exception {
+ HashMap<String, Float> states = new HashMap<String, Float>();
+ String state = null;
+ Float probability = null;
+
+ for (Object stateProb : stateProbs) {
+ if (state == null)
+ if (stateProb instanceof String)
+ state = (String) stateProb;
+ else
+ throw new InvalidParameterException("Os parametros devem ser informados no formato: state(string), prob(float), ..., ...");
+ else if (state != null)
+ if ( !(stateProb instanceof String) ) {
+ if (stateProb instanceof Integer)
+ probability = new Float ((Integer) stateProb);
+ else if (stateProb instanceof Float)
+ probability = (Float) stateProb;
+ else
+ throw new InvalidParameterException("Os parametros devem ser informados no formato: state(string), prob(float), ..., ...");
+
+ states.put(state.toLowerCase(), probability);
+ probability = null;
+ state = null;
+ } else
+ throw new InvalidParameterException("Os parametros devem ser informados no formato: state(string), prob(float), ..., ...");
+ }
+
+ float likelihood[] = new float[node.getStatesSize()]; //nr. de estados do nodo
+ for(int i=0; i < node.getStatesSize(); i++) {
+ Float prob = states.get(node.getStateAt(i).toLowerCase());
+ states.remove(node.getStateAt(i).toLowerCase());
+ if (prob != null)
+ likelihood[i] = prob;
+ else
+ likelihood[i] = 0;
+ }
+
+ if (states.size() > 0) {
+ StringBuilder invalidStates = new StringBuilder();
+ for (String key : states.keySet()) {
+ invalidStates.append(key);
+ invalidStates.append(" ");
+ }
+ throw new InvalidNodeState("Estados de nodos inválidos: " + invalidStates);
+ }
+
+ node.addLikeliHood(likelihood);
+ rede.updateEvidences();
+ }
+
+ public List<ProbabilisticBean> getProbabilidades(TreeVariable node) {
+
+ List<ProbabilisticBean> listProbs = new ArrayList<ProbabilisticBean>();
+
+ for (int i=0; i < node.getStatesSize(); i++)
+ listProbs.add(new ProbabilisticBean(node.getStateAt(i), node.getMarginalAt(i)));
+
+ return listProbs;
+ }
+
+ public float getProbabilidadeByState(TreeVariable node, String state) {
+ for (ProbabilisticBean bean : getProbabilidades(node)) {
+ if (state.toLowerCase().equals(bean.getState().toLowerCase()))
+ return bean.getProbability();
+ }
+
+ return 0;
+ }
+
+ public List<ProbabilisticBean> getProbabilidadesAscOrder(TreeVariable node) {
+ List<ProbabilisticBean> listProbs = getProbabilidades(node);
+
+ Collections.sort(listProbs, new Comparator() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ ProbabilisticBean nodo1 = (ProbabilisticBean) o1;
+ ProbabilisticBean nodo2 = (ProbabilisticBean) o2;
+
+ if (nodo1.getProbability() > nodo2.getProbability())
+ return 1;
+ else if (nodo1.getProbability() < nodo2.getProbability())
+ return -1;
+ else
+ return 0;
+ }
+ });
+
+ return listProbs;
+ }
+
+ public List<ProbabilisticBean> getProbabilidadesDescOrder(TreeVariable node) {
+ List<ProbabilisticBean> listProbs = getProbabilidades(node);
+
+ Collections.sort(listProbs, new Comparator() {
+ @Override
+ public int compare(Object o1, Object o2) {
+ ProbabilisticBean nodo1 = (ProbabilisticBean) o1;
+ ProbabilisticBean nodo2 = (ProbabilisticBean) o2;
+
+ if (nodo1.getProbability() > nodo2.getProbability())
+ return -1;
+ else if (nodo1.getProbability() < nodo2.getProbability())
+ return 1;
+ else
+ return 0;
+ }
+ });
+
+ return listProbs;
+ }
+
+
+}
+++ /dev/null
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.ufcspa.simdecs.util;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import javax.persistence.EntityManager;
-import org.ufcspa.simdecs.entities.Nodo;
-import org.ufcspa.simdecs.entities.Rede;
-import unbbayes.io.xmlbif.version6.XMLBIFIO;
-import unbbayes.prs.Node;
-import unbbayes.prs.bn.JunctionTreeAlgorithm;
-import unbbayes.prs.bn.ProbabilisticNetwork;
-import unbbayes.prs.bn.ProbabilisticNode;
-
-/**
- *
- * @author maroni
- */
-public class UnBUtil {
-
-
- private static UnBUtil unBUtil;
- private ProbabilisticNetwork rede;
-
- private UnBUtil(Rede redeEntity) {
- abreRede(redeEntity);
- }
-
- public final void abreRede(Rede redeEntity) {
- try {
- // required to run unbbayes gui classes on server
- System.setProperty("java.awt.headless", "false");
- rede = new ProbabilisticNetwork(null);
- XMLBIFIO.loadXML(new File(redeEntity.getArquivo()), rede);
-
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(1);
- }
-
- compilar();
- }
-
- public static UnBUtil getInstance(Rede redeEntity) {
- if (unBUtil == null)
- unBUtil = new UnBUtil(redeEntity);
-
- return unBUtil;
- }
-
- public ProbabilisticNode getNodeByName(String name) {
- for(Node node : rede.getNodes()) {
- if (node.getName().equals(name))
- return (ProbabilisticNode) node;
- }
-
- return null;
- }
-
- public NodoBean getNodoBeanByNodo(Nodo nodo) {
- for(Node node : rede.getNodes()) {
- if (node.getName().equals(nodo.getNome()))
- return new NodoBean(nodo, (ProbabilisticNode) node);
- }
-
- return null;
- }
-
- public ProbabilisticNetwork getRede() {
- return rede;
- }
-
- public void compilar() {
- JunctionTreeAlgorithm jt = new JunctionTreeAlgorithm();
- jt.setNet(rede);
- jt.run();
- }
-
- public void setProbablidadeNodo(ProbabilisticNode pn, float sim, float nao) {
- float likelihood[] = new float[pn.getStatesSize()]; //nr. de estados do nodo
- likelihood[0] = sim;
- likelihood[1] = nao;
-
- pn.addLikeliHood(likelihood);
- try {
- unBUtil.getRede().updateEvidences();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void ativarNodo(ProbabilisticNode pn) {
- setProbablidadeNodo(pn, 1f, 0.0f);
- }
-
- public void desativarNodo(ProbabilisticNode pn) {
- setProbablidadeNodo(pn, 0.0f, 1f);
- }
-
- public List<NodoBean> getProbabilidadeNodos(String tipo) {
- EntityManager em = DbUtil.getInstance().getEntityManager();
- List<NodoBean> nodos = new ArrayList<NodoBean>();
-
- for (int j = 0; j < rede.getNodeCount(); j++) {
- ProbabilisticNode nodoAtual = (ProbabilisticNode) rede.getNodeAt(j);
-
-
- Nodo nodo = (Nodo) em.createQuery("From Nodo where nome=:pNome")
- .setParameter("pNome", nodoAtual.getName())
- .getSingleResult();
-
-
- if (!nodo.getTipo().equals(tipo))
- continue;
-
- nodos.add(new NodoBean(nodo, nodoAtual));
- }
-
- Collections.sort(nodos, new Comparator() {
- @Override
- public int compare(Object o1, Object o2) {
- NodoBean nodo1 = (NodoBean) o1;
- NodoBean nodo2 = (NodoBean) o2;
-
- if (nodo1.getProbabilidade() < nodo2.getProbabilidade())
- return 1;
- else if (nodo1.getProbabilidade() > nodo2.getProbabilidade())
- return -1;
- else
- return 0;
- }
- });
-
- return nodos;
- }
-
- public List<NodoBean> getProbabilidadeDiagnosticos() {
- return getProbabilidadeNodos(Nodo.DIAGNOSTICO);
- }
-
- public List<NodoBean> getProbabilidadeCondutas() {
- return getProbabilidadeNodos(Nodo.CONDUTA);
- }
-
- public void print() {
- for (int j = 0; j < rede.getNodeCount(); j++) {
- ProbabilisticNode nodoAtual = (ProbabilisticNode) rede.getNodeAt(j);
- System.out.println(nodoAtual.getName());
-
- // Verificando a tabela de probabilidades do nodo
- for (int pb = 0; pb < nodoAtual.getStatesSize(); pb++) {
- System.out.println(nodoAtual.getStateAt(pb)+":"+nodoAtual.getMarginalAt(pb));
- }
- System.out.println("");
- }
- }
-}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
+<glassfish-web-app error-url="">
+ <context-root>/simdecs</context-root>
+ <class-loader delegate="true"/>
+ <jsp-config>
+ <property name="keepgenerated" value="true">
+ <description>Keep a copy of the generated servlet class' java code.</description>
+ </property>
+ </jsp-config>
+</glassfish-web-app>
--- /dev/null
+<?xml version='1.0' encoding='US-ASCII'?>
+<xbifns:XMLBIF version="0.6" xmlns:xbifns="http://unbbayes.sourceforge.net/xml/XMLBIF_0_6.xsd">
+ <xbifns:header>
+ <xbifns:version>1.0</xbifns:version>
+ <xbifns:name>di</xbifns:name>
+ <xbifns:creator>UnBBayes</xbifns:creator>
+ </xbifns:header>
+ <xbifns:staticProperty>
+ <xbifns:nodeSize>40</xbifns:nodeSize>
+ <xbifns:nodeFontSize>0</xbifns:nodeFontSize>
+ <xbifns:colorUtilityNode>0</xbifns:colorUtilityNode>
+ <xbifns:colorDecisionNode>0</xbifns:colorDecisionNode>
+ <xbifns:colorDiscreteProbabilisticNode>0</xbifns:colorDiscreteProbabilisticNode>
+ <xbifns:colorContinuousProbilisticNode>0</xbifns:colorContinuousProbilisticNode>
+ <xbifns:colorExplanationNode>0</xbifns:colorExplanationNode>
+ </xbifns:staticProperty>
+ <xbifns:hierarchy>
+ <xbifns:root name="root">
+ <xbifns:level name=""/>
+ <xbifns:level name="Investigacao"/>
+ </xbifns:root>
+ </xbifns:hierarchy>
+ <xbifns:network>
+ <xbifns:variables>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="130" xPos="670" type="DiscreteProbabilistic" name="ExameComplementar">
+ <xbifns:description/>
+ <xbifns:state name="Insuficiente"/>
+ <xbifns:state name="Suficiente"/>
+ <xbifns:state name="Excessiva"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="200" xPos="740" type="DiscreteProbabilistic" name="ExameFisico">
+ <xbifns:description/>
+ <xbifns:state name="Insuficiente"/>
+ <xbifns:state name="Suficiente"/>
+ <xbifns:state name="Excessiva"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="270" xPos="690" type="DiscreteProbabilistic" name="Anamnese">
+ <xbifns:description/>
+ <xbifns:state name="Insuficiente"/>
+ <xbifns:state name="Suficiente"/>
+ <xbifns:state name="Excessiva"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="90" xPos="80" type="DiscreteProbabilistic" name="Confianca">
+ <xbifns:description/>
+ <xbifns:state name="Baixa"/>
+ <xbifns:state name="Media"/>
+ <xbifns:state name="Alta"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-14336" height="60.0" width="80.0" yPos="0" xPos="229" type="Decision" name="Tatica">
+ <xbifns:description/>
+ <xbifns:state name="Orientacao"/>
+ <xbifns:state name="Ampliacao"/>
+ <xbifns:state name="Apoio"/>
+ <xbifns:state name="Contestacao"/>
+ <xbifns:state name="Comprovacao"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-16711681" height="60.0" width="80.0" yPos="90" xPos="150" type="Utility" name="Utility">
+ <xbifns:description/>
+ <xbifns:state name="Utilidade"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="200" xPos="420" type="DiscreteProbabilistic" name="ResultadoInvestigacao">
+ <xbifns:description/>
+ <xbifns:state name="Correta"/>
+ <xbifns:state name="Incorreta"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="280" xPos="70" type="DiscreteProbabilistic" name="HesitacaoDiagnostico">
+ <xbifns:description/>
+ <xbifns:state name="Presente"/>
+ <xbifns:state name="Ausente"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="290" xPos="180" type="DiscreteProbabilistic" name="HesitacaoConduta">
+ <xbifns:description/>
+ <xbifns:state name="Presente"/>
+ <xbifns:state name="Ausente"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="110" xPos="420" type="DiscreteProbabilistic" name="Bogus">
+ <xbifns:description/>
+ <xbifns:state name="Presente"/>
+ <xbifns:state name="Ausente"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="200" xPos="570" type="DiscreteProbabilistic" name="Investigacao">
+ <xbifns:description>Investigacao</xbifns:description>
+ <xbifns:state name="Insuficiente"/>
+ <xbifns:state name="Suficiente"/>
+ <xbifns:state name="Excessiva"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="300" xPos="420" type="DiscreteProbabilistic" name="AbriuFichaPaciente">
+ <xbifns:description/>
+ <xbifns:state name="Nao"/>
+ <xbifns:state name="Sim"/>
+ </xbifns:variable>
+ <xbifns:variable perguntas="" tipo="E" tempoEtapa="0.0" custoEtapa="0.0" rgbColor="-256" height="60.0" width="80.0" yPos="200" xPos="150" type="DiscreteProbabilistic" name="Credibilidade">
+ <xbifns:description/>
+ <xbifns:state name="Alta"/>
+ <xbifns:state name="Média"/>
+ <xbifns:state name="Baixa"/>
+ </xbifns:variable>
+ </xbifns:variables>
+ <xbifns:structure>
+ <xbifns:edge child="Utility" parent="Credibilidade"/>
+ <xbifns:edge child="Utility" parent="Confianca"/>
+ <xbifns:edge child="Utility" parent="Tatica"/>
+ <xbifns:edge child="ResultadoInvestigacao" parent="Bogus"/>
+ <xbifns:edge child="ResultadoInvestigacao" parent="AbriuFichaPaciente"/>
+ <xbifns:edge child="ResultadoInvestigacao" parent="Investigacao"/>
+ <xbifns:edge child="Investigacao" parent="ExameFisico"/>
+ <xbifns:edge child="Investigacao" parent="Anamnese"/>
+ <xbifns:edge child="Investigacao" parent="ExameComplementar"/>
+ <xbifns:edge child="Credibilidade" parent="ResultadoInvestigacao"/>
+ <xbifns:edge child="Credibilidade" parent="HesitacaoDiagnostico"/>
+ <xbifns:edge child="Credibilidade" parent="HesitacaoConduta"/>
+ </xbifns:structure>
+ <xbifns:conditionalDistributionSet>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="ExameComplementar"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.33333298563957214</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="ExameFisico"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.33333298563957214</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Anamnese"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.33333298563957214</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Confianca"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.33333298563957214</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Utility"/>
+ <xbifns:parents>
+ <xbifns:parent index="0" name="Tatica"/>
+ <xbifns:parent index="1" name="Confianca"/>
+ <xbifns:parent index="2" name="Credibilidade"/>
+ </xbifns:parents>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="3">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="4">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="5">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="6">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="7">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="8">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="9">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="10">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="11">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="12">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="13">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="14">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="15">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="16">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="17">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="18">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="19">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="20">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="21">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="22">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="23">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="24">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="25">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="26">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="27">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="28">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="29">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="30">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="31">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="32">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="33">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="34">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="35">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="36">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="37">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="38">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="39">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="40">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="41">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="42">0.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="43">1.0</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="44">0.0</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="ResultadoInvestigacao"/>
+ <xbifns:parents>
+ <xbifns:parent index="0" name="Investigacao"/>
+ <xbifns:parent index="1" name="AbriuFichaPaciente"/>
+ <xbifns:parent index="2" name="Bogus"/>
+ </xbifns:parents>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.949999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="3">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="4">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="5">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="6">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="7">0.8999999761581421</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="8">0.75</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="9">0.25</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="10">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="11">0.6499999761581421</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="12">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="13">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="14">0.8500000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="15">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="16">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="17">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="18">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="19">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="20">0.949999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="21">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="22">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="23">0.20000000298023224</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="HesitacaoDiagnostico"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.5</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="HesitacaoConduta"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.5</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Bogus"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.5</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Investigacao"/>
+ <xbifns:parents>
+ <xbifns:parent index="0" name="ExameComplementar"/>
+ <xbifns:parent index="1" name="Anamnese"/>
+ <xbifns:parent index="2" name="ExameFisico"/>
+ </xbifns:parents>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.949999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.02500000037252903</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.02500000037252903</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="3">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="4">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="5">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="6">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="7">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="8">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="9">0.25</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="10">0.25</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="11">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="12">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="13">0.550000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="14">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="15">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="16">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="17">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="18">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="19">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="20">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="21">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="22">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="23">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="24">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="25">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="26">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="27">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="28">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="29">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="30">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="31">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="32">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="33">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="34">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="35">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="36">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="37">0.44999998807907104</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="38">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="39">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="40">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="41">0.33333298563957214</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="42">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="43">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="44">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="45">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="46">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="47">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="48">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="49">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="50">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="51">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="52">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="53">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="54">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="55">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="56">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="57">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="58">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="59">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="60">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="61">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="62">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="63">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="64">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="65">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="66">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="67">0.30000001192092896</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="68">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="69">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="70">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="71">0.75</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="72">0.3499999940395355</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="73">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="74">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="75">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="76">0.4000000059604645</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="77">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="78">0.2547770142555237</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="79">0.019108299165964127</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="80">0.7261149883270264</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="AbriuFichaPaciente"/>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.5</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.5</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ <xbifns:conditionalDistribution type="Discrete">
+ <xbifns:owner name="Credibilidade"/>
+ <xbifns:parents>
+ <xbifns:parent index="0" name="HesitacaoConduta"/>
+ <xbifns:parent index="1" name="HesitacaoDiagnostico"/>
+ <xbifns:parent index="2" name="ResultadoInvestigacao"/>
+ </xbifns:parents>
+ <xbifns:CPT>
+ <xbifns:dependentParentIndex index="0">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="1">0.15000000596046448</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="2">0.699999988079071</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="3">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="4">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="5">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="6">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="7">0.6000000238418579</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="8">0.20000000298023224</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="9">0.8999999761581421</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="10">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="11">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="12">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="13">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="14">0.8999999761581421</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="15">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="16">0.05000000074505806</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="17">0.8999999761581421</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="18">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="19">0.10000000149011612</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="20">0.800000011920929</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="21">0.02500000037252903</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="22">0.02500000037252903</xbifns:dependentParentIndex>
+ <xbifns:dependentParentIndex index="23">0.949999988079071</xbifns:dependentParentIndex>
+ </xbifns:CPT>
+ </xbifns:conditionalDistribution>
+ </xbifns:conditionalDistributionSet>
+ </xbifns:network>
+</xbifns:XMLBIF>
\ No newline at end of file
-http://200.18.67.61/simdecs2/
\ No newline at end of file
+http://localhost:8080/simdecs/
\ No newline at end of file
*/
/*
- TODO customize this sample style
Syntax recommendation http://www.w3.org/TR/REC-CSS2/
*/
--- /dev/null
+<?xml version='1.0' encoding='UTF-8' ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html">
+ <h:head>
+ <title>Facelet Title</title>
+ </h:head>
+ <h:body>
+ Hello from Facelets
+ </h:body>
+</html>
+