lux.index.attribute
Class QNameAttributeImpl

java.lang.Object
  extended by org.apache.lucene.util.AttributeImpl
      extended by lux.index.attribute.QNameAttributeImpl
All Implemented Interfaces:
Cloneable, QNameAttribute, org.apache.lucene.util.Attribute

public class QNameAttributeImpl
extends org.apache.lucene.util.AttributeImpl
implements QNameAttribute

See Also:
QNameAttribute

Constructor Summary
QNameAttributeImpl()
           
 
Method Summary
 void addQName(QName qname)
          add another QName, and reset the counter.
 void clear()
          We do *not* clear the state here, since it persists across multiple tokens.
 void clearQNames()
          clear the current set of QNames.
 void copyTo(org.apache.lucene.util.AttributeImpl target)
           
 boolean hasNext()
           
 QName next()
           
 boolean onFirst()
           
 
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameAttributeImpl

public QNameAttributeImpl()
Method Detail

clear

public void clear()
We do *not* clear the state here, since it persists across multiple tokens. Rather we rely on QNameTextTokenStream to manage our state.

Specified by:
clear in class org.apache.lucene.util.AttributeImpl

copyTo

public void copyTo(org.apache.lucene.util.AttributeImpl target)
Specified by:
copyTo in class org.apache.lucene.util.AttributeImpl

hasNext

public boolean hasNext()
Specified by:
hasNext in interface QNameAttribute
Returns:
whether there are any more QNames

next

public QName next()
Specified by:
next in interface QNameAttribute
Returns:
the next QName

addQName

public void addQName(QName qname)
Description copied from interface: QNameAttribute
add another QName, and reset the counter.

Specified by:
addQName in interface QNameAttribute
Parameters:
qname - the QName to associate with the current token

clearQNames

public void clearQNames()
Description copied from interface: QNameAttribute
clear the current set of QNames. We don't do this in clear() since we want these to persist across a range of tokens

Specified by:
clearQNames in interface QNameAttribute

onFirst

public boolean onFirst()
Specified by:
onFirst in interface QNameAttribute
Returns:
whether the next QName is the first QName


Copyright © 2013. All Rights Reserved.