MCPcopy Create free account
hub / github.com/BaseXdb/basex / copy

Method copy

basex-core/src/main/java/org/basex/util/ft/FTLexer.java:232–244  ·  view source on GitHub ↗

Returns a new lexer, adopting the tokenizer options. @param opt full-text options @return lexer

(final FTOpt opt)

Source from the content-addressed store, hash-verified

230 * @return lexer
231 */
232 public FTLexer copy(final FTOpt opt) {
233 // assign options to text:
234 final FTOpt to = ftOpt;
235 to.set(ST, opt.is(ST));
236 to.set(DC, opt.is(DC));
237 to.ln = opt.ln;
238 to.th = opt.th;
239 to.sd = opt.sd;
240 // only change case in insensitive mode
241 to.cs = opt.cs != null && opt.cs != FTCase.INSENSITIVE ? FTCase.SENSITIVE :
242 FTCase.INSENSITIVE;
243 return new FTLexer(to).init(text);
244 }
245
246 /**
247 * Lists all languages for which tokenizers and stemmers are available.

Callers

nothing calls this directly

Calls 3

setMethod · 0.95
isMethod · 0.65
initMethod · 0.45

Tested by

no test coverage detected