lux.index.analysis
Class QNameTokenFilter

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by org.apache.lucene.analysis.TokenStream
          extended by org.apache.lucene.analysis.TokenFilter
              extended by lux.index.analysis.QNameTokenFilter
All Implemented Interfaces:
Closeable

public final class QNameTokenFilter
extends org.apache.lucene.analysis.TokenFilter

Expand the input term by adding additional terms at the same position, prefixed by the node names (QNames) found in the QNameAttribute. The node name is serialized in reverse-Clark format: localname{namespace-uri} if processing is namespace-aware. Otherwise the node name is serialized as a lexical QName: prefix:localname without regard to any namespace uri binding. TODO: remove the unused namespace-unaware processing, or put it in another class?


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State
 
Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
protected QNameTokenFilter(org.apache.lucene.analysis.TokenStream input)
           
 
Method Summary
 boolean incrementToken()
           
 boolean isNamespaceAware()
           
 void reset(org.apache.lucene.analysis.TokenStream inputAgain)
           
 void setNamespaceAware(boolean namespaceAware)
           
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameTokenFilter

protected QNameTokenFilter(org.apache.lucene.analysis.TokenStream input)
Method Detail

reset

public final void reset(org.apache.lucene.analysis.TokenStream inputAgain)

incrementToken

public boolean incrementToken()
                       throws IOException
Specified by:
incrementToken in class org.apache.lucene.analysis.TokenStream
Throws:
IOException

isNamespaceAware

public boolean isNamespaceAware()
Returns:
if true, indexed QNames include the namespace URI; otherwise they include the prefix.

setNamespaceAware

public void setNamespaceAware(boolean namespaceAware)


Copyright © 2013. All Rights Reserved.