Class TypeDefStore


  • public class TypeDefStore
    extends java.lang.Object
    Store of implemented TypeDefs for the repository. Source: https://github.com/odpi/egeria-connector-hadoop-ecosystem/blob/master/apache-atlas-adapter/src/main/java/org/odpi/egeria/connectors/apache/atlas/repositoryconnector/stores/TypeDefStore.java
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeDefStore()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTypeDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
      Adds the provided TypeDef to the list of those that are implemented in the repository.
      void addUnimplementedTypeDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
      Adds the provided TypeDef to the list of those that are not implemented in the repository.
      java.util.Map<java.lang.String,​TypeDefStore.EndpointMapping> getAllEndpointMappingsFromCatalogName​(java.lang.String catalogTypeName)
      Retrieve all endpoint mappings (relationships) that are mapped for the provided Catalog type.
      java.util.Map<java.lang.String,​java.lang.String> getAllMappedCatalogTypeDefNames​(java.lang.String omrsName)
      Retrieves all of the Catalog TypeDef names that are mapped to the provided OMRS TypeDef name, or null if there is no mapping.
      java.util.Map<java.lang.String,​java.lang.String> getAllMappedOMRSTypeDefNames​(java.lang.String catalogName)
      Retrieves all of the OMRS TypeDef names that are mapped to the provided OMRS TypeDef name, or null if there is no mapping.
      java.util.Map<java.lang.String,​org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute> getAllTypeDefAttributesForName​(java.lang.String name)
      Retrieves a map from attribute name to attribute definition for all attributes of the specified type definition, including all of its supertypes' attributes.
      java.util.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef> getAllTypeDefs()
      Retrieves a listing of all of the implemented type definitions for this repository.
      TypeDefStore.EndpointMapping getEndpointMappingFromCatalogName​(java.lang.String catalogTypeName, java.lang.String relationshipPrefix)
      Retrieve the relationship endpoint mapping from the Catalog details provided.
      java.lang.String getMappedCatalogTypeDefName​(java.lang.String omrsName, java.lang.String prefix)
      Retrieves the Catalog TypeDef name that is mapped to the provided OMRS TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping.
      java.lang.String getMappedOMRSTypeDefName​(java.lang.String catalogName, java.lang.String prefix)
      Retrieves the OMRS TypeDef name that is mapped to the provided Catalog TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping.
      java.util.Map<java.lang.String,​java.lang.String> getMappedOMRSTypeDefNameWithPrefixes​(java.lang.String catalogName)
      Retrieves the OMRS TypeDef name that is mapped to the provided Catalog TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping.
      java.util.Map<java.lang.String,​java.lang.String> getPropertyMappingsForCatalogTypeDef​(java.lang.String catalogName, java.lang.String prefix)
      Retrieves a map from Catalog property name to OMRS property name for the provided Catalog TypeDef name, or null if there are no mappings (or no properties).
      java.util.Map<java.lang.String,​java.lang.String> getPropertyMappingsForOMRSTypeDef​(java.lang.String omrsName, java.lang.String prefix)
      Retrieves a map from OMRS property name to Catalog property name for the provided OMRS TypeDef name, or null if there are no mappings (or no properties).
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByGUID​(java.lang.String guid)
      Retrieves an implemented TypeDef by its GUID.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByGUID​(java.lang.String guid, boolean warnIfNotFound)
      Retrieves an implemented TypeDef by its GUID.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName​(java.lang.String name)
      Retrieves an implemented TypeDef by its name.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByPrefix​(java.lang.String prefix)
      Retrieves the OMRS TypeDef that is mapped to the provided prefix, or null if there is no mapping.
      org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getUnimplementedTypeDefByGUID​(java.lang.String guid)
      Retrieves an unimplemented TypeDef by its GUID.
      boolean isReserved​(java.lang.String omrsName)
      Indicates whether the provided OMRS TypeDef is reserved for later mapping (and therefore should not be created).
      boolean isSuperTypeOfMappedType​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)  
      boolean isTypeDefMapped​(java.lang.String omrsName)
      Indicates whether the provided OMRS TypeDef is mapped to a Catalog TypeDef.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeDefStore

        public TypeDefStore()
    • Method Detail

      • isTypeDefMapped

        public boolean isTypeDefMapped​(java.lang.String omrsName)
        Indicates whether the provided OMRS TypeDef is mapped to a Catalog TypeDef.
        Parameters:
        omrsName - name of the OMRS TypeDef
        Returns:
        boolean
      • isReserved

        public boolean isReserved​(java.lang.String omrsName)
        Indicates whether the provided OMRS TypeDef is reserved for later mapping (and therefore should not be created).
        Parameters:
        omrsName - name of the OMRS TypeDef
        Returns:
        boolean
      • getPropertyMappingsForCatalogTypeDef

        public java.util.Map<java.lang.String,​java.lang.String> getPropertyMappingsForCatalogTypeDef​(java.lang.String catalogName,
                                                                                                           java.lang.String prefix)
        Retrieves a map from Catalog property name to OMRS property name for the provided Catalog TypeDef name, or null if there are no mappings (or no properties).
        Parameters:
        catalogName - the name of the Catalog TypeDef
        prefix - the prefix (if any) when mappings to multiple types exist
        Returns:
        Map<String, String>
      • getPropertyMappingsForOMRSTypeDef

        public java.util.Map<java.lang.String,​java.lang.String> getPropertyMappingsForOMRSTypeDef​(java.lang.String omrsName,
                                                                                                        java.lang.String prefix)
        Retrieves a map from OMRS property name to Catalog property name for the provided OMRS TypeDef name, or null if there are no mappings (or no properties).
        Parameters:
        omrsName - the name of the OMRS TypeDef
        prefix - the prefix (if any) when mappings to multiple types exist
        Returns:
        Map<String, String>
      • getEndpointMappingFromCatalogName

        public TypeDefStore.EndpointMapping getEndpointMappingFromCatalogName​(java.lang.String catalogTypeName,
                                                                              java.lang.String relationshipPrefix)
        Retrieve the relationship endpoint mapping from the Catalog details provided.
        Parameters:
        catalogTypeName - the name of the Catalog type definition
        relationshipPrefix - the prefix used for the relationship, if it is a generated relationship (null if not generated)
        Returns:
        EndpointMapping
      • getAllEndpointMappingsFromCatalogName

        public java.util.Map<java.lang.String,​TypeDefStore.EndpointMapping> getAllEndpointMappingsFromCatalogName​(java.lang.String catalogTypeName)
        Retrieve all endpoint mappings (relationships) that are mapped for the provided Catalog type.
        Parameters:
        catalogTypeName - the name of the Catalog type definition
        Returns:
        Map<String, EndpointMapping>
      • getAllMappedCatalogTypeDefNames

        public java.util.Map<java.lang.String,​java.lang.String> getAllMappedCatalogTypeDefNames​(java.lang.String omrsName)
        Retrieves all of the Catalog TypeDef names that are mapped to the provided OMRS TypeDef name, or null if there is no mapping. The map returned will be keyed by prefix, and values will be the mapped Catalog TypeDef name for that prefix.
        Parameters:
        omrsName - the name of the OMRS TypeDef
        Returns:
        Map<String, String>
      • getMappedCatalogTypeDefName

        public java.lang.String getMappedCatalogTypeDefName​(java.lang.String omrsName,
                                                            java.lang.String prefix)
        Retrieves the Catalog TypeDef name that is mapped to the provided OMRS TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping.
        Parameters:
        omrsName - the name of the OMRS TypeDef
        prefix - the prefix (if any) when mappings to multiple types exist
        Returns:
        String
      • getTypeDefByPrefix

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByPrefix​(java.lang.String prefix)
        Retrieves the OMRS TypeDef that is mapped to the provided prefix, or null if there is no mapping.
        Parameters:
        prefix - the prefix for the OMRS type to retrieve
        Returns:
        TypeDef
      • getAllMappedOMRSTypeDefNames

        public java.util.Map<java.lang.String,​java.lang.String> getAllMappedOMRSTypeDefNames​(java.lang.String catalogName)
        Retrieves all of the OMRS TypeDef names that are mapped to the provided OMRS TypeDef name, or null if there is no mapping. The map returned will be keyed by prefix, and values will be the mapped OMRS TypeDef name for that prefix.
        Parameters:
        catalogName - the name of the Catalog TypeDef
        Returns:
        Map<String, String>
      • getMappedOMRSTypeDefName

        public java.lang.String getMappedOMRSTypeDefName​(java.lang.String catalogName,
                                                         java.lang.String prefix)
        Retrieves the OMRS TypeDef name that is mapped to the provided Catalog TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping.
        Parameters:
        catalogName - the name of the Catalog TypeDef
        prefix - the prefix (if any) when mappings to multiple types exist
        Returns:
        String
      • getMappedOMRSTypeDefNameWithPrefixes

        public java.util.Map<java.lang.String,​java.lang.String> getMappedOMRSTypeDefNameWithPrefixes​(java.lang.String catalogName)
        Retrieves the OMRS TypeDef name that is mapped to the provided Catalog TypeDef name, the same name if there is a one-to-one mapping between Catalog and OMRS TypeDefs, or null if there is no mapping. The result is a mapping of prefix to OMRS type.
        Parameters:
        catalogName - the name of the Catalog TypeDef
        Returns:
        Map<String, String>
      • addTypeDef

        public void addTypeDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
        Adds the provided TypeDef to the list of those that are implemented in the repository.
        Parameters:
        typeDef - an implemented type definition
      • isSuperTypeOfMappedType

        public boolean isSuperTypeOfMappedType​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
      • addUnimplementedTypeDef

        public void addUnimplementedTypeDef​(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
        Adds the provided TypeDef to the list of those that are not implemented in the repository. (Still needed for tracking and inheritance.)
        Parameters:
        typeDef - an unimplemented type definition
      • getUnimplementedTypeDefByGUID

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getUnimplementedTypeDefByGUID​(java.lang.String guid)
        Retrieves an unimplemented TypeDef by its GUID.
        Parameters:
        guid - of the type definition
        Returns:
        TypeDef
      • getTypeDefByGUID

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByGUID​(java.lang.String guid)
        Retrieves an implemented TypeDef by its GUID.
        Parameters:
        guid - of the type definition
        Returns:
        TypeDef
      • getTypeDefByGUID

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByGUID​(java.lang.String guid,
                                                                                                                                               boolean warnIfNotFound)
        Retrieves an implemented TypeDef by its GUID.
        Parameters:
        guid - of the type definition
        warnIfNotFound - whether to log a warning if GUID is not known (true) or not (false).
        Returns:
        TypeDef
      • getTypeDefByName

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName​(java.lang.String name)
        Retrieves an implemented TypeDef by its name.
        Parameters:
        name - of the type definition
        Returns:
        TypeDef
      • getAllTypeDefAttributesForName

        public java.util.Map<java.lang.String,​org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute> getAllTypeDefAttributesForName​(java.lang.String name)
        Retrieves a map from attribute name to attribute definition for all attributes of the specified type definition, including all of its supertypes' attributes.
        Parameters:
        name - of the type definition
        Returns:
        Map<String, TypeDefAttribute>
      • getAllTypeDefs

        public java.util.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef> getAllTypeDefs()
        Retrieves a listing of all of the implemented type definitions for this repository.
        Returns:
        List<TypeDef>