Class TextSearchModelMatch
java.lang.Object
com._1c.g5.v8.dt.search.core.Match
com._1c.g5.v8.dt.search.core.text.TextSearchModelMatch
- All Implemented Interfaces:
IMatchParentProvider,Comparable<TextSearchModelMatch>
Representation of finded text in model by text search
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.search.core.provider.IMatchParentProvider
IMatchParentProvider.Factory, IMatchParentProvider.Registry -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTextSearchModelMatch(IBmModel model, String text, long topObjectId, long objectId, org.eclipse.emf.ecore.EStructuralFeature feature, int textOffset, int textLength) Create instance of text search file match -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(TextSearchModelMatch other) booleanReturns the element that contains this match.org.eclipse.emf.ecore.EStructuralFeatureThe feature reference contains the search textlongGet the object IDgetText()Returns property value text contains search textintReturns the length of finded textintReturns offset index of finded text in property valuelongReturns bmId of container top object of property with finded textinthashCode()Resolve match contains objectResolve top object for match contains objectMethods inherited from class com._1c.g5.v8.dt.search.core.Match
getMetadataTopObjectId, getModel, isFiltered, resolveObjectById, setFiltered
-
Constructor Details
-
TextSearchModelMatch
public TextSearchModelMatch(IBmModel model, String text, long topObjectId, long objectId, org.eclipse.emf.ecore.EStructuralFeature feature, int textOffset, int textLength) Create instance of text search file match- Parameters:
model- the BM model contain matched object, cannot benulltext- the property value contains the search text, cannot benulltopObjectId- the file containing the search text, cannot benullobjectId- the match object IDfeature- the reference contains the search text, cannot benulltextOffset- the offset index of finded text in property valuetextLength- the length of finded text
-
-
Method Details
-
getObjectId
public long getObjectId()Get the object ID- Returns:
- the matched object ID
-
getFeature
public org.eclipse.emf.ecore.EStructuralFeature getFeature()The feature reference contains the search text- Returns:
- the feature
-
getTopObjectId
public long getTopObjectId()Returns bmId of container top object of property with finded text- Returns:
- the container top object bmId
-
resolveMatchObject
Resolve match contains object- Returns:
- match contains object, or empty optional if engine of BM model is disposed or not in 'running' state
-
resolveMatchTopObject
Resolve top object for match contains object- Returns:
- top object, or empty optional if engine of BM model is disposed or not in 'running' state
-
getText
Returns property value text contains search text- Returns:
- the property value text, never
null
-
getTextLength
public int getTextLength()Returns the length of finded text- Returns:
- the finded text length
-
getTextOffset
public int getTextOffset()Returns offset index of finded text in property value- Returns:
- the text offset index
-
getElement
Description copied from class:MatchReturns the element that contains this match. The element is used to group the match.- Specified by:
getElementin classMatch- Returns:
- the element that contains this match, cannot be
null
-
compareTo
- Specified by:
compareToin interfaceComparable<TextSearchModelMatch>
-
hashCode
public int hashCode() -
equals
-