Skip to content

Defining new types

Egeria supports a wide variety of open metadata types that cover a broad range of metadata. These types can be extended through the normal contribution process of the Egeria project. It is also possible to create your own type definitions that can be exchanged across the open metadata repository cohort and may also be maintained through Egeria's APIs using extended properties.

Type definitions need to be governed because they must be consistent across a cohort - during the whole time that one or more instances of the type are stored in the repositories.

Egeria does have an API for dynamically defining types but it is recommended that you only use it went experimenting with types and instances. Instead, you should manage your types in an open metadata archive that is loaded in the metadata access servers during each server start up.

Creating your own type archive

A type archive is created using a Java program that uses the repository services archive utilities to add your new type definitions to an open metadata archive file.

Begin by setting up your build file - this is an example using Maven.

<?xml version="1.0" encoding="UTF-8"?>

<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

<project xmlns=""


    <name>My Types Utility</name>
        This package builds the open metadata type archive for my extended types.






/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package cocopharma.openmetadata.types;

import org.odpi.openmetadata.opentypes.OpenMetadataTypesArchiveWriter;

 * OpenMetadataTypesArchiveWriter create a physical open metadata archive file for the supplied open metadata archives
 * encoded using Open Metadata Repository Services (OMRS) formats.
public class CocoTypesArchiveUtility
    private static final String defaultTypeArchiveFileName = "CocoMetadataTypes.json";

     * Main program to control the archive writer.
     * Note: See issue #3392 if logging is needed
     * @param args ignored arguments
    public static void main(String[] args)
        OpenMetadataTypesArchiveWriter archiveWriter = new OpenMetadataTypesArchiveWriter();