From: Michele Silva Date: Thu, 2 Feb 2012 23:26:26 +0000 (-0200) Subject: Import inicial. X-Git-Url: http://200.18.67.61/gitweb/?a=commitdiff_plain;h=ae815b9b3b6a5e1bc64df9c6db558b1730cbbef4;p=simdecs2.git Import inicial. --- ae815b9b3b6a5e1bc64df9c6db558b1730cbbef4 diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..48e17e4 --- /dev/null +++ b/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project SimDeCS. + + + diff --git a/lib/avalon-framework-4.1.3.jar b/lib/avalon-framework-4.1.3.jar new file mode 100755 index 0000000..fd72580 Binary files /dev/null and b/lib/avalon-framework-4.1.3.jar differ diff --git a/lib/commons-fileupload-1.2.2.jar b/lib/commons-fileupload-1.2.2.jar new file mode 100755 index 0000000..131f192 Binary files /dev/null and b/lib/commons-fileupload-1.2.2.jar differ diff --git a/lib/commons-io-2.1.jar b/lib/commons-io-2.1.jar new file mode 100755 index 0000000..b5c7d69 Binary files /dev/null and b/lib/commons-io-2.1.jar differ diff --git a/lib/commons-lang3-3.1.jar b/lib/commons-lang3-3.1.jar new file mode 100755 index 0000000..a85e539 Binary files /dev/null and b/lib/commons-lang3-3.1.jar differ diff --git a/lib/commons-logging-1.1.jar b/lib/commons-logging-1.1.jar new file mode 100755 index 0000000..2ff9bbd Binary files /dev/null and b/lib/commons-logging-1.1.jar differ diff --git a/lib/icu4j-3.8.jar b/lib/icu4j-3.8.jar new file mode 100755 index 0000000..2665486 Binary files /dev/null and b/lib/icu4j-3.8.jar differ diff --git a/lib/javahelp-2.0.02.jar b/lib/javahelp-2.0.02.jar new file mode 100755 index 0000000..6b894bc Binary files /dev/null and b/lib/javahelp-2.0.02.jar differ diff --git a/lib/jaxme2-0.5.1.jar b/lib/jaxme2-0.5.1.jar new file mode 100755 index 0000000..9696d43 Binary files /dev/null and b/lib/jaxme2-0.5.1.jar differ diff --git a/lib/jaxme2-rt-0.5.1.jar b/lib/jaxme2-rt-0.5.1.jar new file mode 100755 index 0000000..3ef8d91 Binary files /dev/null and b/lib/jaxme2-rt-0.5.1.jar differ diff --git a/lib/jaxmeapi-0.5.1.jar b/lib/jaxmeapi-0.5.1.jar new file mode 100755 index 0000000..dcf0556 Binary files /dev/null and b/lib/jaxmeapi-0.5.1.jar differ diff --git a/lib/jaxmejs-0.5.1.jar b/lib/jaxmejs-0.5.1.jar new file mode 100755 index 0000000..63cb385 Binary files /dev/null and b/lib/jaxmejs-0.5.1.jar differ diff --git a/lib/jaxmexs-0.5.1.jar b/lib/jaxmexs-0.5.1.jar new file mode 100755 index 0000000..17a7e65 Binary files /dev/null and b/lib/jaxmexs-0.5.1.jar differ diff --git a/lib/jpf-1.5.jar b/lib/jpf-1.5.jar new file mode 100755 index 0000000..5353d0c Binary files /dev/null and b/lib/jpf-1.5.jar differ diff --git a/lib/junit-4.1.jar b/lib/junit-4.1.jar new file mode 100755 index 0000000..2c46d67 Binary files /dev/null and b/lib/junit-4.1.jar differ diff --git a/lib/log4j-1.2.12.jar b/lib/log4j-1.2.12.jar new file mode 100755 index 0000000..9b5a720 Binary files /dev/null and b/lib/log4j-1.2.12.jar differ diff --git a/lib/logkit-1.0.1.jar b/lib/logkit-1.0.1.jar new file mode 100755 index 0000000..d3250ee Binary files /dev/null and b/lib/logkit-1.0.1.jar differ diff --git a/lib/postgresql-9.1-901.jdbc3.jar b/lib/postgresql-9.1-901.jdbc3.jar new file mode 100644 index 0000000..046eeca Binary files /dev/null and b/lib/postgresql-9.1-901.jdbc3.jar differ diff --git a/lib/servlet-api-2.3.jar b/lib/servlet-api-2.3.jar new file mode 100755 index 0000000..cd5b351 Binary files /dev/null and b/lib/servlet-api-2.3.jar differ diff --git a/lib/unbbayes-4.10.4-1s.jar b/lib/unbbayes-4.10.4-1s.jar new file mode 100755 index 0000000..c53c95e Binary files /dev/null and b/lib/unbbayes-4.10.4-1s.jar differ diff --git a/lib/xalan-2.7.0.jar b/lib/xalan-2.7.0.jar new file mode 100755 index 0000000..007be39 Binary files /dev/null and b/lib/xalan-2.7.0.jar differ diff --git a/lib/xml-apis-1.0.b2.jar b/lib/xml-apis-1.0.b2.jar new file mode 100755 index 0000000..ad33a5a Binary files /dev/null and b/lib/xml-apis-1.0.b2.jar differ diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml new file mode 100644 index 0000000..2d5f877 --- /dev/null +++ b/nbproject/ant-deploy.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..db58d5e --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +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> + + +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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..2e0f702 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=94d05c5c +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=94d05c5c +nbproject/build-impl.xml.script.CRC32=a02c700a +nbproject/build-impl.xml.stylesheet.CRC32=b7883b1f@1.36.1.1 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..25ea7c6 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,131 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processor.options=-Aeclipselink.canonicalmodel.use_static_factory=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +file.reference.avalon-framework-4.1.3.jar=lib/avalon-framework-4.1.3.jar +file.reference.commons-fileupload-1.2.2.jar=lib/commons-fileupload-1.2.2.jar +file.reference.commons-io-2.1.jar=lib/commons-io-2.1.jar +file.reference.commons-lang3-3.1.jar=lib/commons-lang3-3.1.jar +file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar +file.reference.icu4j-3.8.jar=lib/icu4j-3.8.jar +file.reference.javahelp-2.0.02.jar=lib/javahelp-2.0.02.jar +file.reference.jaxme2-0.5.1.jar=lib/jaxme2-0.5.1.jar +file.reference.jaxme2-rt-0.5.1.jar=lib/jaxme2-rt-0.5.1.jar +file.reference.jaxmeapi-0.5.1.jar=lib/jaxmeapi-0.5.1.jar +file.reference.jaxmejs-0.5.1.jar=lib/jaxmejs-0.5.1.jar +file.reference.jaxmexs-0.5.1.jar=lib/jaxmexs-0.5.1.jar +file.reference.jpf-1.5.jar=lib/jpf-1.5.jar +file.reference.junit-4.1.jar=lib/junit-4.1.jar +file.reference.log4j-1.2.12.jar=lib/log4j-1.2.12.jar +file.reference.logkit-1.0.1.jar=lib/logkit-1.0.1.jar +file.reference.postgresql-9.1-901.jdbc3.jar=lib/postgresql-9.1-901.jdbc3.jar +file.reference.servlet-api-2.3.jar=lib/servlet-api-2.3.jar +file.reference.unbbayes-4.10.4-1s.jar=lib/unbbayes-4.10.4-1s.jar +file.reference.xalan-2.7.0.jar=lib/xalan-2.7.0.jar +file.reference.xml-apis-1.0.b2.jar=lib/xml-apis-1.0.b2.jar +includes=** +j2ee.compile.on.save=false +j2ee.deploy.on.save=false +j2ee.platform=1.6-web +j2ee.platform.classpath=${j2ee.server.home}/modules/jstl-impl.jar:${j2ee.server.home}/modules/javax.resource.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.ejb.jar:${j2ee.server.home}/modules/jsf-impl.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/javax.annotation.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.security.auth.message.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee.jar:${j2ee.server.home}/modules/jsf-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.deploy.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/javax.security.jacc.jar:${j2ee.server.home}/modules/javax.transaction.jar:${j2ee.server.home}/modules/jersey-core.jar:${j2ee.server.home}/modules/javax.servlet.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.jms.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 +j2ee.platform.wsimport.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 +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${libs.primefaces.classpath}:\ + ${libs.hibernate-support.classpath}:\ + ${file.reference.avalon-framework-4.1.3.jar}:\ + ${file.reference.commons-fileupload-1.2.2.jar}:\ + ${file.reference.commons-io-2.1.jar}:\ + ${file.reference.commons-lang3-3.1.jar}:\ + ${file.reference.commons-logging-1.1.jar}:\ + ${file.reference.icu4j-3.8.jar}:\ + ${file.reference.javahelp-2.0.02.jar}:\ + ${file.reference.jaxme2-0.5.1.jar}:\ + ${file.reference.jaxme2-rt-0.5.1.jar}:\ + ${file.reference.jaxmeapi-0.5.1.jar}:\ + ${file.reference.jaxmejs-0.5.1.jar}:\ + ${file.reference.jaxmexs-0.5.1.jar}:\ + ${file.reference.jpf-1.5.jar}:\ + ${file.reference.junit-4.1.jar}:\ + ${file.reference.log4j-1.2.12.jar}:\ + ${file.reference.logkit-1.0.1.jar}:\ + ${file.reference.servlet-api-2.3.jar}:\ + ${file.reference.unbbayes-4.10.4-1s.jar}:\ + ${file.reference.xalan-2.7.0.jar}:\ + ${file.reference.xml-apis-1.0.b2.jar}:\ + ${file.reference.postgresql-9.1-901.jdbc3.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.6 +javac.target=1.6 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=SimDeCS.war +war.name=SimDeCS.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..848272b --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,111 @@ + + + org.netbeans.modules.web.project + + + SimDeCS + 1.6.5 + + + ${libs.primefaces.classpath} + WEB-INF/lib + + + ${libs.hibernate-support.classpath} + WEB-INF/lib + + + ${file.reference.avalon-framework-4.1.3.jar} + WEB-INF/lib + + + ${file.reference.commons-fileupload-1.2.2.jar} + WEB-INF/lib + + + ${file.reference.commons-io-2.1.jar} + WEB-INF/lib + + + ${file.reference.commons-lang3-3.1.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-1.1.jar} + WEB-INF/lib + + + ${file.reference.icu4j-3.8.jar} + WEB-INF/lib + + + ${file.reference.javahelp-2.0.02.jar} + WEB-INF/lib + + + ${file.reference.jaxme2-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxme2-rt-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmeapi-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmejs-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jaxmexs-0.5.1.jar} + WEB-INF/lib + + + ${file.reference.jpf-1.5.jar} + WEB-INF/lib + + + ${file.reference.junit-4.1.jar} + WEB-INF/lib + + + ${file.reference.log4j-1.2.12.jar} + WEB-INF/lib + + + ${file.reference.logkit-1.0.1.jar} + WEB-INF/lib + + + ${file.reference.servlet-api-2.3.jar} + WEB-INF/lib + + + ${file.reference.unbbayes-4.10.4-1s.jar} + WEB-INF/lib + + + ${file.reference.xalan-2.7.0.jar} + WEB-INF/lib + + + ${file.reference.xml-apis-1.0.b2.jar} + WEB-INF/lib + + + ${file.reference.postgresql-9.1-901.jdbc3.jar} + WEB-INF/lib + + + + + + + + + + + + diff --git a/samples/headache.xml b/samples/headache.xml new file mode 100755 index 0000000..7e5d5b5 --- /dev/null +++ b/samples/headache.xml @@ -0,0 +1,1277 @@ + + + + 1.0 + Headache + UnBBayes + + + 40 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Rest Relief + + + + + Nuchal rigidity + + + + + Nasal Obstruction + + + + + Uncommon episodies + + + + + Visual Disturbance + + + + + High frequency + + + + + Antimicrobians + + + + + Fever + + + + + Nasal Discharge + + + + + Sinusitis + + + + + Facial Pain + + + + + Painful mastication + + + + + Temporomandibular + + + + + Aneurysmal History + + + + + Acute weakness + + + + + Diplopy + + + + + Seizure + + + + + Imaging Investigation + + + + + Specialist + + + + + Profilaxy + + + + + Analgesia + + + + + Unilateral Red Eye + + + + + Photophobia + + + + + Pulsating Pain + + + + + Hemicranial Pain + + + + + Cluster Headache + + + + + Migraine + + + + + Tension-type Headache + + + + + Nausea + + + + + Holocranial Pain + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + 0.4000000059604645 + 0.6000000238418579 + 0.30000001192092896 + 0.699999988079071 + 0.3499999940395355 + 0.6499999761581421 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + 0.9990000128746033 + 0.0010000000474974513 + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.10000000149011612 + 0.8999999761581421 + + + + + + + + + + + + 0.949999988079071 + 0.05000000074505806 + 0.75 + 0.25 + 0.699999988079071 + 0.30000001192092896 + 0.3499999940395355 + 0.6499999761581421 + 0.8999999761581421 + 0.10000000149011612 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.15000000596046448 + 0.8500000238418579 + 0.8999999761581421 + 0.10000000149011612 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.15000000596046448 + 0.8500000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.20000000298023224 + 0.800000011920929 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.5 + 0.5 + 0.800000011920929 + 0.20000000298023224 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + + + + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.699999988079071 + 0.30000001192092896 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.8999999761581421 + 0.10000000149011612 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.9990000128746033 + 0.0010000000474974513 + 0.0010000000474974513 + 0.9990000128746033 + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + 0.009999999776482582 + 0.9900000095367432 + + + + + + 0.0010000000474974513 + 0.9990000128746033 + + + + + + + + + + + + + + 0.9900000095367432 + 0.009999999776482582 + 0.20000000298023224 + 0.800000011920929 + 0.6499999761581421 + 0.3499999940395355 + 0.30000001192092896 + 0.699999988079071 + 0.8999999761581421 + 0.10000000149011612 + 0.10000000149011612 + 0.8999999761581421 + 0.6000000238418579 + 0.4000000059604645 + 0.20000000298023224 + 0.800000011920929 + 0.6499999761581421 + 0.3499999940395355 + 0.4000000059604645 + 0.6000000238418579 + 0.800000011920929 + 0.20000000298023224 + 0.30000001192092896 + 0.699999988079071 + 0.800000011920929 + 0.20000000298023224 + 0.4000000059604645 + 0.6000000238418579 + 0.4000000059604645 + 0.6000000238418579 + 0.009999999776482582 + 0.9900000095367432 + 0.9900000095367432 + 0.009999999776482582 + 0.4000000059604645 + 0.6000000238418579 + 0.8999999761581421 + 0.10000000149011612 + 0.20000000298023224 + 0.800000011920929 + 0.949999988079071 + 0.05000000074505806 + 0.20000000298023224 + 0.800000011920929 + 0.800000011920929 + 0.20000000298023224 + 0.10000000149011612 + 0.8999999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.20000000298023224 + 0.800000011920929 + 0.10000000149011612 + 0.8999999761581421 + 0.05000000074505806 + 0.949999988079071 + 0.10000000149011612 + 0.8999999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.550000011920929 + 0.44999998807907104 + 0.0010000000474974513 + 0.9990000128746033 + 0.949999988079071 + 0.05000000074505806 + 0.6499999761581421 + 0.3499999940395355 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.8999999761581421 + 0.10000000149011612 + 0.550000011920929 + 0.44999998807907104 + 0.550000011920929 + 0.44999998807907104 + 0.10000000149011612 + 0.8999999761581421 + 0.6000000238418579 + 0.4000000059604645 + 0.10000000149011612 + 0.8999999761581421 + 0.15000000596046448 + 0.8500000238418579 + 0.05000000074505806 + 0.949999988079071 + 0.05000000074505806 + 0.949999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.9900000095367432 + 0.009999999776482582 + 0.30000001192092896 + 0.699999988079071 + 0.8999999761581421 + 0.10000000149011612 + 0.20000000298023224 + 0.800000011920929 + 0.8181819915771484 + 0.18181799352169037 + 0.30000001192092896 + 0.699999988079071 + 0.550000011920929 + 0.44999998807907104 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.20000000298023224 + 0.800000011920929 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + 0.009999999776482582 + 0.9900000095367432 + + + + + + + + + + + + + + + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.44999998807907104 + 0.550000011920929 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.44999998807907104 + 0.550000011920929 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.3499999940395355 + 0.6499999761581421 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.699999988079071 + 0.30000001192092896 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.30000001192092896 + 0.699999988079071 + 0.5 + 0.5 + 0.31818199157714844 + 0.6818180084228516 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.6666669845581055 + 0.33333298563957214 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.3499999940395355 + 0.6499999761581421 + 0.30000001192092896 + 0.699999988079071 + 0.009999999776482582 + 0.9900000095367432 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.5 + 0.5 + 0.4000000059604645 + 0.6000000238418579 + 0.6499999761581421 + 0.3499999940395355 + 0.699999988079071 + 0.30000001192092896 + 0.44999998807907104 + 0.550000011920929 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.3499999940395355 + 0.6499999761581421 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6499999761581421 + 0.3499999940395355 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.550000011920929 + 0.44999998807907104 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + 0.9990000128746033 + 0.0010000000474974513 + 0.9900000095367432 + 0.009999999776482582 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.699999988079071 + 0.30000001192092896 + 0.6000000238418579 + 0.4000000059604645 + 0.949999988079071 + 0.05000000074505806 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + 0.550000011920929 + 0.44999998807907104 + 0.699999988079071 + 0.30000001192092896 + 0.550000011920929 + 0.44999998807907104 + 0.5 + 0.5 + 0.05000000074505806 + 0.949999988079071 + + + + + + + + + + + 0.6000000238418579 + 0.4000000059604645 + 0.20000000298023224 + 0.800000011920929 + 0.4000000059604645 + 0.6000000238418579 + 0.15000000596046448 + 0.8500000238418579 + 0.9900000095367432 + 0.009999999776482582 + 0.800000011920929 + 0.20000000298023224 + 0.8999999761581421 + 0.10000000149011612 + 0.6499999761581421 + 0.3499999940395355 + + + + + + 0.029999999329447746 + 0.9700000286102295 + + + + + + 0.05000000074505806 + 0.949999988079071 + + + + + \ No newline at end of file diff --git a/setup/glassfish-resources.xml b/setup/glassfish-resources.xml new file mode 100644 index 0000000..0fd0d9e --- /dev/null +++ b/setup/glassfish-resources.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/conf/MANIFEST.MF b/src/conf/MANIFEST.MF new file mode 100644 index 0000000..59499bc --- /dev/null +++ b/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/src/conf/persistence.xml b/src/conf/persistence.xml new file mode 100644 index 0000000..1fcb1bd --- /dev/null +++ b/src/conf/persistence.xml @@ -0,0 +1,23 @@ + + + + org.hibernate.ejb.HibernatePersistence + jdbc/SimDeCS + org.ufcspa.simdecs.entities.Usuario + org.ufcspa.simdecs.entities.Caso + org.ufcspa.simdecs.entities.Paciente + org.ufcspa.simdecs.entities.Rede + org.ufcspa.simdecs.entities.Nodo + org.ufcspa.simdecs.entities.DependenciaNodo + org.ufcspa.simdecs.entities.NodoPaciente + org.ufcspa.simdecs.entities.PerguntaNodo + org.ufcspa.simdecs.entities.RespostaNodo + org.ufcspa.simdecs.entities.SinonimoResposta + true + + + + + + + diff --git a/src/java/org/ufcspa/simdecs/bn/ui/FileUploadController.java b/src/java/org/ufcspa/simdecs/bn/ui/FileUploadController.java new file mode 100644 index 0000000..cfde520 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/bn/ui/FileUploadController.java @@ -0,0 +1,94 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.bn.ui; + +import java.io.*; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.faces.application.FacesMessage; +import javax.faces.bean.ManagedBean; +import javax.faces.context.FacesContext; +import javax.persistence.EntityManager; +import javax.xml.bind.JAXBException; +import org.primefaces.event.FileUploadEvent; +import org.primefaces.model.UploadedFile; +import org.ufcspa.simdecs.entities.Nodo; +import org.ufcspa.simdecs.entities.Rede; +import org.ufcspa.simdecs.util.DbUtil; +import unbbayes.io.exception.LoadException; +import unbbayes.io.xmlbif.version6.XMLBIFIO; +import unbbayes.prs.bn.ProbabilisticNetwork; + +/** + * + * @author mchelem + */ +@ManagedBean(name = "fileUploadController") +public class FileUploadController implements Serializable { + + private static final Logger logger = Logger.getLogger("" + FileUploadController.class); + EntityManager em = null; + + public FileUploadController() { + em = DbUtil.getInstance().getEntityManager(); + } + + private File saveUploadedFile(UploadedFile uploadedFile) throws IOException{ + long unixTime = System.currentTimeMillis() / 1000L; + + InputStream in = new BufferedInputStream(uploadedFile.getInputstream()); + File file = new File("bn_"+ unixTime + "_" + uploadedFile.getFileName()); + FileOutputStream fout = new FileOutputStream(file); + while(in.available() != 0){ + fout.write(in.read()); + } + logger.log(Level.INFO, "Uploaded file saved in: {0}", file.getAbsolutePath()); + return file; + } + + private void persist(Rede redeBayesiana){ + em.getTransaction().begin(); + em.persist(redeBayesiana); + em.getTransaction().commit(); + logger.log(Level.INFO, "Bayesian Network {0} persisted.", redeBayesiana.getNome()); + } + + + public void handleFileUpload(FileUploadEvent event) { + try { + File file = this.saveUploadedFile(event.getFile()); + // required to run unbbayes gui classes on server + System.setProperty("java.awt.headless", "false"); + + ProbabilisticNetwork bn = new ProbabilisticNetwork(null); + XMLBIFIO.loadXML(new File(file.getAbsolutePath()), bn); + Rede rede = new Rede(); + rede.setNome(bn.getName()); + rede.setArquivo(file.getAbsolutePath()); + + ArrayList nodes = new ArrayList(); + for (unbbayes.prs.Node prs_node: bn.getNodes()){ + Nodo nodo = new Nodo(); + nodo.setNome(prs_node.getName()); + nodo.setBogus("N"); + nodo.setRede(rede); + nodes.add(nodo); + } + rede.setNodos(nodes); + persist(rede); + + FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded."); + FacesContext.getCurrentInstance().addMessage(null, msg); + } catch (LoadException ex) { + Logger.getLogger(FileUploadController.class.getName()).log(Level.SEVERE, null, ex); + } catch (IOException ex) { + Logger.getLogger(FileUploadController.class.getName()).log(Level.SEVERE, null, ex); + } catch (JAXBException ex) { + Logger.getLogger(FileUploadController.class.getName()).log(Level.SEVERE, null, ex); + } + } +} + \ No newline at end of file diff --git a/src/java/org/ufcspa/simdecs/entities/Caso.java b/src/java/org/ufcspa/simdecs/entities/Caso.java new file mode 100644 index 0000000..68d963c --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/Caso.java @@ -0,0 +1,131 @@ +/* + * 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.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; +import org.hibernate.annotations.Index; +import org.hibernate.annotations.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(appliesTo="Caso", + indexes= { + @Index(name="caso_usu_ix", columnNames="usu_id"), + @Index(name="caso_nome_ix", columnNames="nome") + } + ) +public class Caso implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @SequenceGenerator(name="seqCaso", sequenceName="SQ_CASO") + @GeneratedValue(strategy = GenerationType.AUTO, generator="seqCaso") + private Long id; + + @Column(nullable=false, length=300) + private String nome; + + @Column(nullable=false, length=4000) + private String textoInicial; + + @Column(nullable=false, length=4000) + private String resumo; + + @ManyToOne + @JoinColumn(name="usu_id", nullable=false) + private Usuario usuario; + + @OneToMany(mappedBy="caso") + private List pacientes; + + public Usuario getUsuario() { + return usuario; + } + + public void setUsuario(Usuario usuario) { + this.usuario = usuario; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public String getResumo() { + return resumo; + } + + public void setResumo(String resumo) { + this.resumo = resumo; + } + + public String getTextoInicial() { + return textoInicial; + } + + public void setTextoInicial(String textoInicial) { + this.textoInicial = textoInicial; + } + + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + Caso other = (Caso) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.Caso[ id=" + id + " ]"; + } + + public List getPacientes() { + return pacientes; + } + + public void setPacientes(List pacientes) { + this.pacientes = pacientes; + } +} diff --git a/src/java/org/ufcspa/simdecs/entities/DependenciaNodo.java b/src/java/org/ufcspa/simdecs/entities/DependenciaNodo.java new file mode 100644 index 0000000..346cd19 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/DependenciaNodo.java @@ -0,0 +1,99 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.entities; + +import java.io.Serializable; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(name="DEPENDENCIA_NODO") +public class DependenciaNodo implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqDependenciaNodo", sequenceName="SQ_DEPENDENCIA_NODO") + @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqDependenciaNodo") + private Long id; + + @ManyToOne + @JoinColumn(name="nodo_id", nullable=false) + private Nodo nodo; + + @ManyToOne + @JoinColumn(name="nodo_dependente_id", nullable=false) + private Nodo nodoDependente; + + @ManyToOne + @JoinColumn(name="resn_id", nullable=false) + private Nodo respostaNodo; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + DependenciaNodo other = (DependenciaNodo) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.DependenciaNodo[ id=" + id + " ]"; + } + + public Nodo getNodo() { + return nodo; + } + + public void setNodo(Nodo nodo) { + this.nodo = nodo; + } + + public Nodo getNodoDependente() { + return nodoDependente; + } + + public void setNodoDependente(Nodo nodoDependente) { + this.nodoDependente = nodoDependente; + } + + public Nodo getRespostaNodo() { + return respostaNodo; + } + + public void setRespostaNodo(Nodo respostaNodo) { + this.respostaNodo = respostaNodo; + } + +} diff --git a/src/java/org/ufcspa/simdecs/entities/Nodo.java b/src/java/org/ufcspa/simdecs/entities/Nodo.java new file mode 100644 index 0000000..afc7b81 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/Nodo.java @@ -0,0 +1,159 @@ +/* + * 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.List; +import javax.persistence.*; + +/** + * + * @author maroni + */ +@Entity +public class Nodo implements Serializable { + + public static final String SINAL_SINTOMA = "SINAL_SINTOMA"; + public static final String HISTORICO = "HISTORICO"; + public static final String EXAME_FISICO = "EXAME_FISICO"; + public static final String EXAME_COMPLEMENTAR = "EXAME_COMPLEMENTAR"; + public static final String DIAGNOSTICO = "DIAGNOSTICO"; + public static final String CONDUTA = "CONDUTA"; + + + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqNodo", sequenceName="SQ_NODO") + @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqNodo") + private Long id; + + @Column(nullable=false, length=100) + private String nome; + + @Column(nullable=true, length=100) + private String nomeAmigavel; + + @Column(nullable=true) + private Integer tempo; + + @Column(nullable=true) + private Float custo; + + @Column(nullable=true, length=30) + private String tipo; + + @Column(nullable=true, length=1) + private String bogus; + + @OneToMany(cascade = javax.persistence.CascadeType.ALL, mappedBy="nodo") + private List perguntas; + + @ManyToOne + @JoinColumn(name="rede_id", nullable=false) + private Rede rede; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Nodo other = (Nodo) obj; + if ((this.nome == null) ? (other.nome != null) : !this.nome.equals(other.nome)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 17 * hash + (this.nome != null ? this.nome.hashCode() : 0); + return hash; + } + + + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.Nodo[ nome=" + nome + " ]"; + } + + public Float getCusto() { + return custo; + } + + public void setCusto(Float custo) { + this.custo = custo; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public String getNomeAmigavel() { + return nomeAmigavel; + } + + public void setNomeAmigavel(String nomeAmigavel) { + this.nomeAmigavel = nomeAmigavel; + } + + public Rede getRede() { + return rede; + } + + public void setRede(Rede rede) { + this.rede = rede; + } + + public Integer getTempo() { + return tempo; + } + + public void setTempo(Integer tempo) { + this.tempo = tempo; + } + + public String getTipo() { + return tipo; + } + + public void setTipo(String tipo) { + this.tipo = tipo; + } + + public String getBogus() { + return bogus; + } + + public void setBogus(String bogus) { + this.bogus = bogus; + } + + public List getPerguntas() { + return perguntas; + } + + public void setPerguntas(List perguntas) { + this.perguntas = perguntas; + } + + +} diff --git a/src/java/org/ufcspa/simdecs/entities/NodoPaciente.java b/src/java/org/ufcspa/simdecs/entities/NodoPaciente.java new file mode 100644 index 0000000..e6e7df9 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/NodoPaciente.java @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.entities; + +import java.io.Serializable; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.SequenceGenerator; + +/** + * + * @author maroni + */ +@Entity +public class NodoPaciente implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqNodoPaciente", sequenceName="SQ_NODO_PACIENTE") + @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqNodoPaciente") + private Long id; + + @ManyToOne + @JoinColumn(name="nodo_id", nullable=false) + private Nodo nodo; + + @ManyToOne + @JoinColumn(name="paciente_id", nullable=false) + private Paciente paciente; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + NodoPaciente other = (NodoPaciente) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.NodoPaciente[ id=" + id + " ]"; + } + + public Nodo getNodo() { + return nodo; + } + + public void setNodo(Nodo nodo) { + this.nodo = nodo; + } + + public Paciente getPaciente() { + return paciente; + } + + public void setPaciente(Paciente paciente) { + this.paciente = paciente; + } + +} diff --git a/src/java/org/ufcspa/simdecs/entities/Paciente.java b/src/java/org/ufcspa/simdecs/entities/Paciente.java new file mode 100644 index 0000000..47cd958 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/Paciente.java @@ -0,0 +1,163 @@ +/* + * 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.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; +import org.hibernate.annotations.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(appliesTo="Paciente") +public class Paciente implements Serializable { + + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="seqPaciente", sequenceName="SQ_PACIENTE") + @GeneratedValue(strategy = GenerationType.AUTO, generator="seqPaciente") + private Long id; + + @ManyToOne + @JoinColumn(name="rede_id", nullable=false) + private Rede rede; + + @ManyToOne + @JoinColumn(name="caso_id", nullable=false) + private Caso caso; + + @Column(length=100, nullable=false) + private String nome; + + @Column(length=3, nullable=false) + private Integer idade; + + @Column(nullable=false) + private Float peso; + + @Column(nullable=false) + private Float altura; + + @Column(length=1, nullable=false) + private String sexo; + + @OneToMany(mappedBy="paciente") + private List nodos; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + Paciente other = (Paciente) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.Paciente[ id=" + id + " ]"; + } + + public Integer getIdade() { + return idade; + } + + public void setIdade(Integer idade) { + this.idade = idade; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public Float getPeso() { + return peso; + } + + public void setPeso(Float peso) { + this.peso = peso; + } + + public Rede getRede() { + return rede; + } + + public void setRede(Rede rede) { + this.rede = rede; + } + + public String getSexo() { + return sexo; + } + + public void setSexo(String sexo) { + this.sexo = sexo; + } + + public Caso getCaso() { + return caso; + } + + public void setCaso(Caso caso) { + this.caso = caso; + } + + public String getImage() { + if (sexo.equals("F")) + return "img/patientFemale.png"; + else + return "img/patientMale.png"; + } + + public Float getAltura() { + return altura; + } + + public void setAltura(Float altura) { + this.altura = altura; + } + + public List getNodos() { + return nodos; + } + + public void setNodos(List nodos) { + this.nodos = nodos; + } +} diff --git a/src/java/org/ufcspa/simdecs/entities/PerguntaNodo.java b/src/java/org/ufcspa/simdecs/entities/PerguntaNodo.java new file mode 100644 index 0000000..f1a8ae0 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/PerguntaNodo.java @@ -0,0 +1,101 @@ +/* + * 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.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(name="PERGUNTA_NODO") +public class PerguntaNodo implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqPerguntaNodo", sequenceName="SQ_PERGUNTA_NODO") + @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqPerguntaNodo") + private Long id; + + @Column(length=2000, nullable=false) + private String texto; + + @ManyToOne + @JoinColumn(name="nodo_id", nullable=false) + private Nodo nodo; + + @OneToMany(cascade = javax.persistence.CascadeType.ALL, mappedBy="pergunta") + private List respostas; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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 PerguntaNodo)) { + return false; + } + PerguntaNodo other = (PerguntaNodo) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.PerguntaNodo[ id=" + id + " ]"; + } + + public String getTexto() { + return texto; + } + + public void setTexto(String texto) { + this.texto = texto; + } + + public Nodo getNodo() { + return nodo; + } + + public void setNodo(Nodo nodo) { + this.nodo = nodo; + } + + public List getRespostas() { + return respostas; + } + + public void setRespostas(List respostas) { + this.respostas = respostas; + } + + +} diff --git a/src/java/org/ufcspa/simdecs/entities/Rede.java b/src/java/org/ufcspa/simdecs/entities/Rede.java new file mode 100644 index 0000000..52a3457 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/Rede.java @@ -0,0 +1,98 @@ +/* + * 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.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; +import org.hibernate.annotations.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(appliesTo="Rede") +public class Rede implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="seqRede", sequenceName="SQ_REDE") + @GeneratedValue(strategy = GenerationType.AUTO, generator="seqRede") + private Long id; + + @Column(length=100, nullable=false) + private String nome; + + @Column(length=100, nullable=false) + private String arquivo; + + @OneToMany(cascade = javax.persistence.CascadeType.ALL, mappedBy="rede") + private List nodos; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + Rede other = (Rede) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.Rede[ id=" + id + " ]"; + } + + public String getArquivo() { + return arquivo; + } + + public void setArquivo(String arquivo) { + this.arquivo = arquivo; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + + public List getNodos() { + return nodos; + } + + public void setNodos(List nodos) { + this.nodos = nodos; + } + +} diff --git a/src/java/org/ufcspa/simdecs/entities/RespostaNodo.java b/src/java/org/ufcspa/simdecs/entities/RespostaNodo.java new file mode 100644 index 0000000..8b1d562 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/RespostaNodo.java @@ -0,0 +1,114 @@ +/* + * 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.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; +// +/** + * + * @author maroni + */ +@Entity +@Table(name="RESPOSTA_NODO") +public class RespostaNodo implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqRespotaNOdo", sequenceName="SQ_RESPOTA_NODO") + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + @Column(nullable=false, length=3) + private Integer pesoMinimo; + + @Column(nullable=false, length=3) + private Integer pesoMaximo; + + @ManyToOne + @JoinColumn(name="nodo_id", nullable=false) + private PerguntaNodo pergunta; + + @OneToMany(cascade = javax.persistence.CascadeType.ALL, mappedBy="resposta") + private List sinonimos; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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 RespostaNodo)) { + return false; + } + RespostaNodo other = (RespostaNodo) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.RespostaNodo[ id=" + id + " ]"; + } + + public Integer getPesoMaximo() { + return pesoMaximo; + } + + public void setPesoMaximo(Integer pesoMaximo) { + this.pesoMaximo = pesoMaximo; + } + + public Integer getPesoMinimo() { + return pesoMinimo; + } + + public void setPesoMinimo(Integer pesoMinimo) { + this.pesoMinimo = pesoMinimo; + } + + public PerguntaNodo getPergunta() { + return pergunta; + } + + public void setPergunta(PerguntaNodo pergunta) { + this.pergunta = pergunta; + } + + + public List getSinonimos() { + return sinonimos; + } + + public void setSinonimos(List sinonimos) { + this.sinonimos = sinonimos; + } + + + +} diff --git a/src/java/org/ufcspa/simdecs/entities/SinonimoResposta.java b/src/java/org/ufcspa/simdecs/entities/SinonimoResposta.java new file mode 100644 index 0000000..47f54c4 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/SinonimoResposta.java @@ -0,0 +1,88 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +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.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.SequenceGenerator; +import javax.persistence.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(name="SINONIMO_RESPOSTA") +public class SinonimoResposta implements Serializable { + private static final long serialVersionUID = 1L; + @Id + @SequenceGenerator(name="SeqSinonimoResposta", sequenceName="SQ_SINONIMO_RESPOTA") + @GeneratedValue(strategy = GenerationType.AUTO, generator="SeqSinonimoResposta") + private Long id; + + @Column(length=2000, nullable=false) + private String texto; + + @ManyToOne + @JoinColumn(name="resn_id", nullable=false) + private RespostaNodo resposta; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + SinonimoResposta other = (SinonimoResposta) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.SinonimoRespota[ id=" + id + " ]"; + } + + public RespostaNodo getResposta() { + return resposta; + } + + public void setResposta(RespostaNodo resposta) { + this.resposta = resposta; + } + + public String getTexto() { + return texto; + } + + public void setTexto(String texto) { + this.texto = texto; + } + + +} diff --git a/src/java/org/ufcspa/simdecs/entities/Usuario.java b/src/java/org/ufcspa/simdecs/entities/Usuario.java new file mode 100644 index 0000000..3c8afdf --- /dev/null +++ b/src/java/org/ufcspa/simdecs/entities/Usuario.java @@ -0,0 +1,97 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +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.SequenceGenerator; +import org.hibernate.annotations.Table; + +/** + * + * @author maroni + */ +@Entity +@Table(appliesTo="Usuario") +public class Usuario implements Serializable { + private static final long serialVersionUID = 1L; + + + @Id + @SequenceGenerator(name="seqUsuario", sequenceName="SQ_USUARIO") + @GeneratedValue(strategy = GenerationType.AUTO, generator="seqUsuario") + private Long id; + + @Column(length=50, nullable=false) + private String nome; + + @Column(length=30, nullable=false, unique=true) + private String login; + + @Column(length=50, nullable=false) + private String senha; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getNome() { + return nome; + } + + public void setNome(String nome) { + this.nome = nome; + } + + public String getSenha() { + return senha; + } + + public void setSenha(String senha) { + this.senha = senha; + } + + @Override + public int hashCode() { + int hash = 0; + hash += (id != null ? id.hashCode() : 0); + return hash; + } + + @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; + } + Usuario other = (Usuario) object; + if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { + return false; + } + return true; + } + + @Override + public String toString() { + return "org.ufcspa.simdecs.entities.Usuario[ id=" + id + " ]"; + } + +} diff --git a/src/java/org/ufcspa/simdecs/mb/DefaultManagedBean.java b/src/java/org/ufcspa/simdecs/mb/DefaultManagedBean.java new file mode 100644 index 0000000..16218b3 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/mb/DefaultManagedBean.java @@ -0,0 +1,85 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.mb; + +import java.util.Locale; +import javax.faces.application.FacesMessage; +import javax.faces.application.FacesMessage.Severity; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.persistence.EntityManager; +import javax.servlet.http.HttpSession; +import org.ufcspa.simdecs.entities.Usuario; +import org.ufcspa.simdecs.util.DbUtil; + +/** + * + * @author maroni + */ +public class DefaultManagedBean { + + protected EntityManager em; + + public Usuario getUsuario() { + return (Usuario) getSession().getAttribute("usuario"); + } + + public DefaultManagedBean() { + em = DbUtil.getInstance().getEntityManager(); + } + + public Locale getLocale() { + return getFacesContext().getViewRoot().getLocale(); + } + + public void addMessage(String componentID, Severity severity, String iTitle, String iMessage) { + FacesContext.getCurrentInstance().addMessage(componentID, new FacesMessage(severity, iTitle, iMessage)); + } + + public void addInfoMessage(String componentID, String iTitle, String iMessage) { + addMessage(componentID, FacesMessage.SEVERITY_INFO, iTitle, iMessage); + } + + public void addInfoMessage(String iTitle, String iMessage) { + addInfoMessage(null, iTitle, iMessage); + } + + public void addWarnMessage(String componentID, String iTitle, String iMessage) { + addMessage(componentID, FacesMessage.SEVERITY_WARN, iTitle, iMessage); + } + + public void addWarnMessage(String iTitle, String iMessage) { + addWarnMessage(null, iTitle, iMessage); + } + + public void addErrorMessage(String componentID, String iTitle, String iMessage) { + addMessage(componentID, FacesMessage.SEVERITY_ERROR, iTitle, iMessage); + } + + public void addErrorMessage(String iTitle, String iMessage) { + addErrorMessage(null, iTitle, iMessage); + } + + protected String getTextParameter(String paramName) { + return (String) getFacesContext().getExternalContext().getRequestParameterMap().get(paramName); + } + + protected Object getParameter(String paramName) { + return getFacesContext().getExternalContext().getRequestParameterMap().get(paramName); + } + + protected FacesContext getFacesContext() { + return FacesContext.getCurrentInstance(); + } + + + protected UIComponent getComponentById(String componentId) { + return getFacesContext().getViewRoot().findComponent(componentId); + } + + protected HttpSession getSession() { + return (HttpSession) getFacesContext().getExternalContext().getSession(true); + } +} diff --git a/src/java/org/ufcspa/simdecs/mb/editarcasos/EditarCasoBean.java b/src/java/org/ufcspa/simdecs/mb/editarcasos/EditarCasoBean.java new file mode 100644 index 0000000..959808a --- /dev/null +++ b/src/java/org/ufcspa/simdecs/mb/editarcasos/EditarCasoBean.java @@ -0,0 +1,211 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.mb.editarcasos; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; +import org.ufcspa.simdecs.entities.Caso; +import org.ufcspa.simdecs.entities.Nodo; +import org.ufcspa.simdecs.entities.Paciente; +import org.ufcspa.simdecs.entities.Rede; +import org.ufcspa.simdecs.mb.DefaultManagedBean; + +/** + * + * @author maroni + */ +@ManagedBean +@RequestScoped +public class EditarCasoBean extends DefaultManagedBean { + + private Long idPaciente; + private String nomePaciente; + private Integer idadePaciente; + private Float pesoPaciente; + private Float alturaPaciente; + private String sexoPaciente; + private Long redePaciente; + private Map listaRedesPaciente; + private List listaPacientes; + private String relato; + private Map listaSinaisSintomas; + private List sinaisSintomasSelecionados; + + private Caso caso; + + private void populate() { + // Popula Caso + caso = (Caso) em.createQuery("From Caso where id=:pIDCaso") + .setParameter("pIDCaso", (Long) getSession().getAttribute("casoSelecionado")) + .getSingleResult(); + + // Popula Lista de Redes + Iterator it = em.createQuery("From Rede Order By nome").getResultList().iterator(); + listaRedesPaciente= new HashMap(); + while(it.hasNext()) { + Rede rede = it.next(); + listaRedesPaciente.put(rede.getNome(), String.valueOf(rede.getId())); + } + + // Popula Lista de Pacientes + listaPacientes = caso.getPacientes(); + } + + /** Creates a new instance of EditarCasoBean */ + public EditarCasoBean() { + populate(); + } + + public void prepareAdicionarPaciente() { + redePaciente = idPaciente = null; + sexoPaciente = nomePaciente = ""; + pesoPaciente = null; + idadePaciente= null; + } + + public void adicionarPaciente() { + Rede rede = em.find(Rede.class, redePaciente); + em.getTransaction().begin(); + Paciente paciente = new Paciente(); + paciente.setNome(nomePaciente); + paciente.setIdade(idadePaciente); + paciente.setPeso(pesoPaciente); + paciente.setSexo(sexoPaciente); + paciente.setAltura(alturaPaciente); + paciente.setRede(rede); + paciente.setCaso(caso); + em.persist(paciente); + em.getTransaction().commit(); + addInfoMessage("Paciente Adicionado!", "Paciente adicionado com sucesso!"); + populate(); + } + + public void selecionaPaciente() { + Paciente paciente = em.find(Paciente.class, Long.valueOf(getTextParameter("pIdPaciente"))); + + Iterator it = em.createQuery("From Nodo Where rede.id=:pRedeID and tipo=:pTipo") + .setParameter("pRedeID", paciente.getId()) + .setParameter("pTipo", Nodo.SINAL_SINTOMA) + .getResultList() + .iterator(); + listaSinaisSintomas = new HashMap(); + while(it.hasNext()) { + Nodo nodo = it.next(); + listaSinaisSintomas.put(nodo.getNomeAmigavel(), nodo.getNome()); + } + } + + public Caso getCaso() { + return caso; + } + + public void setCaso(Caso caso) { + this.caso = caso; + } + + public Long getIdPaciente() { + return idPaciente; + } + + public void setIdPaciente(Long idPaciente) { + this.idPaciente = idPaciente; + } + + public Integer getIdadePaciente() { + return idadePaciente; + } + + public void setIdadePaciente(Integer idadePaciente) { + this.idadePaciente = idadePaciente; + } + + + public String getNomePaciente() { + return nomePaciente; + } + + public void setNomePaciente(String nomePaciente) { + this.nomePaciente = nomePaciente; + } + + public Float getPesoPaciente() { + return pesoPaciente; + } + + public void setPesoPaciente(Float pesoPaciente) { + this.pesoPaciente = pesoPaciente; + } + + public Long getRedePaciente() { + return redePaciente; + } + + public void setRedePaciente(Long redePaciente) { + this.redePaciente = redePaciente; + } + + public String getSexoPaciente() { + return sexoPaciente; + } + + public void setSexoPaciente(String sexoPaciente) { + this.sexoPaciente = sexoPaciente; + } + + public Map getListaRedesPaciente() { + return listaRedesPaciente; + } + + public void setListaRedesPaciente(Map listaRedesPaciente) { + this.listaRedesPaciente = listaRedesPaciente; + } + + public List getListaPacientes() { + return listaPacientes; + } + + public void setListaPacientes(List listaPacientes) { + this.listaPacientes = listaPacientes; + } + + public Map getListaSinaisSintomas() { + return listaSinaisSintomas; + } + + public void setListaSinaisSintomas(Map listaSinaisSintomas) { + this.listaSinaisSintomas = listaSinaisSintomas; + } + + public List getSinaisSintomasSelecionados() { + return sinaisSintomasSelecionados; + } + + public void setSinaisSintomasSelecionados(List sinaisSintomasSelecionados) { + this.sinaisSintomasSelecionados = sinaisSintomasSelecionados; + } + + + public String getRelato() { + return relato; + } + + public void setRelato(String relato) { + this.relato = relato; + } + + public Float getAlturaPaciente() { + return alturaPaciente; + } + + public void setAlturaPaciente(Float alturaPaciente) { + this.alturaPaciente = alturaPaciente; + } + + +} diff --git a/src/java/org/ufcspa/simdecs/mb/editarcasos/LoginBean.java b/src/java/org/ufcspa/simdecs/mb/editarcasos/LoginBean.java new file mode 100644 index 0000000..7600b1c --- /dev/null +++ b/src/java/org/ufcspa/simdecs/mb/editarcasos/LoginBean.java @@ -0,0 +1,64 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.mb.editarcasos; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; +import javax.persistence.EntityManager; +import javax.persistence.NoResultException; +import javax.servlet.http.HttpSession; +import org.ufcspa.simdecs.entities.Usuario; +import org.ufcspa.simdecs.mb.DefaultManagedBean; +import org.ufcspa.simdecs.util.DbUtil; + +/** + * + * @author maroni + */ +@ManagedBean +@RequestScoped +public class LoginBean extends DefaultManagedBean { + + + private String login; + private String senha; + + public String getLogin() { + return login; + } + + public void setLogin(String login) { + this.login = login; + } + + public String getSenha() { + return senha; + } + + public void setSenha(String senha) { + this.senha = senha; + } + + public String validadeLogin() { + try { + Usuario usuario = (Usuario) em.createQuery("From Usuario as Usu Where Usu.login=:pLogin and Usu.senha=:pSenha") + .setParameter("pLogin", login.toLowerCase()) + .setParameter("pSenha", senha) + .getSingleResult(); + + HttpSession session = getSession(); + session.setAttribute("usuario", usuario); + session.setMaxInactiveInterval(-1); + return "editarcasos/selecioneCaso.jsf?faces-redirect=true"; + } catch (NoResultException e) { + addInfoMessage("Usuário/Senha Inválidos", "Usuário/Senha Inválidos"); + return null; + } + } + + + public LoginBean() { + } +} diff --git a/src/java/org/ufcspa/simdecs/mb/editarcasos/SelecioneCasoBean.java b/src/java/org/ufcspa/simdecs/mb/editarcasos/SelecioneCasoBean.java new file mode 100644 index 0000000..96df97a --- /dev/null +++ b/src/java/org/ufcspa/simdecs/mb/editarcasos/SelecioneCasoBean.java @@ -0,0 +1,173 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.mb.editarcasos; + +import java.util.List; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; +import org.primefaces.component.commandbutton.CommandButton; +import org.ufcspa.simdecs.entities.Caso; +import org.ufcspa.simdecs.entities.Usuario; +import org.ufcspa.simdecs.mb.DefaultManagedBean; + + +/** + * + * @author maroni + */ +@ManagedBean +@RequestScoped +public class SelecioneCasoBean extends DefaultManagedBean { + + private Long idCaso; + private String nomeUsuario; + private String nomeCaso; + private String textoInicial; + private String resumo; + private List listaCasos; + + public String getNomeUsuario() { + Usuario usuario = getUsuario(); + if (usuario != null) { + return usuario.getNome(); + } else + return null; + } + + public void preparaNovoCaso() { + nomeCaso = textoInicial = resumo = ""; + idCaso = null; + + CommandButton buttonCriar = (CommandButton) getComponentById("fEditarCaso:criar"); + CommandButton buttonEditar = (CommandButton) getComponentById("fEditarCaso:editar"); + CommandButton buttonExcluir = (CommandButton) getComponentById("fEditarCaso:excluir"); + + buttonCriar.setRendered(true); + buttonEditar.setRendered(false); + buttonExcluir.setRendered(false); + } + + public String criarNovoCaso() { + em.getTransaction().begin(); + Usuario usuario = getUsuario(); + + Caso caso = new Caso(); + caso.setNome(nomeCaso); + caso.setResumo(resumo); + caso.setTextoInicial(textoInicial); + caso.setUsuario(usuario); + em.persist(caso); + + em.getTransaction().commit(); + getSession().setAttribute("casoSelecionado", caso.getId()); + + return "/editarcasos/editarCaso.jsf?faces-redirect=true&pIDCaso="; + } + + public String editarCaso() { + + Caso caso = em.find(Caso.class, idCaso); + + if (caso != null) { + em.getTransaction().begin(); + + caso.setNome(nomeCaso); + caso.setResumo(resumo); + caso.setTextoInicial(textoInicial); + em.persist(caso); + + em.getTransaction().commit(); + } + getSession().setAttribute("casoSelecionado", caso.getId()); + + return "/editarcasos/editarCaso.jsf?faces-redirect=true"; + + } + + public void prepararEditarCasoClinico() { + Long id = Long.valueOf(getTextParameter("pIDCaso")); + Caso caso = (Caso) em.createQuery("From Caso Where id=:pIDCaso") + .setParameter("pIDCaso", id) + .getSingleResult(); + + idCaso = id; + nomeCaso = caso.getNome(); + textoInicial = caso.getTextoInicial(); + resumo = caso.getResumo(); + + CommandButton buttonCriar = (CommandButton) getComponentById("fEditarCaso:criar"); + CommandButton buttonEditar = (CommandButton) getComponentById("fEditarCaso:editar"); + CommandButton buttonExcluir = (CommandButton) getComponentById("fEditarCaso:excluir"); + + buttonCriar.setRendered(false); + buttonEditar.setRendered(true); + buttonExcluir.setRendered(true); + } + + public void excluirCasoClinico() { + Long id = Long.valueOf(getTextParameter("pIDCaso")); + Caso caso = (Caso) em.createQuery("From Caso Where id=:pIDCaso") + .setParameter("pIDCaso", id) + .getSingleResult(); + + em.getTransaction().begin(); + em.remove(caso); + em.getTransaction().commit(); + populateCasosClinicos(); + addInfoMessage("Excluido!", "Caso clínico excluido com sucesso!"); + + } + + public SelecioneCasoBean() { + populateCasosClinicos(); + } + + private void populateCasosClinicos() { + listaCasos = em.createQuery("From Caso Where usuario.id=:pIdUsuario Order By nome") + .setParameter("pIdUsuario", getUsuario().getId()) + .getResultList(); + } + + public List getListaCasos() { + return listaCasos; + } + + public void setListaCasos(List listaCasos) { + this.listaCasos = listaCasos; + } + + public String getNomeCaso() { + return nomeCaso; + } + + public void setNomeCaso(String nomeCaso) { + this.nomeCaso = nomeCaso; + } + + public String getResumo() { + return resumo; + } + + public void setResumo(String resumo) { + this.resumo = resumo; + } + + public String getTextoInicial() { + return textoInicial; + } + + public void setTextoInicial(String textoInicial) { + this.textoInicial = textoInicial; + } + + public Long getIdCaso() { + return idCaso; + } + + public void setIdCaso(Long idCaso) { + this.idCaso = idCaso; + } + +} diff --git a/src/java/org/ufcspa/simdecs/test/Teste.java b/src/java/org/ufcspa/simdecs/test/Teste.java new file mode 100644 index 0000000..2754040 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/test/Teste.java @@ -0,0 +1,42 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.test; + +import java.io.File; +import unbbayes.io.xmlbif.version4.XMLBIFIO; +import unbbayes.prs.bn.ProbabilisticNetwork; +import unbbayes.prs.bn.ProbabilisticNode; + +/** + * + * @author maroni + */ +public class Teste { + + /** + * @param args + */ + public static void main(String[] args) { + /* + * Carregando uma rede espec’fica + */ + ProbabilisticNetwork rede = new ProbabilisticNetwork(null); + try { + XMLBIFIO.loadXML(new File("/Users/maroni/teste.xml"), rede); + + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + + /* + * Lendo um nodo espec’fico + * Pegando um nodo. Para trabalhar com a tabela de probabilidades, + * preciso que este nodo seja um ProbabilisticNode. Repare no typecasting + */ + + ProbabilisticNode nodo = (ProbabilisticNode) rede.getNode("seizure"); + } +} diff --git a/src/java/org/ufcspa/simdecs/util/DbUtil.java b/src/java/org/ufcspa/simdecs/util/DbUtil.java new file mode 100644 index 0000000..4510115 --- /dev/null +++ b/src/java/org/ufcspa/simdecs/util/DbUtil.java @@ -0,0 +1,35 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.ufcspa.simdecs.util; + +import javax.persistence.EntityManager; +import javax.persistence.EntityManagerFactory; +import javax.persistence.Persistence; + +/** + * + * @author maroni + */ +public class DbUtil { + + private static DbUtil dbUtil; + private EntityManager em; + + private DbUtil() { + EntityManagerFactory emf = Persistence.createEntityManagerFactory("SimDeCSPU"); + em = emf.createEntityManager(); + } + + public static DbUtil getInstance() { + if (dbUtil == null) + dbUtil = new DbUtil(); + + return dbUtil; + } + + public EntityManager getEntityManager() { + return em; + } +} diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml new file mode 100644 index 0000000..8806522 --- /dev/null +++ b/web/WEB-INF/web.xml @@ -0,0 +1,34 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + *.jsf + + + + 30 + + + + login.jsf + + + PrimeFaces FileUpload Filter + + org.primefaces.webapp.filter.FileUploadFilter + + + + PrimeFaces FileUpload Filter + Faces Servlet + + diff --git a/web/editarcasos/editarCaso.xhtml b/web/editarcasos/editarCaso.xhtml new file mode 100644 index 0000000..0542a4a --- /dev/null +++ b/web/editarcasos/editarCaso.xhtml @@ -0,0 +1,126 @@ + + + + + SimDeCS - Selecione o Caso + + + + + + + + + Bem vindo ao caso clínico ""!

+ Selecione abaixo um dos pacientes ou clique em "Adicionar novo paciente" para montagem do caso clínico. +

+ + + + + + + +
+ + + + +
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + + + +
Relato Inicial do Paciente
+ +
Sinais e Sintomas apresentados
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nome:
Idade
Peso
Altura
Assunto Clínico
+ + + +
Sexo
+ + + + +
+ +     + + +
+
+
+ + diff --git a/web/editarcasos/selecioneCaso.xhtml b/web/editarcasos/selecioneCaso.xhtml new file mode 100644 index 0000000..ec35611 --- /dev/null +++ b/web/editarcasos/selecioneCaso.xhtml @@ -0,0 +1,83 @@ + + + + + SimDeCS - Selecione o Caso + + + + + + + + + Olá ! Seja bem vindo ao simulador de casos clínicos SimDeCS. +

+ Selecione abaixo o caso clínico com o qual deseja trabalhar ou clique em "Criar um novo caso clínico". +

+
+

Selecione o caso clínico:

+
    + +
  • + + + +
  • +
    +
  • + + Criar um novo caso clínico + +
  • +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Nome do Caso
Resumo
Texto Inicial
+
+ +     + +     + +     + + + +
+
+
+ + +
+ + diff --git a/web/img/background.gif b/web/img/background.gif new file mode 100755 index 0000000..3b697ce Binary files /dev/null and b/web/img/background.gif differ diff --git a/web/img/patientFemale.png b/web/img/patientFemale.png new file mode 100755 index 0000000..99d9fb6 Binary files /dev/null and b/web/img/patientFemale.png differ diff --git a/web/img/patientMale.png b/web/img/patientMale.png new file mode 100755 index 0000000..f96304d Binary files /dev/null and b/web/img/patientMale.png differ diff --git a/web/img/plus.png b/web/img/plus.png new file mode 100755 index 0000000..88c42b0 Binary files /dev/null and b/web/img/plus.png differ diff --git a/web/login.xhtml b/web/login.xhtml new file mode 100644 index 0000000..3c24551 --- /dev/null +++ b/web/login.xhtml @@ -0,0 +1,37 @@ + + + + + SimDeCS - Login + + + +



+
+ + +
+ + + + + + + + + + + + +
Usuário:
Senha:
+ +
+
+
+
+
+ + diff --git a/web/modelo.xsd b/web/modelo.xsd new file mode 100644 index 0000000..b6890df --- /dev/null +++ b/web/modelo.xsd @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/rede/index.xhtml b/web/rede/index.xhtml new file mode 100644 index 0000000..b97f284 --- /dev/null +++ b/web/rede/index.xhtml @@ -0,0 +1,20 @@ + + + + + Facelet Title + + + Hello from Facelets + + + + + + + + + diff --git a/web/style.css b/web/style.css new file mode 100644 index 0000000..08a2be3 --- /dev/null +++ b/web/style.css @@ -0,0 +1,50 @@ +/* + Document : style + Created on : 25/01/2012, 08:55:06 + Author : maroni + Description: + Purpose of the stylesheet follows. +*/ + +/* + TODO customize this sample style + Syntax recommendation http://www.w3.org/TR/REC-CSS2/ +*/ + +root { + display: block; +} + +body { + font-size: 12px; + font-family: Verdana,Arial,Helvetica,sans-serif; + background-image: url(img/background.gif) +} + +a:link { + color: blue; +} + +a:visited { + color: blue; +} + +a:hover { + color: blue; +} + +a:active { + color: blue; +} + +h1 { + font-size: 16px; +} + +h2 { + font-size: 13px; +} + +.ui-datalist-data { + border: 0px; +} \ No newline at end of file diff --git a/web/teste.xsd b/web/teste.xsd new file mode 100644 index 0000000..7f55c81 --- /dev/null +++ b/web/teste.xsd @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file