Examples of FormatException


Examples of com.hp.hpl.jena.shared.uuid.JenaUUID.FormatException

    public JenaUUID parse(String s) throws FormatException
    {
        s = s.toLowerCase() ;

        if ( s.length() != 36 )
            throw new FormatException("UUID string is not 36 chars long: it's "+s.length()+" ["+s+"]") ;

        if ( s.charAt(8!= '-' && s.charAt(13) != '-' && s.charAt(18) != '-' && s.charAt(23) != '-' )
            throw new FormatException("String does not have dashes in the right places: "+s) ;

        UUID_V1 u = parse$(s) ;
        if ( u.getVersion() != versionHere )
            throw new FormatException("Wrong version (Expected: "+versionHere+"Got: "+u.getVersion()+"): "+s) ;
        if ( u.getVariant() != variantHere )
            throw new FormatException("Wrong version (Expected: "+variantHere+"Got: "+u.getVariant()+"): "+s) ;
        return u ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.uuid.JenaUUID.FormatException

    public JenaUUID parse(String s) throws FormatException
    {
        s = s.toLowerCase() ;

        if ( s.length() != 36 )
            throw new FormatException("UUID string is not 36 chars long: it's "+s.length()+" ["+s+"]") ;

        if ( s.charAt(8!= '-' && s.charAt(13) != '-' && s.charAt(18) != '-' && s.charAt(23) != '-' )
            throw new FormatException("String does not have dashes in the right places: "+s) ;

        UUID_V1 u = parse$(s) ;
        if ( u.getVersion() != versionHere )
            throw new FormatException("Wrong version (Expected: "+versionHere+"Got: "+u.getVersion()+"): "+s) ;
        if ( u.getVariant() != variantHere )
            throw new FormatException("Wrong version (Expected: "+variantHere+"Got: "+u.getVariant()+"): "+s) ;
        return u ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.uuid.JenaUUID.FormatException

    public UUID_V4 parseV4(String s)
    {
        s = s.toLowerCase() ;

        if ( s.length() != 36 )
            throw new FormatException("UUID string is not 36 chars long: it's "+s.length()+" ["+s+"]") ;

        if ( s.charAt(8!= '-' && s.charAt(13) != '-' && s.charAt(18) != '-' && s.charAt(23) != '-' )
            throw new FormatException("String does not have dashes in the right places: "+s) ;

        UUID_V4 u = parse$(s) ;
        if ( u.getVersion() != versionHere )
            throw new FormatException("Wrong version (Expected: "+versionHere+"Got: "+u.getVersion()+"): "+s) ;
        if ( u.getVariant() != variantHere )
            throw new FormatException("Wrong version (Expected: "+variantHere+"Got: "+u.getVariant()+"): "+s) ;
        return u ;
    }
View Full Code Here

Examples of com.tonbeller.wcf.format.FormatException

    RequestContext context = RequestContext.instance();
    Locale locale = context.getLocale();
      if (analysisName == null || analysisName.trim().equals("")) {
        logger.error("Analysis name missing.");
        String msg = EngineMessageBundle.getMessage("error.analysis.name.missing", locale);
      throw new FormatException(msg);
    }
    // save the current analisys name if the recoveryAnalysisName variable
    this.recoveryAnalysisName = this.analysisName;
    this.analysisName = analysisName;
  }
View Full Code Here

Examples of com.tonbeller.wcf.format.FormatException

    RequestContext context = RequestContext.instance();
    Locale locale = context.getLocale();
    if (templateName == null || templateName.trim().equals("")) {
        logger.error("Template name missing.");
        String msg = EngineMessageBundle.getMessage("error.template.name.missing", locale);
      throw new FormatException(msg);
    }
    if (templateName.indexOf("/") != -1 || templateName.indexOf("\\") != -1) {
      logger.error("Template name contains file path separators.");
        String msg = EngineMessageBundle.getMessage("error.template.name.contains.separators", locale);
      throw new FormatException(msg);
    }
    if (templateName.indexOf("<") != -1 || templateName.indexOf(">") != -1) {
      logger.error("Template name contains invalid characters.");
        String msg = EngineMessageBundle.getMessage("error.template.name.invalid.characters", locale);
      throw new FormatException(msg);
    }
    this.templateName = templateName;
  }
View Full Code Here

Examples of com.tonbeller.wcf.format.FormatException

    RequestContext context = RequestContext.instance();
    Locale locale = context.getLocale();
    if (templateName == null || templateName.trim().equals("")) {
        logger.error("Template name missing.");
        String msg = EngineMessageBundle.getMessage("error.template.name.missing", locale);
      throw new FormatException(msg);
    }
    if (templateName.indexOf("/") != -1 || templateName.indexOf("\\") != -1) {
      logger.error("Template name contains file path separators.");
        String msg = EngineMessageBundle.getMessage("error.template.name.contains.separators", locale);
      throw new FormatException(msg);
    }
    if (templateName.indexOf("<") != -1 || templateName.indexOf(">") != -1) {
      logger.error("Template name contains invalid characters.");
        String msg = EngineMessageBundle.getMessage("error.template.name.invalid.characters", locale);
      throw new FormatException(msg);
    }
    this.templateName = templateName;
  }
View Full Code Here

Examples of com.tonbeller.wcf.format.FormatException

      return;
    }
    if (analysisDescription.indexOf("/") != -1 || analysisDescription.indexOf("\\") != -1) {
      logger.error("Analysis name contains file path separators.");
        String msg = EngineMessageBundle.getMessage("error.analysis.description.contains.separators", locale);
      throw new FormatException(msg);
    }
    if (analysisDescription.indexOf("<") != -1 || analysisDescription.indexOf(">") != -1 || analysisDescription.indexOf("&lt;") != -1 || analysisDescription.indexOf("&gt;") != -1) {
      logger.error("Analysis name contains invalid characters.");
        String msg = EngineMessageBundle.getMessage("error.analysis.description.invalid.characters", locale);
      throw new FormatException(msg);
    }   
    //************** CLOSE NEW******************
    this.analysisDescription = analysisDescription;

  }
View Full Code Here

Examples of com.tonbeller.wcf.format.FormatException

    RequestContext context = RequestContext.instance();
    Locale locale = context.getLocale();
    if (analysisName == null || analysisName.trim().equals("")) {
      logger.error("Analysis name missing.");
      String msg = EngineMessageBundle.getMessage("error.analysis.name.missing", locale);
      throw new FormatException(msg);
    }
    if (analysisName.indexOf("/") != -1 || analysisName.indexOf("\\") != -1) {
      logger.error("Analysis name contains file path separators.");
      String msg = EngineMessageBundle.getMessage("error.analysis.name.contains.separators", locale);
      throw new FormatException(msg);
    }
    if (analysisName.indexOf("<") != -1 || analysisName.indexOf(">") != -1) {
      logger.error("Analysis name contains invalid characters.");
      String msg = EngineMessageBundle.getMessage("error.analysis.name.invalid.characters", locale);
      throw new FormatException(msg);
    }
    // save the current analisys name if the recoveryAnalysisName variable
    this.recoveryAnalysisName = this.analysisName;
    this.analysisName = analysisName;
  }
View Full Code Here

Examples of com.xmultra.exception.FormatException

                                   node.getLocalName() +
                                   "\" element has an invalid value. Must be an " +
                                   "integer with a min value of \"" +
                                   min + "\" and a max value of \"" + max + "\".");
            logger.logError(errEntry);
            throw new FormatException(e.getMessage());
        }
        return integer;
    }
View Full Code Here

Examples of loci.formats.FormatException

      tiffParser = new TiffParser(in);
      tiffParser.setDoCaching(false);
      tiffParser.setUse64BitOffsets(false);
      final Boolean littleEndian = tiffParser.checkHeader();
      if (littleEndian == null) {
        throw new FormatException("Invalid FlowSight file");
      }
      final boolean little = littleEndian.booleanValue();
      in.order(little);
     
      LOGGER.info("Reading IFDs");

      ifdOffsets = tiffParser.getIFDOffsets();

      if (ifdOffsets.length < 2) {
        throw new FormatException("No IFDs found");
      }
     
      LOGGER.info("Populating metadata");

      /*
       * The first IFD contains file-scope metadata
       */
      final IFD ifd0 = tiffParser.getFirstIFD();
      tiffParser.fillInIFD(ifd0);
      final int channelCount = ifd0.getIFDIntValue(CHANNEL_COUNT_TAG);
      final String channelNamesString = ifd0.getIFDStringValue(CHANNEL_NAMES_TAG);
      channelNames = channelNamesString.split("\\|");
      if (channelNames.length != channelCount) {
        throw new FormatException(String.format(
            "Channel count (%d) does not match number of channel names (%d) in string \"%s\"",
            channelCount, channelNames.length, channelNamesString));
      }
      LOGGER.debug(String.format(
          "Found %d channels: %s",
          channelCount, channelNamesString.replace('|', ',')));
      final String channelDescsString = ifd0.getIFDStringValue(CHANNEL_DESCS_TAG);
      channelDescs =  channelDescsString.split("\\|");
      if (channelDescs.length != channelCount) {
        throw new FormatException(String.format(
            "Channel count (%d) does not match number of channel descriptions (%d) in string \"%s\"",
            channelCount, channelDescs.length, channelDescsString));
      }
      /*
       * Scan the remaining IFDs
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.