Config DMT Schema

The DMTSchema is a xml configuration file to tell DMTFramework how transport your object. Your definition need comply with DMTSchema.xsd which can be found in your distribution dmt_{version}.jar under package org.dmdf.dmt.

You can name your configuration file whatever way you want, and put them anywhere you want, later on you need set the VM property tell where can find your schemas.



<!-- The name attribute and version attribute is the identifier of your defined schema, in your DMT you need use it as a key -->
<dmtschema name="getUserAccount" version="0">

<!-- The Default_dmtspec section define the default class attribute configuration. For those class have no dmtspec defined in this schema, this configuration will apply -->
<!-- If this schema applys to a object while doing DMT transport, any attribute listed here as exclude will be excluded - if they are exists. All other attributes will be transported -->
        <exclude name="createDateTime"/>
        <exclude name="lastModifiedDateTime"/>
        <exclude name="createdBy"/>
        <exclude name="modifiedBy"/>
<!-- Define the externalizer should be used for a class in this schema. type_name refer to your Domain Model Class and the Content e.g. CompanyExternalizer refer to the Externalizer used to handle your object (type of Company here) transport. The class name all need to use fully qualified name, the externalizer need to be those externalizer implement org.dmdf.dmt.Externalzier interface. For more information, refere to DMTExternalzier -->
    <externalizer type_name="Company">CompanyExternalizer</externalizer>
<!-- A dmtspec for your domain object with type of classname here is "UserAccount", the classname need to be fully qualified class name, only attributes listed here (in include node) will be transported. Each class can have at most only one dmtspec in one dmtschema configuration file. If you have multiple definitions for same class, the last one will be used. -->
    <dmtspec classname="UserAccount">

You can manually create this XML file, or you can use the DMT Schema Config Eclipse Plugin to config your schema and generate this file for you