Package org.alfresco.solr.query
Class AbstractStructuredFieldPosition
java.lang.Object
org.alfresco.solr.query.AbstractStructuredFieldPosition
- All Implemented Interfaces:
StructuredFieldPosition
- Direct Known Subclasses:
AbsoluteStructuredFieldPosition,AnyStructuredFieldPosition,RelativeStructuredFieldPosition,SelfAxisStructuredFieldPosition
public abstract class AbstractStructuredFieldPosition
extends Object
implements StructuredFieldPosition
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractStructuredFieldPosition(String termText, boolean isTerminal, boolean isAbsolute) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanabstract StringintIf absolute return the position.Get the test to search for in the term query.inthashCode()booleanIs this an absolute element; that is, it knows its exact position.booleanbooleanThis element only knows its position relative to the previous element.booleanIf 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.booleanbooleanlinkSelf()Normally paths would require onlt parent chaining.booleanvoidA reference to the caching term positions this element uses.protected voidsetTerminal(boolean isTerminal) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.alfresco.solr.query.StructuredFieldPosition
matches
-
Constructor Details
-
AbstractStructuredFieldPosition
-
-
Method Details
-
isTerminal
public boolean isTerminal()Description copied from interface:StructuredFieldPositionIf 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.- Specified by:
isTerminalin interfaceStructuredFieldPosition- Returns:
- boolean
-
setTerminal
protected void setTerminal(boolean isTerminal) -
isAbsolute
public boolean isAbsolute()Description copied from interface:StructuredFieldPositionIs this an absolute element; that is, it knows its exact position.- Specified by:
isAbsolutein interfaceStructuredFieldPosition- Returns:
- boolean
-
isRelative
public boolean isRelative()Description copied from interface:StructuredFieldPositionThis element only knows its position relative to the previous element.- Specified by:
isRelativein interfaceStructuredFieldPosition- Returns:
- boolean
-
getTermText
Description copied from interface:StructuredFieldPositionGet the test to search for in the term query. This may be null if it should not have a term query- Specified by:
getTermTextin interfaceStructuredFieldPosition- Returns:
- String
-
getPosition
public int getPosition()Description copied from interface:StructuredFieldPositionIf 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:
getPositionin interfaceStructuredFieldPosition- Returns:
- int
-
setCachingTermPositions
Description copied from interface:StructuredFieldPositionA 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- Specified by:
setCachingTermPositionsin interfaceStructuredFieldPosition- Parameters:
tps- CachingTermPositions
-
getCachingTermPositions
- Specified by:
getCachingTermPositionsin interfaceStructuredFieldPosition
-
allowsLinkingBySelf
public boolean allowsLinkingBySelf()- Specified by:
allowsLinkingBySelfin interfaceStructuredFieldPosition
-
allowslinkingByParent
public boolean allowslinkingByParent()- Specified by:
allowslinkingByParentin interfaceStructuredFieldPosition
-
linkParent
public boolean linkParent()- Specified by:
linkParentin interfaceStructuredFieldPosition
-
linkSelf
public boolean linkSelf()Description copied from interface:StructuredFieldPositionNormally paths would require onlt parent chaining. for some it is parent and child chaining.- Specified by:
linkSelfin interfaceStructuredFieldPosition- Returns:
- boolean
-
toString
-
getDescription
-
isDescendant
public boolean isDescendant()- Specified by:
isDescendantin interfaceStructuredFieldPosition
-
matchesAll
public boolean matchesAll()- Specified by:
matchesAllin interfaceStructuredFieldPosition
-
hashCode
public int hashCode() -
equals
-