Initializes the index with required templates and mappings.
358567
private void initIndex() throws Exception {

        // 0. Add the tasklog template
        GetIndexTemplatesResponse result = elasticSearchClient.admin()
            .indices()
            .prepareGetTemplates("tasklog_template")
            .execute()
            .actionGet();

        if (result.getIndexTemplates().isEmpty()) {
            logger.info("Creating the index template 'tasklog_template'");
            InputStream stream = ElasticSearchDAOV5.class
                .getResourceAsStream("/template_tasklog.json");
            byte[] templateSource = IOUtils.toByteArray(stream);

            try {
                elasticSearchClient.admin()
                    .indices()
                    .preparePutTemplate("tasklog_template")
                    .setSource(templateSource, XContentType.JSON)
                    .execute()
                    .actionGet();
            } catch (Exception e) {
                logger.error("Failed to init tasklog_template", e);
            }
        }
    }
1365415
public void init() {
        surnameIndex.clear();

        final RootVisitor visitor = new RootVisitor();
        mRoot.accept(visitor);
        for (final Person person : visitor.getPersons()) {
            final String key = person.getString();
            // Surname for inclusion in the index.
            // This is the string by which the person will be indexed.
            final String indexName = person.getIndexName();

            if (!indexName.isEmpty()) {
                final SortedMap<String, SortedSet<String>> names =
                        findNamesPerSurname(person.getSurname());
                final SortedSet<String> ids = findIdsPerName(indexName, names);
                ids.add(key);
            }
        }
    }
1025617
private void init() throws IndexerException {
		if (!loaded) {
			loaded = true;

			String storageType = config.getString(null, "storage", "type");
			try {
				storage = PluginManager.getStorage(storageType);
				storage.init(config.toString());
			} catch (PluginException pe) {
				throw new IndexerException(pe);
			}

			// Credentials
			usernameMap = new HashMap<String, String>();
			passwordMap = new HashMap<String, String>();

			solr = initCore("solr");
			anotar = initCore("anotar");

			// initialise non-hardcoded indexers
			solrServerMap = new HashMap<String, SolrServer>();
			JsonObject indexerConfig = config.getObject("indexer");

			List<String> hardcodedValues = Arrays.asList("type", "properties", "useCache", "buffer", "solr", "anotar");
			for (Object key : indexerConfig.keySet()) {
				if (key instanceof String) {
					String keyString = (String) key;
					if (!hardcodedValues.contains(keyString)) {
						solrServerMap.put(keyString, initCore(keyString));
					}
				}
			}

			anotarAutoCommit = config.getBoolean(true, "indexer", "anotar", "autocommit");
			propertiesId = config.getString(DEFAULT_METADATA_PAYLOAD, "indexer", "propertiesId");

			customParams = new HashMap<String, String>();

			// Caching
			scriptCache = new HashMap<String, PyObject>();
			groovyScriptCache = new HashMap<String, String>();
			configCache = new HashMap<String, JsonSimpleConfig>();
			useCache = config.getBoolean(true, "indexer", "useCache");

		}
		loaded = true;
	}
1328904
private void init(){
	
		if(!Annotation.isInheritedMapped(configuredClass))
			Error.classNotMapped(configuredClass);
		
		for (Class<?> classe :getClasses()){
			relationalManyToOneMapper.put(classe.getName(), new JMapper(configuredClass, classe,ChooseConfig.DESTINATION));
			relationalOneToManyMapper.put(classe.getName(), new JMapper(classe, configuredClass,ChooseConfig.SOURCE));
		}
	}
1115797
def update_indexes_after(start_index)
      size = @templates.size
      if size > 0
        start_index.upto(size - 1) do |index|
          @templates[index].context.locals[:_index=].call(index)
        end
      end
    end
719987
private void initialize() {

		domainIds.addAll(getResourceIds("rdfs:domain"));
		rangeIds.addAll(getResourceIds("rdfs:range"));

		allowsInstances     = "true".equals(getValue(getFirstElement(getElement(), "krdf:allowsInstances")));
		multipleOccurrences = "true".equals(getValue(getFirstElement(getElement(), "krdf:multipleOccurrences")));
		isMixedIn           = "true".equals(getValue(getFirstElement(getElement(), "krdf:isMixedIn")));
		oneWay              = "true".equals(getValue(getFirstElement(getElement(), "krdf:oneWay")));
		icon                = getValue(getFirstElement(getElement(), "krdf:icon"));

		final Object isPrimaryValue = getValue(getFirstElement(getElement(), "krdf:primary"));
		if (isPrimaryValue == null || "true".equals(isPrimaryValue)) {

			primary = true;
		}


		final Node node = getFirstElement(getElement(), "owl:inverseOf");
		if (node != null) {

			final String inverse = getResourceId(node);
			if (inverse != null) {

				this.inverseId = URI.create(inverse);
			}
		}

	}
988928
void initResultIndex() {

        int startIndex = 0;
        if ((m_pageIndex > 0) && (m_pageSize > 0)) {
            startIndex = (m_pageIndex - 1) * m_pageSize;
        }

        m_resultIndex = startIndex > m_resultSize ? m_resultSize : startIndex;
    }
1318438
protected function init()
    {
        if (null === $this->items) {
            list($constraints, $sorting, $joins) = $this->translate($this->filter, $this->sorting);

            if (empty($constraints)) {
                $constraints = '';
            } else {
                $constraints = ' WHERE ' . implode(' AND ', $constraints);
            }

            if ($this->prefetch) {
                $this->initEntities($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            } else {
                $this->initKeys($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            }

            $this->rewind();
        }
    }
285795
protected function initIndexesInfo()
    {
        $this->_indexNames = [];
        $this->_indexTypes = [];
        $indexes = $this->findIndexes();
        foreach ($indexes as $index) {
            $indexName = $index['Index'];
            $this->_indexNames[] = $indexName;
            $this->_indexTypes[$indexName] = $index['Type'];
        }
    }
424766
static void initialize() {
        if (INITIALIZED.getAndSet(true)) {
            throw new IllegalStateException("Already initialized");
        }
        // Set the default initializer if none has been provided yet.
        INITIALIZER.compareAndSet(null, new ServiceLoaderZoneRulesInitializer());
        INITIALIZER.get().initializeProviders();
    }
1322640
@PostConstruct
  public void initialize() {

    if (this.initialized) {
      return;
    }
    LOG.debug("Initializing.");
    if (this.accessControlSchemaMapper == null) {
      this.accessControlSchemaMapper = new AccessControlSchemaXmlMapper();
    }
    if (this.accessControlSchema == null) {

      this.accessControlSchema = new ClassPathResource("config/app/security/access-control-schema.xml");
    }
    this.initialized = true;
  }
685147
private function loadIndexes(): void
    {
        if (null !== $this->gsi) {
            return;
        }

        $this->gsi = [];
        foreach ($this->getIndexes() as $gsi) {
            $this->gsi[$gsi->getAlias()] = $gsi;
        }
    }
30355
protected function initTemplates()
    {
        foreach ($this->templates as $template => $templatePath) {
            $this->templates[$template] = $this->normalizePath($templatePath);
        }

        if (!isset($this->templates['default'])) {
            $this->templates['default'] = realpath(dirname(__DIR__) . '/../templates/default');
        }
    }
140251
@Override
    protected void initializeImpl()
    {
        //initialize
        super.initializeImpl();
        
        //initialize templates
        this.initializeMailTemplates();

        //get logger
        Logger logger=this.getLogger();

        //validate mail address template
        if(this.mailAddressTemplate==null)
        {
            throw new FaxException("Mail address template not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.MAIL_ADDRESS_TEMPLATE_PROPERTY_KEY);
        }
        logger.logDebug(new Object[]{"Using mail address template: ",this.mailAddressTemplate},null);
        
        //validate mail subject template
        if(this.mailSubjectTemplate==null)
        {
            throw new FaxException("Mail subject template not defined in fax4j.properties. Property: "+FaxClientSpiConfigurationConstants.MAIL_SUBJECT_TEMPLATE_PROPERTY_KEY);
        }
        logger.logDebug(new Object[]{"Using mail subject template: ",this.mailSubjectTemplate},null);
    }
380522
public void init(ObjectMapper objectMapper) {
		if (!initialized) {
			this.initialized = true;
			this.objectMapper = objectMapper;
			this.objectMapper.registerModules(getJacksonModules());

			applyRepositoryRegistration(resourceRegistry);

			for (Module module : modules) {
				if (module instanceof InitializingModule) {
					((InitializingModule) module).init();
				}
			}
		}
	}
1309773
protected void init() {

        m_elementMappings = new HashMap<String, List<String>>();
        m_elementWidgets = new HashMap<String, I_CmsWidget>();
        m_validationErrorRules = new HashMap<String, String>();
        m_validationErrorMessages = new HashMap<String, String>();
        m_validationWarningRules = new HashMap<String, String>();
        m_validationWarningMessages = new HashMap<String, String>();
        m_defaultValues = new HashMap<String, String>();
        m_configurationValues = new HashMap<String, String>();
        m_searchSettings = new HashMap<String, Boolean>();
        m_relations = new HashMap<String, CmsRelationType>();
        m_relationChecks = new HashMap<String, Boolean>();
        m_previewLocation = null;
        m_modelFolder = null;
        m_tabs = new ArrayList<CmsXmlContentTab>();
        m_cssHeadIncludes = new LinkedHashSet<String>();
        m_jsHeadIncludes = new LinkedHashSet<String>();
        m_settings = new LinkedHashMap<String, CmsXmlContentProperty>();
        m_titleMappings = new ArrayList<String>(2);
        m_formatters = new ArrayList<CmsFormatterBean>();
        m_searchFields = new HashMap<String, CmsSearchField>();
        m_searchFieldsPage = new HashMap<String, CmsSearchField>();
        m_allowedTemplates = new CmsDefaultSet<String>();
        m_allowedTemplates.setDefaultMembership(true);
        m_displayTypes = new HashMap<String, DisplayType>();
        m_synchronizations = new ArrayList<String>();
        m_editorChangeHandlers = new ArrayList<I_CmsXmlContentEditorChangeHandler>();
        m_nestedFormatterElements = new HashSet<String>();
        try (
        InputStream stream = CmsDefaultXmlContentHandler.class.getResourceAsStream("simple-searchsetting-configs.st")) {
            m_searchTemplateGroup = CmsStringUtil.readStringTemplateGroup(stream);
        } catch (IOException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
870277
private void initHandlers() {
		mapWidget.getMapModel().getMapView().addMapViewChangedHandler(this);

		mapWidget.getMapModel().runWhenInitialized(new Runnable() {

			public void run() {
				zoomTo();
			}
		});
	}