public class HitPropertyContextWords extends HitProperty
Modifier and Type | Class and Description |
---|---|
static class |
HitPropertyContextWords.ContextPart
A stretch of words from the (surroundings of) the matched text.
|
static class |
HitPropertyContextWords.ContextStart
A location in the hit context to start a stretch of words from.
|
contexts, hits, logger, reverse
Constructor and Description |
---|
HitPropertyContextWords(BlackLabIndex index,
Annotation annotation,
MatchSensitivity sensitivity,
List<HitPropertyContextWords.ContextPart> words) |
HitPropertyContextWords(BlackLabIndex index,
Annotation annotation,
MatchSensitivity sensitivity,
String wordSpec) |
Modifier and Type | Method and Description |
---|---|
HitProperty |
copyWith(Results<Hit> newHits,
Contexts contexts,
boolean invert)
Produce a copy of this HitProperty object with a different Hits and Contexts
object.
|
boolean |
equals(Object obj) |
PropertyValueContextWords |
get(Hit hit)
Get the property value for a specific result.
|
int |
hashCode() |
String |
name()
Get the name of the property
|
List<Annotation> |
needsContext()
Retrieve context from which field(s) prior to sorting/grouping on this
property?
|
String |
serialize()
Serialize this HitProperty so we can deserialize it later (to pass it via
URL, for example)
|
compare, copyWith, deserialize, deserialize, docPropsOnly, docPropValues, isReverse, needsContextSize, reverse, serializeReverse, setContextIndices, setContexts, sortDescendingByDefault, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ignoreSensitivity, isCompound, propNames, props
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public HitPropertyContextWords(BlackLabIndex index, Annotation annotation, MatchSensitivity sensitivity, String wordSpec)
public HitPropertyContextWords(BlackLabIndex index, Annotation annotation, MatchSensitivity sensitivity, List<HitPropertyContextWords.ContextPart> words)
public HitProperty copyWith(Results<Hit> newHits, Contexts contexts, boolean invert)
HitProperty
copyWith
in class HitProperty
newHits
- new Hits to use, or null to inheritcontexts
- new Contexts to use, or null to inheritinvert
- true if we should invert the previous sort order; false to keep it the samepublic PropertyValueContextWords get(Hit hit)
ResultProperty
get
in interface ResultProperty<Hit>
get
in class HitProperty
hit
- result to get property value forpublic List<Annotation> needsContext()
HitProperty
needsContext
in class HitProperty
public String name()
ResultProperty
name
in interface ResultProperty<Hit>
name
in class HitProperty
public String serialize()
ResultProperty
serialize
in interface ResultProperty<Hit>
serialize
in class HitProperty
public int hashCode()
hashCode
in interface ResultProperty<Hit>
hashCode
in class HitProperty
public boolean equals(Object obj)
equals
in interface Comparator<Hit>
equals
in interface ResultProperty<Hit>
equals
in class HitProperty
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.