org.umber.catalan.process.workers.partition
Class PartitionIndexer

java.lang.Object
  extended byorg.umber.catalan.process.workers.partition.PartitionIndexer

public class PartitionIndexer
extends java.lang.Object

Scans a text document and divides it into partitions, according to the supplied Partition objects.

Author:
jsheets

Field Summary
static java.lang.String UNKNOWN_TYPE
          PartitionRange type for unrecognized partitions.
 
Constructor Summary
PartitionIndexer(Partition[] scanners)
          Creates a new instance of PartitionIndexer.
 
Method Summary
 PartitionRange[] findIndexes(java.lang.String text)
          Calculates partition indexes according to the supplied scanners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_TYPE

public static final java.lang.String UNKNOWN_TYPE
PartitionRange type for unrecognized partitions. Usually only found as last partition.

See Also:
Constant Field Values
Constructor Detail

PartitionIndexer

public PartitionIndexer(Partition[] scanners)
Creates a new instance of PartitionIndexer.

Parameters:
scanners - partition scanners to index against
Method Detail

findIndexes

public PartitionRange[] findIndexes(java.lang.String text)
Calculates partition indexes according to the supplied scanners. Always tries the scanners in their original array order.

Parameters:
text - text to scan
Returns:
partition indexing results, or null if unable to reconcile text with scanners