Package com.atlan.samples.loaders.models
Class CategoryEnrichmentDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.EnrichmentDetails
-
- com.atlan.samples.loaders.models.CategoryEnrichmentDetails
-
public class CategoryEnrichmentDetails extends EnrichmentDetails
Utility class for capturing the enrichment details provided about a glossary.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<C extends CategoryEnrichmentDetails,B extends CategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<C,B>>-
Nested classes/interfaces inherited from class com.atlan.samples.loaders.models.EnrichmentDetails
EnrichmentDetails.EnrichmentDetailsBuilder<C extends EnrichmentDetails,B extends EnrichmentDetails.EnrichmentDetailsBuilder<C,B>>
-
Nested classes/interfaces inherited from class com.atlan.samples.loaders.models.AssetDetails
AssetDetails.AssetDetailsBuilder<C extends AssetDetails,B extends AssetDetails.AssetDetailsBuilder<C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOL_CATEGORY_PATHstatic java.lang.StringCOL_GLOSSARY-
Fields inherited from class com.atlan.samples.loaders.models.EnrichmentDetails
COL_README, COL_USER_DESCRIPTION
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCategoryEnrichmentDetails(CategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<?,?>builder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetCategoryPath()static CategoryEnrichmentDetailsgetFromRow(GlossaryCache glossaryCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)Build up details about the category on the provided row.com.atlan.model.assets.AssetgetGlossary()static java.lang.StringgetGlossaryNameFromIdentity(java.lang.String identity)Retrieve the name of the glossary from a category's identity.java.lang.StringgetIdentity()Retrieve the unique identity of this asset for deduplication across rows.static java.lang.StringgetIdentity(java.lang.String categoryPath, com.atlan.model.assets.Asset glossary)Construct the unique identity for the provided category path in a given glossary.static java.lang.StringgetNameFromPath(java.lang.String path)Retrieve the name of the category from its path.static java.lang.StringgetPathFromIdentity(java.lang.String identity)Retrieve the path of the category from its identity.inthashCode()java.lang.StringtoString()static voidupsert(CategoryCache categoryCache, java.util.Map<java.lang.String,CategoryEnrichmentDetails> categories, int batchSize, int level, boolean replaceClassifications, boolean replaceCM, boolean updateOnly)Create categories in bulk, if they do not exist, or update them if they do (idempotent).-
Methods inherited from class com.atlan.samples.loaders.models.EnrichmentDetails
getCustomMetadataValues, getCustomMetadataValuesFromRow, getReadme, getUserDescription
-
Methods inherited from class com.atlan.samples.loaders.models.AssetDetails
appendAtlanTags, getAnnouncementMessage, getAnnouncementTitle, getAnnouncementType, getAtlanTags, getBoolean, getCertificate, getCertificateStatusMessage, getDescription, getFromRow, getMissingFields, getMultiValuedList, getOwnerGroups, getOwnerUsers, getRequiredEmptyFields, isStub, selectivelyUpdateCustomMetadata
-
-
-
-
Field Detail
-
COL_GLOSSARY
public static final java.lang.String COL_GLOSSARY
- See Also:
- Constant Field Values
-
COL_CATEGORY_PATH
public static final java.lang.String COL_CATEGORY_PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CategoryEnrichmentDetails
protected CategoryEnrichmentDetails(CategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<?,?> b)
-
-
Method Detail
-
getIdentity
public java.lang.String getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.- Specified by:
getIdentityin classAssetDetails- Returns:
- String giving the unique identity of the asset
-
getPathFromIdentity
public static java.lang.String getPathFromIdentity(java.lang.String identity)
Retrieve the path of the category from its identity.- Parameters:
identity- of the category- Returns:
- only the path of the category
-
getNameFromPath
public static java.lang.String getNameFromPath(java.lang.String path)
Retrieve the name of the category from its path.- Parameters:
path- of the category- Returns:
- only the name of the category
-
getGlossaryNameFromIdentity
public static java.lang.String getGlossaryNameFromIdentity(java.lang.String identity)
Retrieve the name of the glossary from a category's identity.- Parameters:
identity- of the category- Returns:
- only the name of the glossary
-
getIdentity
public static java.lang.String getIdentity(java.lang.String categoryPath, com.atlan.model.assets.Asset glossary)Construct the unique identity for the provided category path in a given glossary.- Parameters:
categoryPath- path of the category (@-delimited)glossary- glossary in which the category is expected to exist- Returns:
- the unique identity (not qualifiedName) of the category
-
getFromRow
public static CategoryEnrichmentDetails getFromRow(GlossaryCache glossaryCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the category on the provided row.- Parameters:
glossaryCache- cache of glossaries keyed by glossary namerow- a row of data from the spreadsheet, as a map from column name to valuedelim- delimiter used in cells that can contain multiple values- Returns:
- the category enrichment details for that row
-
upsert
public static void upsert(CategoryCache categoryCache, java.util.Map<java.lang.String,CategoryEnrichmentDetails> categories, int batchSize, int level, boolean replaceClassifications, boolean replaceCM, boolean updateOnly)
Create categories in bulk, if they do not exist, or update them if they do (idempotent).- Parameters:
categoryCache- a cache of categoriescategories- the set of categories to ensure existbatchSize- maximum number of categories to create per batchlevel- of categories to createreplaceClassifications- if true, the classifications in the spreadsheet will overwrite all existing classifications on the asset; otherwise they will only be appendedreplaceCM- if true, the custom metadata in the spreadsheet will overwrite all custom metadata on the asset; otherwise only the attributes with values will be updatedupdateOnly- if true, only attempt to update existing assets, otherwise allow assets to be created as well
-
builder
public static CategoryEnrichmentDetails.CategoryEnrichmentDetailsBuilder<?,?> builder()
-
getGlossary
public com.atlan.model.assets.Asset getGlossary()
-
getCategoryPath
public java.lang.String getCategoryPath()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classEnrichmentDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqualin classEnrichmentDetails
-
hashCode
public int hashCode()
- Overrides:
hashCodein classEnrichmentDetails
-
toString
public java.lang.String toString()
- Overrides:
toStringin classEnrichmentDetails
-
-