Class AnalyticsAssetUtils
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.utils.AnalyticsAssetUtils
-
public class AnalyticsAssetUtils extends Object
Class provides useful operations with bean classAnalyticsAsset.
-
-
Constructor Summary
Constructors Constructor Description AnalyticsAssetUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddContainer(AnalyticsAsset asset, MetadataContainer container)Add container to the asset.static voidaddItem(AnalyticsAsset asset, MetadataItem item)Add item to the asset.static voidaddReference(AnalyticsAsset asset, AssetReference reference)Add reference to the asset.static voidaddSourceGuid(AnalyticsAsset asset, String guid)Add source GUID to the asset.static Map<String,String>buildAdditionalProperties(AnalyticsAsset asset)Build additional properties of the bean from asset content.static AssetReferencegetAssetReferenceByGuid(AnalyticsAsset asset, String guid)Find reference to asset with GUID.static MetadataContainergetContainer(AnalyticsAsset asset, int index)get container from asset at defined index.static booleanhasMetadataModule(AnalyticsAsset asset)Check if asset is metadata module.static booleanisVisualization(AnalyticsAsset asset)Check if asset is visualization.static MetadataContainerremoveContainer(AnalyticsAsset asset, int index)Remove container from asset at defined index.
-
-
-
Method Detail
-
addContainer
public static void addContainer(AnalyticsAsset asset, MetadataContainer container)
Add container to the asset.- Parameters:
asset- to add new container to.container- to add.
-
removeContainer
public static MetadataContainer removeContainer(AnalyticsAsset asset, int index)
Remove container from asset at defined index.- Parameters:
asset- to remove container from.index- to remove.- Returns:
- removed container or null if requested container does not exists.
-
getContainer
public static MetadataContainer getContainer(AnalyticsAsset asset, int index)
get container from asset at defined index.- Parameters:
asset- to get container from.index- to get.- Returns:
- requested container or null if it does not exist.
-
addItem
public static void addItem(AnalyticsAsset asset, MetadataItem item)
Add item to the asset.- Parameters:
asset- to add new item to.item- to add.
-
addSourceGuid
public static void addSourceGuid(AnalyticsAsset asset, String guid)
Add source GUID to the asset.- Parameters:
asset- to add new GUID to.guid- to add.
-
addReference
public static void addReference(AnalyticsAsset asset, AssetReference reference)
Add reference to the asset.- Parameters:
asset- to add new reference to.reference- to add.
-
isVisualization
public static boolean isVisualization(AnalyticsAsset asset)
Check if asset is visualization.- Parameters:
asset- to check.- Returns:
- true if asset has any visualization.
-
hasMetadataModule
public static boolean hasMetadataModule(AnalyticsAsset asset)
Check if asset is metadata module.- Parameters:
asset- to check.- Returns:
- true if asset has any metadata element.
-
buildAdditionalProperties
public static Map<String,String> buildAdditionalProperties(AnalyticsAsset asset)
Build additional properties of the bean from asset content.- Parameters:
asset- provides property values.- Returns:
- map of properties by name.
-
getAssetReferenceByGuid
public static AssetReference getAssetReferenceByGuid(AnalyticsAsset asset, String guid)
Find reference to asset with GUID.- Parameters:
asset- owner of the reference.guid- of the referenced asset to search.- Returns:
- referencing asset or null.
-
-