Class DefaultAtlasMappingBuilder

  • All Implemented Interfaces:
    io.atlasmap.api.AtlasMappingBuilder

    public abstract class DefaultAtlasMappingBuilder
    extends Object
    implements io.atlasmap.api.AtlasMappingBuilder
    A base AtlasMappingBuilder with some common utility methods. In most cases user can extend this class and just implement processMapping().
    See Also:
    AtlasField
    • Constructor Detail

      • DefaultAtlasMappingBuilder

        public DefaultAtlasMappingBuilder()
    • Method Detail

      • read

        public AtlasField read​(String docId,
                               String path)
                        throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • readConstant

        public AtlasField readConstant​(String name)
                                throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • readProperty

        public AtlasField readProperty​(String scope,
                                       String name)
                                throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • write

        public void write​(String docId,
                          String path,
                          Object value)
                   throws io.atlasmap.api.AtlasException
        Throws:
        io.atlasmap.api.AtlasException
      • process

        public void process()
        Specified by:
        process in interface io.atlasmap.api.AtlasMappingBuilder
      • processMapping

        public abstract void processMapping()
                                     throws Exception
        Define custom mapping logic. User can extend this class and implement custom mapping logic in this method. The thrown Exception will be catched in process() and added as an Audit.
        Throws:
        Exception - Indicate mapping error to be recorded as an Audit
      • setAtlasSession

        public void setAtlasSession​(io.atlasmap.api.AtlasSession session)
                             throws io.atlasmap.api.AtlasException
        Specified by:
        setAtlasSession in interface io.atlasmap.api.AtlasMappingBuilder
        Throws:
        io.atlasmap.api.AtlasException
      • getAtlasSession

        public io.atlasmap.api.AtlasSession getAtlasSession()
        Get DefaultAtlasSession.
        Returns:
        AtlasSession.
      • addAudit

        public void addAudit​(Exception e)