java.lang.Object
org.apache.jena.sparql.expr.RegexEngine
- Direct Known Subclasses:
RegexEngine.RegexJava,RegexEngine.RegexXerces
Encapsulate a specific regular expression systems.
The two provided are the regular expression implement in Apache Xerces (2.11.0) and the JDK java.util.regex.
By default java.util.regex is used. It does not support the "x" flag.
The default is set by symbol ARQ.regexImpl (comand line arq:regexImpl) to either "javaRegex" or
"xercesRegex".
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegexEnginestatic intstatic PatternmakePattern(String label, String patternStr, String flags) abstract booleanstatic voidsetRegexImpl(RegexEngine.RegexImpl valRegexImpl) For testingstatic CharSequencetimeBounded(CharSequence charSequence) Returns a potentially time-bounded character sequence
-
Constructor Details
-
RegexEngine
public RegexEngine()
-
-
Method Details
-
match
-
setRegexImpl
For testing -
makePattern
-
makeMask
-
create
-
timeBounded
Returns a potentially time-bounded character sequenceIf
SparqlLimits.MAX_REGEX_EVALUATION_TIMEis set to a positive non-zero value then a time-boundedCharSequenceis returned to prevent regular expression evaluation taking too long. If it's set to anything else then the original character sequence is returned.- Parameters:
charSequence- Original character sequence to time bound- Returns:
- Possible time-bounded Character Sequence, or
nullif the input wasnull
-