Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


oracle.stellent.wcm.common.utils
Class SimplePatternMatcher

java.lang.Object
  extended by oracle.stellent.wcm.common.utils.SimplePatternMatcher


public class SimplePatternMatcher
extends java.lang.Object

Class to hold a list of simple patterns and enable matching against those patterns for arbitrary strings.


Nested Class Summary
static class SimplePatternMatcher.MatchResult
          Result from a match operation

 

Constructor Summary
SimplePatternMatcher()
           

 

Method Summary
 void addExclusionPattern(java.lang.String pattern)
          Add the exclusion pattern to this matcher.
 void addPattern(java.lang.String pattern, java.lang.String data)
          Add the pattern to this matcher.
 void addSimplePattern(java.lang.String pattern, java.lang.String data)
          Add a simple pattern to this matcher object.
 java.util.Collection<java.lang.String> getPatterns()
           
 SimplePatternMatcher.MatchResult matchText(java.lang.String text)
          See if there is a match.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SimplePatternMatcher

public SimplePatternMatcher()

Method Detail

addSimplePattern

public void addSimplePattern(java.lang.String pattern,
                             java.lang.String data)
Add a simple pattern to this matcher object. A simple pattern is a string containing one or more '*' characters that is then turned into a proper regular expression.
Parameters:
pattern - the pattern
data - information to associate with this pattern

getPatterns

public java.util.Collection<java.lang.String> getPatterns()
Returns:
a set of the patterns on this object

addExclusionPattern

public void addExclusionPattern(java.lang.String pattern)
Add the exclusion pattern to this matcher. This pattern will be directly compiled into a regular expression without modification.
Parameters:
pattern - the pattern of items to exclude

addPattern

public void addPattern(java.lang.String pattern,
                       java.lang.String data)
Add the pattern to this matcher. This pattern will be directly compiled into a regular expression without modification.
Parameters:
pattern - the pattern
data - the data to associate with the pattern.

matchText

public SimplePatternMatcher.MatchResult matchText(java.lang.String text)
See if there is a match. If so, return the associated data.
Parameters:
text - the text to match
Returns:
the associated data

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.