Tabnine Logo
PatternUtils.wildcardToRegex
Code IndexAdd Tabnine to your IDE (free)

How to use
wildcardToRegex
method
in
org.apache.stanbol.entityhub.servicesapi.util.PatternUtils

Best Java code snippets using org.apache.stanbol.entityhub.servicesapi.util.PatternUtils.wildcardToRegex (Showing top 4 results out of 315)

origin: org.apache.stanbol/org.apache.stanbol.entityhub.core

/**
 * Removes the FieldMapping based on the fieldPattern
 * @param fieldPattern the field pattern
 */
public void removeFieldMapping(String fieldPattern){
  if(fieldPattern == null || fieldPattern.length()<1){
    return;
  }
  if(PatternUtils.usesWildCard(fieldPattern)){
    Pattern pattern = Pattern.compile(PatternUtils.wildcardToRegex(fieldPattern,true));
    synchronized (wildcardMap) {
      wildcardMap.remove(pattern);
    }
  } else {
    synchronized (fieldMap) {
      fieldMap.remove(fieldPattern);
    }
  }
}
/* (non-Javadoc)
origin: apache/stanbol

/**
 * Removes the FieldMapping based on the fieldPattern
 * @param fieldPattern the field pattern
 */
public void removeFieldMapping(String fieldPattern){
  if(fieldPattern == null || fieldPattern.length()<1){
    return;
  }
  if(PatternUtils.usesWildCard(fieldPattern)){
    Pattern pattern = Pattern.compile(PatternUtils.wildcardToRegex(fieldPattern,true));
    synchronized (wildcardMap) {
      wildcardMap.remove(pattern);
    }
  } else {
    synchronized (fieldMap) {
      fieldMap.remove(fieldPattern);
    }
  }
}
/* (non-Javadoc)
origin: apache/stanbol

this.inverse = ignore; //if ignore=true -> filter==null && mappedTo.lenght==0
if(PatternUtils.usesWildCard(fieldPattern)){
  this.regex = Pattern.compile(PatternUtils.wildcardToRegex(fieldPattern,true));
  this.usesWildcard = true;
} else {
origin: org.apache.stanbol/org.apache.stanbol.entityhub.servicesapi

this.inverse = ignore; //if ignore=true -> filter==null && mappedTo.lenght==0
if(PatternUtils.usesWildCard(fieldPattern)){
  this.regex = Pattern.compile(PatternUtils.wildcardToRegex(fieldPattern,true));
  this.usesWildcard = true;
} else {
org.apache.stanbol.entityhub.servicesapi.utilPatternUtilswildcardToRegex

Javadoc

Converts a Wildcard search string to REGEX. If strict is enabled, than the REGEX pattern searches only full labels ("^Patt?er.*$") otherwise it searches the whole text ("Patt?er.*")

Popular methods of PatternUtils

  • usesWildCard
    Returns true if the parsed value contains an '?' or '*'
  • encodeWildcard
    Internally used to convert a wildcard to a regex
  • escapeRegex
  • wildcardWordToRegex
    Converts a Wildcard search string to REGEX matching whole words in the text.
  • word2Regex
    Creates a regex that matches vales against whole words ('\b{value}\b)

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • Menu (java.awt)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JCheckBox (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now