Class TermEnrichmentDetails


  • public class TermEnrichmentDetails
    extends EnrichmentDetails
    Utility class for capturing the enrichment details provided about a glossary.
    • Method Detail

      • getIdentity

        public java.lang.String getIdentity()
        Retrieve the unique identity of this asset for deduplication across rows.
        Specified by:
        getIdentity in class AssetDetails
        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 name
        categoryCache - cache of categories keyed by category identity
        row - a row of data from the spreadsheet, as a map from column name to value
        delim - 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 exist
        batchSize - maximum number of terms to create per batch
        replaceAtlanTags - if true, the Atlan tags in the spreadsheet will overwrite all existing Atlan tags on the asset; otherwise they will only be appended
        replaceCM - if true, the custom metadata in the spreadsheet will overwrite all custom metadata on the asset; otherwise only the attributes with values will be updated
        updateOnly - if true, only attempt to update existing assets, otherwise allow assets to be created as well
        Returns:
        a cache of the terms
      • getGlossary

        public com.atlan.model.assets.Asset getGlossary()
      • getName

        public java.lang.String getName()
      • getCategories

        public java.util.List<com.atlan.model.assets.Asset> getCategories()
      • 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()