com.telelogic.rhapsody.core
Interface IRPSearchQuery


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

addDiagramToViewsList

int addDiagramToViewsList(IRPDiagram view)
Adds the specified diagram to the list of views to be searched for the search text. Note that the list of views to search will be used only if you call the method IRPSearchQuery.setViewsToSearch, providing IRPSearchQuery.ViewsToSearch.DETAILED as the argument.

Parameters:
view - the diagram to add to the list of views to search
Returns:
the location of the new item in the list of views. Note that the order of the list can change when a view is added or removed, so the returned index can only be used if you have not made additional changes to the list since adding the item.
Throws:
RhapsodyRuntimeException

addFilterElementType

void addFilterElementType(java.lang.String elementType)
Adds an element type to the list of element types that the search should be applied to. Note that the purpose of this method is to limit the search to certain element types. If you do not call this method at all, then the search will be applied to all model element types.

Parameters:
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.
Throws:
RhapsodyRuntimeException

addFilterSearchInField

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. Note that the purpose of this method is to limit the search to certain element fields. If you do not call this method at all, then the search will be applied to all model element fields.

Parameters:
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.

addFilterStereotype

void addFilterStereotype(IRPStereotype stereotype)
Specifies that the search should be limited to model elements with a specific stereotype applied to them. Note that you can call this method multiple times to specify that the search should be limited to elements that have a certain group of stereotypes.

Parameters:
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.
Throws:
RhapsodyRuntimeException

addFilterSubQuery

void addFilterSubQuery(IRPTableLayout subQuery,
                       int useWithNotOperator)
Adds a subquery to the list of subqueries specified for the search.

Parameters:
subQuery - the subquery to add for the search
useWithNotOperator - use 1 if you want the NOT operator to be used for the specified subquery, 0 otherwise
Throws:
RhapsodyRuntimeException

addMatrixToViewsList

int addMatrixToViewsList(IRPMatrixView view)
Adds the specified matrix to the list of views to be searched for the search text. Note that the list of views to search will be used only if you call the method IRPSearchQuery.setViewsToSearch, providing IRPSearchQuery.ViewsToSearch.DETAILED as the argument.

Parameters:
view - the matrix to add to the list of views to search
Returns:
the location of the new item in the list of views. Note that the order of the list can change when a view is added or removed, so the returned index can only be used if you have not made additional changes to the list since adding the item.
Throws:
RhapsodyRuntimeException

addSearchScope

void addSearchScope(IRPModelElement scopeElement)
Adds an element to the scope for the search. You can call this method multiple times to include different parts of the model in a search.

Parameters:
scopeElement - model element that represents a part of the model that should be searched, for example, a specific package
Throws:
RhapsodyRuntimeException

addTableToViewsList

int addTableToViewsList(IRPTableView view)
Adds the specified table to the list of views to be searched for the search text. Note that the list of views to search will be used only if you call the method IRPSearchQuery.setViewsToSearch, providing IRPSearchQuery.ViewsToSearch.DETAILED as the argument.

Parameters:
view - the table to add to the list of views to search
Returns:
the location of the new item in the list of views. Note that the order of the list can change when a view is added or removed, so the returned index can only be used if you have not made additional changes to the list since adding the item.
Throws:
RhapsodyRuntimeException

getFilterElementTypes

IRPCollection getFilterElementTypes()
Returns the element types that are to be searched for the search text. Note that this method will return element types only if you used the method addFilterElementType to limit the search to certain element types. If you did not call the method addFilterElementType, then the search is applied to all element types, and getFilterElementType will return an empty collection.

Returns:
the element types that are to be searched
Throws:
RhapsodyRuntimeException

getFilterReferenceIncludeReferencedElementsInSearchResults

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.

Returns:
1 if the reference search criterion specified that the referenced elements included in the search criterion should also be displayed in the search results, 0 otherwise
Throws:
RhapsodyRuntimeException

getFilterReferenceNameOfReferencedElements

java.lang.String getFilterReferenceNameOfReferencedElements()
Returns the model element name that was specified for the reference criterion that was defined.

Returns:
the model element name that was specified for the reference criterion that was defined
Throws:
RhapsodyRuntimeException

getFilterReferenceNumberOfReferences

int getFilterReferenceNumberOfReferences()
Returns the number of references that was specified as a search criterion.

Returns:
the number of references that was specified as a search criterion
Throws:
RhapsodyRuntimeException

getFilterReferenceQuantityOperator

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.

Returns:
value that indicates whether the search criterion was an exact number of references, less than a specific number of references, or more than a specific number of references. The value returned will be one of the values defined in IRPSearchQuery.References.QuantityOperator.
Throws:
RhapsodyRuntimeException

getFilterReferenceRelationKind

java.lang.String getFilterReferenceRelationKind()
Returns the type of reference used in the search criterion, for example, aggregates or incoming relations.

Returns:
the type of reference used in the search criterion - one of the values defined in IRPSearchQuery.References.RelationKind.
Throws:
RhapsodyRuntimeException

getFilterReferenceStereotypeOfReferencedElements

java.lang.String getFilterReferenceStereotypeOfReferencedElements()
Returns the stereotype that was specified for the reference criterion that was defined.

Returns:
the stereotype that was specified for the reference criterion that was defined
Throws:
RhapsodyRuntimeException

getFilterReferenceTypeOfReferencedElements

java.lang.String getFilterReferenceTypeOfReferencedElements()
Returns the model element type that was specified for the reference criterion that was defined.

Returns:
the model element type that was specified for the reference criterion that was defined.
Throws:
RhapsodyRuntimeException

getFilterSearchInFields

IRPCollection getFilterSearchInFields()
Returns the list of element fields that the search is to be applied to.

Returns:
the list of element fields that the search is to be applied to. The collection returned will consist of constants defined in the class 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.
Throws:
RhapsodyRuntimeException

getFilterStereotypes

IRPCollection getFilterStereotypes()
Returns the names of the stereotypes that were specified as search criteria.

Returns:
the names of the stereotypes that were specified as search criteria
Throws:
RhapsodyRuntimeException

getFilterSubQueries

IRPCollection getFilterSubQueries()
Returns the subqueries that were specified for the search.

Returns:
the subqueries that were specified for the search
Throws:
RhapsodyRuntimeException

getFilterSubQueryUseWithNotOperator

int getFilterSubQueryUseWithNotOperator(IRPTableLayout subQuery)
Checks whether the NOT operator was specified for the specified subquery.

Parameters:
subQuery - the subquery to be checked
Returns:
1 if the NOT operator was specified for the subquery, 0 otherwise
Throws:
RhapsodyRuntimeException

getFilterTagFindAs

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.

Returns:
the type of search that was specified for the tag name and tag value search criteria - will be one of the constants defined in the class SearchFindAsEnum, for example SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search.
Throws:
RhapsodyRuntimeException

getFilterTagMatchCase

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.

Returns:
1 if an exact match was specified for the tag criteria in terms of upper and lower case, 0 otherwise
Throws:
RhapsodyRuntimeException

getFilterTagMatchWholeWord

int getFilterTagMatchWholeWord()
Checks whether a whole word match was specified for the tag name and tag value search criteria

Returns:
1 if whole word match was specified for the tag criteria, 0 otherwise
Throws:
RhapsodyRuntimeException

getFilterTagName

java.lang.String getFilterTagName()
Returns the tag name specified as a criterion for the search

Returns:
the tag name specified as a criterion for the search
Throws:
RhapsodyRuntimeException

getFilterTagValue

java.lang.String getFilterTagValue()
Returns the tag value specified as a criterion for the search

Returns:
the tag value specified as a criterion for the search
Throws:
RhapsodyRuntimeException

getSearchScopeElements

IRPCollection getSearchScopeElements()
Returns a collection of the model elements that constitute the scope for the search.

Returns:
the model elements that constitute the scope for the search
Throws:
RhapsodyRuntimeException

getView

IRPModelElement getView(int Index)
Retrieves the specified item from the list of tables, matrices, and diagrams that are to be searched.

Parameters:
Index - the index of the view to retrieve. Note that the index of the first view in the list is 0.
Returns:
the specified item from the list of tables, matrices, and diagrams that are to be searched
Throws:
RhapsodyRuntimeException

getViewCount

int getViewCount()
Returns the number of views in the list of views that are to be searched.

Returns:
the number of views in the list of views that are to be searched
Throws:
RhapsodyRuntimeException

loadFromQuery

void loadFromQuery(IRPTableLayout query)
Loads the settings from the specified query into the search query object.

Parameters:
query - the query element whose settings should be loaded into the search query object
Throws:
RhapsodyRuntimeException

removeFilterElementTypes

void removeFilterElementTypes()
Removes any element type filters that you defined to limit the search to certain element types. After calling this method, the search will be applied to all model element types.

Throws:
RhapsodyRuntimeException

removeFilterReferences

void removeFilterReferences()
Removes reference search criterion that was defined for the search query.

Throws:
RhapsodyRuntimeException

removeFilterSearchInFields

void removeFilterSearchInFields()
Removes any element field filters that you defined to limit the search to certain element fields, for example, model element descriptions. After calling this method, the search will be applied to all model element fields.

Throws:
RhapsodyRuntimeException

removeFilterStereotypes

void removeFilterStereotypes()
Removes any stereotype filter that was defined to limit the search to model elements that have certain stereotypes applied to them.

Throws:
RhapsodyRuntimeException

removeFilterSubQueries

void removeFilterSubQueries()
Removes the subquery criteria that were specified for the search.

Throws:
RhapsodyRuntimeException

removeFilterSubQuery

int removeFilterSubQuery(IRPTableLayout subQuery)
Removes the specified subquery from the search.

Parameters:
subQuery - the subquery that should be removed from the list of subqueries for the search
Throws:
RhapsodyRuntimeException

removeFilterTag

void removeFilterTag()
Removes the tag name and tag value criteria that were defined for the search query.

Throws:
RhapsodyRuntimeException

removeSearchScopeElement

int removeSearchScopeElement(IRPModelElement scopeElement)
Removes the specified model element from the scope for the search.

Parameters:
scopeElement - the model element that should be removed from the scope of the search
Throws:
RhapsodyRuntimeException

removeView

void removeView(int Index)
Removes the specified view from the list of views to be searched for the search text. This method can be used in conjunction with getViewCount and getView to loop through the views in the list and remove a specific one.

Parameters:
Index - the index of the view in the list of views to search
Throws:
RhapsodyRuntimeException

resetSearchScope

void resetSearchScope()
Resets the search scope to include the entire project, or all projects if multiple projects are open.

Throws:
RhapsodyRuntimeException

saveAsQuery

IRPTableLayout saveAsQuery(IRPPackage queryOwner)
Saves the search query object that you defined as a query in your model.

Parameters:
queryOwner - the model element under which the new query should be created
Returns:
the new query element that was created
Throws:
RhapsodyRuntimeException

setFilterReference

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.

Parameters:
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 number
numberOfReferences - the number of references that should be used as a search criterion
relationKind - 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 relations
typeOfReferencedElements - 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 them
nameOfReferencedElements - use this parameter to specify that the reference criterion should be limited to references to elements with a specific name
includeReferencedElementsInSearchResults - 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.

setFilterTag

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.

Parameters:
tagName - the text to use for the tag name criterion
tagValue - the text to use for the tag value criterion
matchCase - 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 otherwise
matchWholeWord - use 1 to require a whole word match for the tag name and tag value search criteria, use 0 otherwise
findAs - 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.
Throws:
RhapsodyRuntimeException

getFilterSubQueriesOperator

java.lang.String getFilterSubQueriesOperator()
Returns indication of how the specified subqueries are to be combined in the search

Returns:
indication of how the subqueries are to be combined in the search - will be one of the constants defined in the class IRPSearchQuery.SubQueriesOperator, for example IRPSearchQuery.SubQueriesOperator.AND.

getFilterUnitsOnly

int getFilterUnitsOnly()
Checks whether the search is limited to model elements that are saved units.

Returns:
1 if the search is limited to saved units, 0 otherwise
Throws:
RhapsodyRuntimeException

getFilterUnresolvedKind

java.lang.String getFilterUnresolvedKind()
Returns the method that was specified for handling unresolved elements in the search. The value returned will be one of the constants from the class IRPSearchQuery.UnresolvedKind.

Returns:
the method that was specified for handling unresolved elements in the search

getIncludeDescendants

int getIncludeDescendants()
Checks whether the scope of the search is to include the descendants of the elements specified for the scope.

Returns:
1 if the scope of the search is to include the descendants of the elements specified for the scope, 0 otherwise
Throws:
RhapsodyRuntimeException

getInterfaceName

java.lang.String getInterfaceName()
Returns the name of the interface (IRPSearchQuery).

Returns:
the name of the interface (IRPSearchQuery)
Throws:
RhapsodyRuntimeException

getMatchCase

int getMatchCase()
Checks whether an exact match was specified for the query in terms of upper and lower case.

Returns:
1 if an exact match was specified in terms of upper and lower case, 0 otherwise
Throws:
RhapsodyRuntimeException

getMatchSpecifiedCriteria

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.

Returns:
1 if the query is to return the model elements that match the criteria specified, 0 if the query is to return the model elements that do not match the specified criteria
Throws:
RhapsodyRuntimeException

getMatchWholeWord

int getMatchWholeWord()
Checks whether a whole word match was specified for the search.

Returns:
1 if a whole word match was specified, 0 otherwise
Throws:
RhapsodyRuntimeException

getSearchFindAsOption

char getSearchFindAsOption()
Returns the type of search that was specified for the search text - regular text, wildcard, regular expression, or empty string.

Returns:
the type of search that was specified for the search text - will be one of the constants defined in the class SearchFindAsEnum, for example SearchFindAsEnum.RP_SEARCH_WILDCARD for a wildcard search or SearchFindAsEnum.RP_SEARCH_REGEX for a regular expression search.
Throws:
RhapsodyRuntimeException

getSearchScopeObject

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().


getSearchText

java.lang.String getSearchText()
Returns the text that was specified as the text to search for.

Returns:
the text to search for
Throws:
RhapsodyRuntimeException

getViewIncludeModelElements

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.

Returns:
1 if the query specified 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
Throws:
RhapsodyRuntimeException

getViewsToSearch

java.lang.String getViewsToSearch()
Returns indication of which views (diagrams, tables, and matrices) are supposed to be searched.

Returns:
indication of which views are supposed to be searched - will be one of the constants defined in the class IRPSearchQuery.ViewsToSearch, for example IRPSearchQuery.ViewsToSearch.OPEN.

setFilterSubQueriesOperator

void setFilterSubQueriesOperator(java.lang.String filterSubQueriesOperator)
Specify how the various subqueries specified should be combined - as an AND operation or an OR operation

Parameters:
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.AND

setFilterUnitsOnly

void setFilterUnitsOnly(int filterUnitsOnly)
Specifies whether the search should be limited to model elements that are saved units.

Parameters:
filterUnitsOnly - use 1 to specify that the search should be limited to model elements that are saved units, 0 otherwise
Throws:
RhapsodyRuntimeException

setFilterUnresolvedKind

void setFilterUnresolvedKind(java.lang.String filterUnresolvedKind)
Specifies how unresolved elements should be handled in the search.

Parameters:
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.

setIncludeDescendants

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.

Parameters:
includeDescendants - use 1 if you want the search scope to include the descendants of the specified elements, 0 otherwise
Throws:
RhapsodyRuntimeException

setMatchCase

void setMatchCase(int matchCase)
Specifies whether the search should require an exact match in terms of upper and lower case.

Parameters:
matchCase - use 1 to specify that an exact match is required in terms of upper and lower case, 0 otherwise
Throws:
RhapsodyRuntimeException

setMatchSpecifiedCriteria

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.

Parameters:
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
Throws:
RhapsodyRuntimeException

setMatchWholeWord

void setMatchWholeWord(int matchWholeWord)
Specifies whether the search should require whole word matches.

Parameters:
matchWholeWord - use 1 to specify that a whole word match is required, 0 otherwise
Throws:
RhapsodyRuntimeException

setSearchFindAsOption

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.

Parameters:
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.
Throws:
RhapsodyRuntimeException

setSearchScopeObject

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).


setSearchText

void setSearchText(java.lang.String searchText)
Specifies the text that should be searched for.

Parameters:
searchText - the text that should be searched for
Throws:
RhapsodyRuntimeException

setViewIncludeModelElements

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.

Parameters:
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
Throws:
RhapsodyRuntimeException

setViewsToSearch

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.

Parameters:
viewsToSearch - use one of the constants defined in the class IRPSearchQuery.ViewsToSearch to indicate which views should be searched, for example IRPSearchQuery.ViewsToSearch.ALL
Throws:
RhapsodyRuntimeException