Package java.util.regex

Examples of java.util.regex.Matcher.pattern()


      theCommand.command = matcher.group(2);   

      parseDecodedCommand(itemName,theCommand,ohCommand);

    } else {
      logger.error("{} does not match the IRDB IRtrans message format ({})",message,matcher.pattern());
    }
  }

  protected void parseDecodedCommand(String itemName, IrCommand theCommand, Command ohCommand) {
View Full Code Here


    Matcher configMatcher = DMX_CONFIG_PATTERN.matcher(configString.trim());
    if (!configMatcher.matches()) {
      throw new BindingConfigParseException(
          "DMX Configuration must match pattern: "
              + configMatcher.pattern().toString());
    }
   
    try {

      Matcher cmdMatcher = DMX_CMD_PATTERN.matcher(configString.trim());
View Full Code Here

            Matcher statusMatcher = STATUS_CONFIG_PATTERN.matcher(bindingConfig);
           
           
      if ((!actionMatcher.matches() && !statusMatcher.matches())) {
        throw new BindingConfigParseException(getBindingType()+
            " binding configuration must consist of five [config="+statusMatcher.pattern()+"] or six parts [config="
                + actionMatcher.pattern() + "]");
      } else {
        if(actionMatcher.matches()) {
           commandAsString = actionMatcher.group(1);
           host = actionMatcher.group(2);
View Full Code Here

   @Override
   public void reviseParsedImage(org.jclouds.ec2.domain.Image from, ImageBuilder builder, OsFamily family,
            OperatingSystem.Builder osBuilder) {
      try {
         Matcher matcher = getMatcherAndFind(from.getImageLocation());
         if (matcher.pattern() == AMZN_PATTERN) {
            osBuilder.family(OsFamily.AMZN_LINUX);
            osBuilder.version(matcher.group(2));
            builder.version(matcher.group(2));
         } else if (matcher.pattern() == AMAZON_PATTERN) {
            family = OsFamily.fromValue(matcher.group(1));
View Full Code Here

         Matcher matcher = getMatcherAndFind(from.getImageLocation());
         if (matcher.pattern() == AMZN_PATTERN) {
            osBuilder.family(OsFamily.AMZN_LINUX);
            osBuilder.version(matcher.group(2));
            builder.version(matcher.group(2));
         } else if (matcher.pattern() == AMAZON_PATTERN) {
            family = OsFamily.fromValue(matcher.group(1));
            osBuilder.family(family);
            osBuilder.version(ComputeServiceUtils.parseVersionOrReturnEmptyString(family, matcher.group(2),
                     osVersionMap));
         } else {
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.