Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

5.2. Model Extension Definition (MED)

The purpose of a MED is to define one or more sets of extension properties. Each set of extension properties pertains to one model object type (or metaclass). Each MED consists of the following:
  • Namespace Prefix - a unique identifier. Typically only a small number of letters and can be used as an abbreviation for the namespace URI.
  • Namespace URI - a unique URI.
  • Extended Metamodel URI (Model Class) - the metamodel URI that is being extended. Each metamodel URI also has model class and that is typically what is shown in the Designer. The model classes supported for extension are: Relational, Web Service, XML Document, and Function.
  • Version - (currently not being used)
  • Description - an optional description or purpose.
  • Extended Model Object Types (Metaclasses) - a set of model object types, or metaclasses, that have extension properties defined.
  • Properties - the extension property definitions grouped by model object type.
A MED file is an XML file with an extension of mxd. A MED schema file (see attached modelExtension.xsd file) is used to validate a MED file. Here is a sample MED file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<modelExtension xmlns:p="http://org.teiid.modelExtension/2011"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	metamodelUri="http://www.metamatrix.com/metamodels/Relational"
    	namespacePrefix="mymodelextension" namespaceUri="org.my.extension.mymodelextension"
    	version="1"
    	xsi:schemaLocation="http://org.teiid.modelExtension/2011 modelExtension.xsd"
    	xmlns="http://org.teiid.modelExtension/2011">
    <p:description>This is my model extension</p:description>
    <p:extendedMetaclass name="com.metamatrix.metamodels.relational.impl.BaseTableImpl">
        <p:property advanced="false" index="true" masked="false" name="copyable" required="false" type="boolean">
            <p:description locale="en_US">Indicates if table can be copied</p:description>
            <p:display locale="en_US">Copyable</p:display>
        </p:property>
    </p:extendedMetaclass>
</modelExtension>
The MED Registry is where the MEDs used by Teiid Designer are stored. MED files can be edited by opening the .mxd file in the Extension Editor.