|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRPSearchQuery
The IRPSearchQuery interface represents the search criteria objects that are used by IRPSearchManager to carry out searches.
Nested Class Summary | |
---|---|
static class |
IRPSearchQuery.References
|
static class |
IRPSearchQuery.SearchInField
Constant values used with elements of this type |
static class |
IRPSearchQuery.SubQueriesOperator
|
static class |
IRPSearchQuery.UnresolvedKind
|
static class |
IRPSearchQuery.ViewsToSearch
|
Method Summary | |
---|---|
int |
addDiagramToViewsList(IRPDiagram view)
Adds the specified diagram to the list of views to be searched for the search text. |
void |
addFilterElementType(java.lang.String elementType)
Adds an element type to the list of element types that the search should be applied to. |
void |
addFilterSearchInField(java.lang.String searchInField)
Adds an element field to the list of element fields that the search should be applied to, for example, element name or element description. |
void |
addFilterStereotype(IRPStereotype stereotype)
Specifies that the search should be limited to model elements with a specific stereotype applied to them. |
void |
addFilterSubQuery(IRPTableLayout subQuery,
int useWithNotOperator)
Adds a subquery to the list of subqueries specified for the search. |
int |
addMatrixToViewsList(IRPMatrixView view)
Adds the specified matrix to the list of views to be searched for the search text. |
void |
addSearchScope(IRPModelElement scopeElement)
Adds an element to the scope for the search. |
int |
addTableToViewsList(IRPTableView view)
Adds the specified table to the list of views to be searched for the search text. |
IRPCollection |
getFilterElementTypes()
Returns the element types that are to be searched for the search text. |
int |
getFilterReferenceIncludeReferencedElementsInSearchResults()
Checks whether the reference search criterion specified that the referenced elements included in the search criterion should also be displayed in the search results. |
java.lang.String |
getFilterReferenceNameOfReferencedElements()
Returns the model element name that was specified for the reference criterion that was defined. |
int |
getFilterReferenceNumberOfReferences()
Returns the number of references that was specified as a search criterion. |
java.lang.String |
getFilterReferenceQuantityOperator()
When the search criterion includes a specific number of references, this method returns a value that indicates whether the criterion was exactly that number of references, less than that number, or more than that number. |
java.lang.String |
getFilterReferenceRelationKind()
Returns the type of reference used in the search criterion, for example, aggregates or incoming relations. |
java.lang.String |
getFilterReferenceStereotypeOfReferencedElements()
Returns the stereotype that was specified for the reference criterion that was defined. |
java.lang.String |
getFilterReferenceTypeOfReferencedElements()
Returns the model element type that was specified for the reference criterion that was defined. |
IRPCollection |
getFilterSearchInFields()
Returns the list of element fields that the search is to be applied to. |
IRPCollection |
getFilterStereotypes()
Returns the names of the stereotypes that were specified as search criteria. |
IRPCollection |
getFilterSubQueries()
Returns the subqueries that were specified for the search. |
java.lang.String |
getFilterSubQueriesOperator()
Returns indication of how the specified subqueries are to be combined in the search |
int |
getFilterSubQueryUseWithNotOperator(IRPTableLayout subQuery)
Checks whether the NOT operator was specified for the specified subquery. |
char |
getFilterTagFindAs()
Returns the type of search that was specified for the tag name and tag value search criteria - regular text, wildcard, regular expression, or empty string. |
int |
getFilterTagMatchCase()
Checks whether an exact match was specified for the tag name and tag value search criteria, in terms of upper and lower case. |
int |
getFilterTagMatchWholeWord()
Checks whether a whole word match was specified for the tag name and tag value search criteria |
java.lang.String |
getFilterTagName()
Returns the tag name specified as a criterion for the search |
java.lang.String |
getFilterTagValue()
Returns the tag value specified as a criterion for the search |
int |
getFilterUnitsOnly()
Checks whether the search is limited to model elements that are saved units. |
java.lang.String |
getFilterUnresolvedKind()
Returns the method that was specified for handling unresolved elements in the search. |
int |
getIncludeDescendants()
Checks whether the scope of the search is to include the descendants of the elements specified for the scope. |
java.lang.String |
getInterfaceName()
Returns the name of the interface (IRPSearchQuery). |
int |
getMatchCase()
Checks whether an exact match was specified for the query in terms of upper and lower case. |
int |
getMatchSpecifiedCriteria()
Checks whether the query is to return the model elements that match the criteria specified, or the model elements that do not match the criteria specified. |
int |
getMatchWholeWord()
Checks whether a whole word match was specified for the search. |
char |
getSearchFindAsOption()
Returns the type of search that was specified for the search text - regular text, wildcard, regular expression, or empty string. |
IRPCollection |
getSearchScopeElements()
Returns a collection of the model elements that constitute the scope for the search. |
IRPModelElement |
getSearchScopeObject()
Deprecated. This method, used to return the scope specified for the search, was introduced when Rhapsody only allowed you to specify a single element as the scope. Now that Rhapsody allows you to specify a list of such elements, you should use the method getSearchScopeElements() . |
java.lang.String |
getSearchText()
Returns the text that was specified as the text to search for. |
IRPModelElement |
getView(int Index)
Retrieves the specified item from the list of tables, matrices, and diagrams that are to be searched. |
int |
getViewCount()
Returns the number of views in the list of views that are to be searched. |
int |
getViewIncludeModelElements()
Checks whether the query specifies that the search results should also include model elements that were found by the search but are not referenced in any of the views that you specified. |
java.lang.String |
getViewsToSearch()
Returns indication of which views (diagrams, tables, and matrices) are supposed to be searched. |
void |
loadFromQuery(IRPTableLayout query)
Loads the settings from the specified query into the search query object. |
void |
removeFilterElementTypes()
Removes any element type filters that you defined to limit the search to certain element types. |
void |
removeFilterReferences()
Removes reference search criterion that was defined for the search query. |
void |
removeFilterSearchInFields()
Removes any element field filters that you defined to limit the search to certain element fields, for example, model element descriptions. |
void |
removeFilterStereotypes()
Removes any stereotype filter that was defined to limit the search to model elements that have certain stereotypes applied to them. |
void |
removeFilterSubQueries()
Removes the subquery criteria that were specified for the search. |
int |
removeFilterSubQuery(IRPTableLayout subQuery)
Removes the specified subquery from the search. |
void |
removeFilterTag()
Removes the tag name and tag value criteria that were defined for the search query. |
int |
removeSearchScopeElement(IRPModelElement scopeElement)
Removes the specified model element from the scope for the search. |
void |
removeView(int Index)
Removes the specified view from the list of views to be searched for the search text. |
void |
resetSearchScope()
Resets the search scope to include the entire project, or all projects if multiple projects are open. |
IRPTableLayout |
saveAsQuery(IRPPackage queryOwner)
Saves the search query object that you defined as a query in your model. |
void |
setFilterReference(java.lang.String quantityOperator,
int numberOfReferences,
java.lang.String relationKind,
java.lang.String typeOfReferencedElements,
java.lang.String stereotypeOfReferencedElements,
java.lang.String nameOfReferencedElements,
int includeReferencedElementsInSearchResults)
Sets criteria for the search based on an element's references. |
void |
setFilterSubQueriesOperator(java.lang.String filterSubQueriesOperator)
Specify how the various subqueries specified should be combined - as an AND operation or an OR operation |
void |
setFilterTag(java.lang.String tagName,
java.lang.String tagValue,
int matchCase,
int matchWholeWord,
char findAs)
Sets tag name and tag value criteria for the search query. |
void |
setFilterUnitsOnly(int filterUnitsOnly)
Specifies whether the search should be limited to model elements that are saved units. |
void |
setFilterUnresolvedKind(java.lang.String filterUnresolvedKind)
Specifies how unresolved elements should be handled in the search. |
void |
setIncludeDescendants(int includeDescendants)
Specifies whether the scope for the search should include the descendants of the elements specified for the scope, for example, the subpackages of a package that was added to the scope. |
void |
setMatchCase(int matchCase)
Specifies whether the search should require an exact match in terms of upper and lower case. |
void |
setMatchSpecifiedCriteria(int matchSpecifiedCriteria)
Specifies whether the query should return the model elements that match the criteria specified, or the model elements that do not match the criteria specified. |
void |
setMatchWholeWord(int matchWholeWord)
Specifies whether the search should require whole word matches. |
void |
setSearchFindAsOption(char searchFindAsOption)
Sets the type of search that should be used for the search text - regular text, wildcard, regular expression, or empty string. |
void |
setSearchScopeObject(IRPModelElement searchScopeObject)
Deprecated. This method, used to set the scope for the search, was introduced when Rhapsody only allowed you to specify a single element as the scope. Now that Rhapsody allows you to specify a list of such elements, you should use the method addSearchScope(com.telelogic.rhapsody.core.IRPModelElement) . |
void |
setSearchText(java.lang.String searchText)
Specifies the text that should be searched for. |
void |
setViewIncludeModelElements(int viewIncludeModelElements)
Specifies whether the search results should also include model elements that were found by the search but are not referenced in any of the views that you specified. |
void |
setViewsToSearch(java.lang.String viewsToSearch)
Specifies which views (tables, matrices, and diagrams) should be searched - all, none, all open, or just the views that were specified with the methods addDiagramToViewsList, addTableToViewsList, and addMatrixToViewsList. |
Method Detail |
---|
int addDiagramToViewsList(IRPDiagram view)
view
- the diagram to add to the list of views to search
RhapsodyRuntimeException
void addFilterElementType(java.lang.String elementType)
elementType
- element type to add to the list of element types to search. The strings to use for this parameter can be found in the file metaclasses.txt in the Doc directory of the Rhapsody installation. For this parameter, you can also use any "new terms" in your project.
RhapsodyRuntimeException
void addFilterSearchInField(java.lang.String searchInField)
searchInField
- element field to add to the list of element fields to search. The value of this parameter should be one of the constants defined in the class IRPSearchQuery.SearchInField
. For example, use IRPSearchQuery.SearchInField.NAME for the name of the model element, and IRPSearchQuery.SearchInField.DESCRIPTION for the description of the model element.void addFilterStereotype(IRPStereotype stereotype)
stereotype
- the stereotype to use as a search criterion. Use null if you want to search for model elements that do not have any stereotypes applied to them.
RhapsodyRuntimeException
void addFilterSubQuery(IRPTableLayout subQuery, int useWithNotOperator)
subQuery
- the subquery to add for the searchuseWithNotOperator
- use 1 if you want the NOT operator to be used for the specified subquery, 0 otherwise
RhapsodyRuntimeException
int addMatrixToViewsList(IRPMatrixView view)
view
- the matrix to add to the list of views to search
RhapsodyRuntimeException
void addSearchScope(IRPModelElement scopeElement)
scopeElement
- model element that represents a part of the model that should be searched, for example, a specific package
RhapsodyRuntimeException
int addTableToViewsList(IRPTableView view)
view
- the table to add to the list of views to search
RhapsodyRuntimeException
IRPCollection getFilterElementTypes()
RhapsodyRuntimeException
int getFilterReferenceIncludeReferencedElementsInSearchResults()
RhapsodyRuntimeException
java.lang.String getFilterReferenceNameOfReferencedElements()
RhapsodyRuntimeException
int getFilterReferenceNumberOfReferences()
RhapsodyRuntimeException
java.lang.String getFilterReferenceQuantityOperator()
IRPSearchQuery.References.QuantityOperator
.
RhapsodyRuntimeException
java.lang.String getFilterReferenceRelationKind()
IRPSearchQuery.References.RelationKind
.
RhapsodyRuntimeException
java.lang.String getFilterReferenceStereotypeOfReferencedElements()
RhapsodyRuntimeException
java.lang.String getFilterReferenceTypeOfReferencedElements()
RhapsodyRuntimeException
IRPCollection getFilterSearchInFields()
IRPSearchQuery.SearchInField
. For example, IRPSearchQuery.SearchInField.NAME for the name of the model element, and IRPSearchQuery.SearchInField.DESCRIPTION for the description of the model element.
RhapsodyRuntimeException
IRPCollection getFilterStereotypes()
RhapsodyRuntimeException
IRPCollection getFilterSubQueries()
RhapsodyRuntimeException
int getFilterSubQueryUseWithNotOperator(IRPTableLayout subQuery)
subQuery
- the subquery to be checked
RhapsodyRuntimeException
char getFilterTagFindAs()
SearchFindAsEnum
, for example SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search.
RhapsodyRuntimeException
int getFilterTagMatchCase()
RhapsodyRuntimeException
int getFilterTagMatchWholeWord()
RhapsodyRuntimeException
java.lang.String getFilterTagName()
RhapsodyRuntimeException
java.lang.String getFilterTagValue()
RhapsodyRuntimeException
IRPCollection getSearchScopeElements()
RhapsodyRuntimeException
IRPModelElement getView(int Index)
Index
- the index of the view to retrieve. Note that the index of the first view in the list is 0.
RhapsodyRuntimeException
int getViewCount()
RhapsodyRuntimeException
void loadFromQuery(IRPTableLayout query)
query
- the query element whose settings should be loaded into the search query object
RhapsodyRuntimeException
void removeFilterElementTypes()
RhapsodyRuntimeException
void removeFilterReferences()
RhapsodyRuntimeException
void removeFilterSearchInFields()
RhapsodyRuntimeException
void removeFilterStereotypes()
RhapsodyRuntimeException
void removeFilterSubQueries()
RhapsodyRuntimeException
int removeFilterSubQuery(IRPTableLayout subQuery)
subQuery
- the subquery that should be removed from the list of subqueries for the search
RhapsodyRuntimeException
void removeFilterTag()
RhapsodyRuntimeException
int removeSearchScopeElement(IRPModelElement scopeElement)
scopeElement
- the model element that should be removed from the scope of the search
RhapsodyRuntimeException
void removeView(int Index)
Index
- the index of the view in the list of views to search
RhapsodyRuntimeException
void resetSearchScope()
RhapsodyRuntimeException
IRPTableLayout saveAsQuery(IRPPackage queryOwner)
queryOwner
- the model element under which the new query should be created
RhapsodyRuntimeException
void setFilterReference(java.lang.String quantityOperator, int numberOfReferences, java.lang.String relationKind, java.lang.String typeOfReferencedElements, java.lang.String stereotypeOfReferencedElements, java.lang.String nameOfReferencedElements, int includeReferencedElementsInSearchResults)
quantityOperator
- if you are specifying a number of references as a criterion, use one of the values defined in IRPSearchQuery.References.QuantityOperator
to specify whether the criterion should be exactly that number of references, less than that number, or more than that numbernumberOfReferences
- the number of references that should be used as a search criterionrelationKind
- use one of the values defined in IRPSearchQuery.References.RelationKind
to specify the type of references that are to be used as a search criterion, for example, aggregates or incoming relationstypeOfReferencedElements
- can be used to specify a model element type to further limit the reference criterion, for example, find model elements that have aggregates of type "Attribute". The strings to use for this parameter can be found in the file metaclasses.txt in the Doc directory of the Rhapsody installation. You can also use the names of any "new terms" in your project.stereotypeOfReferencedElements
- use this parameter to specify that the reference criterion should be limited to references to elements that have a specific stereotype applied to themnameOfReferencedElements
- use this parameter to specify that the reference criterion should be limited to references to elements with a specific nameincludeReferencedElementsInSearchResults
- use 1 to specify that the referenced elements included in the search criterion should also be displayed in the search results, 0 otherwise. For example, if you searched for classes that have aggregates of type "Attribute" with the stereotype Web Managed applied to them, and you used 1 for this parameter, the results will list the classes found as well as their attributes that have the Web Managed stereotype.void setFilterTag(java.lang.String tagName, java.lang.String tagValue, int matchCase, int matchWholeWord, char findAs)
tagName
- the text to use for the tag name criteriontagValue
- the text to use for the tag value criterionmatchCase
- use 1 to require an exact match for the tag name and tag value search criteria, in terms of upper and lower case, use 0 otherwisematchWholeWord
- use 1 to require a whole word match for the tag name and tag value search criteria, use 0 otherwisefindAs
- use one of the constants defined in the class SearchFindAsEnum
to indicate the type of search that should be used for the tag name and tag value search criteria. For example, use SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search. If you want to search for elements that have an empty string for a tag value, use SearchFindAsEnum.RP_SEARCH_EMPTY_ONLY.
RhapsodyRuntimeException
java.lang.String getFilterSubQueriesOperator()
IRPSearchQuery.SubQueriesOperator
, for example IRPSearchQuery.SubQueriesOperator.AND.int getFilterUnitsOnly()
RhapsodyRuntimeException
java.lang.String getFilterUnresolvedKind()
IRPSearchQuery.UnresolvedKind
.
int getIncludeDescendants()
RhapsodyRuntimeException
java.lang.String getInterfaceName()
RhapsodyRuntimeException
int getMatchCase()
RhapsodyRuntimeException
int getMatchSpecifiedCriteria()
RhapsodyRuntimeException
int getMatchWholeWord()
RhapsodyRuntimeException
char getSearchFindAsOption()
SearchFindAsEnum
, for example SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search.
RhapsodyRuntimeException
IRPModelElement getSearchScopeObject()
getSearchScopeElements()
.
java.lang.String getSearchText()
RhapsodyRuntimeException
int getViewIncludeModelElements()
RhapsodyRuntimeException
java.lang.String getViewsToSearch()
IRPSearchQuery.ViewsToSearch
, for example IRPSearchQuery.ViewsToSearch.OPEN.void setFilterSubQueriesOperator(java.lang.String filterSubQueriesOperator)
filterSubQueriesOperator
- use one of the constants defined in the class IRPSearchQuery.SubQueriesOperator
to indicate how the specified subqueries should be combined, for example IRPSearchQuery.SubQueriesOperator.ANDvoid setFilterUnitsOnly(int filterUnitsOnly)
filterUnitsOnly
- use 1 to specify that the search should be limited to model elements that are saved units, 0 otherwise
RhapsodyRuntimeException
void setFilterUnresolvedKind(java.lang.String filterUnresolvedKind)
filterUnresolvedKind
- how unresolved elements should be handled in the search. The value of the parameter should be one of the constants from the class IRPSearchQuery.UnresolvedKind
.void setIncludeDescendants(int includeDescendants)
includeDescendants
- use 1 if you want the search scope to include the descendants of the specified elements, 0 otherwise
RhapsodyRuntimeException
void setMatchCase(int matchCase)
matchCase
- use 1 to specify that an exact match is required in terms of upper and lower case, 0 otherwise
RhapsodyRuntimeException
void setMatchSpecifiedCriteria(int matchSpecifiedCriteria)
matchSpecifiedCriteria
- use 1 if you want the query to return the model elements that match the criteria specified, use 0 if you want the query to return the model elements that do not match the criteria specified
RhapsodyRuntimeException
void setMatchWholeWord(int matchWholeWord)
matchWholeWord
- use 1 to specify that a whole word match is required, 0 otherwise
RhapsodyRuntimeException
void setSearchFindAsOption(char searchFindAsOption)
searchFindAsOption
- use one of the constants defined in the class SearchFindAsEnum
to indicate the type of search that should be used for the search text. For example, use SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search. If you want to search for elements that have an empty string in certain fields, use SearchFindAsEnum.RP_SEARCH_EMPTY_ONLY.
RhapsodyRuntimeException
void setSearchScopeObject(IRPModelElement searchScopeObject)
addSearchScope(com.telelogic.rhapsody.core.IRPModelElement)
.
void setSearchText(java.lang.String searchText)
searchText
- the text that should be searched for
RhapsodyRuntimeException
void setViewIncludeModelElements(int viewIncludeModelElements)
viewIncludeModelElements
- use 1 to specify that the search results should also include model elements that were found by the search but are not referenced in any of the views that you specified, 0 otherwise
RhapsodyRuntimeException
void setViewsToSearch(java.lang.String viewsToSearch)
viewsToSearch
- use one of the constants defined in the class IRPSearchQuery.ViewsToSearch
to indicate which views should be searched, for example IRPSearchQuery.ViewsToSearch.ALL
RhapsodyRuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |