diff --git a/software/build/build.xml b/software/build/build.xml index 95a80f7fc..dc3ee49e0 100644 --- a/software/build/build.xml +++ b/software/build/build.xml @@ -1,12 +1,5 @@ - - @@ -191,6 +184,7 @@ L--> + diff --git a/software/build/project.properties b/software/build/project.properties index 6860dbc10..d64078256 100644 --- a/software/build/project.properties +++ b/software/build/project.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - ############################################################## # # BDA-Lite Project Property File @@ -16,8 +9,8 @@ ### NCIT BROWSER SETTINGS (Defaults for the browser) ### ######################################################### debug.on=false -application.version=2.2 -application.version.display=Version $application.version (using LexEVS 6.0) +application.version=2.3 +application.version.display=Version $application.version (using LexEVS 6.1) log.package=gov.nih.nci log.level=INFO ncitbrowser.conf.path=conf @@ -53,13 +46,15 @@ jboss.server.inst=jboss-5.1.0.GA ############################################################################## ; application.data.path = Path used by application for cache and config files ; lex.evs.api.url = URL to the lexevsapi application (If "null", lg.config.file must point to a local lexevs instance) +lex.evs.api.url=http://ncias-d499-v.nci.nih.gov:29780/lexevsapi61 ; lg.config.file = Points to a local lexevs instance ; mail.smtp.server = Mail server to use for the 'Contact Us' page ; ncicb.contact.url = 'Contact Us' email address ; terminology.subset.download.url = URL to download page of NCI Report Writer application ; term.suggestion.application.url = URL to the NCI Suggest Term application ; ncit.url = URL to NCIt application -; meddra_security_token = Medra security token +; meddra_security_token = MedDRA security token +; ncbo_api_key = NCBO API key ; license_page_option = Display license page flag ; audio_captcha_background_noise_on = Set to false to turn off the background noise for audio captcha (default to true) ; diff --git a/software/ncitbrowser/conf/NCItBrowserProperties.xml b/software/ncitbrowser/conf/NCItBrowserProperties.xml index 1b6c5c050..4584d45b6 100644 --- a/software/ncitbrowser/conf/NCItBrowserProperties.xml +++ b/software/ncitbrowser/conf/NCItBrowserProperties.xml @@ -1,12 +1,5 @@ - - @@ -326,14 +319,6 @@ L--> true - - OMIM_Number - OMIM Number - http://www.ncbi.nlm.nih.gov:80/entrez/dispomim.cgi?id= - see OMIM info - true - - PDQ_Closed_Trial_Search_ID PDQ Closed Trial Search ID @@ -573,6 +558,11 @@ L--> AUDIO_CAPTCHA_BACKGROUND_NOISE_ON @audio_captcha_background_noise_on@ + + + NCBO_API_KEY + @ncbo_api_key@ + diff --git a/software/ncitbrowser/conf/application-config-client-info.xml b/software/ncitbrowser/conf/application-config-client-info.xml index 8b23d5181..4c5695c01 100644 --- a/software/ncitbrowser/conf/application-config-client-info.xml +++ b/software/ncitbrowser/conf/application-config-client-info.xml @@ -1,12 +1,4 @@ - - - diff --git a/software/ncitbrowser/conf/application-config-client.xml b/software/ncitbrowser/conf/application-config-client.xml index c9c6daee3..90b653120 100644 --- a/software/ncitbrowser/conf/application-config-client.xml +++ b/software/ncitbrowser/conf/application-config-client.xml @@ -1,12 +1,4 @@ - - - diff --git a/software/ncitbrowser/conf/ehcache.xml b/software/ncitbrowser/conf/ehcache.xml index 45031aaf9..e9ae42df2 100644 --- a/software/ncitbrowser/conf/ehcache.xml +++ b/software/ncitbrowser/conf/ehcache.xml @@ -1,10 +1,3 @@ - - diff --git a/software/ncitbrowser/conf/ncit-log4j.xml b/software/ncitbrowser/conf/ncit-log4j.xml index 320b7ee50..c074e35d6 100644 --- a/software/ncitbrowser/conf/ncit-log4j.xml +++ b/software/ncitbrowser/conf/ncit-log4j.xml @@ -1,12 +1,4 @@ - - - diff --git a/software/ncitbrowser/lib/aopalliance-1.0.jar b/software/ncitbrowser/lib/aopalliance-1.0.jar new file mode 100644 index 000000000..578b1a0c3 Binary files /dev/null and b/software/ncitbrowser/lib/aopalliance-1.0.jar differ diff --git a/software/ncitbrowser/lib/cog-axis.jar b/software/ncitbrowser/lib/cog-axis.jar new file mode 100644 index 000000000..e0973774e Binary files /dev/null and b/software/ncitbrowser/lib/cog-axis.jar differ diff --git a/software/ncitbrowser/lib/cog-jglobus.jar b/software/ncitbrowser/lib/cog-jglobus.jar new file mode 100644 index 000000000..ddd926dad Binary files /dev/null and b/software/ncitbrowser/lib/cog-jglobus.jar differ diff --git a/software/ncitbrowser/lib/commons-fileupload-1.2.2.jar b/software/ncitbrowser/lib/commons-fileupload-1.2.2.jar new file mode 100644 index 000000000..131f1924e Binary files /dev/null and b/software/ncitbrowser/lib/commons-fileupload-1.2.2.jar differ diff --git a/software/ncitbrowser/lib/commons-logging-1.1.1.jar b/software/ncitbrowser/lib/commons-logging-1.1.1.jar index 8758a96b7..1deef144c 100644 Binary files a/software/ncitbrowser/lib/commons-logging-1.1.1.jar and b/software/ncitbrowser/lib/commons-logging-1.1.1.jar differ diff --git a/software/ncitbrowser/lib/commons-logging-api-1.1.jar b/software/ncitbrowser/lib/commons-logging-api-1.1.jar new file mode 100644 index 000000000..d1abcbb47 Binary files /dev/null and b/software/ncitbrowser/lib/commons-logging-api-1.1.jar differ diff --git a/software/ncitbrowser/lib/lexbig.jar b/software/ncitbrowser/lib/lexbig.jar index 7d29d7a36..7c0b5e5a7 100644 Binary files a/software/ncitbrowser/lib/lexbig.jar and b/software/ncitbrowser/lib/lexbig.jar differ diff --git a/software/ncitbrowser/lib/lexevsapi60-beans.jar b/software/ncitbrowser/lib/lexevsapi60-beans.jar index 035d650e8..5da4bdcd9 100644 Binary files a/software/ncitbrowser/lib/lexevsapi60-beans.jar and b/software/ncitbrowser/lib/lexevsapi60-beans.jar differ diff --git a/software/ncitbrowser/lib/lexevsapi60-framework.jar b/software/ncitbrowser/lib/lexevsapi60-framework.jar new file mode 100644 index 000000000..5ca9f18e7 Binary files /dev/null and b/software/ncitbrowser/lib/lexevsapi60-framework.jar differ diff --git a/software/ncitbrowser/lib/ognl-2.7.3.jar b/software/ncitbrowser/lib/ognl-2.7.3.jar deleted file mode 100644 index 6517028b4..000000000 Binary files a/software/ncitbrowser/lib/ognl-2.7.3.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/ognl-3.0.5.jar b/software/ncitbrowser/lib/ognl-3.0.5.jar new file mode 100644 index 000000000..cd6dbaadb Binary files /dev/null and b/software/ncitbrowser/lib/ognl-3.0.5.jar differ diff --git a/software/ncitbrowser/lib/rmiio-2.0.2-License.jar b/software/ncitbrowser/lib/rmiio-2.0.2-License.jar new file mode 100644 index 000000000..4e8bf9f4a Binary files /dev/null and b/software/ncitbrowser/lib/rmiio-2.0.2-License.jar differ diff --git a/software/ncitbrowser/lib/sdk-client-framework.jar b/software/ncitbrowser/lib/sdk-client-framework.jar index e1d9d8dde..7f4facc3e 100644 Binary files a/software/ncitbrowser/lib/sdk-client-framework.jar and b/software/ncitbrowser/lib/sdk-client-framework.jar differ diff --git a/software/ncitbrowser/lib/sdk-grid-remoting.jar b/software/ncitbrowser/lib/sdk-grid-remoting.jar new file mode 100644 index 000000000..9c7ab7125 Binary files /dev/null and b/software/ncitbrowser/lib/sdk-grid-remoting.jar differ diff --git a/software/ncitbrowser/lib/sdk-security.jar b/software/ncitbrowser/lib/sdk-security.jar index 8ccc21a0d..8465ea5c7 100644 Binary files a/software/ncitbrowser/lib/sdk-security.jar and b/software/ncitbrowser/lib/sdk-security.jar differ diff --git a/software/ncitbrowser/lib/spring-2.5.6.jar b/software/ncitbrowser/lib/spring-2.5.6.jar deleted file mode 100644 index 527367005..000000000 Binary files a/software/ncitbrowser/lib/spring-2.5.6.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/spring-aop-2.5.6.jar b/software/ncitbrowser/lib/spring-aop-2.5.6.jar deleted file mode 100644 index a11cc3aa5..000000000 Binary files a/software/ncitbrowser/lib/spring-aop-2.5.6.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/spring-aop-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-aop-3.1.0.RELEASE.jar new file mode 100644 index 000000000..89122c619 Binary files /dev/null and b/software/ncitbrowser/lib/spring-aop-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-asm-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-asm-3.1.0.RELEASE.jar new file mode 100644 index 000000000..63780c76f Binary files /dev/null and b/software/ncitbrowser/lib/spring-asm-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-aspects-2.5.6.jar b/software/ncitbrowser/lib/spring-aspects-2.5.6.jar deleted file mode 100644 index e8dfcd81a..000000000 Binary files a/software/ncitbrowser/lib/spring-aspects-2.5.6.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/spring-aspects-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-aspects-3.1.0.RELEASE.jar new file mode 100644 index 000000000..15429f362 Binary files /dev/null and b/software/ncitbrowser/lib/spring-aspects-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-beans-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-beans-3.1.0.RELEASE.jar new file mode 100644 index 000000000..70843919c Binary files /dev/null and b/software/ncitbrowser/lib/spring-beans-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-context-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-context-3.1.0.RELEASE.jar new file mode 100644 index 000000000..e84b39e3b Binary files /dev/null and b/software/ncitbrowser/lib/spring-context-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-context-support-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-context-support-3.1.0.RELEASE.jar new file mode 100644 index 000000000..b332c85fe Binary files /dev/null and b/software/ncitbrowser/lib/spring-context-support-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-core-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-core-3.1.0.RELEASE.jar new file mode 100644 index 000000000..7c2bced19 Binary files /dev/null and b/software/ncitbrowser/lib/spring-core-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-expression-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-expression-3.1.0.RELEASE.jar new file mode 100644 index 000000000..64388b365 Binary files /dev/null and b/software/ncitbrowser/lib/spring-expression-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-jdbc-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-jdbc-3.1.0.RELEASE.jar new file mode 100644 index 000000000..0bf5fc58a Binary files /dev/null and b/software/ncitbrowser/lib/spring-jdbc-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-orm-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-orm-3.1.0.RELEASE.jar new file mode 100644 index 000000000..82ef63e7d Binary files /dev/null and b/software/ncitbrowser/lib/spring-orm-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-oxm-1.5.7.jar b/software/ncitbrowser/lib/spring-oxm-1.5.7.jar deleted file mode 100644 index 150e40140..000000000 Binary files a/software/ncitbrowser/lib/spring-oxm-1.5.7.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/spring-oxm-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-oxm-3.1.0.RELEASE.jar new file mode 100644 index 000000000..c4ebbb2ea Binary files /dev/null and b/software/ncitbrowser/lib/spring-oxm-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-test-2.5.6.jar b/software/ncitbrowser/lib/spring-test-2.5.6.jar deleted file mode 100644 index 25898406d..000000000 Binary files a/software/ncitbrowser/lib/spring-test-2.5.6.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/spring-test-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-test-3.1.0.RELEASE.jar new file mode 100644 index 000000000..ce5964142 Binary files /dev/null and b/software/ncitbrowser/lib/spring-test-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-tx-3.1.0.RELEASE.jar b/software/ncitbrowser/lib/spring-tx-3.1.0.RELEASE.jar new file mode 100644 index 000000000..d26ceeb17 Binary files /dev/null and b/software/ncitbrowser/lib/spring-tx-3.1.0.RELEASE.jar differ diff --git a/software/ncitbrowser/lib/spring-xml-1.5.7.jar b/software/ncitbrowser/lib/spring-xml-1.5.9.jar similarity index 69% rename from software/ncitbrowser/lib/spring-xml-1.5.7.jar rename to software/ncitbrowser/lib/spring-xml-1.5.9.jar index 3669fb4d5..bff349446 100644 Binary files a/software/ncitbrowser/lib/spring-xml-1.5.7.jar and b/software/ncitbrowser/lib/spring-xml-1.5.9.jar differ diff --git a/software/ncitbrowser/lib/struts2-api-2.0.1.jar b/software/ncitbrowser/lib/struts2-api-2.0.1.jar deleted file mode 100644 index 118c9c87f..000000000 Binary files a/software/ncitbrowser/lib/struts2-api-2.0.1.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/struts2-core-2.0.1.jar b/software/ncitbrowser/lib/struts2-core-2.0.1.jar deleted file mode 100644 index 6e6fc7af6..000000000 Binary files a/software/ncitbrowser/lib/struts2-core-2.0.1.jar and /dev/null differ diff --git a/software/ncitbrowser/lib/xwork-core-2.3.4.1.jar b/software/ncitbrowser/lib/xwork-core-2.3.4.1.jar new file mode 100644 index 000000000..a78b1db76 Binary files /dev/null and b/software/ncitbrowser/lib/xwork-core-2.3.4.1.jar differ diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/CartActionBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/CartActionBean.java index a739fb035..c521d97bc 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/CartActionBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/CartActionBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import gov.nih.nci.evs.browser.utils.RemoteServerUtil; @@ -27,7 +20,7 @@ import org.LexGrid.LexBIG.DataModel.Collections.AbsoluteCodingSchemeVersionReferenceList; import org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference; import org.LexGrid.LexBIG.Utility.Constructors; - + import javax.faces.component.html.HtmlSelectBooleanCheckbox; import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletRequest; @@ -57,7 +50,45 @@ import gov.nih.nci.evs.browser.utils.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -220,8 +251,8 @@ public String addToCart() throws Exception { String name = null; String url = null; String version = null; - String type = null; - + String type = null; + _messageflag = false; // Get concept information from the Entity item passed in @@ -289,7 +320,7 @@ public String addToCart() throws Exception { item.setUrl(url); if (!_cart.containsKey(code)) - _cart.put(code,item); + _cart.put(code,item); // Add scheme and version back in for redisplay request.setAttribute("dictionary", codingScheme); @@ -331,7 +362,7 @@ public String addToCart() throws Exception { } } - updateCartSizeSessionVariable(request); + updateCartSizeSessionVariable(request); return "concept_details"; } @@ -433,7 +464,7 @@ public String exportCartXML() throws Exception { SearchCart search = new SearchCart(); ResolvedConceptReference ref = null; - HashMap versionList = null; + HashMap versionList = null; if (getCount() < 1) { _messageflag = true; @@ -499,12 +530,12 @@ public String exportCartXML() throws Exception { _logger.debug("Adding NS: " + sv.namespace); } } - + // Instantiate DefinitionEntry(Rule Set) - DefinitionEntry de = new DefinitionEntry(); - de.setRuleOrder(1L); + DefinitionEntry de = new DefinitionEntry(); + de.setRuleOrder(1L); de.setOperator(DefinitionOperator.OR); - + // Instantiate ValueSetDefinitionReference ValueSetDefinitionReference vsdRef = new ValueSetDefinitionReference(); vsdRef.setValueSetDefinitionURI("EXPORT:CART_NODES"); @@ -675,8 +706,8 @@ public String exportCartToCSV() throws Exception { // Don't allow JSF to forward to cart.jsf FacesContext.getCurrentInstance().responseComplete(); - } - + } + return null; } @@ -692,7 +723,7 @@ public static class Concept { private String version = null; private String url = null; private String displayStatus = ""; - private String displayCodingSchemeName = "[Not Set]"; + private String displayCodingSchemeName = "[Not Set]"; private HtmlSelectBooleanCheckbox checkbox = null; // Getters & setters @@ -761,7 +792,7 @@ public void setUrl(String url) { public String getKey() { return code + " (" + displayCodingSchemeName + " " + version + ")"; } - + public HtmlSelectBooleanCheckbox getCheckbox() { if (checkbox == null) checkbox = new HtmlSelectBooleanCheckbox(); return checkbox; @@ -769,8 +800,8 @@ public HtmlSelectBooleanCheckbox getCheckbox() { public void setCheckbox(HtmlSelectBooleanCheckbox checkbox) { this.checkbox = checkbox; - } - + } + // *** Private Methods *** private void setSelected(boolean selected) { @@ -779,7 +810,7 @@ private void setSelected(boolean selected) { private boolean getSelected() { return this.checkbox.isSelected(); - } + } private void initDisplayStatus() { if (this.codingScheme == null || this.version == null || this.code == null) diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DefSourceMapping.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DefSourceMapping.java index f17382314..34af45d73 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DefSourceMapping.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DefSourceMapping.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DisplayItem.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DisplayItem.java index 528cded3e..808b350e5 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DisplayItem.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/DisplayItem.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBean.java index 4fa07d334..f77cd7c24 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.io.*; @@ -18,7 +11,45 @@ import gov.nih.nci.evs.browser.properties.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -29,6 +60,7 @@ * */ +//public class IteratorBean extends Object implements Serializable { public class IteratorBean extends Object { private static Logger _logger = Logger.getLogger(IteratorBean.class); private static int DEFAULT_MAX_RETURN = 100; diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBeanManager.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBeanManager.java index 8aa1a69e5..e2ae20a34 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBeanManager.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/IteratorBeanManager.java @@ -1,16 +1,47 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.util.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/LicenseBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/LicenseBean.java index a416bea69..a61c41392 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/LicenseBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/LicenseBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.util.*; @@ -17,7 +10,45 @@ import gov.nih.nci.evs.browser.properties.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingData.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingData.java index 66ed3f2a2..675c8ca5a 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingData.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingData.java @@ -1,17 +1,29 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.io.*; import java.util.*; /** - * + * +* Copyright 2008,2009 NGIT. This software was developed in conjunction with the National Cancer Institute, +* and so to the extent government employees are co-authors, any rights in such works shall be subject to Title 17 of the United States Code, section 105. +* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the disclaimer of Article 3, below. Redistributions +* in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other +* materials provided with the distribution. +* 2. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: +* "This product includes software developed by NGIT and the National Cancer Institute." +* If no such end-user documentation is to be included, this acknowledgment shall appear in the software itself, +* wherever such third-party acknowledgments normally appear. +* 3. The names "The National Cancer Institute", "NCI" and "NGIT" must not be used to endorse or promote products derived from this software. +* 4. This license does not authorize the incorporation of this software into any third party proprietary programs. This license does not authorize +* the recipient to use any trademarks owned by either NCI or NGIT +* 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, +* NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingIteratorBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingIteratorBean.java index 366a7a657..bdc93cba4 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingIteratorBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MappingIteratorBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.io.*; @@ -28,7 +21,45 @@ import org.LexGrid.LexBIG.Utility.Iterators.ResolvedConceptReferencesIterator; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -170,7 +201,7 @@ public void initialize() { //KLO, work-around #2 int knt = 0; - while (_iterator != null && _iterator.hasNext()) { + while (_iterator.hasNext()) { knt++; if (knt > INITIAL_ITERATOR_RESOLUTION) break; diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MetadataElement.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MetadataElement.java index 878edd811..c732d9741 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MetadataElement.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/MetadataElement.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/OntologyBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/OntologyBean.java index e863bd279..a53370c37 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/OntologyBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/OntologyBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import gov.nih.nci.evs.browser.utils.*; @@ -25,7 +18,45 @@ /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ public class OntologyBean { diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources.properties b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources.properties index 7628945ee..aa43f85cf 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources.properties +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - useridLabel=Userid passwordLabel=Password loginSubmitLabel=Login diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en-us.properties b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en-us.properties index 7628945ee..aa43f85cf 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en-us.properties +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en-us.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - useridLabel=Userid passwordLabel=Password loginSubmitLabel=Login diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en.properties b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en.properties index 7628945ee..aa43f85cf 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en.properties +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_en.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - useridLabel=Userid passwordLabel=Password loginSubmitLabel=Login diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_es.properties b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_es.properties index 05b1d776e..275d6c6f2 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_es.properties +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_es.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - useridLabel=Identificacion del usuario passwordLabel=Contraseña loginSubmitLabel=Conexión diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_fr.properties b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_fr.properties index d68b0b107..58be26db8 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_fr.properties +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/Resources_fr.properties @@ -1,10 +1,3 @@ -#L -# Copyright Northrop Grumman Information Technology. -# -# Distributed under the OSI-approved BSD 3-Clause License. -# See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -#L - useridLabel=Nom de l'Utilisateur passwordLabel=Mot de Passe loginSubmitLabel=Connectez diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SearchStatusBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SearchStatusBean.java index 272a19cf2..c70910540 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SearchStatusBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SearchStatusBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.util.*; @@ -19,7 +12,45 @@ import gov.nih.nci.evs.browser.utils.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SecurityTokenHolder.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SecurityTokenHolder.java index 0a9dc98a1..0383e524c 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SecurityTokenHolder.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/SecurityTokenHolder.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/UserSessionBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/UserSessionBean.java index 3b0c9e356..4116db246 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/UserSessionBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/UserSessionBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; import java.util.*; @@ -38,7 +31,45 @@ /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -144,23 +175,27 @@ public List getQuickLinkList() { public String searchAction() { + +HttpServletResponse response = + (HttpServletResponse) FacesContext.getCurrentInstance() + .getExternalContext().getResponse(); +response.setContentType("text/html;charset=utf-8"); + HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance() .getExternalContext().getRequest(); boolean mapping_search = false; - String single_mapping_search = HTTPUtils.cleanXSS((String) request.getParameter("single_mapping_search")); + if (single_mapping_search != null && single_mapping_search.compareTo("true") == 0) { mapping_search = true; request.getSession().setAttribute("nav_type", "terminologis"); String cs_dictionary = HTTPUtils.cleanXSS((String) request.getParameter("dictionary")); String cs_version = HTTPUtils.cleanXSS((String) request.getParameter("version")); - } - String max_str = null; int maxToReturn = -1;// 1000; try { @@ -185,6 +220,8 @@ public String searchAction() { searchTarget = "names"; } + + request.getSession().setAttribute("searchTarget", searchTarget); request.getSession().setAttribute("algorithm", matchAlgorithm); @@ -230,6 +267,7 @@ public String searchAction() { String version = null; String scheme_and_version = HTTPUtils.cleanXSS((String) request.getParameter("scheme_and_version")); + if (scheme_and_version != null) { Vector cs_version_vec = DataUtils.parseData(scheme_and_version, "$"); scheme = (String) cs_version_vec.elementAt(0); @@ -261,8 +299,6 @@ public String searchAction() { scheme = Constants.CODING_SCHEME_NAME; } - - if (scheme != null) { String check_formal_name = DataUtils.getFormalName(scheme); if (check_formal_name == null) { @@ -272,7 +308,6 @@ public String searchAction() { } } - version = HTTPUtils.cleanXSS((String) request.getParameter("version")); if (version == null) { version = DataUtils.getVocabularyVersionByTag(scheme, "PRODUCTION"); @@ -297,7 +332,6 @@ public String searchAction() { _logger.debug("UserSessionBean scheme: " + scheme); _logger.debug("searchAction version: " + version); - if (isMapping) { if (searchTarget.compareTo("names") == 0) { /* @@ -305,6 +339,7 @@ public String searchAction() { scheme, version, matchText, matchAlgorithm, maxToReturn); */ + ResolvedConceptReferencesIteratorWrapper wrapper = new MappingSearchUtils().searchByNameOrCode( scheme, version, matchText, matchAlgorithm, maxToReturn, SearchUtils.SEARCH_BY_NAME_ONLY); @@ -322,7 +357,7 @@ public String searchAction() { } } catch (Exception ex) { - ex.printStackTrace(); + //ex.printStackTrace(); } } @@ -355,7 +390,7 @@ public String searchAction() { } } catch (Exception ex) { - ex.printStackTrace(); + //ex.printStackTrace(); } } @@ -399,7 +434,12 @@ public String searchAction() { if (iterator == null) { String msg = "No match."; if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { - msg = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + msg = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + msg = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } } request.getSession().setAttribute("message", msg); request.getSession().setAttribute("dictionary", scheme); @@ -418,7 +458,12 @@ public String searchAction() { if (numberRemaining == 0) { String msg = "No match."; if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { - msg = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + msg = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + msg = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } } request.getSession().setAttribute("message", msg); @@ -536,6 +581,7 @@ public String searchAction() { String key = iteratorBeanManager.createIteratorKey(schemes, versions, matchText, searchTarget, matchAlgorithm, maxToReturn); + if (searchTarget.compareTo("names") == 0) { if (iteratorBeanManager.containsIteratorBean(key)) { iteratorBean = iteratorBeanManager.getIteratorBean(key); @@ -543,12 +589,15 @@ public String searchAction() { } else { ResolvedConceptReferencesIteratorWrapper wrapper = null; try { - wrapper = new SearchUtils() - //.searchByName(schemes, versions, matchText, source, - .searchByNameOrCode(schemes, versions, matchText, source, - matchAlgorithm, ranking, maxToReturn, SearchUtils.SEARCH_BY_NAME_ONLY); + if (SimpleSearchUtils.isSimpleSearchSupported(matchAlgorithm, SimpleSearchUtils.NAMES)) { + wrapper = new SimpleSearchUtils().search(schemes, versions, matchText, SimpleSearchUtils.BY_NAME, matchAlgorithm); + } else { + wrapper = new SearchUtils() + .searchByNameOrCode(schemes, versions, matchText, source, + matchAlgorithm, ranking, maxToReturn, SearchUtils.SEARCH_BY_NAME_ONLY); + } } catch (Exception ex) { - + ex.printStackTrace(); } if (wrapper != null) { @@ -581,7 +630,7 @@ public String searchAction() { source, matchAlgorithm, ranking, maxToReturn, false); } catch (Exception ex) { - + //ex.printStackTrace(); } if (wrapper != null) { @@ -607,7 +656,7 @@ public String searchAction() { matchText, source, matchAlgorithm, excludeDesignation, ranking, maxToReturn); } catch (Exception ex) { - + //ex.printStackTrace(); } @@ -636,7 +685,7 @@ public String searchAction() { ranking, maxToReturn); } catch (Exception ex) { - + //ex.printStackTrace(); } @@ -647,10 +696,8 @@ public String searchAction() { int numberOfMatches = iterator.numberRemaining(); } catch (Exception ex) { - ex.printStackTrace(); + //ex.printStackTrace(); } - - iteratorBean = new IteratorBean(iterator); iteratorBean.setKey(key); iteratorBeanManager.addIteratorBean(iteratorBean); @@ -702,12 +749,10 @@ public String searchAction() { .debug("UserSessionBean request.getSession().setAttribute dictionary: " + scheme); - - //KLO, 051012 - request.getSession().removeAttribute("n"); - request.getSession().removeAttribute("b"); - request.getSession().removeAttribute("m"); - + //KLO, 051012 + request.getSession().removeAttribute("n"); + request.getSession().removeAttribute("b"); + request.getSession().removeAttribute("m"); return "search_results"; } else if (size == 1) { @@ -777,10 +822,11 @@ public String searchAction() { request.getSession().setAttribute("type", "properties"); request.getSession().setAttribute("new_search", Boolean.TRUE); - //KLO, 051012 - request.getSession().removeAttribute("n"); - request.getSession().removeAttribute("b"); - request.getSession().removeAttribute("m"); + //KLO, 051012 + request.getSession().removeAttribute("n"); + request.getSession().removeAttribute("b"); + request.getSession().removeAttribute("m"); + response.setContentType("text/html;charset=utf-8"); return "concept_details"; } @@ -791,9 +837,14 @@ public String searchAction() { int minimumSearchStringLength = NCItBrowserProperties.getMinimumSearchStringLength(); - if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { - message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; - } + if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + message = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } + } else if (matchAlgorithm.compareTo(Constants.STARTWITH_SEARCH_ALGORITHM) == 0 && matchText.length() < minimumSearchStringLength) { @@ -1042,6 +1093,14 @@ public String acceptLicenseAction() { request.getSession().setAttribute("concept", c); request.getSession().setAttribute("type", "properties"); + + HttpServletResponse response = + (HttpServletResponse) FacesContext.getCurrentInstance() + .getExternalContext().getResponse(); + + response.setContentType("text/html;charset=utf-8"); + + return "concept_details"; } else { String message = "Unidentifiable vocabulary name, or code"; @@ -1054,12 +1113,11 @@ public String acceptLicenseAction() { public String multipleSearchAction() { - - HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance() .getExternalContext().getRequest(); + String selected_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("selected_vocabularies")); String[] ontology_list = request.getParameterValues("ontology_list"); if ( ontology_list == null ) { @@ -1090,6 +1148,8 @@ public String multipleSearchAction() { String matchAlgorithm = HTTPUtils.cleanXSS((String) request.getParameter("algorithm")); + + //KLO 051512 AppScan if (matchAlgorithm == null || matchAlgorithm.length() == 0) { matchAlgorithm = "exactMatch"; @@ -1111,19 +1171,22 @@ public String multipleSearchAction() { Vector display_name_vec = (Vector) request.getSession().getAttribute("display_name_vec"); -// check if selection status has been changed. StringBuffer buf = new StringBuffer(); -buf.append("|"); -//String ontologiesToSearchOnStr = "|"; -if (ontology_list != null) { - for (int i = 0; i < ontology_list.length; ++i) { - //ontologiesToSearchOnStr = - //ontologiesToSearchOnStr + ontology_list[i] + "|"; - buf.append(ontology_list[i] + "|"); +String ontologiesToSearchOnStr = selected_vocabularies; +if (DataUtils.isNull(selected_vocabularies)) { + // check if selection status has been changed. + + buf.append("|"); + //String ontologiesToSearchOnStr = "|"; + if (ontology_list != null) { + for (int i = 0; i < ontology_list.length; ++i) { + //ontologiesToSearchOnStr = + //ontologiesToSearchOnStr + ontology_list[i] + "|"; + buf.append(ontology_list[i] + "|"); + } } + ontologiesToSearchOnStr = buf.toString(); } -String ontologiesToSearchOnStr = buf.toString(); - for (int i = 0; i < display_name_vec.size(); i++) { OntologyInfo info = (OntologyInfo) display_name_vec.elementAt(i); @@ -1140,7 +1203,6 @@ public String multipleSearchAction() { request.getSession().setAttribute("ontologiesToSearchOnStr", ontologiesToSearchOnStr); - List list = new ArrayList(); //String ontologiesToSearchOnStr = null; @@ -1159,7 +1221,7 @@ public String multipleSearchAction() { } -int selected_knt = 0; + int selected_knt = 0; Vector ontologies_to_search_on = new Vector(); StringBuffer buff = new StringBuffer(); @@ -1410,19 +1472,45 @@ else if (searchTarget.compareTo("relationships") == 0 if (searchTarget.compareTo("names") == 0) { + + + long ms = System.currentTimeMillis(); long delay = 0; _logger.debug("Calling SearchUtils().searchByNameAndCode " + matchText); - ResolvedConceptReferencesIteratorWrapper wrapper = + ResolvedConceptReferencesIteratorWrapper wrapper = null; /* new SearchUtils().searchByName(schemes, versions, matchText, source, matchAlgorithm, ranking, maxToReturn); */ + + /* new SearchUtils().searchByNameAndCode(schemes, versions, matchText, source, matchAlgorithm, ranking, maxToReturn); + */ + + //062013 KLO + if (SimpleSearchUtils.isSimpleSearchSupported(matchAlgorithm, SimpleSearchUtils.NAMES)) { + + + try { + wrapper = new SimpleSearchUtils().search(schemes, versions, matchText, SimpleSearchUtils.BY_NAME, matchAlgorithm); + } catch (Exception ex) { + ex.printStackTrace(); + } + } else { + wrapper = new SearchUtils().searchByNameOrCode( + schemes, versions, matchText, + source, matchAlgorithm, ranking, maxToReturn, SearchUtils.SEARCH_BY_NAME_ONLY); + } + if (wrapper != null) { iterator = wrapper.getIterator(); + + + + } delay = System.currentTimeMillis() - ms; _logger.debug("searchByNameAndCode delay (millisec.): " + delay); @@ -1520,7 +1608,6 @@ else if (searchTarget.compareTo("relationships") == 0 if (size == 1) { list = iteratorBean.getData(0, 0); if (list == null || list.size() == 0) { - //System.out.println("WARNING: Iterator is empty." ); String msg = "No match found."; request.getSession().setAttribute("message", msg); @@ -1628,11 +1715,16 @@ else if (searchTarget.compareTo("relationships") == 0 request.getSession().removeAttribute("b"); request.getSession().removeAttribute("m"); +HttpServletResponse response = + (HttpServletResponse) FacesContext.getCurrentInstance() + .getExternalContext().getResponse(); + +response.setContentType("text/html;charset=utf-8"); + return "concept_details"; } else if (list != null && list.size() > 0) { - String match_size = Integer.toString(size); ;// Integer.toString(v.size()); request.getSession().setAttribute("match_size", match_size); @@ -1654,7 +1746,6 @@ else if (searchTarget.compareTo("relationships") == 0 return "search_results"; } } else if (size > 1) { - String match_size = Integer.toString(size); ;// Integer.toString(v.size()); request.getSession().setAttribute("match_size", match_size); @@ -1671,8 +1762,6 @@ else if (searchTarget.compareTo("relationships") == 0 request.getSession().removeAttribute("n"); request.getSession().removeAttribute("b"); request.getSession().removeAttribute("m"); - - return "search_results"; } @@ -1691,9 +1780,14 @@ else if (searchTarget.compareTo("relationships") == 0 } String message = Constants.ERROR_NO_MATCH_FOUND; - if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { - message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; - } + if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + message = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } + } else if (matchAlgorithm.compareTo(Constants.STARTWITH_SEARCH_ALGORITHM) == 0 && matchText.length() < minimumSearchStringLength) { @@ -1843,6 +1937,7 @@ public String advancedSearchAction() { request.setAttribute("message", message); return "message"; } + matchText = matchText.trim(); bean.setMatchText(matchText); @@ -1894,6 +1989,8 @@ public String advancedSearchAction() { String key = null; String searchType = HTTPUtils.cleanXSS((String) request.getParameter("selectSearchOption")); + searchTarget = searchType; + _logger.debug("SearchUtils.java searchType: " + searchType); if (searchType != null && searchType.compareTo("Property") == 0) { @@ -1953,8 +2050,7 @@ public String advancedSearchAction() { } } - } else if (searchType != null - && searchType.compareToIgnoreCase("Relationship") == 0) { + } else if (searchType != null && searchType.compareToIgnoreCase("Relationship") == 0) { //request.getSession().setAttribute("selectSearchOption", "Relationship"); @@ -2077,8 +2173,7 @@ public String advancedSearchAction() { if (numberRemaining == 0) { iterator = null; } else { - //System.out.println("(UserSessionBean) numerRemaining: " + numberRemaining); - if (iterator.hasNext()) { + if (iterator.hasNext()) { iteratorBean = new IteratorBean(iterator); iteratorBean.setKey(key); iteratorBean.setMatchText(matchText); @@ -2092,7 +2187,6 @@ public String advancedSearchAction() { } catch (Exception ex) { //ex.printStackTrace(); //020713 KLO - //System.out.println("(UserSessionBean) Exception set iterator = null: " ); iterator = null; } /* @@ -2107,6 +2201,7 @@ public String advancedSearchAction() { } } else if (searchType != null && searchType.compareTo("Name") == 0) { + searchFields = SearchFields.setName(schemes, matchText, searchTarget, source, matchAlgorithm, maxToReturn); @@ -2115,10 +2210,20 @@ public String advancedSearchAction() { iteratorBean = iteratorBeanManager.getIteratorBean(key); iterator = iteratorBean.getIterator(); } else { - wrapper = - new SearchUtils().searchByName(scheme, version, matchText, - source, matchAlgorithm, ranking, maxToReturn, - SearchUtils.NameSearchType.Name); + + if (SimpleSearchUtils.searchAllSources(source) && SimpleSearchUtils.isSimpleSearchSupported(matchAlgorithm, SimpleSearchUtils.NAMES)) { + try { + wrapper = new SimpleSearchUtils().search(scheme, version, matchText, SimpleSearchUtils.BY_NAME, matchAlgorithm); + } catch (Exception ex) { + ex.printStackTrace(); + } + } else { + wrapper = + new SearchUtils().searchByName(scheme, version, matchText, + source, matchAlgorithm, ranking, maxToReturn, + SearchUtils.NameSearchType.Name); + } + if (wrapper != null) { iterator = wrapper.getIterator(); if (iterator != null) { @@ -2146,10 +2251,18 @@ public String advancedSearchAction() { * matchText, source, matchAlgorithm, ranking, maxToReturn, * SearchUtils.NameSearchType.Code); */ + schemes = new Vector(); + Vector versions = new Vector(); + schemes.add(scheme); + versions.add(version); + + wrapper = new CodeSearchUtils().searchByCode(schemes, versions, matchText, source, matchAlgorithm, ranking, maxToReturn, false); + /* wrapper = new SearchUtils().searchByCode(scheme, version, matchText, source, matchAlgorithm, ranking, maxToReturn); + */ if (wrapper != null) { iterator = wrapper.getIterator(); @@ -2223,8 +2336,13 @@ public String advancedSearchAction() { } catch (Exception ex) { String message = "No match found."; - if (matchAlgorithm.compareTo("exactMatch") == 0) { - message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + message = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } } request.setAttribute("message", message); return "no_match"; @@ -2254,13 +2372,25 @@ public String advancedSearchAction() { request.getSession().setAttribute("new_search", Boolean.TRUE); + +HttpServletResponse response = + (HttpServletResponse) FacesContext.getCurrentInstance() + .getExternalContext().getResponse(); + +response.setContentType("text/html;charset=utf-8"); + return "concept_details"; } } String message = "No match found."; - if (matchAlgorithm.compareTo("exactMatch") == 0) { - message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; - } + if (matchAlgorithm.compareTo(Constants.EXACT_SEARCH_ALGORITHM) == 0) { + String t = searchTarget.toLowerCase(); + if (t.indexOf("code") != -1) { + message = Constants.ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE; + } else { + message = Constants.ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS; + } + } request.setAttribute("message", message); return "no_match"; @@ -2564,7 +2694,7 @@ public ResolvedConceptReference getFirstResolvedConceptReference(ResolvedConcept //return refs[0]; ResolvedConceptReference ref = (ResolvedConceptReference) iterator.next(); if (ref == null) { - System.out.println("(*) UserSessionBean.broken iterator getFirstResolvedConceptReference returns null???"); + System.out.println("(UserSessionBean getFirstResolvedConceptReference returns null???"); } return ref; } @@ -2596,6 +2726,12 @@ public String regenerateCaptchaImage() throws Exception { request.getSession().setAttribute("retry", "true"); + String captcha_option = HTTPUtils.cleanXSS((String) request.getParameter("captcha_option")); + boolean captchaOptionValid = DataUtils.isCaptchaOptionValid(captcha_option); + if (!captchaOptionValid) { + String msg = Constants.INVALID_CAPTCHA_OTPION; + request.getSession().setAttribute("errorMsg", msg); + } return "retry"; } @@ -2623,10 +2759,18 @@ public String switchCaptchaMode() { request.getSession().setAttribute("emailaddress", from); String captcha_option = HTTPUtils.cleanXSS((String) request.getParameter("captcha_option")); - if (isNull(captcha_option)) { captcha_option = "default"; } + + boolean captchaOptionValid = DataUtils.isCaptchaOptionValid(captcha_option); + if (!captchaOptionValid) { + String msg = Constants.INVALID_CAPTCHA_OTPION; + request.getSession().setAttribute("errorMsg", msg); + return "retry"; + } + + if (captcha_option.compareTo("default") == 0) { captcha_option = "audio"; } else { @@ -2659,6 +2803,20 @@ public String contactUs() throws Exception { request.getSession().setAttribute("message", message); request.getSession().setAttribute("emailaddress", from); + + String captcha_option = HTTPUtils.cleanXSS((String) request.getParameter("captcha_option")); + if (isNull(captcha_option)) { + captcha_option = "default"; + } + request.getSession().setAttribute("captcha_option", captcha_option); + + boolean captchaOptionValid = DataUtils.isCaptchaOptionValid(captcha_option); + if (!captchaOptionValid) { + msg = Constants.INVALID_CAPTCHA_OTPION; + request.getSession().setAttribute("errorMsg", msg); + return "retry"; + } + if (isNull(answer) || isNull(subject) || isNull(message) || isNull(from)) { msg = Constants.PLEASE_COMPLETE_DATA_ENTRIES; request.getSession().setAttribute("errorMsg", msg); @@ -2674,11 +2832,6 @@ public String contactUs() throws Exception { return "retry"; } - String captcha_option = HTTPUtils.cleanXSS((String) request.getParameter("captcha_option")); - if (isNull(captcha_option)) { - captcha_option = "default"; - } - request.getSession().setAttribute("captcha_option", captcha_option); try { String retstr = null; @@ -2744,7 +2897,6 @@ private String validateCaptcha(HttpServletRequest request, "WARNING: The string you entered does not match" + " with what is shown in the image. Please try again."); } else { - System.out.println("Correct Captcha answer: " + answer); } request.getSession().removeAttribute(Captcha.NAME); return null; } @@ -2752,16 +2904,7 @@ private String validateCaptcha(HttpServletRequest request, private String validateAudioCaptcha(HttpServletRequest request, String returnIncompleteState) throws Exception { AudioCaptcha captcha = (AudioCaptcha) request.getSession().getAttribute(AudioCaptcha.NAME); -/* - if (captcha == null) { - AudioCaptcha ac = new AudioCaptcha.Builder() - .addAnswer() - .addNoise() - .build(); - request.getSession().setAttribute(AudioCaptcha.NAME, ac); - } -*/ // Do this so we can capture non-Latin chars request.setCharacterEncoding("UTF-8"); String answer = HTTPUtils.cleanXSS((String) request.getParameter("answer")); @@ -2776,8 +2919,6 @@ private String validateAudioCaptcha(HttpServletRequest request, throw new InvalidCaptChaInputException( "WARNING: The numbers you entered does not match" + " with what is set in the audio. Please try again."); - } else { - System.out.println("Correct AudioCaptcha answer: " + answer); } request.getSession().removeAttribute(AudioCaptcha.NAME); diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/ValueSetBean.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/ValueSetBean.java index 4a315f6b8..b909b8e62 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/ValueSetBean.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/bean/ValueSetBean.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.bean; @@ -18,7 +11,6 @@ import javax.faces.model.*; import javax.servlet.http.*; -import gov.nih.nci.evs.browser.utils.*; import gov.nih.nci.evs.browser.utils.*; import gov.nih.nci.evs.browser.properties.*; import gov.nih.nci.evs.browser.common.*; @@ -51,7 +43,45 @@ /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ public class ValueSetBean { @@ -282,6 +312,18 @@ public void conceptDomainChangedEvent(ValueChangeEvent event) { } + public String valueSetSearchRedirect(HttpServletRequest request, HttpServletResponse response, String vsduri) { + try { + request.getRequestDispatcher("/ncitbrowser/ajax?action=create_src_vs_tree&vsd_uri=" + vsduri). + forward(request,response); + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } + + +/* public String valueSetSearchAction() { java.lang.String valueSetDefinitionRevisionId = null; String msg = null; @@ -290,6 +332,18 @@ public String valueSetSearchAction() { (HttpServletRequest) FacesContext.getCurrentInstance() .getExternalContext().getRequest(); + HttpServletResponse response = + (HttpServletResponse) FacesContext.getCurrentInstance() + .getExternalContext().getResponse(); + + String VSD_view = HTTPUtils.cleanXSS((String) request.getParameter("view")); + if (!DataUtils.isNull(VSD_view)) { + request.getSession().setAttribute("view", VSD_view); + } + + String value_set_home = HTTPUtils.cleanXSS((String) request.getParameter("value_set_home")); + String vsduri = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); + String selectValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getParameter("selectValueSetSearchOption")); request.getSession().setAttribute("selectValueSetSearchOption", selectValueSetSearchOption); @@ -299,13 +353,15 @@ public String valueSetSearchAction() { String checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("checked_vocabularies")); if (checked_vocabularies == null || (checked_vocabularies.compareTo("") == 0)) { checked_vocabularies = (String) request.getSession().getAttribute("checked_vocabularies"); - //System.out.println("checked_vocabularies(session): " + checked_vocabularies); } - //if (checked_vocabularies == null || (checked_vocabularies != null && checked_vocabularies.compareTo("") == 0)) { //DYEE if (checked_vocabularies == null || (checked_vocabularies.compareTo("") == 0)) { msg = "No value set definition is selected."; request.getSession().setAttribute("message", msg); + + if (value_set_home != null && !DataUtils.isNull(vsduri)) { + return valueSetSearchRedirect(request, response, vsduri); + } return "message"; } @@ -318,8 +374,6 @@ public String valueSetSearchAction() { selected_vocabularies_size = selected_vocabularies.size(); } - String VSD_view = HTTPUtils.cleanXSS((String) request.getParameter("view")); - request.getSession().setAttribute("view", VSD_view); String selectCodingScheme = getSelectedOntology(); //(String) request.getParameter("selectedOntology"); @@ -335,6 +389,11 @@ public String valueSetSearchAction() { if (matchText.length() == 0) { String message = "Please enter a search string."; request.getSession().setAttribute("message", message); + + if (value_set_home != null && !DataUtils.isNull(vsduri)) { + return valueSetSearchRedirect(request, response, vsduri); + } + return "message"; } request.getSession().setAttribute("matchText_VSD", matchText); @@ -343,14 +402,7 @@ public String valueSetSearchAction() { Vector v = new Vector(); LexEVSValueSetDefinitionServices vsd_service = null; vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices(); - -System.out.println("(***) ValueSetBean selectValueSetSearchOption: " + selectValueSetSearchOption); - if (selectValueSetSearchOption.compareTo("Code") == 0 && selected_vocabularies != null) { - -System.out.println("(***) ValueSetBean selectValueSetSearchOption: " + selectValueSetSearchOption + " = by Code"); - - String uri = null; try { @@ -376,74 +428,17 @@ public String valueSetSearchAction() { } } - - /* - - if (checked_vocabularies != null) { - for (int k=0; k + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/common/Constants.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/common/Constants.java index c6d74ddcc..b21faf7cc 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/common/Constants.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/common/Constants.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.common; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -54,6 +85,9 @@ public class Constants { public static final String ERROR_NO_MATCH_FOUND_TRY_OTHER_ALGORITHMS = "No match found. Please try 'Begins With' or 'Contains' search instead."; + public static final String ERROR_NO_MATCH_FOUND_CODE_IS_CASESENSITIVE = + "No match found. Please note that code search is case sensitive."; + public static final String ERROR_ENCOUNTERED_TRY_NARROW_QUERY = "Unable to perform search successfully. Please narrow your query."; public static final String ERROR_REQUIRE_MORE_SPECIFIC_QUERY_STRING = @@ -95,6 +129,49 @@ public class Constants { public static final String PROPERTY = "properties"; public static final String RELATIONSHIP = "relationahips"; + //public static final String[] VALID_CAPTCHA_OTPIONS = new String[] {"default","audio"}; + public static final String DEFAULT_CAPTCHA_OTPION = "default"; + public static final String AUDIO_CAPTCHA_OTPION = "audio"; + + public static final String INVALID_CAPTCHA_OTPION = "WARNING: Invalid CAPTCHA option."; + + public static final String UNIDENTIFIABLE_VOCABULARY = "WARNING: Unidentifiable vocabulary name."; + + + public static final String ROLE_LABEL = "Role Relationships"; + public static final String ROLE_LABEL_2 = "pointing from the current concept to other concepts"; + public static final String ROLE_DESCRIPTION_LABEL = "(True for the current concept and its descendants, may be inherited from parent(s).)"; + + public static final String ASSOCIATION_LABEL = "Associations"; + public static final String ASSOCIATION_LABEL_2 = "pointing from the current concept to other concepts"; + public static final String ASSOCIATION_DESCRIPTION_LABEL = "(True for the current concept.)"; + + public static final String INVERSE_ROLE_LABEL = "Incoming Role Relationships"; + public static final String INVERSE_ROLE_LABEL_2 = "pointing from other concepts to the current concept"; + public static final String INVERSE_ROLE_DESCRIPTION_LABEL = "(True for the other concept and its descendants, may be inherited from its parent(s).)"; + + public static final String INVERSE_ASSOCIATION_LABEL = "Incoming Associations"; + public static final String INVERSE_ASSOCIATION_LABEL_2 = "pointing from other concepts to the current concept"; + //public static final String INVERSE_ASSOCIATION_DESCRIPTION_LABEL = "(True for the other concept’s relationship to the current concept.)"; + + public static final String INVERSE_ASSOCIATION_DESCRIPTION_LABEL = "(True for the other concept's relationship to the current concept.)"; + + +/* +Role Relationships pointing from the current concept to other concepts: +(True for the current concept and its descendants, may be inherited from parent(s).) + +Associations pointing from the current concept to other concepts: +(True for the current concept.) + +Incoming Role Relationships pointing from other concepts to the current concept: +(True for the other concept and its descendants, may be inherited from its parent(s).) + +Incoming Associations pointing from other concepts to the current concept: +(True for the other concept’s relationship to the current concept.) + +*/ + /** * Constructor diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToHtmlFormatter.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToHtmlFormatter.java index 6521e8122..0440e4338 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToHtmlFormatter.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToHtmlFormatter.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; @@ -14,7 +7,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToTextFormatter.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToTextFormatter.java index 4befeb4b9..f290a3774 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToTextFormatter.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/AsciiToTextFormatter.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import gov.nih.nci.evs.browser.utils.*; @@ -15,7 +8,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FileFormatterBase.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FileFormatterBase.java index 5ac64e328..ea173fcd6 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FileFormatterBase.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FileFormatterBase.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import java.io.*; @@ -13,7 +6,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FormatterConstant.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FormatterConstant.java index d21e07ef2..236a5ae3b 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FormatterConstant.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/FormatterConstant.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterBase.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterBase.java index 14394e872..5337ac884 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterBase.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterBase.java @@ -1,16 +1,47 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import java.io.File; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterFileOutputStream.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterFileOutputStream.java index 0398672be..583ec1ab7 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterFileOutputStream.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterFileOutputStream.java @@ -1,16 +1,47 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import java.io.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterInterface.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterInterface.java index a8148497b..f1ff585eb 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterInterface.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterInterface.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterStringBuffer.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterStringBuffer.java index f455a09fa..997cc4891 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterStringBuffer.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/TabFormatterStringBuffer.java @@ -1,14 +1,45 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToHtmlFormatter.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToHtmlFormatter.java index 8b19d3a1d..074a20790 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToHtmlFormatter.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToHtmlFormatter.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import java.io.*; @@ -13,7 +6,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToTextFormatter.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToTextFormatter.java index e52d5c4ce..ad1ced444 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToTextFormatter.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/formatter/UrlAsciiToTextFormatter.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.formatter; import java.io.*; @@ -13,7 +6,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/NCItBrowserProperties.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/NCItBrowserProperties.java index f3ac7eb24..ca5c2ba7c 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/NCItBrowserProperties.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/NCItBrowserProperties.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.properties; import java.util.*; @@ -12,7 +5,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -72,11 +103,14 @@ public class NCItBrowserProperties { public static final String AUDIO_CAPTCHA_BACKGROUND_NOISE_ON = "AUDIO_CAPTCHA_BACKGROUND_NOISE_ON"; + public static final String NCBO_API_KEY = "NCBO_API_KEY"; + private static NCItBrowserProperties _browserProperties = null; private static Properties _properties = new Properties(); private static boolean _debugOn = false; private static boolean _audio_captcha_background_noise_on = true; + private static String _ncbo_api_key = null; private static int _maxToReturn = 1000; private static int _maxTreeLevel = 1000; @@ -161,6 +195,11 @@ private NCItBrowserProperties() { _term_suggestion_application_url = _browserProperties .getProperty(_browserProperties.TERM_SUGGESTION_APPLICATION_URL); + + _ncbo_api_key = + _browserProperties + .getProperty(_browserProperties.NCBO_API_KEY); + _license_page_option = _browserProperties .getProperty(_browserProperties.LICENSE_PAGE_OPTION); @@ -423,6 +462,11 @@ public static String getNCIT_URL() { return _ncit_url; } + public static String getNCBO_API_KEY() { + return _ncbo_api_key; + } + + public static int getPaginationTimeOut() { return _pagination_time_out; } diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/PropertyFileParser.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/PropertyFileParser.java index 10a74239e..d206f8021 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/PropertyFileParser.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/PropertyFileParser.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.properties; import java.io.*; @@ -19,7 +12,45 @@ import gov.nih.nci.evs.browser.bean.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/StandardFtpReportInfo.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/StandardFtpReportInfo.java index 3745e8c4e..e11b79dff 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/StandardFtpReportInfo.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/properties/StandardFtpReportInfo.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.properties; import gov.nih.nci.evs.browser.utils.*; @@ -14,7 +7,45 @@ import org.apache.log4j.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AFacesServlet.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AFacesServlet.java index d709a0c51..8b4294a1c 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AFacesServlet.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AFacesServlet.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.servlet; import gov.nih.nci.evs.browser.common.*; @@ -18,7 +11,45 @@ import static gov.nih.nci.evs.browser.common.Constants.*; /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** diff --git a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AjaxServlet.java b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AjaxServlet.java index a67316b54..e117821e6 100644 --- a/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AjaxServlet.java +++ b/software/ncitbrowser/src/java/gov/nih/nci/evs/browser/servlet/AjaxServlet.java @@ -1,10 +1,3 @@ -/*L - * Copyright Northrop Grumman Information Technology. - * - * Distributed under the OSI-approved BSD 3-Clause License. - * See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. - */ - package gov.nih.nci.evs.browser.servlet; import org.json.*; @@ -51,9 +44,61 @@ import org.LexGrid.commonTypes.PropertyQualifier; import org.LexGrid.commonTypes.Property; +import gov.nih.nci.evs.browser.bean.*; + + +import javax.faces.FactoryFinder; +import javax.faces.component.UIViewRoot; +import javax.faces.context.FacesContext; +import javax.faces.context.FacesContextFactory; +import javax.faces.lifecycle.Lifecycle; +import javax.faces.lifecycle.LifecycleFactory; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + + /** - * + * + * Copyright 2008,2009 NGIT. This software was developed in conjunction + * with the National Cancer Institute, and so to the extent government + * employees are co-authors, any rights in such works shall be subject + * to Title 17 of the United States Code, section 105. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the disclaimer of Article 3, + * below. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 2. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by NGIT and the National + * Cancer Institute." If no such end-user documentation is to be + * included, this acknowledgment shall appear in the software itself, + * wherever such third-party acknowledgments normally appear. + * 3. The names "The National Cancer Institute", "NCI" and "NGIT" must + * not be used to endorse or promote products derived from this software. + * 4. This license does not authorize the incorporation of this software + * into any third party proprietary programs. This license does not + * authorize the recipient to use any trademarks owned by either NCI + * or NGIT + * 5. THIS SOFTWARE IS PROVIDED "AS IS," AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, (INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE) ARE + * DISCLAIMED. IN NO EVENT SHALL THE NATIONAL CANCER INSTITUTE, + * NGIT, OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * */ /** @@ -192,6 +237,21 @@ public void execute(HttpServletRequest request, HttpServletResponse response) action = "create_src_vs_tree"; } +if (action.compareTo("values") == 0) { + resolveValueSetAction(request, response); + return; +} + +if (action.compareTo("versions") == 0) { + selectCSVersionAction(request, response); + return; +} + +if (action.compareTo("xmldefinitions") == 0) { + exportVSDToXMLAction(request, response); + return; +} + String node_id = HTTPUtils.cleanXSS(request.getParameter("ontology_node_id"));// DataConstants.ONTOLOGY_NODE_ID); @@ -285,7 +345,11 @@ public void execute(HttpServletRequest request, HttpServletResponse response) * (System.currentTimeMillis() - ms)); return; } } */ - if (action.equals("search_value_set")) { + if (action.equals("export_mapping")) { + export_mapping(request, response); + } else if (action.equals("value_set_home")) { + value_set_home(request, response); + } else if (action.equals("search_value_set")) { search_value_set(request, response); } else if (action.equals("create_src_vs_tree")) { create_src_vs_tree(request, response); @@ -617,7 +681,7 @@ public static void search_hierarchy(HttpServletRequest request, HttpServletRespo println(out, ""); println(out, " "); println(out, " Vocabulary Hierarchy"); - println(out, " "); + println(out, " "); println(out, " "); println(out, " "); println(out, " "); @@ -1118,7 +1182,7 @@ public static void search_hierarchy(HttpServletRequest request, HttpServletRespo } println(out, ""); - println(out, "
"); + println(out, " "); println(out, " "); @@ -1164,42 +1228,79 @@ public static void create_cs_vs_tree(HttpServletRequest request, HttpServletResp } } + public static void create_vs_tree(HttpServletRequest request, HttpServletResponse response, int view) { + Object obj = request.getParameter("vsd_uri"); + + String vsd_uri = null; + if (obj != null) { + vsd_uri = HTTPUtils.cleanXSS((String) obj); + } + create_vs_tree(request, response, view, vsd_uri); + } + + + + + +////////////////////////// +// create_vs_tree +////////////////////////// + + + public static void create_vs_tree(HttpServletRequest request, HttpServletResponse response, int view, String vsd_uri) { + String root_vsd_uri = vsd_uri; + String vsd_name = null; + boolean isValueSet = false; + ValueSetDefinition vsd = null; + + String vsd_description = "DESCRIPTION NOT AVAILABLE"; + if (vsd_uri != null) { + vsd = DataUtils.findValueSetDefinitionByURI(vsd_uri); + if (vsd != null) { + vsd_name = vsd.getValueSetDefinitionName(); + isValueSet = true; + vsd_description = ValueSetHierarchy.getValueSetDecription(vsd_uri); + } else { + Entity entity = DataUtils.getConceptByCode(Constants.TERMINOLOGY_VALUE_SET_NAME, null, vsd_uri); + if (entity != null) { + vsd_name = entity.getEntityDescription().getContent(); + } + vsd_description = DataUtils.getTerminologyValueSetDescription(vsd_uri); + } + } request.getSession().removeAttribute("b"); request.getSession().removeAttribute("m"); - response.setContentType("text/html"); PrintWriter out = null; - - String checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("checked_vocabularies")); - String partial_checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("partial_checked_vocabularies")); - + String checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("checked_vocabularies")); + String partial_checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("partial_checked_vocabularies")); try { out = response.getWriter(); } catch (Exception ex) { ex.printStackTrace(); return; } - String message = (String) request.getSession().getAttribute("message"); - out.println(""); out.println(""); out.println(""); -if (view == Constants.STANDARD_VIEW) { - out.println(" NCI Term Browser - Value Set Source View"); +if (DataUtils.isNull(vsd_uri)) { + if (view == Constants.STANDARD_VIEW) { + out.println(" NCI Term Browser - Value Set Source View"); + } else { + out.println(" NCI Term Browser - Value Set Terminology View"); + } } else { - out.println(" NCI Term Browser - Value Set Terminology View"); + out.println(" NCI Term Browser - Value Set " + vsd_uri + " "); } - - //out.println(" NCI Thesaurus"); - out.println(" "); + out.println(" "); out.println(""); out.println(" + + + + + + + + + + diff --git a/software/ncitbrowser/web/pages/FlexoViz.swf b/software/ncitbrowser/web/pages/FlexoViz.swf new file mode 100644 index 000000000..6c98d0a1d Binary files /dev/null and b/software/ncitbrowser/web/pages/FlexoViz.swf differ diff --git a/software/ncitbrowser/web/pages/accept_license.jsp b/software/ncitbrowser/web/pages/accept_license.jsp index a1b5eb0f4..3bc8a3b38 100644 --- a/software/ncitbrowser/web/pages/accept_license.jsp +++ b/software/ncitbrowser/web/pages/accept_license.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -18,7 +11,7 @@ L--%> NCI Term Browser - + diff --git a/software/ncitbrowser/web/pages/advanced_search.jsp b/software/ncitbrowser/web/pages/advanced_search.jsp index a09eaccd4..47555a955 100644 --- a/software/ncitbrowser/web/pages/advanced_search.jsp +++ b/software/ncitbrowser/web/pages/advanced_search.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -33,6 +26,8 @@ L--%> JSPUtils.JSPHeaderInfo info2 = new JSPUtils.JSPHeaderInfo(request); String adv_search_vocabulary = info2.dictionary; String adv_search_version = info2.version; + + String new_algorithm = "I feel lucky"; %> @@ -40,7 +35,7 @@ L--%> <%=adv_search_vocabulary%> - + @@ -196,7 +191,7 @@ L--%> algorithm = algorithmObj[i].value; break; } - } + } var selectSearchOption = ""; var selectSearchOptionObj = document.forms["advancedSearchForm"].selectSearchOption; @@ -205,23 +200,19 @@ L--%> selectSearchOption = selectSearchOptionObj[i].value; break; } - } + } - if (algorithm != "exactMatch" && selectSearchOption == "Code") { + + if (algorithm != "exactMatch" && selectSearchOption == "Code") { selectSearchOption = "Name"; - //selectSearchOptionObj[0].checked; - //return; } var adv_search_source = document.forms["advancedSearchForm"].adv_search_source.value; - - var rel_search_association = document.forms["advancedSearchForm"].rel_search_association.value; var selectProperty = document.forms["advancedSearchForm"].selectProperty.value; var _version = document.forms["advancedSearchForm"].version.value; - var direction = ""; var directionObj = document.forms["advancedSearchForm"].direction; for (var i=0; i direction = directionObj[i].value; } } - - window.location.href="/ncitbrowser/pages/advanced_search.jsf?refresh=1" + "&opt="+ selectSearchOption + "&text="+ text @@ -270,7 +259,7 @@ L--%> String refresh = HTTPUtils.cleanXSS((String) request.getParameter("refresh")); boolean refresh_page = false; - if (refresh != null) { + if (!DataUtils.isNull(refresh)) { refresh_page = true; } @@ -287,10 +276,12 @@ L--%> String direction = null; if (refresh_page) { + // Note: Called when the user selects "Search By" fields. selectSearchOption = HTTPUtils.cleanXSS((String) request.getParameter("opt")); search_string = HTTPUtils.cleanXSS((String) request.getParameter("text")); adv_search_algorithm = HTTPUtils.cleanXSS((String) request.getParameter("algorithm")); + adv_search_source = HTTPUtils.cleanXSS((String) request.getParameter("sab")); rel_search_association = HTTPUtils.cleanXSS((String) request.getParameter("rel")); direction = HTTPUtils.cleanXSS((String) request.getParameter("dir")); @@ -298,7 +289,18 @@ L--%> rel_search_rela = HTTPUtils.cleanXSS((String) request.getParameter("rela")); selectProperty = HTTPUtils.cleanXSS((String) request.getParameter("prop")); - adv_search_type = selectSearchOption; + if (adv_search_algorithm.compareToIgnoreCase("lucene") == 0) { + if (selectSearchOption.compareToIgnoreCase("Code") != 0) { + selectSearchOption = "Name"; + } + selectProperty = null; + rel_search_association = null; + adv_search_source = null; + direction = null; + rel_search_rela = null; + } + + adv_search_type = selectSearchOption; } else { @@ -307,7 +309,7 @@ L--%> direction = (String) request.getSession().getAttribute("direction"); } - if (selectSearchOption == null || selectSearchOption.compareTo("null") == 0) { + if (DataUtils.isNull(selectSearchOption)) { selectSearchOption = "Property"; } @@ -371,13 +373,12 @@ L--%> direction = "source"; } - String check__e = "", check__b = "", check__s = "" , check__c =""; if (adv_search_algorithm == null || adv_search_algorithm.compareTo("exactMatch") == 0) check__e = "checked"; else if (adv_search_algorithm.compareTo("startsWith") == 0) check__s= "checked"; - else if (adv_search_algorithm.compareTo("DoubleMetaphoneLuceneQuery") == 0) + else if (adv_search_algorithm.compareToIgnoreCase("lucene") == 0) check__b= "checked"; else check__c = "checked"; @@ -420,7 +421,7 @@ L--%> - + @@ -437,13 +438,28 @@ L--%> + +<% +if (adv_search_algorithm.compareToIgnoreCase("lucene") != 0) { +%> + + + + + +<% +} else { +%> + + + + + + + +<% +} +%> + + +<% +} +%> + + +
- tabindex="3" >Exact Match  + tabindex="3" onclick="refresh_algorithm()"; >Exact Match  tabindex="3" onclick="refresh_algorithm()"; >Begins With  tabindex="3" onclick="refresh_algorithm()"; >Contains + +<% +String luceneSearch = "Match Algorithm
Wildcard (multiple characters): heart*
Wildcard (single character): he?rt
Fuzzy match: heart~
Boolean: heart AND attack
Boosting: heart^5 AND attack
Negation: heart -attack
Code Field: code:118797008 AND heart
')\" onmouseout=\"UnTip()\" >Lucene Search
"; +%> + + tabindex="3" onclick="refresh_algorithm()"; > + + Lucene
  
Concepts searched for have: @@ -492,8 +526,25 @@ L--%>
onclick="javascript:refresh()" tabindex="5">Name  onclick="refresh_code()" tabindex="5">Code  + +<% +if (adv_search_algorithm.compareToIgnoreCase("lucene") != 0) { + + +%> onclick="javascript:refresh()" tabindex="5">Property  onclick="javascript:refresh()" tabindex="5">Relationship +<% +} else { +%> + + + + +<% +} +%> +
@@ -647,6 +698,60 @@ L--%> } %> +<% +if (adv_search_algorithm.compareToIgnoreCase("lucene") == 0 && selectSearchOption.compareTo("Name") == 0) { +%> + +
+

+ + + + + + + + + + + + + + + + + + + + +
 Examples:
   +Wildcard (multiple characters): heart* +
   +Wildcard (single character): he?rt +
   +Fuzzy match: heart~ +
   +Boolean: heart AND attack +
   +Boosting: heart^5 AND attack +
   +Negation: heart -attack +
+

+
diff --git a/software/ncitbrowser/web/pages/cart.jsp b/software/ncitbrowser/web/pages/cart.jsp index 956159491..e72c1642e 100644 --- a/software/ncitbrowser/web/pages/cart.jsp +++ b/software/ncitbrowser/web/pages/cart.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> @@ -13,7 +6,7 @@ L--%> NCI Term Browser - + @@ -28,11 +21,11 @@ L--%> skip navigation links - + @@ -87,7 +80,7 @@ String prev_cs_urn = ""; - + diff --git a/software/ncitbrowser/web/pages/concept_details.jsp b/software/ncitbrowser/web/pages/concept_details.jsp index 627dbffa4..412cf71d5 100644 --- a/software/ncitbrowser/web/pages/concept_details.jsp +++ b/software/ncitbrowser/web/pages/concept_details.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> @@ -39,10 +32,16 @@ L--%> <%@ page import="org.LexGrid.LexBIG.Extensions.Generic.LexBIGServiceConvenienceMethods"%> <%@ page import="org.LexGrid.LexBIG.Extensions.Generic.MappingExtension"%> +<%@ page import="gov.nih.nci.evs.browser.properties.*"%> +<%@ page import="gov.nih.nci.evs.browser.utils.*"%> + + <% + response.setContentType("text/html;charset=utf-8"); + JSPUtils.JSPHeaderInfo info = new JSPUtils.JSPHeaderInfo(request); String dictionary = info.dictionary; if (dictionary != null) { @@ -70,7 +69,55 @@ L--%> <% } %> - + + +<% + boolean view_graph_link = false; + String ncbo_id = null; + String is_virtual = "true"; + + RESTClient client = new RESTClient(); + HashMap formalName2VirtualIdMap = (HashMap) request.getSession().getAttribute("formalName2VirtualIdMap"); + if (formalName2VirtualIdMap == null) { + formalName2VirtualIdMap = DataUtils.getFormalName2VirtualIdMap(); + request.getSession().setAttribute("formalName2VirtualIdMap", formalName2VirtualIdMap); + } + + String virtualId = null; + if (formalName2VirtualIdMap != null) { + virtualId = (String) formalName2VirtualIdMap.get(dictionary); + if (virtualId != null) { + HashMap version2IdMap = client.getVersion2IdMap(virtualId); + if (version2IdMap != null && version2IdMap.containsKey(version)) { + String t = (String) version2IdMap.get(version); + Vector id_vec = DataUtils.parseData(t); + if (id_vec.size() == 1) { + ncbo_id = (String) id_vec.elementAt(0); + } else { + ncbo_id = (String) id_vec.elementAt(id_vec.size()-1); + } + if (ncbo_id != null) { + view_graph_link = true; + } + } else { + //System.out.println("WARNING: " + dictionary + " (version: " + version + ") not found in NCBO Bioportal."); + } + } + } + + // To be removed (set to true) when api_key is setup on anthill. + boolean to_be_removed = false; + if (!to_be_removed) { + if (dictionary.compareTo("NCI Thesaurus") == 0 || dictionary.compareTo("NCI_Thesaurus") == 0) { + ncbo_id = "1032"; + view_graph_link = true; + } + } + +%> + + + @@ -80,6 +127,20 @@ L--%> + + + + @@ -227,7 +288,7 @@ L--%>
- +
@@ -246,6 +307,8 @@ L--%> <%=JSPUtils.getPipeSeparator(isPipeDisplayed)%> <% } + + boolean historyAccess = HistoryUtils.isHistoryServiceAvailable(dictionary); if (historyAccess) { %> @@ -254,8 +317,37 @@ L--%> View History <% } %> - <%=JSPUtils.getPipeSeparator(isPipeDisplayed)%> + + +<% +if (ncbo_id != null) { +%> + <%=JSPUtils.getPipeSeparator(isPipeDisplayed)%> + + + + + + + + + + View Graph + + +<% +} +%> + + <%=JSPUtils.getPipeSeparator(isPipeDisplayed)%> @@ -274,7 +366,8 @@ L--%> %> <%=JSPUtils.getPipeSeparator(isPipeDisplayed)%> Suggest Changes <% + target="_blank" alt="Term Suggestion">Suggest Changes + <% } %> @@ -290,6 +383,7 @@ L--%> String b = HTTPUtils.cleanXSS((String) request.getParameter("b")); String n = HTTPUtils.cleanXSS((String) request.getParameter("n")); String m = HTTPUtils.cleanXSS((String) request.getParameter("m")); +String vse = HTTPUtils.cleanXSS((String) request.getParameter("vse")); if (!DataUtils.isNull(b) && !DataUtils.isInteger(b)) { @@ -306,6 +400,13 @@ String m = HTTPUtils.cleanXSS((String) request.getParameter("m")); String key = HTTPUtils.cleanXSS((String) request.getParameter("key")); +if (!DataUtils.isNull(vse)) { +%> + +<% +} + + if (!DataUtils.isNull(b)) { if (DataUtils.isNull(n)) { n = "1"; @@ -332,8 +433,9 @@ if (!DataUtils.isNull(b)) { } %> + - +
diff --git a/software/ncitbrowser/web/pages/concept_history.jsp b/software/ncitbrowser/web/pages/concept_history.jsp index d0c10dc00..08003e2d8 100644 --- a/software/ncitbrowser/web/pages/concept_history.jsp +++ b/software/ncitbrowser/web/pages/concept_history.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page import="java.util.Vector" %> @@ -20,7 +13,7 @@ L--%> NCI Thesaurus History - + diff --git a/software/ncitbrowser/web/pages/contact_us.jsp b/software/ncitbrowser/web/pages/contact_us.jsp index 298daa4b3..3e57288cd 100644 --- a/software/ncitbrowser/web/pages/contact_us.jsp +++ b/software/ncitbrowser/web/pages/contact_us.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -43,7 +36,7 @@ L--%> NCI Thesaurus - + @@ -84,6 +77,9 @@ L--%> alt_captcha_option = "default"; } + String test_option = "invalid_option"; + + Captcha captcha = (Captcha) request.getSession().getAttribute("captcha"); AudioCaptcha ac = null; boolean isUserError = false; @@ -99,23 +95,6 @@ L--%> request.getSession().removeAttribute("retry"); } -/* -if (captcha_option.compareTo("default") == 0) { - captcha = new Captcha.Builder(200, 50) - .addText() - .addBackground() - //.addNoise() - .gimp() - //.addBorder() - .build(); - request.getSession().setAttribute(Captcha.NAME, captcha); -} -*/ - - System.out.println("captcha_option: " + captcha_option); - System.out.println("alt_captcha_option: " + alt_captcha_option); - - //String ncicb_contact_url = new DataUtils().getNCICBContactURL(); String subject = (String) request.getSession().getAttribute("subject"); String message = (String) request.getSession().getAttribute("message"); @@ -125,7 +104,6 @@ if (captcha_option.compareTo("default") == 0) { if (subject == null) subject = ""; if (message == null) message = ""; if (emailaddress == null) emailaddress = ""; - //String errorMsg = gov.nih.nci.evs.browser.utils.HTTPUtils.cleanXSS((String) request.getAttribute("errorMsg")); if (errorMsg == null) errorMsg = ""; boolean error = errorMsg.length() > 0; @@ -304,7 +282,7 @@ if (captcha_option.compareTo("default") == 0) { action="#{userSessionBean.clearContactUs}" alt="clear"> - + - <%@ page import="java.util.*"%> <%@ page import="gov.nih.nci.evs.browser.formatter.*"%> <%@ page import="gov.nih.nci.evs.browser.properties.*"%> diff --git a/software/ncitbrowser/web/pages/contents/_list_standard_reports.jsp b/software/ncitbrowser/web/pages/contents/_list_standard_reports.jsp index d06ad5fd3..65b81d292 100644 --- a/software/ncitbrowser/web/pages/contents/_list_standard_reports.jsp +++ b/software/ncitbrowser/web/pages/contents/_list_standard_reports.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="java.util.*"%> <%@ page import="gov.nih.nci.evs.browser.formatter.*"%> <%@ page import="gov.nih.nci.evs.browser.properties.*"%> diff --git a/software/ncitbrowser/web/pages/cs_mappings.jsp b/software/ncitbrowser/web/pages/cs_mappings.jsp index 439455942..755277fbd 100644 --- a/software/ncitbrowser/web/pages/cs_mappings.jsp +++ b/software/ncitbrowser/web/pages/cs_mappings.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -59,7 +52,7 @@ L--%> NCI Term Browser - + @@ -104,7 +97,7 @@ String warning_msg = (String) request.getSession().getAttribute("warning");
- + <%@ include file="/pages/templates/sub-header.jsp" %> diff --git a/software/ncitbrowser/web/pages/deprecated/concept_details_other_term.jsp b/software/ncitbrowser/web/pages/deprecated/concept_details_other_term.jsp index 4ea34f937..5fa4d756e 100644 --- a/software/ncitbrowser/web/pages/deprecated/concept_details_other_term.jsp +++ b/software/ncitbrowser/web/pages/deprecated/concept_details_other_term.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page import="java.util.List" %> @@ -41,7 +34,7 @@ L--%> NCI Term Browser - + diff --git a/software/ncitbrowser/web/pages/deprecated/valueSetTmp.jsp b/software/ncitbrowser/web/pages/deprecated/valueSetTmp.jsp index 2f0636ab3..ce0b762d8 100644 --- a/software/ncitbrowser/web/pages/deprecated/valueSetTmp.jsp +++ b/software/ncitbrowser/web/pages/deprecated/valueSetTmp.jsp @@ -1,15 +1,8 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - NCI Term Browser - Value Set Source View - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/ncitbrowser/web/pages/ncbo_graph_ff.jsp b/software/ncitbrowser/web/pages/ncbo_graph_ff.jsp new file mode 100644 index 000000000..1fd8ff997 --- /dev/null +++ b/software/ncitbrowser/web/pages/ncbo_graph_ff.jsp @@ -0,0 +1,46 @@ +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<%@ page import="gov.nih.nci.evs.browser.utils.*" %> + + +<%@ page contentType="text/html;charset=windows-1252"%> + + + + NCI Term Browser + + + + + + + + + + +<% +String code = HTTPUtils.cleanXSS((String) request.getParameter("code")); +String id = HTTPUtils.cleanXSS((String) request.getParameter("id")); +%> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/software/ncitbrowser/web/pages/rank_help_info.jsp b/software/ncitbrowser/web/pages/rank_help_info.jsp index 9be5ed5bd..c606b7de4 100644 --- a/software/ncitbrowser/web/pages/rank_help_info.jsp +++ b/software/ncitbrowser/web/pages/rank_help_info.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page contentType="text/html;charset=windows-1252"%> @@ -19,7 +12,7 @@ L--%> Sources - + diff --git a/software/ncitbrowser/web/pages/resolve_value_set.jsp b/software/ncitbrowser/web/pages/resolve_value_set.jsp index fe47e1076..1ce9d1343 100644 --- a/software/ncitbrowser/web/pages/resolve_value_set.jsp +++ b/software/ncitbrowser/web/pages/resolve_value_set.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -25,7 +18,7 @@ L--%> NCI Term Browser - Value Set - + @@ -100,7 +93,7 @@ String prev_cs_urn = "";
+ + + diff --git a/software/ncitbrowser/web/pages/templates/navigationTabs.jsp b/software/ncitbrowser/web/pages/templates/navigationTabs.jsp index 57a9641de..552677f43 100644 --- a/software/ncitbrowser/web/pages/templates/navigationTabs.jsp +++ b/software/ncitbrowser/web/pages/templates/navigationTabs.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.*" %>
- + diff --git a/software/ncitbrowser/web/pages/resolved_value_set.jsp b/software/ncitbrowser/web/pages/resolved_value_set.jsp index 5e13b22e9..3da34bcb9 100644 --- a/software/ncitbrowser/web/pages/resolved_value_set.jsp +++ b/software/ncitbrowser/web/pages/resolved_value_set.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> @@ -26,7 +19,7 @@ L--%> NCI Thesaurus - + @@ -143,8 +136,7 @@ L--%> String itr_size_str = obj.toString(); } - String resultsPerPage = HTTPUtils.cleanXSS((String) request - .getParameter("resultsPerPage")); + String resultsPerPage = HTTPUtils.cleanXSS((String) request.getParameter("resultsPerPage")); if (resultsPerPage == null) { resultsPerPage = (String) request.getSession() .getAttribute("resultsPerPage"); @@ -159,8 +151,7 @@ L--%> String selectedResultsPerPage = resultsPerPage; - String page_number = HTTPUtils.cleanXSS((String) request - .getParameter("page_number")); + String page_number = HTTPUtils.cleanXSS((String) request.getParameter("page_number")); int pageNum = 0; if (page_number != null) { @@ -197,24 +188,20 @@ L--%>
- + <% - if (message != null) { + if (!DataUtils.isNull(message)) { %>

 <%=message%>

<% - request.getSession().removeAttribute("message"); - } else { + } else { %>
 
<% } - %> + %> @@ -431,22 +424,40 @@ if (isMapping || isExtension) { <% } - else if (code != null && code.indexOf("@") == -1) { + else if (code != null && code.indexOf("@") != -1 && name.compareTo("") == 0) { + i++; + if (i % 2 == 0) { + %> + + <% + } else { + %> + + <% + } + %> + + + <% + } + + else if (code != null) { // && code.indexOf("@") == -1) { i++; - String con_status = null; - if (concept_status_hmap != null) { - con_status = (String) concept_status_hmap.get(rcr.getCodingSchemeName() + "$" + rcr.getCodingSchemeVersion() + "$" + code); - } - - //if (status_vec != null && status_vec.elementAt(i) != null) { - // con_status = (String) status_vec.elementAt(i); - if (con_status != null) { - con_status = con_status.replaceAll("_", " "); - } + if (name.compareTo("") == 0) { + name = "Not available"; + } + String con_status = null; + if (concept_status_hmap != null) { + con_status = (String) concept_status_hmap.get(rcr.getCodingSchemeName() + "$" + rcr.getCodingSchemeVersion() + "$" + code); + } + if (con_status != null) { + con_status = con_status.replaceAll("_", " "); + } - if (i % 2 == 0) { %> diff --git a/software/ncitbrowser/web/pages/single_search_results.jsp b/software/ncitbrowser/web/pages/single_search_results.jsp index e5eed09ca..1dbfb68d7 100644 --- a/software/ncitbrowser/web/pages/single_search_results.jsp +++ b/software/ncitbrowser/web/pages/single_search_results.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -23,7 +16,7 @@ L--%> NCI Thesaurus - + diff --git a/software/ncitbrowser/web/pages/source_help_info-termbrowser.jsp b/software/ncitbrowser/web/pages/source_help_info-termbrowser.jsp index 0e60b760d..181a7dae9 100644 --- a/software/ncitbrowser/web/pages/source_help_info-termbrowser.jsp +++ b/software/ncitbrowser/web/pages/source_help_info-termbrowser.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page contentType="text/html;charset=windows-1252"%> @@ -19,7 +12,7 @@ L--%> Sources - + diff --git a/software/ncitbrowser/web/pages/source_help_info.jsp b/software/ncitbrowser/web/pages/source_help_info.jsp index b23f62ef7..e86f496c1 100644 --- a/software/ncitbrowser/web/pages/source_help_info.jsp +++ b/software/ncitbrowser/web/pages/source_help_info.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page contentType="text/html;charset=windows-1252"%> @@ -19,7 +12,7 @@ L--%> Sources - + diff --git a/software/ncitbrowser/web/pages/subset.jsp b/software/ncitbrowser/web/pages/subset.jsp index ab7cec99d..7a49300f7 100644 --- a/software/ncitbrowser/web/pages/subset.jsp +++ b/software/ncitbrowser/web/pages/subset.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -49,12 +42,31 @@ L--%> NCI Thesaurus - Subsets - + + + + + + + @@ -148,6 +160,7 @@ L--%>

+ + + + + + + + + + + +
- - + @@ -340,7 +327,7 @@ L--%> <% - if (message == null) { + if (DataUtils.isNull(message)) { %> <%@ include file="/pages/templates/pagination-resolved-valueset.jsp"%> <% diff --git a/software/ncitbrowser/web/pages/resolved_value_set_search_results.jsp b/software/ncitbrowser/web/pages/resolved_value_set_search_results.jsp index 7090c7cbd..75b4fe7c9 100644 --- a/software/ncitbrowser/web/pages/resolved_value_set_search_results.jsp +++ b/software/ncitbrowser/web/pages/resolved_value_set_search_results.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -25,7 +18,7 @@ L--%> NCI Term Browser - Value Set Search - + @@ -110,7 +103,7 @@ String checked = ""; <%-- 0 <%@ include file="/pages/templates/navigationTabs.jsp"%> --%> - <% +<% String resultsPerPage = HTTPUtils.cleanXSS((String) request.getParameter("resultsPerPage")); @@ -199,14 +192,28 @@ String key = (String) request.getSession().getAttribute("key"); } - if (message != null) { - %> -

<%=message%>

- <% - } - + boolean no_match = false; + + %>
+<% + if (!DataUtils.isNull(message)) { + if (message.startsWith("No match found")) { + no_match = true; + } +%> + + <%}%> + + + +<% +if (!no_match) { +%> + + + + <% + } + %> + + +
+

 <%=message%>

+
@@ -249,12 +256,12 @@ String key = (String) request.getSession().getAttribute("key"); boolean timeout = iteratorBean.getTimeout(); message = iteratorBean.getMessage(); - if (message != null) { + if (!DataUtils.isNull(message)) { %>

<%=message%>

<% - message = null; - iteratorBean.setMessage(message); + message = null; + iteratorBean.setMessage(message); } else if (timeout) { %> @@ -414,9 +421,19 @@ String key = (String) request.getSession().getAttribute("key");
<% + + if(message == null || message.compareTo("null") == 0) { @@ -424,8 +441,7 @@ if(message == null || message.compareTo("null") == 0) { %> <%@ include file="/pages/templates/pagination-valueset-results.jsp" %> <% - -} +} %> <%@ include file="/pages/templates/nciFooter.jsp" %> diff --git a/software/ncitbrowser/web/pages/search_results.jsp b/software/ncitbrowser/web/pages/search_results.jsp index c8d2410df..6de4a49a0 100644 --- a/software/ncitbrowser/web/pages/search_results.jsp +++ b/software/ncitbrowser/web/pages/search_results.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -27,7 +20,7 @@ JSPUtils.JSPHeaderInfo info = new JSPUtils.JSPHeaderInfo(request); String search_results_dictionary = info.dictionary; %> <%=search_results_dictionary%> - + @@ -196,6 +189,8 @@ String match_size = Integer.valueOf(size).toString(); String contains_warning_msg = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("contains_warning_msg")); + request.getSession().removeAttribute("contains_warning_msg"); + int next_page_num = page_num + 1; int prev_page_num = page_num - 1; String prev_page_num_str = Integer.toString(prev_page_num); @@ -361,7 +356,8 @@ if (isMapping || isExtension) { //to be modified: Vector status_vec = DataUtils.getConceptStatusByConceptCodes(search_results_dictionary, search_results_version, null, code_vec); */ - + + HashMap concept_status_hmap = DataUtils.getPropertyValuesInBatch(list, "Concept_Status"); @@ -371,48 +367,45 @@ HashMap concept_status_hmap = DataUtils.getPropertyValuesInBatch(list, "Concept_ Object obj = list.get(k); ResolvedConceptReference rcr = null; -if (obj == null) { - _logger.warn("rcr == null???"); -} else { - rcr = (ResolvedConceptReference) obj; -} - - if (rcr != null) { - String code = rcr.getConceptCode(); - coding_scheme_version = rcr.getCodingSchemeVersion(); - -if (isMapping || isExtension) { - - //vocabulary_name = (String) DataUtils.getFormalName(rcr.getCodingSchemeName()); - vocabulary_name = (String) DataUtils.getFormalName(rcr.getCodeNamespace()); - if (vocabulary_name == null) { - vocabulary_name = (String) hmap.get(rcr.getCodingSchemeName()); - } - - short_vocabulary_name = null; - if (name_hmap.containsKey(vocabulary_name)) { - short_vocabulary_name = (String) name_hmap.get(vocabulary_name); - } else { - short_vocabulary_name = DataUtils.getMetadataValue(vocabulary_name, coding_scheme_version, "display_name"); - if (short_vocabulary_name == null || short_vocabulary_name.compareTo("null") == 0) { - short_vocabulary_name = DataUtils.getLocalName(vocabulary_name); - } - name_hmap.put(vocabulary_name, short_vocabulary_name); - } -} - - - String name = "null"; + if (obj != null) { + + rcr = (ResolvedConceptReference) obj; + String code = rcr.getConceptCode(); + + + coding_scheme_version = rcr.getCodingSchemeVersion(); + if (isMapping || isExtension) { + + //vocabulary_name = (String) DataUtils.getFormalName(rcr.getCodingSchemeName()); + vocabulary_name = (String) DataUtils.getFormalName(rcr.getCodeNamespace()); + if (vocabulary_name == null) { + vocabulary_name = (String) hmap.get(rcr.getCodingSchemeName()); + } + + short_vocabulary_name = null; + if (name_hmap.containsKey(vocabulary_name)) { + short_vocabulary_name = (String) name_hmap.get(vocabulary_name); + } else { + short_vocabulary_name = DataUtils.getMetadataValue(vocabulary_name, coding_scheme_version, "display_name"); + if (short_vocabulary_name == null || short_vocabulary_name.compareTo("null") == 0) { + short_vocabulary_name = DataUtils.getLocalName(vocabulary_name); + } + name_hmap.put(vocabulary_name, short_vocabulary_name); + } + } + + + String name = ""; if (rcr.getEntityDescription() != null) { name = rcr.getEntityDescription().getContent(); } else { - Entity entity = SearchUtils.getConceptByCode(rcr.getCodeNamespace(), - null, null, rcr.getConceptCode()); - name = entity.getEntityDescription().getContent(); - - + Entity entity = SearchUtils.getConceptByCode(rcr.getCodeNamespace(), null, null, rcr.getConceptCode()); + if (entity != null && entity.getEntityDescription() != null) { + name = entity.getEntityDescription().getContent(); + } } - if (code == null || code.indexOf("@") != -1) { + + if (code == null) { i++; if (i % 2 == 0) { %> @@ -423,7 +416,7 @@ if (isMapping || isExtension) {
<%=name%>
+ <%=code%> +
of data related to medications, supplies, and services within the healthcare system.
+ +
+
+ + National Children's Study (NCS) Pediatric Terminology + +
+
+ + National Institute of Child Health and Human Development (NICHD) Pediatric Terminology + +
+
+ + +
+ Pediatric Terminology: + + The National Children's Study (NCS) and the National Institute of Child Health and Human Development (NICHD) are working with EVS to provide standardized coding for pediatric clinical trial and other research activities. +

EVS is developing extended methods to create, browse, download, and have direct computer API access to these and other NCIt subsets. diff --git a/software/ncitbrowser/web/pages/templates/content-header-alt.jsp b/software/ncitbrowser/web/pages/templates/content-header-alt.jsp index 6c9fb4d51..bd79f192d 100644 --- a/software/ncitbrowser/web/pages/templates/content-header-alt.jsp +++ b/software/ncitbrowser/web/pages/templates/content-header-alt.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.DataUtils"%> <%@ page import="gov.nih.nci.evs.browser.utils.HTTPUtils" %> diff --git a/software/ncitbrowser/web/pages/templates/content-header-no-searchbox.jsp b/software/ncitbrowser/web/pages/templates/content-header-no-searchbox.jsp index ec0c0c048..17f872c50 100644 --- a/software/ncitbrowser/web/pages/templates/content-header-no-searchbox.jsp +++ b/software/ncitbrowser/web/pages/templates/content-header-no-searchbox.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> -

diff --git a/software/ncitbrowser/web/pages/templates/content-header-other.jsp b/software/ncitbrowser/web/pages/templates/content-header-other.jsp index d497cf351..77464ba9d 100644 --- a/software/ncitbrowser/web/pages/templates/content-header-other.jsp +++ b/software/ncitbrowser/web/pages/templates/content-header-other.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.DataUtils"%> <%@ page import="gov.nih.nci.evs.browser.utils.HTTPUtils" %> <%@ page import="gov.nih.nci.evs.browser.utils.JSPUtils" %> diff --git a/software/ncitbrowser/web/pages/templates/content-header-resolvedvalueset.jsp b/software/ncitbrowser/web/pages/templates/content-header-resolvedvalueset.jsp index 473e6e6e3..991f535c5 100644 --- a/software/ncitbrowser/web/pages/templates/content-header-resolvedvalueset.jsp +++ b/software/ncitbrowser/web/pages/templates/content-header-resolvedvalueset.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="org.LexGrid.valueSets.ValueSetDefinition" %> <%@ page import="gov.nih.nci.evs.browser.utils.*" %> @@ -54,8 +47,11 @@ if (vsdUri != null && vsdUri.compareTo("null") != 0 && vsdUri.indexOf("|") != -1
Help
diff --git a/software/ncitbrowser/web/pages/templates/nciFooter.jsp b/software/ncitbrowser/web/pages/templates/nciFooter.jsp index fad011203..6b090e014 100644 --- a/software/ncitbrowser/web/pages/templates/nciFooter.jsp +++ b/software/ncitbrowser/web/pages/templates/nciFooter.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> -
+ + + + + + + + + + +
+ Results <%=istart_str%>-<%=iend_str%> of <%=match_size%> + +        + + <% + if (page_num > 1) { + %> +   + + Prev +   + <% + } + if (num_pages > 1) { + + int sliding_window_start = 1; + int sliding_window_end = num_pages; + int sliding_window_half_width = NCItBrowserProperties.getSlidingWindowHalfWidth(); + + sliding_window_start = page_num - sliding_window_half_width; + if (sliding_window_start < 1) sliding_window_start = 1; + + sliding_window_end = sliding_window_start + sliding_window_half_width * 2 - 1; + if (sliding_window_end > num_pages) sliding_window_end = num_pages; + + //for (int idx=1; idx<=num_pages; idx++) { + for (int idx=sliding_window_start; idx<=sliding_window_end; idx++) { + + String idx_str = Integer.toString(idx); + if (page_num != idx) { + %> + <%=idx_str%> +   + <% + } else { + %> + <%=idx_str%>  + <% + } + } + } + if (num_pages > 1 && next_page_num <= num_pages) { + + %> +   + + Next + + <% + } + + %> +
+ Show + + + + +  results per page + +    + +   +
+ \ No newline at end of file diff --git a/software/ncitbrowser/web/pages/templates/pagination.jsp b/software/ncitbrowser/web/pages/templates/pagination.jsp index 633a8ae43..c81b3401c 100644 --- a/software/ncitbrowser/web/pages/templates/pagination.jsp +++ b/software/ncitbrowser/web/pages/templates/pagination.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.bean.IteratorBean" %> <%@ page import="gov.nih.nci.evs.browser.bean.UserSessionBean" %> <%@ page import="gov.nih.nci.evs.browser.bean.IteratorBeanManager" %> diff --git a/software/ncitbrowser/web/pages/templates/property.jsp b/software/ncitbrowser/web/pages/templates/property.jsp index 20162e099..2005c8044 100644 --- a/software/ncitbrowser/web/pages/templates/property.jsp +++ b/software/ncitbrowser/web/pages/templates/property.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="java.util.*" %> <%@ page import="java.util.Map.Entry" %> diff --git a/software/ncitbrowser/web/pages/templates/quickLink.jsp b/software/ncitbrowser/web/pages/templates/quickLink.jsp index d597a8463..12afb6f7f 100644 --- a/software/ncitbrowser/web/pages/templates/quickLink.jsp +++ b/software/ncitbrowser/web/pages/templates/quickLink.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page import="java.util.List" %> diff --git a/software/ncitbrowser/web/pages/templates/relationship.jsp b/software/ncitbrowser/web/pages/templates/relationship.jsp index cfba06add..bcb502438 100644 --- a/software/ncitbrowser/web/pages/templates/relationship.jsp +++ b/software/ncitbrowser/web/pages/templates/relationship.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="java.util.*" %> <%@ page import="gov.nih.nci.evs.browser.properties.*" %> <%@ page import="gov.nih.nci.evs.browser.utils.*" %> @@ -204,10 +197,10 @@ if (type != null && type.compareTo("all") == 0) { if (roles != null && roles.size() > 0) { %> - Role Relationships: + <%=Constants.ROLE_LABEL%> <%=Constants.ROLE_LABEL_2%>:
- (Roles are true for current concept and descendants, may be inherited from parent(s).) + <%=Constants.ROLE_DESCRIPTION_LABEL%> <% @@ -258,7 +251,7 @@ if (type != null && type.compareTo("all") == 0) { <% } else if (roles == null || roles.size() == 0) { %> - Role Relationships: (none) + <%=Constants.ROLE_LABEL%> <%=Constants.ROLE_LABEL_2%>: (none) <% } %> @@ -274,9 +267,9 @@ if (type != null && type.compareTo("all") == 0) { <% if (associations != null && associations.size() > 0) { %> - Associations: + <%=Constants.ASSOCIATION_LABEL%> <%=Constants.ASSOCIATION_LABEL_2%>:
-(Associations are true only for the current concept.) +<%=Constants.ASSOCIATION_DESCRIPTION_LABEL%>
@@ -404,7 +397,7 @@ if (type != null && type.compareTo("all") == 0) { <% } else if (associations == null || associations.size() == 0) { %> - Associations: (none) + <%=Constants.ASSOCIATION_LABEL%> <%=Constants.ASSOCIATION_LABEL_2%>: (none) <% } %> @@ -419,6 +412,7 @@ if (type != null && type.compareTo("all") == 0) { if (display_inverse_relationships_metadata_value != null && display_inverse_relationships_metadata_value.compareToIgnoreCase("false") == 0) { display_inverse_relationships = false; } + if (!isMapping) { @@ -427,10 +421,10 @@ if (!isMapping) { if (inverse_roles != null && inverse_roles.size() > 0 && display_inverse_relationships) { %> - Inverse Role Relationships: + <%=Constants.INVERSE_ROLE_LABEL%> <%=Constants.INVERSE_ROLE_LABEL_2%>:
- (Roles are true for current concept and descendants, may be inherited from parent(s).) + <%=Constants.INVERSE_ROLE_DESCRIPTION_LABEL%>
@@ -511,7 +505,7 @@ if (!isMapping) { <% } else if (inverse_roles == null || inverse_roles.size() == 0 || !display_inverse_relationships) { %> - Inverse Role Relationships: (none) + <%=Constants.INVERSE_ROLE_LABEL%> <%=Constants.INVERSE_ROLE_LABEL_2%>: (none) <% } %> @@ -526,9 +520,9 @@ if (!isMapping) { <% if (inverse_associations != null && inverse_associations.size() > 0 && display_inverse_relationships) { %> - Inverse Associations: + <%=Constants.INVERSE_ASSOCIATION_LABEL%> <%=Constants.INVERSE_ASSOCIATION_LABEL_2%>:
-(Associations are true only for the current concept.) +<%=Constants.INVERSE_ASSOCIATION_DESCRIPTION_LABEL%>
<% @@ -659,7 +653,7 @@ if (!isMapping) { <% } else if (inverse_associations == null || inverse_associations.size() == 0 || !display_inverse_relationships) { %> - Inverse Associations: (none) + <%=Constants.INVERSE_ASSOCIATION_LABEL%> <%=Constants.INVERSE_ASSOCIATION_LABEL_2%>: (none) <% } %> diff --git a/software/ncitbrowser/web/pages/templates/searchForm-resolvedvalueset.jsp b/software/ncitbrowser/web/pages/templates/searchForm-resolvedvalueset.jsp index bafc7e4fd..bd16ffe36 100644 --- a/software/ncitbrowser/web/pages/templates/searchForm-resolvedvalueset.jsp +++ b/software/ncitbrowser/web/pages/templates/searchForm-resolvedvalueset.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.*" %> <% @@ -57,14 +50,14 @@ if (uri_str == null) { %> - + @@ -96,7 +89,10 @@ if (uri_str == null) { diff --git a/software/ncitbrowser/web/pages/templates/searchForm-termbrowser.jsp b/software/ncitbrowser/web/pages/templates/searchForm-termbrowser.jsp index d8dd04c4c..af7409329 100644 --- a/software/ncitbrowser/web/pages/templates/searchForm-termbrowser.jsp +++ b/software/ncitbrowser/web/pages/templates/searchForm-termbrowser.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.*" %> <% diff --git a/software/ncitbrowser/web/pages/templates/searchForm-valueset.jsp b/software/ncitbrowser/web/pages/templates/searchForm-valueset.jsp index 732185790..aced0c0fa 100644 --- a/software/ncitbrowser/web/pages/templates/searchForm-valueset.jsp +++ b/software/ncitbrowser/web/pages/templates/searchForm-valueset.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.*" %> <%@ page import="org.lexgrid.valuesets.LexEVSValueSetDefinitionServices" %> @@ -89,7 +82,7 @@ _valueset_match_text = (String) request.getSession().getAttribute("matchText_VSD if (_valueset_match_text == null) _valueset_match_text = ""; %> - + @@ -124,7 +117,7 @@ if (_selectValueSetSearchOption.compareTo("CodingScheme") == 0) { onclick="javascript:cursor_wait();" image="#{valueSetSearch_requestContextPath}/images/search.gif" styleClass="searchbox-btn" - alt="Search Value Sets" + alt="Search concepts in value set" tabindex="2"> diff --git a/software/ncitbrowser/web/pages/templates/searchForm.jsp b/software/ncitbrowser/web/pages/templates/searchForm.jsp index cbda3175a..b99e01fba 100644 --- a/software/ncitbrowser/web/pages/templates/searchForm.jsp +++ b/software/ncitbrowser/web/pages/templates/searchForm.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.properties.*"%> <%@ page import="gov.nih.nci.evs.browser.utils.*"%> <%@ page import="gov.nih.nci.evs.browser.bean.*"%> @@ -82,23 +75,33 @@ L--%> <% boolean back_to_search_results_link = false; + boolean value_set_entity_search = false; String search_key = HTTPUtils.cleanXSS((String) request.getParameter("key")); + String t = HTTPUtils.cleanXSS((String) request.getParameter("b")); + String t2 = HTTPUtils.cleanXSS((String) request.getParameter("vse")); + String vse = null; + + if (!DataUtils.isNull(t2)) { + value_set_entity_search = true; + +vse = t2; + + + } + String page_number = HTTPUtils.cleanXSS((String) request.getParameter("n")); if (!DataUtils.isNull(page_number) && !DataUtils.isInteger(page_number)) { page_number = "1"; } - - if (DataUtils.isNull(t)) { t = (String) request.getSession().getAttribute("b"); page_number = (String) request.getSession().getAttribute("n"); search_key = (String) request.getSession().getAttribute("key"); } - - if (!DataUtils.isNull(t)) { + if (!DataUtils.isNull(t) || !DataUtils.isNull(t2)) { back_to_search_results_link = true; } @@ -166,7 +169,7 @@ L--%> else check_r = "checked"; %> - + if (DataUtils.isNull(search_key)) { %> + <% } else if (back_to_search_results_link) { - if (DataUtils.isNull(multiple_search_flag)) { - %> - - - <% - } else { + + if (value_set_entity_search) { + %> - <% - } + <% + } else { + if (DataUtils.isNull(multiple_search_flag)) { + %> + + <% + } else { + %> + + <% + } + } } %>
tabindex="5"/> tabindex="5" onclick="onCodeButtonPressed('resolvedValueSetSearchForm');" /> + +
- Back to search results - Back to search results + href="<%=request.getContextPath()%>/pages/value_set_entity_search_results.jsf?key=<%=HTTPUtils.cleanXSS(search_key)%>&page_number=<%=page_number%>&vse=<%=vse%>" + tabindex="6" title="Back to search results">Back to search results + Back to search results + + Back to search results + - Advanced Search + tabindex="6" title="Advanced Search"> Advanced Search
diff --git a/software/ncitbrowser/web/pages/templates/sub-header.jsp b/software/ncitbrowser/web/pages/templates/sub-header.jsp index 20ac56515..8fe85417c 100644 --- a/software/ncitbrowser/web/pages/templates/sub-header.jsp +++ b/software/ncitbrowser/web/pages/templates/sub-header.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> -
EVS Logo - <% String source_header = MetadataUtils.getMetadataValue( dictionary, null, null, "source_header"); diff --git a/software/ncitbrowser/web/pages/templates/template.jsp b/software/ncitbrowser/web/pages/templates/template.jsp index 9e031293b..721b6bb5f 100644 --- a/software/ncitbrowser/web/pages/templates/template.jsp +++ b/software/ncitbrowser/web/pages/templates/template.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -29,7 +22,7 @@ L--%> <%=content_title%> - + diff --git a/software/ncitbrowser/web/pages/templates/templatePopup.jsp b/software/ncitbrowser/web/pages/templates/templatePopup.jsp index a45d6e718..d1de163f2 100644 --- a/software/ncitbrowser/web/pages/templates/templatePopup.jsp +++ b/software/ncitbrowser/web/pages/templates/templatePopup.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -42,7 +35,7 @@ L--%> <%=content_title%> - + diff --git a/software/ncitbrowser/web/pages/templates/typeLinks.jsp b/software/ncitbrowser/web/pages/templates/typeLinks.jsp index 220ee3a6e..d77517647 100644 --- a/software/ncitbrowser/web/pages/templates/typeLinks.jsp +++ b/software/ncitbrowser/web/pages/templates/typeLinks.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ page import="gov.nih.nci.evs.browser.utils.*" %> @@ -17,6 +10,17 @@ L--%> String tab_version = typeLinks_info.version; boolean typeLink_isMapping = DataUtils.isMapping(scheme, null); + +String _vse = HTTPUtils.cleanXSS((String) request.getParameter("vse")); +String _search_key = HTTPUtils.cleanXSS((String) request.getParameter("key")); + + +String _page_number = HTTPUtils.cleanXSS((String) request.getParameter("page_number")); + +if (DataUtils.isNull(_page_number)) { + _page_number = "0"; +} + String jsp_page_name = "concept_details.jsf"; String id = null; @@ -47,7 +51,7 @@ L--%> <% } else if (data_type.compareTo("properties") != 0) { %> - + Terms & Properties if (data_type == null || (data_type != null && data_type.compareTo("synonym") != 0)) { %> - + Synonym Details if (data_type == null || (data_type != null && data_type.compareTo("relationship") != 0)) { %> - + Relationships - + Mapping - + View All - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page import="gov.nih.nci.evs.browser.utils.*" %> @@ -24,11 +17,17 @@ L--%> <% if (isMapping) { + String requestContextPath = request.getContextPath(); + %> <% @@ -66,12 +65,18 @@ if (license_display_value != null && (license_display_value.compareTo("show") == } + + %>
View Mapping +   + + Export Mapping +
--%> - - -
<% - if (html_compatable_description_value == null) { + if (DataUtils.isNullOrBlank(scheme)) { + %> +

 <%=Constants.UNIDENTIFIABLE_VOCABULARY%>

+ <% + } else if (html_compatable_description_value == null) { %> <%=HTTPUtils.cleanXSS(scheme)%> <% diff --git a/software/ncitbrowser/web/pages/templates/welcome.jsp b/software/ncitbrowser/web/pages/templates/welcome.jsp index 776234f20..035195abc 100644 --- a/software/ncitbrowser/web/pages/templates/welcome.jsp +++ b/software/ncitbrowser/web/pages/templates/welcome.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page import="gov.nih.nci.evs.browser.utils.*" %> @@ -20,23 +13,30 @@ L--%> <% String codingschemeversion = HTTPUtils.cleanXSS(info.version); String message = null; - boolean isVersionValid = DataUtils.validateCodingSchemeVersion(info.dictionary, info.version); - if (!isVersionValid) { - message = "WARNING: Invalid version number detected. Please correct it before proceeding any further."; + boolean show_content = true; + + if (!DataUtils.isNullOrBlank(info.dictionary) && DataUtils.isNullOrBlank(DataUtils.getFormalName(info.dictionary))) { + message = Constants.UNIDENTIFIABLE_VOCABULARY; + show_content = false; + + } else { + boolean isVersionValid = DataUtils.validateCodingSchemeVersion(info.dictionary, info.version); + if (!isVersionValid) { + message = "WARNING: Invalid version number detected. Please correct it before proceeding any further."; + } } - %> - <%--
Version: <%=HTTPUtils.cleanXSS(info.version)%>

<% + + + + Vector from_vec = new Vector(); Vector to_vec = new Vector(); from_vec.add("ncim_url"); @@ -76,7 +76,9 @@ if (license_display_value != null && (license_display_value.compareTo("show") == - <% + <% + + if (message != null) { %> + +<% } %> +
@@ -86,10 +88,13 @@ if (license_display_value != null && (license_display_value.compareTo("show") == } %> + <% if (show_content) { %>
+ <%=html_compatable_description_value%> + <% if (source_url_value != null) { %> @@ -194,6 +199,9 @@ if (license_display_value != null && (license_display_value.compareTo("show") == More information on NCI dictionaries and resources.
diff --git a/software/ncitbrowser/web/pages/term_type_help_info.jsp b/software/ncitbrowser/web/pages/term_type_help_info.jsp index 51cb28649..2eaa9ae2f 100644 --- a/software/ncitbrowser/web/pages/term_type_help_info.jsp +++ b/software/ncitbrowser/web/pages/term_type_help_info.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ page contentType="text/html;charset=windows-1252"%> @@ -19,7 +12,7 @@ L--%> Term Type Help Informaton - + diff --git a/software/ncitbrowser/web/pages/value_set_entity_search_results.jsp b/software/ncitbrowser/web/pages/value_set_entity_search_results.jsp new file mode 100644 index 000000000..b2c8b2105 --- /dev/null +++ b/software/ncitbrowser/web/pages/value_set_entity_search_results.jsp @@ -0,0 +1,686 @@ +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page contentType="text/html;charset=windows-1252"%> +<%@ page import="java.util.Vector"%> +<%@ page import="java.util.HashMap"%> +<%@ page import="java.util.HashSet"%> +<%@ page import="org.LexGrid.concepts.Entity" %> +<%@ page import="gov.nih.nci.evs.browser.common.Constants" %> +<%@ page import="gov.nih.nci.evs.browser.utils.*" %> +<%@ page import="gov.nih.nci.evs.browser.bean.IteratorBean" %> +<%@ page import="org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference" %> +<%@ page import="javax.faces.context.FacesContext" %> +<%@ page import="org.apache.log4j.*" %> +<%@ page import="gov.nih.nci.evs.browser.utils.*" %> +<%@ page import="org.lexgrid.valuesets.LexEVSValueSetDefinitionServices" %> +<%@ page import="org.LexGrid.LexBIG.Utility.Iterators.ResolvedConceptReferencesIterator" %> + + + + + + + + + + + +<% String vsBasePath = request.getContextPath(); %> + + + + + NCI Term Browser - Value Set Search + + + + + + + + + + + + + + + + + +<%! + private static Logger _logger = Utils.getJspLogger("value_set_entity_search_results.jsp"); +%> + + +<% +String VSD_view = (String) request.getSession().getAttribute("view"); +String valueSetSearch_requestContextPath = request.getContextPath(); +String selected_ValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("selectValueSetSearchOption")); +//String checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("checked_vocabularies")); + +String checked_vocabularies = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("checked_vocabularies")); +Vector selected_vocabularies = null; + + +String tooltip_str = "No value set is selected." + "
"; +String selected_vocabularies_link = ""; +if (checked_vocabularies != null) { + tooltip_str = checked_vocabularies + "
"; + selected_vocabularies = DataUtils.parseData(checked_vocabularies, ","); + + selected_vocabularies_link = JSPUtils.getPopUpWindow(selected_vocabularies, "Selected Value Sets"); +} + + +//String partial_checked_vocabularies = HTTPUtils.cleanXSS((String) request.getParameter("partial_checked_vocabularies")); + + +String resultsPerPage = HTTPUtils.cleanXSS((String) request.getParameter("resultsPerPage")); +if (resultsPerPage == null) { + resultsPerPage = (String) request.getSession().getAttribute("resultsPerPage"); + if (resultsPerPage == null) { + resultsPerPage = "50"; + } + +} else { + request.getSession().setAttribute("resultsPerPage", resultsPerPage); +} + +String selectedResultsPerPage = resultsPerPage; +String itr_key = null; +IteratorBean iteratorBean = (IteratorBean) request.getSession().getAttribute("value_set_entity_search_results"); +if (iteratorBean != null) { + itr_key = iteratorBean.getKey(); +} + +//==================================================================================================== +String matchText = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("matchText")); +int pageNum = 0; +int pageSize = Integer.parseInt( resultsPerPage ); +int size = iteratorBean.getSize(); +List list = null; +int num_pages = size / pageSize; +if (num_pages * pageSize < size) num_pages++; + +String page_number = HTTPUtils.cleanXSS((String) request.getParameter("page_number")); + +if (!DataUtils.isNull(page_number)) { + pageNum = Integer.parseInt(page_number); +} else { + pageNum = 0; + + page_number = "0"; +} + +int istart = pageNum * pageSize; +int page_num = pageNum; +if (page_num == 0) { + page_num++; +} else { + istart = (pageNum-1) * pageSize; +} +int iend = istart + pageSize - 1; +try { + list = iteratorBean.getData(istart, iend); + int prev_size = size; + size = iteratorBean.getSize(); + + if (size != prev_size) { + if (iend > size) { + iend = size; + } + list = iteratorBean.getData(istart, size); + + } else { + + if (iend > size) { + iend = size; + } + + } +} catch (Exception ex) { + //System.out.println("ERROR: bean.getData throws exception??? istart: " + istart + " iend: " + iend); +} + + +num_pages = size / pageSize; +if (num_pages * pageSize < size) num_pages++; + +int istart_plus_pageSize = istart+pageSize; + + +String istart_str = Integer.toString(istart+1); +String iend_str = Integer.valueOf(iend).toString(); + +if (iend >= istart+pageSize-1) { + iend = istart+pageSize-1; + list = iteratorBean.getData(istart, iend); + iend_str = Integer.valueOf(iend+1).toString(); +} + +String match_size = Integer.valueOf(size).toString(); + + +int next_page_num = page_num + 1; +int prev_page_num = page_num - 1; +String prev_page_num_str = Integer.toString(prev_page_num); +String next_page_num_str = Integer.toString(next_page_num); + +//==================================================================================================== +String vsd_uri = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); + + String searchform_requestContextPath = request.getContextPath(); + searchform_requestContextPath = searchform_requestContextPath.replace("//ncitbrowser//ncitbrowser", "//ncitbrowser"); + + request.getSession().setAttribute("navigation_type", "valuesets"); + + String message = (String) request.getSession().getAttribute("message"); + request.getSession().removeAttribute("message"); + + + String t = null; + + String selected_cs = ""; + String selected_cd = null; + + String check_cs = ""; + String check_cd = ""; + String check_code = ""; + String check_name = ""; + String check_src = ""; + + // to be modified + String valueset_search_algorithm = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("valueset_search_algorithm")); ; + + String check__e = "", check__b = "", check__s = "" , check__c =""; + if (valueset_search_algorithm == null || valueset_search_algorithm.compareTo("exactMatch") == 0) + check__e = "checked"; + else if (valueset_search_algorithm.compareTo("startsWith") == 0) + check__s= "checked"; + else if (valueset_search_algorithm.compareTo("DoubleMetaphoneLuceneQuery") == 0) + check__b= "checked"; + else + check__c = "checked"; + + String selectValueSetSearchOption = null; + selectValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getParameter("opt")); + + if (selectValueSetSearchOption == null) { + selectValueSetSearchOption = (String) request.getSession().getAttribute("selectValueSetSearchOption"); + } + + if (DataUtils.isNullOrBlank(selectValueSetSearchOption)) { + selectValueSetSearchOption = "Name"; + } + + if (selectValueSetSearchOption.compareTo("CodingScheme") == 0) + check_cs = "checked"; + else if (selectValueSetSearchOption.compareTo("Code") == 0) + check_code = "checked"; + else if (selectValueSetSearchOption.compareTo("Name") == 0) + check_name = "checked"; + else if (selectValueSetSearchOption.compareTo("Source") == 0) + check_src = "checked"; + + + String valueset_match_text = (String) request.getSession().getAttribute("matchText_VSD"); + if (DataUtils.isNull(valueset_match_text)) { + valueset_match_text = (String) request.getSession().getAttribute("matchText"); + } + if (DataUtils.isNull(valueset_match_text)) { + valueset_match_text = ""; + } + + +String uri_vsd = null; +String vsd_name = "null"; +%> + + + +
skip navigation links + + <%@ include file="/pages/templates/header.jsp" %> +
+ <%@ include file="/pages/templates/sub-header.jsp" %> + +
+ +
+ + + +
+ <%=JSPUtils.getApplicationVersionDisplay()%> +
+
+ + +
+ +
SearchBox Top
+ + +<% + + String match_text = gov.nih.nci.evs.browser.utils.HTTPUtils + .cleanXSS((String) request.getSession().getAttribute("matchText")); + + if (match_text == null) match_text = ""; + + String userAgent = request.getHeader("user-agent"); + boolean isIE = userAgent != null && userAgent.toLowerCase().contains("msie"); + + //String vsd_uri = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); + + if (vsd_uri == null) { + vsd_uri = (String) request.getSession().getAttribute("vsd_uri"); + } + + + String algorithm = gov.nih.nci.evs.browser.utils.HTTPUtils.cleanXSS((String) request.getSession().getAttribute("algorithm")); + + String check_e = "", check_s = "" , check_c =""; + if (algorithm == null || algorithm.compareTo("exactMatch") == 0) + check_e = "checked"; + else if (algorithm.compareTo("startsWith") == 0) + check_s= "checked"; + else + check_c = "checked"; + + + String searchTarget = (String) request.getSession().getAttribute("searchTarget"); + + String check_n = ""; + String check_p = ""; + check_cd =""; + + if (DataUtils.isNullOrBlank(searchTarget)) { + check_n = "checked"; + } else if (searchTarget.compareTo("codes") == 0) { + check_cd = "checked"; + } else if (searchTarget.compareTo("names") == 0) { + check_n = "checked"; + } else if (searchTarget.compareTo("properties") == 0) { + check_p = "checked"; + } + + +%> + + + + +
SearchBox Bottom
+ + + <%@ include file="/pages/templates/menuBar-termbrowserhome.jsp" %> + +
+
+ + + + <%@ include file="/pages/templates/quickLink.jsp" %> + + + +
+
+ + + <%-- 0 <%@ include file="/pages/templates/navigationTabs.jsp"%> --%> + + <% if (!DataUtils.isNullOrBlank(message)) { + if (message.compareToIgnoreCase("No match found.") == 0) { + %> +

 No match found in   + +<%=selected_vocabularies_link%> + + +

. + <% + } else { + %> +

 <%=message%>

+ <% + } + %> + + <% } else { %> + + + + + + + + + + +
+
+ + + + + + + + + + + + +
+ + + + + +
Result for:<%=matchText%>
+

+ Results <%=istart_str%>-<%=iend_str%> of <%=match_size%> for: <%=matchText%> from  + +<%=selected_vocabularies_link%> + +
+
+ +   + + + + + + + + + +<% + String name = null; + String uri = null; + String label = null; + String cd = null; + String sources = null; + String supportedsources = null; + + String entity_name = null; + String entity_code = null; + String entity_cs = null; + String entity_cs_version = null; + + + String vsd_description = ValueSetHierarchy.getValueSetDecription(vsd_uri); + if (vsd_description == null) { + vsd_description = "DESCRIPTION NOT AVAILABLE"; + } + + +HashMap hmap = new HashMap(); +HashSet hset = new HashSet(); + +for (int i=0; i <% + } else { + %> <% + } + %> + + + + + + + + + + + + +<% +} +%> +
Value SetVocabularyNameCode
+ <%=name%> + + <%=cs_name_and_version%> + + <% + if (DataUtils.isNull(entity_cs_version) || entity_cs_version.compareTo("") == 0) { + %> + <%=entity_name%> + <% + } else { + %> + <%=entity_name%> + <% + } + %> + + <%=entity_code%> +
+ + + + + + + + + +<% } %> + +
+ + +

+ +
+ + +
+
+ + <% if (DataUtils.isNullOrBlank(message)) { + +%> + + + <%@ include file="/pages/templates/pagination-valuesetentity-results.jsp" %> + + + <%}%> + + <%@ include file="/pages/templates/nciFooter.jsp" %> +
+
+
+ +
+
Mainbox Bottom
+ + + + + diff --git a/software/ncitbrowser/web/pages/value_set_hierarchy.jsp b/software/ncitbrowser/web/pages/value_set_hierarchy.jsp index 93cc6bb58..cb64bcb8b 100644 --- a/software/ncitbrowser/web/pages/value_set_hierarchy.jsp +++ b/software/ncitbrowser/web/pages/value_set_hierarchy.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -40,7 +33,7 @@ L--%> NCI Term Browser - Value Set Hierarchy - + @@ -538,7 +531,7 @@ Search or browse each from its home page, or search all value sets at once from
-
+ <% String ontology_node_id = HTTPUtils.cleanXSS((String) request.getParameter("code")); diff --git a/software/ncitbrowser/web/pages/value_set_home.jsp b/software/ncitbrowser/web/pages/value_set_home.jsp new file mode 100644 index 000000000..88e697d66 --- /dev/null +++ b/software/ncitbrowser/web/pages/value_set_home.jsp @@ -0,0 +1,570 @@ +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ page contentType="text/html;charset=windows-1252"%> +<%@ page import="java.util.Vector"%> +<%@ page import="org.LexGrid.concepts.Entity" %> +<%@ page import="gov.nih.nci.evs.browser.common.Constants" %> +<%@ page import="gov.nih.nci.evs.browser.utils.*" %> +<%@ page import="gov.nih.nci.evs.browser.bean.IteratorBean" %> +<%@ page import="org.LexGrid.LexBIG.DataModel.Core.ResolvedConceptReference" %> +<%@ page import="javax.faces.context.FacesContext" %> +<%@ page import="org.apache.log4j.*" %> +<%@ page import="gov.nih.nci.evs.browser.utils.*" %> +<%@ page import="org.lexgrid.valuesets.LexEVSValueSetDefinitionServices" %> +<%@ page import="org.LexGrid.valueSets.ValueSetDefinition" %> +<%@ page import="org.LexGrid.concepts.Entity" %> + + + + + + + + + + + +<% String vsBasePath = request.getContextPath(); %> + + + + + NCI Term Browser - Value Set Search + + + + + + + + + + + + + + + + + + + + + +<% + String vd_uri = null; + boolean isValueSet = true; + String valueSetSearch_requestContextPath = request.getContextPath(); + String selected_ValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("selectValueSetSearchOption")); + String vsd_uri = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); + + String uri_vsd = null; + String vsd_name = null; + + String selectedvalueset = null; + ValueSetDefinition vsd = DataUtils.findValueSetDefinitionByURI(vsd_uri); + + if (vsd != null) { + vsd_name = vsd.getValueSetDefinitionName(); + TreeItem ti = ValueSetHierarchy.getSourceValueSetTreeBranch(vsd); + HashMap hmap = new HashMap(); + hmap.put("", ti); + } else { + isValueSet = false; + Entity entity = DataUtils.getConceptByCode(Constants.TERMINOLOGY_VALUE_SET_NAME, null, vsd_uri); + if (entity != null) { + vsd_name = entity.getEntityDescription().getContent(); + } + } + + String searchform_requestContextPath = request.getContextPath(); + searchform_requestContextPath = searchform_requestContextPath.replace("//ncitbrowser//ncitbrowser", "//ncitbrowser"); + + request.getSession().setAttribute("navigation_type", "valuesets"); + + String message = (String) request.getSession().getAttribute("message"); + request.getSession().removeAttribute("message"); + + String t = null; + String selected_cs = ""; + String selected_cd = null; + String check_cs = ""; + String check_cd = ""; + String check_code = ""; + String check_name = ""; + String check_src = ""; + + // to be modified + String valueset_search_algorithm = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("valueset_search_algorithm")); ; + + String check__e = "", check__b = "", check__s = "" , check__c =""; + if (valueset_search_algorithm == null || valueset_search_algorithm.compareTo("exactMatch") == 0) + check__e = "checked"; + else if (valueset_search_algorithm.compareTo("startsWith") == 0) + check__s= "checked"; + else if (valueset_search_algorithm.compareTo("DoubleMetaphoneLuceneQuery") == 0) + check__b= "checked"; + else + check__c = "checked"; + + String selectValueSetSearchOption = null; + selectValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getParameter("opt")); + + if (selectValueSetSearchOption == null) { + selectValueSetSearchOption = (String) request.getSession().getAttribute("selectValueSetSearchOption"); + } + + if (DataUtils.isNullOrBlank(selectValueSetSearchOption)) { + selectValueSetSearchOption = "Name"; + } + + if (selectValueSetSearchOption.compareTo("CodingScheme") == 0) + check_cs = "checked"; + else if (selectValueSetSearchOption.compareTo("Code") == 0) + check_code = "checked"; + else if (selectValueSetSearchOption.compareTo("Name") == 0) + check_name = "checked"; + else if (selectValueSetSearchOption.compareTo("Source") == 0) + check_src = "checked"; + + String valueset_match_text = (String) request.getSession().getAttribute("matchText_VSD"); + if (DataUtils.isNull(valueset_match_text)) { + valueset_match_text = (String) request.getSession().getAttribute("matchText"); + } + if (DataUtils.isNull(valueset_match_text)) { + valueset_match_text = ""; + } + + + + String match_text = gov.nih.nci.evs.browser.utils.HTTPUtils + .cleanXSS((String) request.getSession().getAttribute("matchText")); + + if (match_text == null) match_text = ""; + + String userAgent = request.getHeader("user-agent"); + boolean isIE = userAgent != null && userAgent.toLowerCase().contains("msie"); + + String uri_str = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); + + if (uri_str == null) { + uri_str = (String) request.getSession().getAttribute("vsd_uri"); + } + + + String algorithm = gov.nih.nci.evs.browser.utils.HTTPUtils.cleanXSS((String) request.getSession().getAttribute("algorithm")); + + String check_e = "", check_s = "" , check_c =""; + if (algorithm == null || algorithm.compareTo("exactMatch") == 0) + check_e = "checked"; + else if (algorithm.compareTo("startsWith") == 0) + check_s= "checked"; + else + check_c = "checked"; + + + String searchTarget = (String) request.getSession().getAttribute("searchTarget"); + + String check_n = ""; + String check_p = ""; + check_cd =""; + + if (DataUtils.isNullOrBlank(searchTarget)) { + check_n = "checked"; + } else if (searchTarget.compareTo("codes") == 0) { + check_cd = "checked"; + } else if (searchTarget.compareTo("names") == 0) { + check_n = "checked"; + } else if (searchTarget.compareTo("properties") == 0) { + check_p = "checked"; + } + + String vsd_description = ValueSetHierarchy.getValueSetDecription(vsd_uri); + if (vsd_description == null) { + vsd_description = "DESCRIPTION NOT AVAILABLE"; + } + +%> + + + + skip navigation links + + <%@ include file="/pages/templates/header.jsp" %> +
+ <%@ include file="/pages/templates/sub-header.jsp" %> + +
+ + + + + + <% + if (isValueSet) { + %> + +
+ + + +
+ + +
SearchBox Top
+ + + + +
SearchBox Bottom
+ + + + + + + + + + + + + + +
+ + + +
+ + + <% + } else { + %> + + + +
+ + +
+ Shim + <%@ include file="/pages/templates/menuBar-termbrowserhome.jsp" %> +
+
+ + + + <% + } + %> + + + + + + + + + + + + + <%@ include file="/pages/templates/quickLink.jsp" %> + + + +
+
+ + + + <%-- 0 <%@ include file="/pages/templates/navigationTabs.jsp"%> --%> + + + + <% if (message != null) { %> + + <% } else { %> + + +<% + String VSD_view = (String) request.getSession().getAttribute("view"); +%> + + + + + + +   + + + + + <% } %> +
+

 <%=message%>

+
+
+ + + + + <% + if (isValueSet) { + %> + + + + <% + } else { + %> + + <% + } + %> + + + +
+
Welcome
+
+ + +   + + +   + + +  
+
+
+
+
+ + +
+

+ <%=vsd_description%> +

+
+ + + + +
+
+
+
+ <%@ include file="/pages/templates/nciFooter.jsp" %> +
+
+
+ +
+
Mainbox Bottom
+
+ + + + diff --git a/software/ncitbrowser/web/pages/value_set_search_results.jsp b/software/ncitbrowser/web/pages/value_set_search_results.jsp index 164dd309f..cf03a36ba 100644 --- a/software/ncitbrowser/web/pages/value_set_search_results.jsp +++ b/software/ncitbrowser/web/pages/value_set_search_results.jsp @@ -1,10 +1,3 @@ -<%--L - Copyright Northrop Grumman Information Technology. - - Distributed under the OSI-approved BSD 3-Clause License. - See http://ncip.github.com/nci-term-browser/LICENSE.txt for details. -L--%> - <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> @@ -19,6 +12,9 @@ L--%> <%@ page import="org.apache.log4j.*" %> <%@ page import="gov.nih.nci.evs.browser.utils.*" %> <%@ page import="org.lexgrid.valuesets.LexEVSValueSetDefinitionServices" %> +<%@ page import="org.LexGrid.valueSets.ValueSetDefinition" %> +<%@ page import="org.LexGrid.concepts.Entity" %> + @@ -36,7 +32,7 @@ L--%> NCI Term Browser - Value Set Search - + @@ -109,7 +105,7 @@ L--%> %> -
+ <% String VSD_view = (String) request.getSession().getAttribute("view"); %> @@ -122,27 +118,25 @@ String valueSetSearch_requestContextPath = request.getContextPath(); String selected_ValueSetSearchOption = HTTPUtils.cleanXSS((String) request.getSession().getAttribute("selectValueSetSearchOption")); Vector vsd_vec = null; -String vsd_uri = HTTPUtils.cleanXSS((String) request.getParameter("vsd_uri")); +String value_set_tab = HTTPUtils.cleanXSS((String) request.getParameter("value_set_tab")); + + +String root_vsd_uri = HTTPUtils.cleanXSS((String) request.getParameter("root_vsd_uri")); +String vsd_uri = null; + +if (value_set_tab != null && value_set_tab.compareToIgnoreCase("true") == 0) { + root_vsd_uri = null; +} + String selectedvalueset = null; -if (vsd_uri != null && vsd_uri.compareTo("null") != 0) { - String vsd_metadata = DataUtils.getValueSetDefinitionMetadata(DataUtils.findValueSetDefinitionByURI(vsd_uri)); - vsd_vec = new Vector(); - vsd_vec.add(vsd_metadata); - -} else { - vsd_vec = (Vector) request.getSession().getAttribute("matched_vsds"); - if (vsd_vec != null && vsd_vec.size() == 1) { +vsd_vec = (Vector) request.getSession().getAttribute("matched_vsds"); +if (vsd_vec != null && vsd_vec.size() == 1) { vsd_uri = (String) vsd_vec.elementAt(0); - Vector temp_vec = DataUtils.parseData(vsd_uri); selectedvalueset = (String) temp_vec.elementAt(1); - } -} - - - - + root_vsd_uri = (String) temp_vec.elementAt(0); +} String searchform_requestContextPath = request.getContextPath(); searchform_requestContextPath = searchform_requestContextPath.replace("//ncitbrowser//ncitbrowser", "//ncitbrowser"); @@ -150,14 +144,8 @@ if (vsd_uri != null && vsd_uri.compareTo("null") != 0) { String message = (String) request.getSession().getAttribute("message"); request.getSession().removeAttribute("message"); - -if (message == null) { - if (vsd_vec == null) { - message = "WARNING: Session lost. Please click on the Value Sets tab to start a new session."; - } -} - + String t = null; String selected_cs = ""; @@ -225,9 +213,6 @@ if (message == null) {
- - -
@@ -236,20 +221,55 @@ String uri_vsd = null; String vsd_name = "null"; if ((vsd_vec != null && vsd_vec.size() > 1) || (vsd_vec == null)) { + if (root_vsd_uri != null) { + ValueSetDefinition vsd = DataUtils.findValueSetDefinitionByURI(root_vsd_uri); + + if (vsd != null) { + vsd_name = vsd.getValueSetDefinitionName(); + } else { + //isValueSet = false; + Entity entity = DataUtils.getConceptByCode(Constants.TERMINOLOGY_VALUE_SET_NAME, null, root_vsd_uri); + if (entity != null) { + vsd_name = entity.getEntityDescription().getContent(); + } + } + + + + %> + + + <% + } else { + %> -%> - - -
- <%=JSPUtils.getApplicationVersionDisplay()%> -
-
+ +
+ <%=JSPUtils.getApplicationVersionDisplay()%> +
+
-<% + <% + } + + } else if (vsd_vec != null && vsd_vec.size() > 0) { vsd_uri = (String) vsd_vec.elementAt(0); if (vsd_uri.indexOf("|") == -1) { @@ -266,11 +286,14 @@ if ((vsd_vec != null && vsd_vec.size() > 1) || (vsd_vec == null)) { if (vsd_name == null || vsd_name.compareTo("null") == 0) { %> +
<%=JSPUtils.getApplicationVersionDisplay()%>
+ + <% } else { %> @@ -288,16 +311,32 @@ if ((vsd_vec != null && vsd_vec.size() > 1) || (vsd_vec == null)) { %> <% } else { -%> + if (root_vsd_uri != null) { + %> + + + + + <% + } else { + %> + +
+ <%=JSPUtils.getApplicationVersionDisplay()%> +
+
- -
- <%=JSPUtils.getApplicationVersionDisplay()%> -
-
- - -<% + + <% + } } %> @@ -358,11 +397,11 @@ if (vsd_vec != null && vsd_vec.size() == 1) {