Codota Logo
CmsSearchField.getMappings
Code IndexAdd Codota to your IDE (free)

How to use
getMappings
method
in
org.opencms.search.fields.CmsSearchField

Best Java code snippets using org.opencms.search.fields.CmsSearchField.getMappings (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.opencms/org.opencms.workplace.tools.searchindex

  /**
   * Checks the configuration to write.<p>
   *
   * @return true if configuration is valid, otherwise false
   */
  private boolean checkWriteConfiguration() {

    if ((m_fieldconfiguration != null) || m_fieldconfiguration.getFields().isEmpty()) {
      for (CmsSearchField field : m_fieldconfiguration.getFields()) {
        if (field.getMappings().isEmpty()) {
          return false;
        }
      }
      return true;
    }
    return false;
  }
}
origin: org.opencms/opencms-core

for (I_CmsSearchFieldMapping mapping : field.getMappings()) {
  String mapResult = mapping.getStringValue(cms, resource, extractionResult, properties, propertiesSearched);
  if (mapResult != null) {
origin: org.opencms/opencms-solr

/**
 * Removes a search field mapping from the given field.<p>
 * 
 * @param field the field
 * @param mapping mapping to remove from the field
 * 
 * @return true if remove was successful, false if preconditions for removal are ok but the given 
 *         mapping was unknown.
 * 
 * @throws CmsIllegalStateException if the given mapping is the last mapping inside the given field.
 */
public boolean removeSearchFieldMapping(CmsSearchField field, CmsSearchFieldMapping mapping)
throws CmsIllegalStateException {
  if (field.getMappings().size() < 2) {
    throw new CmsIllegalStateException(Messages.get().container(
      Messages.ERR_FIELD_MAPPING_DELETE_2,
      mapping.getType().toString(),
      field.getName()));
  } else {
    if (LOG.isInfoEnabled()) {
      LOG.info(Messages.get().getBundle().key(
        Messages.LOG_REMOVE_FIELD_MAPPING_INDEX_2,
        mapping.toString(),
        field.getName()));
    }
    return field.getMappings().remove(mapping);
  }
}
origin: org.opencms/org.opencms.workplace.tools.searchindex

/**
 * @see org.opencms.workplace.CmsWidgetDialog#actionCommit()
 */
@Override
public void actionCommit() {
  List<Throwable> errors = new ArrayList<Throwable>();
  try {
    // if new create it first
    boolean found = false;
    Iterator<I_CmsSearchFieldMapping> itMappings = m_field.getMappings().iterator();
    while (itMappings.hasNext()) {
      I_CmsSearchFieldMapping curMapping = itMappings.next();
      if (curMapping.getType().toString().equals(m_mapping.getType().toString())
        && (((curMapping.getParam() == null) && (m_mapping.getParam() == null))
          || (curMapping.getParam().equals(m_mapping.getParam())))) {
        found = true;
      }
    }
    if (!found) {
      m_field.addMapping(m_mapping);
    }
    writeConfiguration();
  } catch (Throwable t) {
    errors.add(t);
  }
  // set the list of errors to display when saving failed
  setCommitErrors(errors);
}
origin: org.opencms/opencms-solr

Iterator<CmsSearchFieldMapping> mappings = fieldConfig.getMappings().iterator();
while (mappings.hasNext()) {
origin: org.opencms/org.opencms.workplace.tools.searchindex

Iterator<I_CmsSearchFieldMapping> itMappings = m_field.getMappings().iterator();
while (itMappings.hasNext()) {
  I_CmsSearchFieldMapping curMapping = itMappings.next();
origin: org.opencms/opencms-solr

Iterator mappings = field.getMappings().iterator();
while (mappings.hasNext()) {
  CmsSearchFieldMapping mapping = (CmsSearchFieldMapping)mappings.next();
org.opencms.search.fieldsCmsSearchFieldgetMappings

Javadoc

Returns the mappings for this field.

Popular methods of CmsSearchField

  • getName
    Returns the name of this field in the Lucene search index.
  • addMapping
    Adds a new field mapping to the internal list of mappings.
  • isStored
    Returns true if the content of this field is stored in the Lucene index. Please refer to the Lucene
  • setBoost
    Sets the boost factor for this field from a String value.
  • <init>
  • addUninvertingMappings
    To allow sorting on a field the field must be added to the map given to org.apache.lucene.uninvertin
  • createField
    Creates a Lucene field from the configuration and the provided content. If no valid content is provi
  • getAnalyzer
    Returns the analyzer used for this field.
  • getBoost
    Returns the boost factor of this field. The boost factor is a Lucene function that controls the "imp
  • getDefaultValue
    Returns the default value to use if no content for this field was collected. In case no default is c
  • getDisplayName
    Returns the display name of the field.
  • getDisplayNameForConfiguration
    Returns the displayNameForConfiguration.
  • getDisplayName,
  • getDisplayNameForConfiguration,
  • isCompressed,
  • isDisplayed,
  • isInExcerptAndStored,
  • isIndexed,
  • isTokenizedAndIndexed,
  • setAnalyzer,
  • setCompressed

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now