org.alfresco.repo.search.impl.lucene.query
Class AbsoluteStructuredFieldPosition

java.lang.Object
  extended by org.alfresco.repo.search.impl.lucene.query.AbstractStructuredFieldPosition
      extended by org.alfresco.repo.search.impl.lucene.query.AbsoluteStructuredFieldPosition
All Implemented Interfaces:
StructuredFieldPosition

public class AbsoluteStructuredFieldPosition
extends AbstractStructuredFieldPosition

This class patches a term at a specified location.


Constructor Summary
AbsoluteStructuredFieldPosition(java.lang.String termText, int position)
          Search for a term at the specified position.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDescription()
           
 int getPosition()
          If absolute return the position.
 int hashCode()
           
 int matches(int start, int end, int offset)
          Does this element match
 
Methods inherited from class org.alfresco.repo.search.impl.lucene.query.AbstractStructuredFieldPosition
allowslinkingByParent, allowsLinkingBySelf, getCachingTermPositions, getTermText, isAbsolute, isDescendant, isRelative, isTerminal, linkParent, linkSelf, matchesAll, setCachingTermPositions, setTerminal, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteStructuredFieldPosition

public AbsoluteStructuredFieldPosition(java.lang.String termText,
                                       int position)
Search for a term at the specified position.

Method Detail

matches

public int matches(int start,
                   int end,
                   int offset)
            throws java.io.IOException
Description copied from interface: StructuredFieldPosition
Does this element match

Parameters:
start - - the start postion of the paths terms
end - - the end position of the paths terms
offset - - the current offset in the path
Returns:
returns the next match position (usually offset + 1) or -1 if it does not match.
Throws:
java.io.IOException

getPosition

public int getPosition()
Description copied from interface: StructuredFieldPosition
If absolute return the position. If relative we could compute the position knowing the previous term unless this element is preceded by a descendat and below style element

Specified by:
getPosition in interface StructuredFieldPosition
Overrides:
getPosition in class AbstractStructuredFieldPosition
Returns:

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class AbstractStructuredFieldPosition

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractStructuredFieldPosition

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractStructuredFieldPosition


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.