partitioner.connect(document);
return document;
}
private IDocumentPartitioner createPartitioner(ITextEntityRenderer renderer) {
final RuleBasedPartitionScanner scanner = new RuleBasedPartitionScanner();
scanner.setPredicateRules(createRules(renderer));
if(renderer != null && renderer.getDefaultPartitionType() != null) {
scanner.setDefaultReturnToken(new Token(renderer.getDefaultPartitionType()));
}
return new FastPartitioner(scanner, getPartitionTypes(renderer));
}