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>
public class TextSearchModelMatch extends Match implements 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
-
-
Constructor Summary
Constructors Constructor Description 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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TextSearchModelMatch other)
boolean
equals(Object obj)
Object
getElement()
Returns the element that contains this match.org.eclipse.emf.ecore.EStructuralFeature
getFeature()
The feature reference contains the search textlong
getObjectId()
Get the object IDString
getText()
Returns property value text contains search textint
getTextLength()
Returns the length of finded textint
getTextOffset()
Returns offset index of finded text in property valuelong
getTopObjectId()
Returns bmId of container top object of property with finded textint
hashCode()
Optional<IBmObject>
resolveMatchObject()
Resolve match contains objectOptional<IBmObject>
resolveMatchTopObject()
Resolve top object for match contains object-
Methods inherited from class com._1c.g5.v8.dt.search.core.Match
getMetadataTopObjectId, getModel, isFiltered, resolveObjectById, setFiltered
-
-
-
-
Constructor Detail
-
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 benull
text
- the property value contains the search text, cannot benull
topObjectId
- the file containing the search text, cannot benull
objectId
- the match object IDfeature
- the reference contains the search text, cannot benull
textOffset
- the offset index of finded text in property valuetextLength
- the length of finded text
-
-
Method Detail
-
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
public Optional<IBmObject> 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
public Optional<IBmObject> 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
public String 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
public Object getElement()
Description copied from class:Match
Returns the element that contains this match. The element is used to group the match.- Specified by:
getElement
in classMatch
- Returns:
- the element that contains this match, cannot be
null
-
compareTo
public int compareTo(TextSearchModelMatch other)
- Specified by:
compareTo
in interfaceComparable<TextSearchModelMatch>
-
-