Package org.xdams.xw.exception

Examples of org.xdams.xw.exception.XWException


      }

      return keys;

    } else {
      throw new XWException("searchAlias must not be null");
    }
  }
View Full Code Here


      }

      return keys;

    } else {
      throw new XWException("searchAlias must not be null");
    }

  }
View Full Code Here

      }

      return keys;

    } else {
      throw new XWException("searchAlias must not be null");
    }

  }
View Full Code Here

      }

      return keys;

    } else {
      throw new XWException("searchAlias must not be null");
    }

  }
View Full Code Here

        }

      }
    } else {
      throw new XWException("Sort criteria must not be null");
    }

  }
View Full Code Here

      QueryResult qr = getQRfromPhrase(xQuery, sortCriteria);
      if (qr != null && qr.elements != 0) {
        result = getTitles(connection, theDb, qr, 0, qr.elements);
      }
    } else {
      throw new XWException("xQuery must not be null");
    }
    return result;
  }
View Full Code Here

   */
  public void setTitleRole(String compositionRole) throws SQLException, XWException {
    if (compositionRole != null && !compositionRole.trim().equals(""))
      setTitleRule(connection, theDb, compositionRole);
    else
      throw new XWException("compositionRole must not be null");
  }
View Full Code Here

      return result;
    }
  private void parseURL(String providerUrl) throws XWException{
    String pURL=providerUrl.trim();
        if(!providerUrl.startsWith("regesta"))
        throw new XWException("Invaild URL String");
    try {
      theHost = pURL.substring(pURL.indexOf("//")+2,pURL.lastIndexOf(":"));
      pURL = pURL.substring(pURL.lastIndexOf(":")+1,pURL.length());
      thePort = Integer.parseInt( pURL.substring(0,pURL.indexOf("/")) );
      pURL = pURL.substring(pURL.indexOf("/")+1,pURL.length());
      theDb = pURL.substring(0,pURL.indexOf("/"));
      pURL = pURL.substring(pURL.indexOf("/")+1,pURL.length());
     
      StringTokenizer strtok= new StringTokenizer(pURL,";");
      while(strtok.hasMoreTokens()){
         String token=strtok.nextToken();
         if(token.indexOf("user=")!=-1)
           theUserDB  = token.substring(token.indexOf("user=")+"user=".length(),token.length());
         if(token.indexOf("password=")!=-1)
             thePasswordDB  = token.substring(token.indexOf("password=")+"password=".length(),token.length());
         if(token.indexOf("pne=")!=-1)
             thePne  = token.substring(token.indexOf("pne=")+"pne=".length(),token.length());
         if(token.indexOf("pnce=")!=-1)
             thePnce  = token.substring(token.indexOf("pnce=")+"pnce=".length(),token.length());
      }
      if(thePne.equals(""))
          throw new XWException("Invaild URL String XW_PNE is required");
     
    }
    catch (NumberFormatException e) {
        throw new XWException("Invaild port");
    }
    catch (ArrayIndexOutOfBoundsException e) {
        throw new XWException("Invaild URL String");
    }
    catch (NullPointerException e) {
        throw new XWException("Invaild URL String");
    }
  }
View Full Code Here

TOP

Related Classes of org.xdams.xw.exception.XWException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.