Package com.atlan.samples.loaders.models
Class TermEnrichmentDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.EnrichmentDetails
-
- com.atlan.samples.loaders.models.TermEnrichmentDetails
-
public class TermEnrichmentDetails extends EnrichmentDetails
Utility class for capturing the enrichment details provided about a glossary.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TermEnrichmentDetails.TermEnrichmentDetailsBuilder<C extends TermEnrichmentDetails,B extends TermEnrichmentDetails.TermEnrichmentDetailsBuilder<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.String
COL_CATEGORIES
static java.lang.String
COL_GLOSSARY
static java.lang.String
COL_T_ANTONYMS
static java.lang.String
COL_T_CLASSIFIES
static java.lang.String
COL_T_RECOMMENDED
static java.lang.String
COL_T_RELATED
static java.lang.String
COL_T_SYNONYMS
static java.lang.String
COL_T_TRANSLATED
static java.lang.String
COL_T_VALID_VALUES
static java.lang.String
COL_TERM_NAME
-
Fields inherited from class com.atlan.samples.loaders.models.EnrichmentDetails
COL_README, COL_USER_DESCRIPTION
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TermEnrichmentDetails(TermEnrichmentDetails.TermEnrichmentDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TermEnrichmentDetails.TermEnrichmentDetailsBuilder<?,?>
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getAntonyms()
java.util.List<com.atlan.model.assets.Asset>
getCategories()
java.util.List<java.lang.String>
getClassifies()
static TermEnrichmentDetails
getFromRow(GlossaryCache glossaryCache, CategoryCache categoryCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the term on the provided row.com.atlan.model.assets.Asset
getGlossary()
static java.lang.String
getGlossaryNameFromIdentity(java.lang.String identity)
Retrieve the name of the glossary from a term's identity.java.lang.String
getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.java.lang.String
getName()
static java.lang.String
getNameFromIdentity(java.lang.String identity)
Retrieve the name of the term from its identity.java.lang.String
getReadme()
java.util.List<java.lang.String>
getRecommendedTerms()
java.util.List<java.lang.String>
getRelatedTerms()
java.util.List<java.lang.String>
getSynonyms()
java.util.List<java.lang.String>
getTranslatedTerms()
java.lang.String
getUserDescription()
java.util.List<java.lang.String>
getValidValuesFor()
int
hashCode()
java.lang.String
toString()
static TermCache
upsert(java.util.Map<java.lang.String,TermEnrichmentDetails> terms, int batchSize, boolean replaceAtlanTags, boolean replaceCM, boolean updateOnly)
Create terms 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
-
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_TERM_NAME
public static final java.lang.String COL_TERM_NAME
- See Also:
- Constant Field Values
-
COL_CATEGORIES
public static final java.lang.String COL_CATEGORIES
- See Also:
- Constant Field Values
-
COL_T_RELATED
public static final java.lang.String COL_T_RELATED
- See Also:
- Constant Field Values
-
COL_T_RECOMMENDED
public static final java.lang.String COL_T_RECOMMENDED
- See Also:
- Constant Field Values
-
COL_T_SYNONYMS
public static final java.lang.String COL_T_SYNONYMS
- See Also:
- Constant Field Values
-
COL_T_ANTONYMS
public static final java.lang.String COL_T_ANTONYMS
- See Also:
- Constant Field Values
-
COL_T_TRANSLATED
public static final java.lang.String COL_T_TRANSLATED
- See Also:
- Constant Field Values
-
COL_T_VALID_VALUES
public static final java.lang.String COL_T_VALID_VALUES
- See Also:
- Constant Field Values
-
COL_T_CLASSIFIES
public static final java.lang.String COL_T_CLASSIFIES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TermEnrichmentDetails
protected TermEnrichmentDetails(TermEnrichmentDetails.TermEnrichmentDetailsBuilder<?,?> b)
-
-
Method Detail
-
getIdentity
public java.lang.String getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.- Specified by:
getIdentity
in classAssetDetails
- Returns:
- String giving the unique identity of the asset
-
getNameFromIdentity
public static java.lang.String getNameFromIdentity(java.lang.String identity)
Retrieve the name of the term from its identity.- Parameters:
identity
- of the term- Returns:
- only the name of the term
-
getGlossaryNameFromIdentity
public static java.lang.String getGlossaryNameFromIdentity(java.lang.String identity)
Retrieve the name of the glossary from a term's identity.- Parameters:
identity
- of the term- Returns:
- only the name of the glossary
-
getFromRow
public static TermEnrichmentDetails getFromRow(GlossaryCache glossaryCache, CategoryCache categoryCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the term on the provided row.- Parameters:
glossaryCache
- cache of glossaries keyed by glossary namecategoryCache
- cache of categories keyed by category identityrow
- 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 term enrichment details for that row
-
upsert
public static TermCache upsert(java.util.Map<java.lang.String,TermEnrichmentDetails> terms, int batchSize, boolean replaceAtlanTags, boolean replaceCM, boolean updateOnly)
Create terms in bulk, if they do not exist, or update them if they do (idempotent).- Parameters:
terms
- the set of terms to ensure existbatchSize
- maximum number of terms to create per batchreplaceAtlanTags
- if true, the Atlan tags in the spreadsheet will overwrite all existing Atlan tags 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- Returns:
- a cache of the terms
-
builder
public static TermEnrichmentDetails.TermEnrichmentDetailsBuilder<?,?> builder()
-
getGlossary
public com.atlan.model.assets.Asset getGlossary()
-
getName
public java.lang.String getName()
-
getUserDescription
public java.lang.String getUserDescription()
- Overrides:
getUserDescription
in classEnrichmentDetails
-
getCategories
public java.util.List<com.atlan.model.assets.Asset> getCategories()
-
getReadme
public java.lang.String getReadme()
- Overrides:
getReadme
in classEnrichmentDetails
-
getRelatedTerms
public java.util.List<java.lang.String> getRelatedTerms()
-
getRecommendedTerms
public java.util.List<java.lang.String> getRecommendedTerms()
-
getSynonyms
public java.util.List<java.lang.String> getSynonyms()
-
getAntonyms
public java.util.List<java.lang.String> getAntonyms()
-
getTranslatedTerms
public java.util.List<java.lang.String> getTranslatedTerms()
-
getValidValuesFor
public java.util.List<java.lang.String> getValidValuesFor()
-
getClassifies
public java.util.List<java.lang.String> getClassifies()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classEnrichmentDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classEnrichmentDetails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEnrichmentDetails
-
toString
public java.lang.String toString()
- Overrides:
toString
in classEnrichmentDetails
-
-