Returns the Solr configuration (object representation of <code>'solrconfig.xml'</code>).<p>

@return the Solr configuration
558482
public SolrConfig getSolrConfig() {

        if (m_solrConfig == null) {
            try (FileInputStream fis = new FileInputStream(getSolrConfigFile())) {
                m_solrConfig = new SolrConfig(
                    Paths.get(getHome(), DEFAULT_CONFIGSET_FOLDER),
                    null,
                    new InputSource(fis));
            } catch (FileNotFoundException e) {
                CmsConfigurationException ex = new CmsConfigurationException(
                    Messages.get().container(Messages.LOG_SOLR_ERR_CONFIG_XML_NOT_FOUND_1, getSolrConfigFile()),
                    e);
                LOG.error(ex.getLocalizedMessage(), ex);
            } catch (Exception e) {
                CmsConfigurationException ex = new CmsConfigurationException(
                    Messages.get().container(Messages.LOG_SOLR_ERR_CONFIG_XML_NOT_READABLE_1, getSolrConfigFile()),
                    e);
                LOG.error(ex.getLocalizedMessage(), ex);
            }
        }
        return m_solrConfig;
    }
481150
public final BeanConfig getConfig() {
    if (null == config) {
      config = new BeanConfig(getClass().getName());
      doBinding();
    }
    return config;
  }
734118
protected CmsXmlContent getConfigurationContent() {

        if (m_configurationContent == null) {
            String configFileName = getConfigurationVfsPath();
            if (getCms().existsResource(configFileName)) {
                // configuration file found, check VFS cache for unmarshalled content
                CmsVfsMemoryObjectCache vfsCache = CmsVfsMemoryObjectCache.getVfsMemoryObjectCache();
                m_configurationContent = (CmsXmlContent)vfsCache.getCachedObject(getCms(), configFileName);
                if (m_configurationContent == null) {
                    // content not found in cache, read the file and unmarshal it
                    try {
                        CmsFile configFile = getCms().readFile(configFileName);
                        CmsXmlContent content = CmsXmlContentFactory.unmarshal(getCms(), configFile);
                        // put the result content in the cache
                        vfsCache.putCachedObject(getCms(), configFileName, content);
                        m_configurationContent = content;
                    } catch (CmsException e) {
                        // should never happen, because we checked the resource existence before
                    }
                }
            }
        }
        return m_configurationContent;
    }
547517
public function get_solr_major_version() {
        if ($this->solrmajorversion !== null) {
            return $this->solrmajorversion;
        }

        // We should really ping first the server to see if the specified indexname is valid but
        // we want to minimise solr server requests as they are expensive. system() emits a warning
        // if it can not connect to the configured index in the configured server.
        $systemdata = @$this->get_search_client()->system();
        $solrversion = $systemdata->getResponse()->offsetGet('lucene')->offsetGet('solr-spec-version');
        $this->solrmajorversion = intval(substr($solrversion, 0, strpos($solrversion, '.')));

        return $this->solrmajorversion;
    }
320315
public String getHome() {

        if (m_homeFolderPath == null) {
            if (CmsStringUtil.isNotEmpty(System.getProperty(SOLR_HOME_PROPERTY))) {
                m_home = System.getProperty(SOLR_HOME_PROPERTY);
            } else {
                m_home = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(SOLR_HOME_DEFAULT);
            }
            m_home = (m_home.endsWith(File.separator)
            ? m_home.substring(0, m_home.lastIndexOf(File.separator))
            : m_home);
        } else {
            m_home = m_homeFolderPath;
        }
        return m_home;
    }
956129
private JSONObject getNodeConfig() {
    JSONObject res = new JSONObject();
    try {
      res.put("class", "org.openqa.grid.common.RegistrationRequest");
      res.put("configuration", getConfiguration());
      JSONArray caps = new JSONArray();
      JSONArray devices = driver.getSupportedDevices();
      for (int i = 0; i < devices.length(); i++) {
        JSONObject device = (JSONObject) devices.get(i);
        for (int x = 0; x < driver.getSupportedApps().length(); x++) {
          caps.put(getDeviceConfig(device, driver.getSupportedApps().getJSONObject(x)));
        }
      }
      res.put("capabilities", caps);
    } catch (JSONException e) {
      throw new SelendroidException(e.getMessage(), e);
    }
    return res;
  }
1202436
private String getSchema() {
        if (Utils.isEmpty(m_config.schema)) {
            m_config.schema = m_config.root + m_config.app + ".xml";
        }
        File schemaFile = new File(m_config.schema);
        if (!schemaFile.exists()) {
            logErrorThrow("Schema file not found: {}", m_config.schema);
        }
        StringBuilder schemaBuffer = new StringBuilder();
        char[] charBuffer = new char[65536];
        try (FileReader reader = new FileReader(schemaFile)) {
            for (int bytesRead = reader.read(charBuffer); bytesRead > 0; bytesRead = reader.read(charBuffer)) {
                schemaBuffer.append(charBuffer, 0, bytesRead);
            }
        } catch (Exception e) {
            logErrorThrow("Cannot read schema file '{}': {}", m_config.schema, e);
        }
        return schemaBuffer.toString();
    }
1191149
public static Map<String,String> getSystemConfiguration()
    {
        if(LibraryConfigurationLoader.systemConfiguration==null)
        {
            synchronized(LibraryConfigurationLoader.class)
            {
                if(LibraryConfigurationLoader.systemConfiguration==null)
                {
                    //read properties
                    Properties properties=LibraryConfigurationLoader.readInternalAndExternalConfiguration();

                    //convert to map
                    Map<String,String> map=new HashMap<String,String>(properties.size());
                    SpiUtil.copyPropertiesToMap(properties,map);

                    //normalize map
                    map=new HashMap<String,String>(map);
                    
                    //prevent changes
                    map=Collections.unmodifiableMap(map);

                    //set instance
                    LibraryConfigurationLoader.systemConfiguration=map;
                }
            }
        }
        
        return LibraryConfigurationLoader.systemConfiguration;
    }
816989
public final JsMEConfig getMeConfig() {

        String thisMethodName = "getMeConfig";

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, thisMethodName, this);
            SibTr.exit(tc, thisMethodName, _me);
        }

        return _me;
    }
1359171
private List<CmsSelectWidgetOption> getFieldConfigurationWidgetConfiguration() {

        List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>();
        if (getSearchIndexIndex() instanceof CmsSolrIndex) {
            List<CmsSolrFieldConfiguration> fieldConfigurations = m_searchManager.getFieldConfigurationsSolr();
            for (CmsSearchFieldConfiguration config : fieldConfigurations) {
                CmsSelectWidgetOption option = new CmsSelectWidgetOption(
                    config.getName(),
                    (config.getName()).equals(CmsSearchFieldConfiguration.STR_STANDARD));
                result.add(option);
            }
        } else {
            List<CmsLuceneFieldConfiguration> fieldConfigurations = m_searchManager.getFieldConfigurationsLucene();
            for (CmsSearchFieldConfiguration config : fieldConfigurations) {
                CmsSelectWidgetOption option = new CmsSelectWidgetOption(
                    config.getName(),
                    (config.getName()).equals(CmsSearchFieldConfiguration.STR_STANDARD));
                result.add(option);
            }
        }
        return result;
    }
1193877
public static Document getPluginConfiguration() {
        try (final InputStream in = Plugins.class.getClassLoader().getResourceAsStream(PLUGIN_CONF)) {
            return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
        } catch (final ParserConfigurationException | SAXException | IOException e) {
            throw new RuntimeException("Failed to read plugin configuration: " + e.getMessage(), e);
        }
    }
234313
public SimpleConfiguration getClientConfiguration() {
    SimpleConfiguration clientConfig = new SimpleConfiguration();
    Iterator<String> iter = getKeys();
    while (iter.hasNext()) {
      String key = iter.next();
      if (key.startsWith(CONNECTION_PREFIX) || key.startsWith(ACCUMULO_PREFIX)
          || key.startsWith(CLIENT_PREFIX)) {
        clientConfig.setProperty(key, getRawString(key));
      }
    }
    return clientConfig;
  }
334985
public List<LoginConfigType<WebFragmentDescriptor>> getAllLoginConfig()
   {
      List<LoginConfigType<WebFragmentDescriptor>> list = new ArrayList<LoginConfigType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("login-config");
      for(Node node: nodeList)
      {
         LoginConfigType<WebFragmentDescriptor>  type = new LoginConfigTypeImpl<WebFragmentDescriptor>(this, "login-config", model, node);
         list.add(type);
      }
      return list;
   }
1272028
public Document generate() throws ParserConfigurationException {
        final DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
        docFactory.setNamespaceAware(true);
        final DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
        this.doc = docBuilder.newDocument();
        doc.setXmlStandalone(true);

        // Create root <bom> node
        final Element bomNode = createRootElement("bom", null,
                new Attribute("xmlns", NS_BOM_11),
                new Attribute("version", String.valueOf(bom.getVersion())));
        if (bom.getSerialNumber() != null) {
            bomNode.setAttribute("serialNumber", bom.getSerialNumber());
        }

        final Element componentsNode = createElement(bomNode, "components");
        createComponentsNode(componentsNode, bom.getComponents());
        createExternalReferencesNode(bomNode, bom.getExternalReferences());
        return doc;
    }
415029
public Document toXML()
	{
		Element sparql = new Element("sparql");
		sparql.setNamespace(Namespace.getNamespace("http://www.w3.org/2005/sparql-results#"));
		
		// generate head
		Element head = new Element("head");
		if(!bindings.isEmpty()) {
			QueryBinding top = bindings.get(0);
			for(QueryArgument arg : top.getBoundArgs()) {
				if(arg.isVar()) {
					Element var = new Element("variable");
					var.setAttribute("name", arg.getValueAsString());
					head.addContent(var);
				}
			}
		}
		sparql.addContent(head);
		
		if(query.isAsk()) {
			Element booleanElement = new Element("boolean");
			if(ask) {
				booleanElement.setText("true");
			}
			else {
				booleanElement.setText("false");
			}
			sparql.addContent(booleanElement);
		}
		else {
			// otherwise generate results
			Element results = new Element("results");
			for(QueryBinding binding : bindings) {
				Element result = new Element("result");
				for(QueryArgument key : binding.getBoundArgs()) {
					if(key.isVar()) {
						Element b = new Element("binding");
						b.setAttribute("name", key.getValueAsString());
						QueryArgument value = binding.get(key);
						switch(value.getType()) {
						case URI:
							Element uri = new Element("uri");
							uri.setText(value.getValueAsIRI().toString());
							b.addContent(uri);
							break;
						case LITERAL:
							Element literal = new Element("literal");
							literal.setText(value.getValueAsLiteral().getLiteral());
							b.addContent(literal);
							break;
						case BNODE:
							Element bnode = new Element("bnode");
							bnode.setText(value.getValueAsBNode().getID().toString());
							b.addContent(bnode);
							break;
						default:
						}
						result.addContent(b);
					}
				}
				results.addContent(result);
			}
			sparql.addContent(results);
		}
		
		return new Document(sparql);
	}
1154896
@Override
    public CmsParameterConfiguration getConfiguration() {

        CmsParameterConfiguration result = new CmsParameterConfiguration();
        CmsParameterConfiguration config = super.getConfiguration();
        if (config != null) {
            result.putAll(config);
        }
        result.put(CONFIGURATION_REQUEST_PARAM_SUPPORT_ENABLED, String.valueOf(m_requestParamSupportEnabled));
        return result;
    }
630957
public File getSolrSchemaFile() {

        final String dir = getHome() + DEFAULT_CONFIGSET_FOLDER + CONF_FOLDER;
        //SOLR7 Schema took a new name, also removed the file extension.
        File file = new File(dir, "managed-schema");
        if (file.exists()) {
            return file;
        }

        //If use the old Schema.xml, it will automatically "upgrade" to a new filename.
        file = new File(dir, IndexSchema.DEFAULT_SCHEMA_FILE);
        return file;
    }