The Eclipse EMF Query component facilitates the process of search and retrieval of model elements of interest in a flexible yet controlled and structured manner. Provides API support for the basic EObject based Condition objects that are used to formulate queries for EMF models.
The query component provides the following classes/interfaces to support queries.
- The IEObjectSource interface provides the search scope elements to be used in a query.
- The SELECT class implements a template-function that does the iteration over model elements and applies the search condition on each; it collects the resulting elements into a QueryResultSet object and returns it to the caller.
- The FROM class represents the elements to search. It is responsible of providing an appropriate iterator for the elements in the search space.
- The WHERE class applies the search conditions over the elements in the search set.
- The UPDATE class passes the elements who satisfy the search condition to a caller-supplied modification function. It collects the modified elements into a QueryResultSet object and returns it to the caller.
- The QueryResultSet class represents the set of elements returned by a given query.
- The EObjectCondition class is the abstract parent of all conditions that deal with model-elements (i.e., EObjects). It incorporates the services of a PruneHandler in order to answers whether or not to prune the element tree at a specific element and thus ignore its children.
- The ConditionPolicy class is used to allow the user to decide how to apply a given condition on a collection of a model-element EAttributes or EReferences values. Supports both the: exists (ANY) and for-all (ALL) semantics.
- The EObjectStructuralFeatureValueCondition class is the parent class for conditions that are responsible for checking the values held in model-elements attributes or references.
The transaction component provides the following capabilities.
- Multi-threading - Supports a protocol for clients to read and write EMF models on multiple threads.
- Model Integrity - Semantic integrity is ensured by automatic validation to detect invalid changes and semantic procedures to proactively maintain correctness of semantic dependencies.
- Batched Events - Clients are notified of groups of related changes in batches, rather than as a stream of EMF notifications. In particular, this allows applications to analyze change sets in their entirety.
- Undo/Redo - For a simplified programming model, the API automatically tracks changes applied to models without the need for client code to use EMF edit Commands. These changes are encapsulated in transactions/operations that can undo and redo themselves.
- Editing Domain - Support cooperative editing of models by multiple editors/applications. EMF resources can be shared amongst different editing domains.
- Eclipse Workspace - The API provides traceability between EMF resources and workspace resources. Multi-threaded access is coordinated via the Eclipse jobs API and its integration with the workspace.
- Eclipse Operations - The API supports the Eclipse operation history as an undo stack for undo/redo of resource changes. The API provides a framework for undoable operations that automatically capture undo/redo information, which can be interleaved on the same history with dependent operations that do not modify the EMF model.
The Eclipse EMF Validation component provides the following capabilities.
- Constraint Definition - Provides API for defining constraints for any EMF meta-model (batch and live constraints).
- Customizable model traversal algorithms - Extensibility API to support meta-models that require custom strategies for model traversal.
- Constraint parsing for languages - Provides support for parsing the content of constraint elements defined in specific languages. The validation framework provides support for two languages: Java and OCL.
- Configurable constraint bindings to application contexts - API support to define "client contexts" that describe the objects that need to be validated and to bind them to constraints that need to be enforced on these objects.
- Validation listeners - Support for listening to validation events.