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 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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.