Interface DataTypeQueryService

All Known Subinterfaces:
DataTypeManagerService

public interface DataTypeQueryService
Simplified datatype service interface to provide query capabilities to a set of open datatype managers.
See Also:
  • Method Details

    • getSortedDataTypeList

      List<DataType> getSortedDataTypeList()
      Gets the sorted list of all datatypes known by this service via it's owned DataTypeManagers. This method can be called frequently, as the underlying data is indexed and only updated as changes are made. The sorting of the list is done using the DataTypeComparator whose primary sort is based upon the DataTypeNameComparator.
      Returns:
      the sorted list of known data types.
    • getSortedCategoryPathList

      List<CategoryPath> getSortedCategoryPathList()
      Prompts the user for a data type. The optional filter text will be used to filter the tree of available types. Gets the sorted list of all category paths known by this service via its owned DataTypeManagers. This method can be called frequently, as the underlying data is indexed and only updated as changes are made. The sorting of the list is done using the natural sort of the CategoryPath objects.
      Returns:
      the sorted list of known category paths.
    • getDataType

      @Deprecated(since="12.0", forRemoval=true) DataType getDataType(String filterText)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method simply calls promptForDataType(String)
    • promptForDataType

      DataType promptForDataType(String filterText)
      Obtain the preferred datatype which corresponds to the specified datatype specified by filterText. A tool-based service provider may prompt the user to select a datatype if more than one possibility exists.
      Parameters:
      filterText - If not null, this text filters the visible data types to only show those that start with the given text
      Returns:
      the preferred data type (e.g., chosen by the user) or null if no match found or selection was cancelled by user.
    • findDataTypes

      List<DataType> findDataTypes(String name, TaskMonitor monitor)
      Finds all data types matching the given name. This method will search all open data type archives.

      Unlike findDataTypes(String, TaskMonitor), this method will not return .conflict data types. If you need those types, then you must call each data type manager directly.

      In the list of types returned, the program data type manager's types will be in the list before types from other archives.

      Parameters:
      name - the data type name to find
      monitor - the task monitor
      Returns:
      the data types
      See Also:
    • getDataTypesByPath

      List<DataType> getDataTypesByPath(DataTypePath path)
      Get the data type for the given data type path.

      This method will check each open data type manager for a data type that matches the path.

      If a type is in the program data type manager, then it will be first in the returned list.

      Parameters:
      path - the path
      Returns:
      the data type
    • getProgramDataTypeByPath

      DataType getProgramDataTypeByPath(DataTypePath path)
      Get the data type for the given data type path from the program's data type manager.
      Parameters:
      path - the path
      Returns:
      the data type; null if the type does not exist