Class AssetCatalogConverter


  • public class AssetCatalogConverter
    extends Object
    AssetConverter is a helper class that maps the OMRS objects to Asset Catalog model.
    • Method Detail

      • getAssetCatalogBean

        public AssetCatalogBean getAssetCatalogBean​(EntityDetail entityDetail)
        Method used to convert the Entity Details to Asset Catalog OMAS Model - Asset Description object
        Parameters:
        entityDetail - entityDetails object
        Returns:
        Asset Description object
      • convertRelationships

        public List<Relationship> convertRelationships​(List<Relationship> relationships)
        Method used to covert a list of relationships from OMRS model to AC OMAS model
        Parameters:
        relationships - list of relationships - OMRS model
        Returns:
        a list of AC OMAS relationships objects
      • convertRelationship

        public Relationship convertRelationship​(Relationship rel)
        Method used to convert the relationship from the OMRS model to AC OMAS model
        Parameters:
        rel - relationship in the OMRS model
        Returns:
        a relationship in AC OMAS model
      • convertClassifications

        public List<Classification> convertClassifications​(List<Classification> classificationsFromEntity)
        Convert a list of Classifications from the OMRS model to Asset Catalog OMAS model
        Parameters:
        classificationsFromEntity - - list of classification in the repository services model
        Returns:
        list of classifications in the AC OMAS model
      • addElement

        public void addElement​(AssetCatalogItemElement assetCatalogItemElement,
                               EntityDetail entityDetail)
        Add an element in the context. If the context is null, the current element becomes the root of the context
        Parameters:
        assetCatalogItemElement - the context
        entityDetail - entity details of the new element
      • getLastNode

        public Element getLastNode​(AssetCatalogItemElement assetCatalogItemElement)
        Returns the last node added in the context
        Parameters:
        assetCatalogItemElement - given context
        Returns:
        the last element
      • addChildElement

        public void addChildElement​(Element parentElement,
                                    Element element)
        Method use to add the parent element to the current element in the built context tree
        Parameters:
        parentElement - parent element from the context
        element - a child element
      • addContextElement

        public void addContextElement​(AssetCatalogItemElement assetCatalogItemElement,
                                      EntityDetail entityDetail)
        Method use to add to the context of the given entity
        Parameters:
        assetCatalogItemElement - asset element that contains the current context
        entityDetail - entity details
      • convertType

        public Type convertType​(TypeDef openType)
        Method used to convert TypeDef to Type object from the Asset Catalog OMAS
        Parameters:
        openType - type definition
        Returns:
        the Type object
      • buildAssetElements

        public Elements buildAssetElements​(EntityDetail entityDetail)
        Create an Asset Element from the Entity Details
        Parameters:
        entityDetail - entityDetails
        Returns:
        an AssetElement object