com.versionone.apiclient

## Class MetaModel

- java.lang.Object
- - com.versionone.apiclient.MetaModel

- All Implemented Interfaces:
    IMetaModel

      public class MetaModel
      extends Object
      implements IMetaModel

  Concrete class for obtaining metadata from the VersionOne server

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetaModel(IAPIConnector connector)` Create from a connection and obtain meta-data as needed
    `MetaModel(IAPIConnector connector, boolean hookup)` Create from a connection and pre-load meta data
    `MetaModel(V1Connector v1Connector)`
    `MetaModel(V1Connector v1Connector, boolean hookup)` Create from a connection and pre-load meta data

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IAssetType` | `getAssetType(String token)` Get an asset type based on a token
    `IAttributeDefinition` | `getAttributeDefinition(String token)` Get an attribute definition from a token
    `IOperation` | `getOperation(String token)` Get an operation based on a token
    `Version` | `getVersion()` Get MetaMode version

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MetaModel

          public MetaModel(IAPIConnector connector)

      Create from a connection and obtain meta-data as needed
      Parameters:
        `connector` - - IAPIConnector

    - #### MetaModel

          public MetaModel(IAPIConnector connector,
                           boolean hookup)

      Create from a connection and pre-load meta data
      Parameters:
        `connector` - - IAPIConnector
        `hookup` - - boolean

    - #### MetaModel

          public MetaModel(V1Connector v1Connector)

    - #### MetaModel

          public MetaModel(V1Connector v1Connector,
                           boolean hookup)

      Create from a connection and pre-load meta data
      Parameters:
        `v1Connector` - v1Connector
        `hookup` - hookup

  - ### Method Detail

    - #### getAssetType

          public IAssetType getAssetType(String token)
                                  throws MetaException

      Get an asset type based on a token
      Specified by:
        `getAssetType` in interface `IMetaModel`
      Parameters:
        `token` - - token of desired asset
      Returns:
        IAssetType for asset defined in token
      Throws:
        `MetaException` - if an error occurs while locating the asset
      See Also:
        `IMetaModel.getAssetType(String)`

    - #### getVersion

          public Version getVersion()
                             throws MetaException

      Get MetaMode version
      Returns:
        Version of MetaModel
      Throws:
        `MetaException` - - MetaException

    - #### getAttributeDefinition

          public IAttributeDefinition getAttributeDefinition(String token)
                                                      throws MetaException

      Get an attribute definition from a token
      Specified by:
        `getAttributeDefinition` in interface `IMetaModel`
      Parameters:
        `token` - - token of desired attribute
      Returns:
        IAttributeDefinition for attribute specified
      Throws:
        `MetaException` - if an error occurs finding the attribute
      See Also:
        `IMetaModel.getAttributeDefinition(String)`

    - #### getOperation

          public IOperation getOperation(String token)
                                  throws MetaException

      Get an operation based on a token
      Specified by:
        `getOperation` in interface `IMetaModel`
      Parameters:
        `token` - - token of desired operation
      Returns:
        IOperation based on token
      Throws:
        `MetaException` - if as error occurs finding the operation information
      See Also:
        `IMetaModel.getOperation(String)`

Copyright © 2016 VersionOne, Inc.. All rights reserved.