Changeset 7609


Ignore:
Timestamp:
14/10/10 16:19:56 (9 years ago)
Author:
mnagni
Message:

The TermParser? had problem to parse strings like 'and' (just the operator name) or '""water' or 'water""' (just the double quotes at the begin or the end of the string).
Fixed. Updated the pom version to 1.2.5

Location:
TI01-discovery-API/trunk/MEDINDiscoveryService
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-API/trunk/MEDINDiscoveryService/.classpath

    r7126 r7609  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<classpath> 
    3         <classpathentry kind="src" path="src/main/java"/> 
    4         <classpathentry kind="src" path="DummyForEclipse"/> 
    5         <classpathentry excluding="**" kind="src" path="src/main/resources"/> 
    6         <classpathentry kind="src" path="src/test/java"/> 
    7         <classpathentry kind="src" path="src/test/resources"/> 
     3        <classpathentry kind="src" output="target/classes" path="src/main/java"/> 
     4        <classpathentry kind="src" output="target/classes" path="target/generated-sources/axis2/wsdl2code/src"/> 
     5        <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> 
     6        <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> 
     7        <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/> 
    88        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> 
    99        <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> 
    1010        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> 
    11         <classpathentry kind="output" path="target"/> 
     11        <classpathentry kind="output" path="target/classes"/> 
    1212</classpath> 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/.settings/org.eclipse.jdt.core.prefs

    r6465 r7609  
    1 #Tue Feb 02 09:50:02 GMT 2010 
     1#Thu Oct 14 16:01:27 BST 2010 
    22eclipse.preferences.version=1 
    33org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 
    44org.eclipse.jdt.core.compiler.compliance=1.5 
     5org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 
    56org.eclipse.jdt.core.compiler.source=1.5 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/pom.xml

    r7558 r7609  
    44        <groupId>ndg.services.discovery</groupId> 
    55        <artifactId>MedinDiscoveryService</artifactId> 
    6         <version>1.2.4</version> 
     6        <version>1.2.5</version> 
    77        <packaging>aar</packaging> 
    88 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/common/TermParser.java

    r7558 r7609  
    88 
    99/** 
    10  *      BSD Licence 
    11  *      Copyright (c) 2009, Science & Technology Facilities Council (STFC) 
    12  *      All rights reserved.     
    13  *  See the LICENSE file in the source distribution of this software for 
    14  *      the full license text. 
     10 * BSD Licence 
     11 * Copyright (c) 2009, Science & Technology Facilities Council (STFC) All rights reserved. 
     12 * Redistribution and use in source and binary forms, with or without 
     13 * modification, are permitted provided that the following conditions are 
     14 * met: 
    1515 * 
    16  * Copyright (C) 2007 STFC & NERC (Science and Technology Facilities Council). 
    17  * This software may be distributed under the terms of the 
    18  * Q Public License, version 1.0 or later. 
    19  * http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 
     16 *   - Redistributions of source code must retain the above copyright 
     17 *     notice, this list of conditions and the following disclaimer. 
     18 *   - Redistributions in binary form must reproduce the above 
     19 *     copyright notice, this list of conditions and the following disclaimer 
     20 *     in the documentation and/or other materials provided with the 
     21 *     distribution. 
     22 *   - Neither the name of the Science & Technology Facilities Council 
     23 *     (STFC) nor the names of its contributors may be used to endorse or 
     24 *     promote products derived from this software without specific prior 
     25 *     written permission. 
     26 * 
     27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     38 *  
    2039 */ 
    2140 
     
    140159        } 
    141160         
    142         private String[] extractWordPhrase(String term) { 
     161        private String[] extractWordPhrase(String term) throws AssembleQueryException { 
    143162                List<String> ret = new ArrayList<String>(); 
    144163 
     
    150169                int grouperIndex = 0; 
    151170                int spaceIndex = 0; 
     171                String item = null; 
    152172                         
    153173                while (true) { 
     
    168188                        if ((grouperIndex != -1 && spaceIndex == -1) 
    169189                                        || (grouperIndex != -1 && spaceIndex != -1 && grouperIndex < spaceIndex)) { 
    170                                 stop = findAssociator(term, start+2);                                    
     190                                stop = findAssociator(term, start+2); 
     191                                if (stop == -1) 
     192                                        throw new AssembleQueryException(new NdgMessage("term.target.syntax.error", new Object[] { term })); 
    171193                                ret.add("''" + term.substring(start+2, stop) + "''");    
    172194                                start = stop + 2; 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/DiscoveryServiceMEDINSkeleton.java

    r7558 r7609  
    141141                                        status = true; 
    142142                                } catch (AssembleQueryException e) { 
    143                                         statusMsg = logHelper.getBundleMessageAndDoLog(e, Level.ERROR); 
    144                                         if (logger.isErrorEnabled()) 
    145                                                 logger.error("searchCriteria: \n" + doSearch.getDoSearch().getSearchCriteria()); 
     143                                        statusMsg = logHelper.getBundleMessageAndDoLog(e, Level.ERROR);                                  
     144                                        logger.error("searchCriteria: \n" + doSearch.getDoSearch().getSearchCriteria()); 
    146145                                } catch (NdgException e) { 
    147146                                        statusMsg = logHelper.getBundleMessageAndDoLog(e, Level.ERROR); 
Note: See TracChangeset for help on using the changeset viewer.