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 java.lang.Object implements StructuredFieldPosition
-
-
Constructor Summary
Constructors Constructor Description AbstractStructuredFieldPosition(java.lang.String termText, boolean isTerminal, boolean isAbsolute)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanallowslinkingByParent()booleanallowsLinkingBySelf()booleanequals(java.lang.Object obj)CachingTermPositionsgetCachingTermPositions()abstract java.lang.StringgetDescription()intgetPosition()If absolute return the position.java.lang.StringgetTermText()Get the test to search for in the term query.inthashCode()booleanisAbsolute()Is this an absolute element; that is, it knows its exact position.booleanisDescendant()booleanisRelative()This element only knows its position relative to the previous element.booleanisTerminal()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.booleanlinkParent()booleanlinkSelf()Normally paths would require onlt parent chaining.booleanmatchesAll()voidsetCachingTermPositions(CachingTermPositions tps)A reference to the caching term positions this element uses.protected voidsetTerminal(boolean isTerminal)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.alfresco.solr.query.StructuredFieldPosition
matches
-
-
-
-
Method Detail
-
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
public java.lang.String 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
public void setCachingTermPositions(CachingTermPositions tps)
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
public 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDescription
public abstract java.lang.String getDescription()
-
isDescendant
public boolean isDescendant()
- Specified by:
isDescendantin interfaceStructuredFieldPosition
-
matchesAll
public boolean matchesAll()
- Specified by:
matchesAllin interfaceStructuredFieldPosition
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-