org.alfresco.repo.search.impl.lucene.query
Interface StructuredFieldPosition

All Known Implementing Classes:
AbsoluteStructuredFieldPosition, AbstractStructuredFieldPosition, AnyStructuredFieldPosition, DescendantAndSelfStructuredFieldPosition, RelativeStructuredFieldPosition, SelfAxisStructuredFieldPosition

public interface StructuredFieldPosition

Elements used to test agains path and Qname


Method Summary
 boolean allowslinkingByParent()
           
 boolean allowsLinkingBySelf()
           
 CachingTermPositions getCachingTermPositions()
           
 int getPosition()
          If absolute return the position.
 java.lang.String getTermText()
          Get the test to search for in the term query.
 boolean isAbsolute()
          Is this an absolute element; that is, it knows its exact position.
 boolean isDescendant()
           
 boolean isRelative()
          This element only knows its position relative to the previous element.
 boolean isTerminal()
          If this position is last in the chain and it is terminal it will ensure it is an exact match for the length of the chain found.
 boolean linkParent()
           
 boolean linkSelf()
          Normally paths would require onlt parent chaining.
 int matches(int start, int end, int offset)
          Does this element match
 boolean matchesAll()
           
 void setCachingTermPositions(CachingTermPositions tps)
          A reference to the caching term positions this element uses.
 

Method Detail

matches

int matches(int start,
            int end,
            int offset)
            throws java.io.IOException
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

isTerminal

boolean isTerminal()
If this position is last in the chain and it is terminal it will ensure it is an exact match for the length of the chain found. If false, it will effectively allow prefix mathces for the likes of descendant-and-below style queries.

Returns:

isAbsolute

boolean isAbsolute()
Is this an absolute element; that is, it knows its exact position.

Returns:

isRelative

boolean isRelative()
This element only knows its position relative to the previous element.

Returns:

getTermText

java.lang.String getTermText()
Get the test to search for in the term query. This may be null if it should not have a term query

Returns:

getPosition

int getPosition()
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

Returns:

setCachingTermPositions

void setCachingTermPositions(CachingTermPositions tps)
A reference to the caching term positions this element uses. This may be null which indicates all terms match, in that case there is no action against the index

Parameters:
tps -

getCachingTermPositions

CachingTermPositions getCachingTermPositions()

linkSelf

boolean linkSelf()
Normally paths would require onlt parent chaining. for some it is parent and child chaining.

Returns:

linkParent

boolean linkParent()

allowslinkingByParent

boolean allowslinkingByParent()

allowsLinkingBySelf

boolean allowsLinkingBySelf()

isDescendant

boolean isDescendant()

matchesAll

boolean matchesAll()


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