Class AssetCatalogConverter
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.assetcatalog.builders.AssetCatalogConverter
-
public class AssetCatalogConverter extends Object
AssetConverter is a helper class that maps the OMRS objects to Asset Catalog model.
-
-
Constructor Summary
Constructors Constructor Description AssetCatalogConverter(String sourceName, OMRSRepositoryHelper repositoryHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildElement(Element parentElement, Element element)Method use to add the parent element to the current element in the built context treevoidaddContextElement(AssetCatalogItemElement assetCatalogItemElement, EntityDetail entityDetail)Method use to add to the context of the given entityvoidaddElement(AssetCatalogItemElement assetCatalogItemElement, EntityDetail entityDetail)Add an element in the context.ElementsbuildAssetElements(EntityDetail entityDetail)Create an Asset Element from the Entity DetailsList<Classification>convertClassifications(List<Classification> classificationsFromEntity)Convert a list of Classifications from the OMRS model to Asset Catalog OMAS modelRelationshipconvertRelationship(Relationship rel)Method used to convert the relationship from the OMRS model to AC OMAS modelList<Relationship>convertRelationships(List<Relationship> relationships)Method used to covert a list of relationships from OMRS model to AC OMAS modelTypeconvertType(TypeDef openType)Method used to convert TypeDef to Type object from the Asset Catalog OMASAssetCatalogBeangetAssetCatalogBean(EntityDetail entityDetail)Method used to convert the Entity Details to Asset Catalog OMAS Model - Asset Description objectElementgetLastNode(AssetCatalogItemElement assetCatalogItemElement)Returns the last node added in the context
-
-
-
Constructor Detail
-
AssetCatalogConverter
public AssetCatalogConverter(String sourceName, OMRSRepositoryHelper repositoryHelper)
-
-
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 contextentityDetail- 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 contextelement- 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 contextentityDetail- 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
-
-