com.ibm.openpages.api.service

## Interface IMetaDataService

-     public interface IMetaDataService

  Gateway to Metadata information pertaining to an OpenPages model.

  See Also:
    `ITypeDefinition`, `IFieldDefinition`, `IFieldDependency`, `IAssociationDefinition`, `IFileTypeDefinition`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IFieldDefinition` | `getField(Id id)` Returns a Field Definition by propertyid.
    `IFieldDefinition` | `getField(java.lang.String systemName)` Returns the field definition with the specified system name.
    `IFileTypeDefinition` | `getFileType(Id id)` Return a supported file type based on it's Id.
    `IFileTypeDefinition` | `getFileType(java.lang.String extension)` Return a supported file type based on the file extension.
    `IFileTypeDefinition` | `getFileType(java.lang.String extension, java.lang.String mimeType)` Gets a file type from the set of all possible file types defined in the OpenPages instance for a given mime type and extension combination.
    `IFileTypeDefinition` | `getFileTypeByMimeType(java.lang.String mimeType)` Return a supported file type based on mime type.
    `ITypeDefinition` | `getType(Id id)` Returns a type definition by id.
    `ITypeDefinition` | `getType(java.lang.String systemName)` Returns the type definition with the specified system name.
    `java.util.List<ITypeDefinition>` | `getTypes()` Gives access to a list of type definitions supported by the system.

- - ### Method Detail

    - #### getTypes

          java.util.List<ITypeDefinition> getTypes()

      Gives access to a list of type definitions supported by the system.

      Returns:
        a list of type definitions supported by the system.

    - #### getType

          ITypeDefinition getType(Id id)

      Returns a type definition by id.

      Parameters:
        `id` - of the type definition to return.
      Returns:
        type definition the typeDefinition identified by the id.

    - #### getField

          IFieldDefinition getField(Id id)

      Returns a Field Definition by propertyid.

      Parameters:
        `propety` - id
      Returns:
        field definition by propertyid

    - #### getType

          ITypeDefinition getType(java.lang.String systemName)

      Returns the type definition with the specified system name.

      Parameters:
        `systemName` - of the type definition.
      Returns:
        a type definition for the supplied system name.

    - #### getField

          IFieldDefinition getField(java.lang.String systemName)

      Returns the field definition with the specified system name.

      Parameters:
        `systemName` - the system name of the field definition
      Returns:
        field definition the field definition identified by the system name

    - #### getFileType

          IFileTypeDefinition getFileType(java.lang.String extension)

      Return a supported file type based on the file extension.

      Parameters:
        `extension` - the file extension
      Returns:
        file type definition identified by the extension

    - #### getFileTypeByMimeType

          IFileTypeDefinition getFileTypeByMimeType(java.lang.String mimeType)

      Return a supported file type based on mime type.

      Parameters:
        `mimeType` - the mime type to find.
      Returns:
        file type definition identified by the MIME type

    - #### getFileType

          IFileTypeDefinition getFileType(Id id)

      Return a supported file type based on it's Id.

      Parameters:
        `id` - the id of the file type.
      Returns:
        file type definition identified by the id

    - #### getFileType

          IFileTypeDefinition getFileType(java.lang.String extension,
                                          java.lang.String mimeType)

      Gets a file type from the set of all possible file types defined in the OpenPages instance for a given mime type and extension combination. May not be supported by a particular type that supports attachment. See the `ITypeDefinition.getFileTypes()` for the list of file types that an object type supports attaching.

      Examples of some common file types (format extension (mime type)):

      - pdf (application/pdf)
      - xls (application/vnd.ms-excel)
      - jpg (image/jpeg)
      - doc (application/msword)
      - html (text/html)
      - rtf (text/richtext)
      - txt (text/plain)

      Mime types are not unique, and there may be multiple instances of file types with the same mime type.

      Parameters:
        `extension` - the file extension to find. e.g. "html", "xls" or "pdf". Note: The dot separator "." should not be included in the extension.
        `mimeType` - the mime type to find. e.g. "image/jpeg", "application/msword", "text/html"
      Returns:
        file type definition for mime type and extension
      Throws:
        `ObjectNotFoundException` - if no file type found for the extension or mime type

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.