Tool Overview | Using CoCompose | Using the Component Browser | Modelling Designs | Translating Designs |
FRAMES | NO FRAMES |
3. Using the component browser |
CoCompose now features a query-based component browser, capable of understanding standard
SQL with an added ATLEAST keyword. This keyword simplifies formulating
a kind of qualitative query, which is internally rewritten to use only standard SQL.
Here are two examples:
Get every composite in the repository
SELECT DISTINCT *
FROM Library
WHERE type = 'composite-type'
Get all components with an adaptability of at least 'compile-time'
SELECT DISTINCT l.* FROM Library l, Properties p
WHERE l.uri = p.uri AND p.propname = 'quality.adaptability'
AND p.propvalue ATLEAST 'compile-time'
The relational database has the following tables:
Library: uri | name | type
Properties: uri | propname | propvalue
Rankings: propname | propvalue | rank
SavedQueries: name | query
3.1. Indexing the components |
Before you can ask queries about components, the properties of the components
must be registered in a database. This 'indexing' process is carried out
automatically when the database is empty, but can also be initiated manually
by selecting Refresh library from the
File menu or typing Ctrl-R.
Manual reindexing is necessary when new components are added.
The indexer looks for components (models, solution patterns,
concepts and composite types) in the ./models and ./repository directories.
3.2. Executing queries |
Type the query in the query editor box above the
Execute button, then press
that button (or type Alt-X). The results will be shown in the list underneath
with the following properties:
Pressing the
Clear button (Alt-C) will erase the contents of the query editor.
3.3. Managing saved queries |
3.4. Using query results |
Each query result in the list box at the bottom of the browser can be opened in a new window simply by double-clicking on it. A model editor window will pop up showing the component in detail.
Furthermore, the concepts and composites can also be incorporated
in new models by selecting the appropriate one in the list box
and using the Create repository composite
tool in the model editor window.
Tool Overview | Using CoCompose | Using the Component Browser | Modelling Designs | Translating Designs |
FRAMES | NO FRAMES |