Codota Logo
ProfileTargetingExpression.isMatch
Code IndexAdd Codota to your IDE (free)

How to use
isMatch
method
in
org.milyn.cdr.ProfileTargetingExpression

Best Java code snippets using org.milyn.cdr.ProfileTargetingExpression.isMatch (Showing top 8 results out of 315)

  • Common ways to obtain ProfileTargetingExpression
private void myMethod () {
ProfileTargetingExpression p =
  • Codota IconString expression;new ProfileTargetingExpression(expression)
  • Smart code suggestions by Codota
}
origin: smooks/smooks

/**
 * Get the specificity of this expression with respect to the supplied profile set.
 * <p/>
 * Iterates over this expressions list of {@link ExpressionToken}s calling
 * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities.
 * @param profileSet Evaluation Profile Set.
 * @return Specificity value of the expression for the supplied profile set.
 */
public double getSpecificity(ProfileSet profileSet) {
  double specificity = 0;
  // Only if the expression matches the device.
  if(isMatch(profileSet)) {
    for (int i = 0; i < expressionTokens.length; i++) {
      if(expressionTokens[i].isMatch(profileSet)) {
        specificity += expressionTokens[i].getSpecificity(profileSet);
      }
    }
  }
  
  return specificity;
}
origin: smooks/smooks

/**
 * Get all SmooksResourceConfiguration entries targeted at the specified profile set. 
 * @param profileSet The profile set to searh against.
 * @return All SmooksResourceConfiguration entries targeted at the specified profile set.
 */
public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) {
  Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>();
  SmooksResourceConfiguration[] matchingSmooksResourceConfigurations;
  
  // Iterate over the SmooksResourceConfigurations defined on this list.
  for(int i = 0; i < size(); i++) {
    SmooksResourceConfiguration resourceConfig = get(i);
    ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions();
    
    for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) {
      ProfileTargetingExpression expression = profileTargetingExpressions[expIndex];
      if(expression.isMatch(profileSet)) {
        matchingSmooksResourceConfigurationsColl.addElement(resourceConfig);
        break;
      } else {
        logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "].  Sub Profiles: [" + profileSet + "]");
      }
    }
  }
  matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()];
  matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations);
  
  return matchingSmooksResourceConfigurations;
}
origin: org.milyn/milyn-smooks-core

/**
 * Get the specificity of this expression with respect to the supplied profile set.
 * <p/>
 * Iterates over this expressions list of {@link ExpressionToken}s calling
 * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities.
 * @param profileSet Evaluation Profile Set.
 * @return Specificity value of the expression for the supplied profile set.
 */
public double getSpecificity(ProfileSet profileSet) {
  double specificity = 0;
  // Only if the expression matches the device.
  if(isMatch(profileSet)) {
    for (int i = 0; i < expressionTokens.length; i++) {
      if(expressionTokens[i].isMatch(profileSet)) {
        specificity += expressionTokens[i].getSpecificity(profileSet);
      }
    }
  }
  
  return specificity;
}
origin: org.milyn/milyn-smooks-all

/**
 * Get the specificity of this expression with respect to the supplied profile set.
 * <p/>
 * Iterates over this expressions list of {@link ExpressionToken}s calling
 * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities.
 * @param profileSet Evaluation Profile Set.
 * @return Specificity value of the expression for the supplied profile set.
 */
public double getSpecificity(ProfileSet profileSet) {
  double specificity = 0;
  // Only if the expression matches the device.
  if(isMatch(profileSet)) {
    for (int i = 0; i < expressionTokens.length; i++) {
      if(expressionTokens[i].isMatch(profileSet)) {
        specificity += expressionTokens[i].getSpecificity(profileSet);
      }
    }
  }
  
  return specificity;
}
origin: org.virtuslab/milyn-smooks-core

/**
 * Get the specificity of this expression with respect to the supplied profile set.
 *
 * Iterates over this expressions list of {@link ExpressionToken}s calling
 * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities.
 * @param profileSet Evaluation Profile Set.
 * @return Specificity value of the expression for the supplied profile set.
 */
public double getSpecificity(ProfileSet profileSet) {
  double specificity = 0;
  // Only if the expression matches the device.
  if(isMatch(profileSet)) {
    for (int i = 0; i < expressionTokens.length; i++) {
      if(expressionTokens[i].isMatch(profileSet)) {
        specificity += expressionTokens[i].getSpecificity(profileSet);
      }
    }
  }
  
  return specificity;
}
origin: org.milyn/milyn-smooks-all

/**
 * Get all SmooksResourceConfiguration entries targeted at the specified profile set. 
 * @param profileSet The profile set to searh against.
 * @return All SmooksResourceConfiguration entries targeted at the specified profile set.
 */
public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) {
  Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>();
  SmooksResourceConfiguration[] matchingSmooksResourceConfigurations;
  
  // Iterate over the SmooksResourceConfigurations defined on this list.
  for(int i = 0; i < size(); i++) {
    SmooksResourceConfiguration resourceConfig = get(i);
    ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions();
    
    for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) {
      ProfileTargetingExpression expression = profileTargetingExpressions[expIndex];
      if(expression.isMatch(profileSet)) {
        matchingSmooksResourceConfigurationsColl.addElement(resourceConfig);
        break;
      } else {
        logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "].  Sub Profiles: [" + profileSet + "]");
      }
    }
  }
  matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()];
  matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations);
  
  return matchingSmooksResourceConfigurations;
}
origin: org.milyn/milyn-smooks-core

/**
 * Get all SmooksResourceConfiguration entries targeted at the specified profile set. 
 * @param profileSet The profile set to searh against.
 * @return All SmooksResourceConfiguration entries targeted at the specified profile set.
 */
public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) {
  Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>();
  SmooksResourceConfiguration[] matchingSmooksResourceConfigurations;
  
  // Iterate over the SmooksResourceConfigurations defined on this list.
  for(int i = 0; i < size(); i++) {
    SmooksResourceConfiguration resourceConfig = get(i);
    ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions();
    
    for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) {
      ProfileTargetingExpression expression = profileTargetingExpressions[expIndex];
      if(expression.isMatch(profileSet)) {
        matchingSmooksResourceConfigurationsColl.addElement(resourceConfig);
        break;
      } else {
        logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "].  Sub Profiles: [" + profileSet + "]");
      }
    }
  }
  matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()];
  matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations);
  
  return matchingSmooksResourceConfigurations;
}
origin: org.virtuslab/milyn-smooks-core

/**
 * Get all SmooksResourceConfiguration entries targeted at the specified profile set. 
 * @param profileSet The profile set to searh against.
 * @return All SmooksResourceConfiguration entries targeted at the specified profile set.
 */
public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) {
  Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>();
  SmooksResourceConfiguration[] matchingSmooksResourceConfigurations;
  
  // Iterate over the SmooksResourceConfigurations defined on this list.
  for(int i = 0; i < size(); i++) {
    SmooksResourceConfiguration resourceConfig = get(i);
    ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions();
    
    for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) {
      ProfileTargetingExpression expression = profileTargetingExpressions[expIndex];
      if(expression.isMatch(profileSet)) {
        matchingSmooksResourceConfigurationsColl.addElement(resourceConfig);
        break;
      } else {
        logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "].  Sub Profiles: [" + profileSet + "]");
      }
    }
  }
  matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()];
  matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations);
  
  return matchingSmooksResourceConfigurations;
}
org.milyn.cdrProfileTargetingExpressionisMatch

Javadoc

Does this expression match one of the profiles in the supplied profile set.

Popular methods of ProfileTargetingExpression

  • <init>
  • getSpecificity
    Get the specificity of this expression with respect to the supplied profile set. Iterates over this

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • Menu (java.awt)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now