Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search.highlight
Class SimpleFragmenter

    java.lang.Object
      org.apache.lucene.search.highlight.SimpleFragmenter

All Implemented Interfaces:
  Fragmenter

public class SimpleFragmenter
extends Object
implements Fragmenter

`Fragmenter` implementation which breaks text up into same-size fragments with no concerns over spotting sentence boundaries.

Author:
  mark@searcharea.co.uk

Constructor Summary
`SimpleFragmenter()`
`SimpleFragmenter(int fragmentSize)`

Method Summary
`int` | `getFragmentSize()`
`boolean` | `isNewFragment(Token token)` Test to see if this token from the stream should be held in a new TextFragment
`void` | `setFragmentSize(int size)`
`void` | `start(String originalText)` Initializes the Fragmenter

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

Constructor Detail

### SimpleFragmenter

    public SimpleFragmenter()

### SimpleFragmenter

    public SimpleFragmenter(int fragmentSize)

Parameters:
  `fragmentSize` - size in bytes of each fragment

Method Detail

### start

    public void start(String originalText)

  Description copied from interface: `Fragmenter`
  Initializes the Fragmenter

  Specified by:
    `start` in interface `Fragmenter`
  Parameters:
    `originalText` -

### isNewFragment

    public boolean isNewFragment(Token token)

  Description copied from interface: `Fragmenter`
  Test to see if this token from the stream should be held in a new TextFragment

  Specified by:
    `isNewFragment` in interface `Fragmenter`
  Parameters:
    `token` -

### getFragmentSize

    public int getFragmentSize()

  Returns:
    size in bytes of each fragment

### setFragmentSize

    public void setFragmentSize(int size)

  Parameters:
    `size` - size in bytes of each fragment

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.