Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Design-time Metadata Framework for JSF Tools Project

Note: This document is under construction and is subject to change.

Overview

In WTP 1.5, the JSF Tools sub-project introduced CMAnnotationFiles provisional API’s that supplied a mechanism to provide metadata to the tooling used primarily with tag libararies. It was sufficient for the time, but requirements for the Visual Page Designer and a desire to be “upgrade proof” as more standardized sources of metadata became available, necessitated a change. In WTP 2.0, and already checked into HEAD, there is a replacement API we call the Metadata Framework.

This framework uses an EMF-based model that has the following advantages over the previous framework:

  • improvements in extensibility
  • generalization of the metadata model
  • improvements in queryabilty

The Model

Entities

An entity identifies the object for which metadata is being provided. Entities can have child entities and can have a collection of Traits. They also can reference EntityGroups from the any model for inclusion.

Traits

A Trait is a property of an entity. The value of a Trait is the metadata that is being applied to the entity. The value of a Trait is an instance of a Trait Type and is modeled as an EMF EObject. A Trait Type can be any EMF EClass. This effectively means that it is a “blob” allowing an arbitrary structure to be stored as the value of that trait giving the ToolsProvider a great deal of flexibility on how metadata is to be provided.

Model

Extends from Entity and identifies the root element that this metadata refers to. The id for the Model is the URI of the model.

EntityGroup

An entity whose collection of traits and child entities get copied to an entity that references it. Entity groups are owned by the Model entity and are referenced by any entity except an EntityGroup to avoid cycles. The intention of an entity group is to reduce the amount of duplicate metadata.

MetaModel

MetadataMetaModel.gif

Back to the top