Add MongoMapper class names to the dispatcher pipeline.
------------------------------------------------------------------------------
961721
def cast_with_mongo_mapper(object, type)
      apply_default_mongo_mapper_options
      cast = cast_without_mongo_mapper(object, type)

      if defined?(::MongoMapper::Document)
        if object.is_a?(Class) && (object.ancestors & [::MongoMapper::Document, ::MongoMapper::EmbeddedDocument]).size > 0
          cast = :mongo_mapper_class
        elsif object.is_a?(::MongoMapper::Document) || object.is_a?(::MongoMapper::EmbeddedDocument)
          cast = :mongo_mapper_instance
        elsif object.is_a?(::MongoMapper::Plugins::Associations::Base)
          cast = :mongo_mapper_association
        elsif object.is_a?(::BSON::ObjectId)
          cast = :mongo_mapper_bson_id
        end
      end

      cast
    end
517420
def build_pipeline(self, collection):
        
        pipeline = []

        if isinstance(collection.where_dict, dict) and collection.where_dict:
            match_dict = {
                "$match": collection.where_dict
            }
            pipeline.append(match_dict)

        group_keys_dict = self.build_mongo_doc(self.join_keys)
        push_dict = self.build_mongo_doc(collection.select_keys)

        group_by_dict = {
            "$group":
                {
                    "_id": group_keys_dict,
                    "docs": {
                        "$push": push_dict
                    }
                }
        }

        pipeline.append(group_by_dict)

        return pipeline
458758
private void registerModulesForCustomFieldDef(ObjectMapper objectMapper) {
		SimpleModule simpleModule = new SimpleModule("CustomFieldDefinition", new Version(1, 0, 0, null));
		simpleModule.addDeserializer(CustomFieldDefinition.class, new CustomFieldDefinitionDeserializer());
		objectMapper.registerModule(simpleModule);
	}
803960
public static void configureMapper(ObjectMapper mapper, Application.Mode mode) {
        mapper.registerModule(new GuavaModule());
        mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
                .enable(SerializationFeature.WRITE_ENUMS_USING_INDEX)
                .enable(MapperFeature.PROPAGATE_TRANSIENT_MARKER)
                .disable(
                        SerializationFeature.WRITE_NULL_MAP_VALUES,
                        SerializationFeature.FAIL_ON_EMPTY_BEANS
                );
        if (!mode.isDev()) {
            mapper.disable(
                    DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
            );
        }
    }
1253063
private static <T extends ObjectMapper> T initializeObjectMapper(T mapper) {
        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
                .configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, true)
                .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
                .configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
                .configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
                .setSerializationInclusion(JsonInclude.Include.NON_NULL)
                .registerModule(new JavaTimeModule())
                .registerModule(ByteArraySerializer.getModule())
                .registerModule(Base64UrlSerializer.getModule())
                .registerModule(DateTimeSerializer.getModule())
                .registerModule(DateTimeRfc1123Serializer.getModule())
                .registerModule(DurationSerializer.getModule());
        mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
                .withFieldVisibility(JsonAutoDetect.Visibility.ANY)
                .withSetterVisibility(JsonAutoDetect.Visibility.NONE)
                .withGetterVisibility(JsonAutoDetect.Visibility.NONE)
                .withIsGetterVisibility(JsonAutoDetect.Visibility.NONE));
        return mapper;
    }
880121
def contribute_to_class(self, cls, name):
        '''
        
        '''
        super(BungiesearchManager, self).contribute_to_class(cls, name)

        from . import Bungiesearch
        from .signals import get_signal_processor
        settings = Bungiesearch.BUNGIE
        if 'SIGNALS' in settings:
            self.signal_processor = get_signal_processor()
            self.signal_processor.setup(self.model)
927500
function fromRawMappings(modules: Array<ModuleTransport>): Generator {
  const generator = new Generator();
  let carryOver = 0;

  for (var j = 0, o = modules.length; j < o; ++j) {
    var module = modules[j];
    var {code, map} = module;

    if (Array.isArray(map)) {
      addMappingsForFile(generator, map, module, carryOver);
    } else if (map != null) {
      throw new Error(
        `Unexpected module with full source map found: ${module.sourcePath}`
      );
    }

    carryOver = carryOver + countLines(code);
  }

  return generator;
}
177283
private static void addDescriptorsToList(final List<FeatureDescriptor> descriptorList,
                                             final Map<String, Object> scopeMap)
    {
        for (Object name : scopeMap.keySet())
        {
            String strName = (String)name;
            Class<?> runtimeType = scopeMap.get(strName).getClass();
            descriptorList.add(makeDescriptor(strName, runtimeType));
        }
    }
901895
def get_pipeline_names():
  """"""
  class_path_set = set()
  for cls in _PipelineMeta._all_classes:
      if cls.class_path is not None:
        class_path_set.add(cls.class_path)
  return sorted(class_path_set)
1214929
private void mapArrayCollectionToVertex(ITypedInstance typedInstance, AtlasVertex instanceVertex,
                                            AttributeInfo attributeInfo, Operation operation) throws AtlasException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Mapping instance {} for array attribute {} vertex {}", typedInstance.toShortString(),
                    attributeInfo.name, string(instanceVertex));
        }

        List newElements = (List) typedInstance.get(attributeInfo.name);
        boolean newAttributeEmpty = (newElements == null || newElements.isEmpty());

        IDataType elementType = ((DataTypes.ArrayType) attributeInfo.dataType()).getElemType();
        String propertyName = GraphHelper.getQualifiedFieldName(typedInstance, attributeInfo);

        List<Object> currentElements = GraphHelper.getArrayElementsProperty(elementType, instanceVertex, propertyName);

        List<Object> newElementsCreated = new ArrayList<>();

        if (!newAttributeEmpty) {
            int index = 0;
            for (; index < newElements.size(); index++) {
                Object currentElement = (currentElements != null && index < currentElements.size()) ?
                        currentElements.get(index) : null;
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Adding/updating element at position {}, current element {}, new element {}", index,
                            currentElement, newElements.get(index));
                }

                Object newEntry = addOrUpdateCollectionEntry(instanceVertex, attributeInfo, elementType,
                        newElements.get(index), currentElement, propertyName, operation);
                newElementsCreated.add(newEntry);
            }
        }

        if(GraphHelper.isReference(elementType)) {
            if (attributeInfo.reverseAttributeName != null && newElementsCreated.size() > 0) {
                // Set/add the new reference value(s) on the reverse reference.
                for (Object newElement : newElementsCreated) {
                    if ((newElement instanceof AtlasEdge)) {
                        AtlasEdge newEdge = (AtlasEdge) newElement;
                        addReverseReference(instanceVertex, attributeInfo.reverseAttributeName, newEdge);
                    }
                    else {
                        throw new AtlasException("Invalid array element type " + newElement.getClass().getName() + " - expected " + AtlasEdge.class.getName() +
                            " for reference " + GraphHelper.getQualifiedFieldName(typedInstance, attributeInfo) + " on vertex " + GraphHelper.getVertexDetails(instanceVertex));
                    }
                }
            }

            List<AtlasEdge> additionalEdges = removeUnusedEntries(instanceVertex, propertyName, (List)currentElements,
                    (List)newElementsCreated, elementType, attributeInfo);
            newElementsCreated.addAll(additionalEdges);
        }

        // for dereference on way out
        GraphHelper.setArrayElementsProperty(elementType, instanceVertex, propertyName, newElementsCreated);
    }
152298
def create_handlers_map():
  
  pipeline_handlers_map = []

  if pipeline:
    pipeline_handlers_map = pipeline.create_handlers_map(prefix=".*/pipeline")

  return pipeline_handlers_map + [
      # Task queue handlers.
      # Always suffix by mapreduce_id or shard_id for log analysis purposes.
      # mapreduce_id or shard_id also presents in headers or payload.
      (r".*/worker_callback.*", handlers.MapperWorkerCallbackHandler),
      (r".*/controller_callback.*", handlers.ControllerCallbackHandler),
      (r".*/kickoffjob_callback.*", handlers.KickOffJobHandler),
      (r".*/finalizejob_callback.*", handlers.FinalizeJobHandler),

      # RPC requests with JSON responses
      # All JSON handlers should have /command/ prefix.
      (r".*/command/start_job", handlers.StartJobHandler),
      (r".*/command/cleanup_job", handlers.CleanUpJobHandler),
      (r".*/command/abort_job", handlers.AbortJobHandler),
      (r".*/command/list_configs", status.ListConfigsHandler),
      (r".*/command/list_jobs", status.ListJobsHandler),
      (r".*/command/get_job_detail", status.GetJobDetailHandler),

      # UI static files
      (STATIC_RE, status.ResourceHandler),

      # Redirect non-file URLs that do not end in status/detail to status page.
      (r".*", RedirectHandler),
      ]
65452
public void addCollectionDescriptor(CollectionDescriptor cod)
    {
        m_CollectionDescriptors.add(cod);
        cod.setClassDescriptor(this); // BRJ

        m_collectionDescriptorNameMap = null;
    }
460442
public void init(ObjectMapper objectMapper) {
        if (resultFactory == null) {
            resultFactory = new ImmediateResultFactory();
        }
        PreconditionUtil.verifyEquals(InitializedState.NOT_INITIALIZED, initializedState, "already initialized");
        this.initializedState = InitializedState.INITIALIZING;
        this.objectMapper = objectMapper;
        this.objectMapper.registerModules(getJacksonModules());
        typeParser.setObjectMapper(objectMapper);

        initializeModules();

        if (isServer) {
            applyRepositoryRegistrations();
            applyResourceRegistrations();
        }

        ExceptionMapperLookup exceptionMapperLookup = getExceptionMapperLookup();
        ExceptionMapperRegistryBuilder mapperRegistryBuilder = new ExceptionMapperRegistryBuilder();
        exceptionMapperRegistry = mapperRegistryBuilder.build(exceptionMapperLookup);

        filterBehaviorProvider =
                new ResourceFilterDirectoryImpl(aggregatedModule.getResourceFilters(), httpRequestContextProvider,
                        resourceRegistry);
        this.initializedState = InitializedState.INITIALIZED;
    }
490880
private MappedClass addMappedClass(final MappedClass mc, final boolean validate) {
        addConverters(mc);

        if (validate && !mc.isInterface()) {
            mc.validate(this);
        }

        mappedClasses.put(mc.getClazz().getName(), mc);

        Set<MappedClass> mcs = mappedClassesByCollection.get(mc.getCollectionName());
        if (mcs == null) {
            mcs = new CopyOnWriteArraySet<MappedClass>();
            final Set<MappedClass> temp = mappedClassesByCollection.putIfAbsent(mc.getCollectionName(), mcs);
            if (temp != null) {
                mcs = temp;
            }
        }

        mcs.add(mc);

        return mc;
    }
1080453
public static void configure(ObjectMapper objectMapper) {
        /**
         * Model
         */
        objectMapper.addMixIn(AbstractElement.class, AbstractElementMixin.class);
        objectMapper.addMixIn(CanonicalPath.class, CanonicalPathMixin.class);
        objectMapper.addMixIn(Environment.class, EnvironmentMixin.class);
        objectMapper.addMixIn(Feed.class, FeedMixin.class);
        objectMapper.addMixIn(Metric.class, MetricMixin.class);
        objectMapper.addMixIn(MetricType.class, MetricTypeMixin.class);
        objectMapper.addMixIn(MetricDataType.class, MetricDataTypeMixin.class);
        objectMapper.addMixIn(Path.class, CanonicalPathMixin.class);
        objectMapper.addMixIn(Relationship.class, RelationshipMixin.class);
        objectMapper.addMixIn(RelativePath.class, RelativePathMixin.class);
        objectMapper.addMixIn(Resource.class, ResourceMixin.class);
        objectMapper.addMixIn(ResourceType.class, ResourceTypeMixin.class);
        objectMapper.addMixIn(Tenant.class, TenantMixin.class);
        objectMapper.addMixIn(StructuredData.class, StructuredDataMixin.class);
        objectMapper.addMixIn(DataEntity.class, DataEntityMixin.class);
        objectMapper.addMixIn(OperationType.class, OperationTypeMixin.class);
        objectMapper.addMixIn(Entity.Blueprint.class, EntityBlueprintMixin.class);
        objectMapper.addMixIn(InventoryStructure.class, InventoryStructureMixin.class);
        objectMapper.addMixIn(IdentityHash.Tree.class, IdentityHashTreeMixin.class);
        objectMapper.addMixIn(SyncHash.Tree.class, SyncHashTreeMixin.class);
        objectMapper.addMixIn(MetricType.Blueprint.class, MetricTypeBlueprintMixin.class);

        /**
         * Query
         */
        objectMapper.addMixIn(QueryFragment.class, QueryFragmentMixin.class);
        objectMapper.addMixIn(FilterFragment.class, FilterFragmentMixin.class);
        objectMapper.addMixIn(PathFragment.class, PathFragmentMixin.class);

        /**
         * Filter
         */
        objectMapper.addMixIn(Contained.class, ContainedMixin.class);
        objectMapper.addMixIn(Defined.class, DefinedMixin.class);
        objectMapper.addMixIn(Incorporated.class, IncorporatedMixin.class);
        objectMapper.addMixIn(Related.class, RelatedMixin.class);
        objectMapper.addMixIn(RelationWith.class, RelationWithMixin.class);
        objectMapper.addMixIn(RelationWith.Ids.class, RelationWithMixin.IdsMixin.class);
        objectMapper.addMixIn(RelationWith.PropertyValues.class, RelationWithMixin.PropertyValuesMixin.class);
        objectMapper.addMixIn(RelationWith.SourceOrTargetOfType.class,
                RelationWithMixin.SourceOrTargetOfTypeMixin.class);
        objectMapper.addMixIn(RelationWith.SourceOfType.class, RelationWithMixin.SourceOfTypeMixin.class);
        objectMapper.addMixIn(RelationWith.TargetOfType.class, RelationWithMixin.TargetOfTypeMixin.class);
        objectMapper.addMixIn(With.Ids.class, WithMixin.IdsMixin.class);
        objectMapper.addMixIn(With.Types.class, WithMixin.TypesMixin.class);
        objectMapper.addMixIn(With.CanonicalPaths.class, WithMixin.CanonicalPathsMixin.class);
        objectMapper.addMixIn(With.RelativePaths.class, WithMixin.RelativePathsMixin.class);
        objectMapper.addMixIn(With.PropertyValues.class, WithMixin.PropertyValuesMixin.class);
        objectMapper.addMixIn(With.DataValued.class, WithMixin.DataValuedMixin.class);
        objectMapper.addMixIn(With.DataAt.class, WithMixin.DataAtMixin.class);
        objectMapper.addMixIn(With.DataOfTypes.class, WithMixin.DataOfTypesMixin.class);

        objectMapper.addMixIn(NoopFilter.class, NoopFilterMixin.class);
        objectMapper.addMixIn(RecurseFilter.class, RecurseFilterMixin.class);
        objectMapper.addMixIn(SwitchElementType.class, SwitchElementTypeMixin.class);

        /**
         * Paging
         */
        objectMapper.addMixIn(Order.class, OrderMixin.class);
        objectMapper.addMixIn(PageContext.class, PageContextMixin.class);
        objectMapper.addMixIn(Pager.class, PagerMixin.class);
    }
118977
private void addMixInAnnotations( Map<Class, Class> mapMixInAnnotations, JsonMixIns mapperMixIns ) {
        if ( null != mapperMixIns ) {
            for ( JsonMixIn jsonMixIn : mapperMixIns.value() ) {
                JClassType targetType = findClassType( jsonMixIn.target() );
                if ( null == targetType ) {
                    continue;
                }
                specificTypes.add( targetType );
                specificTypes.addAll( Arrays.asList( targetType.getSubtypes() ) );

                mapMixInAnnotations.put( jsonMixIn.target(), jsonMixIn.mixIn() );
            }
        }

        if ( !mapMixInAnnotations.isEmpty() ) {
            for ( Entry<Class, Class> entry : mapMixInAnnotations.entrySet() ) {
                JClassType targetType = findClassType( entry.getKey() );
                if ( null == targetType ) {
                    continue;
                }

                JClassType mixInType = findClassType( entry.getValue() );
                if ( null == mixInType ) {
                    continue;
                }

                mixInAnnotations.put( targetType.getQualifiedSourceName(), mixInType );
            }
        }
    }
399740
public <T> void addMapper(Class<T> clazz, StringMapper<T> mapper) {
		addParser(clazz, mapper);
		mappers.put(clazz, mapper);
	}