Tabnine Logo
CmsXmlContent.getValueSequence
Code IndexAdd Tabnine to your IDE (free)

How to use
getValueSequence
method
in
org.opencms.xml.content.CmsXmlContent

Best Java code snippets using org.opencms.xml.content.CmsXmlContent.getValueSequence (Showing top 12 results out of 315)

origin: org.opencms/opencms-core

/** Returns the configured sort options, or the empty list if no such options are configured.
 * @return The configured sort options, or the empty list if no such options are configured.
 */
private List<I_CmsSearchConfigurationSortOption> getSortOptions() {
  final List<I_CmsSearchConfigurationSortOption> options = new ArrayList<I_CmsSearchConfigurationSortOption>();
  final CmsXmlContentValueSequence sortOptions = m_xml.getValueSequence(XML_ELEMENT_SORTOPTIONS, m_locale);
  if (sortOptions == null) {
    return null;
  } else {
    for (int i = 0; i < sortOptions.getElementCount(); i++) {
      final I_CmsSearchConfigurationSortOption option = parseSortOption(
        sortOptions.getValue(i).getPath() + "/");
      if (option != null) {
        options.add(option);
      }
    }
    return options;
  }
}
origin: org.opencms/opencms-core

/**
 * Initialize the key set for an xml bundle.
 */
private void initKeySetForXmlBundle() {
  // consider only available locales
  for (Locale l : m_locales) {
    if (m_xmlBundle.hasLocale(l)) {
      Set<Object> keys = new HashSet<Object>();
      for (I_CmsXmlContentValue msg : m_xmlBundle.getValueSequence("Message", l).getValues()) {
        String msgpath = msg.getPath();
        keys.add(m_xmlBundle.getStringValue(m_cms, msgpath + "/Key", l));
      }
      m_keyset.updateKeySet(null, keys);
    }
  }
}
origin: org.opencms/opencms-core

/**
 * @see org.opencms.jsp.search.config.parser.I_CmsSearchConfigurationParser#parseFieldFacets()
 */
@Override
public Map<String, I_CmsSearchConfigurationFacetField> parseFieldFacets() {
  final Map<String, I_CmsSearchConfigurationFacetField> facetConfigs = new LinkedHashMap<String, I_CmsSearchConfigurationFacetField>();
  final CmsXmlContentValueSequence fieldFacets = m_xml.getValueSequence(XML_ELEMENT_FIELD_FACETS, m_locale);
  if (fieldFacets != null) {
    for (int i = 0; i < fieldFacets.getElementCount(); i++) {
      final I_CmsSearchConfigurationFacetField config = parseFieldFacet(
        fieldFacets.getValue(i).getPath() + "/");
      if (config != null) {
        facetConfigs.put(config.getName(), config);
      }
    }
  }
  return facetConfigs;
}
origin: org.opencms/opencms-core

/**
 * @see org.opencms.jsp.search.config.parser.I_CmsSearchConfigurationParser#parseRangeFacets()
 */
public Map<String, I_CmsSearchConfigurationFacetRange> parseRangeFacets() {
  final Map<String, I_CmsSearchConfigurationFacetRange> facetConfigs = new LinkedHashMap<String, I_CmsSearchConfigurationFacetRange>();
  final CmsXmlContentValueSequence rangeFacets = m_xml.getValueSequence(XML_ELEMENT_RANGE_FACETS, m_locale);
  if (rangeFacets != null) {
    for (int i = 0; i < rangeFacets.getElementCount(); i++) {
      final I_CmsSearchConfigurationFacetRange config = parseRangeFacet(
        rangeFacets.getValue(i).getPath() + "/");
      if (config != null) {
        facetConfigs.put(config.getName(), config);
      }
    }
  }
  return facetConfigs;
}
origin: org.opencms/opencms-solr

CmsXmlContentValueSequence elementSequence = m_content.getValueSequence(name, locale);
int elementCount = elementSequence.getElementCount();
origin: org.opencms/opencms-core

/**
 * Loads the localization for the current locale from a bundle of type xmlvfsbundle.
 * It assumes, the content has already been unmarshalled before.
 * @param locale the locale for which the localization should be loaded
 */
private void loadLocalizationFromXmlBundle(Locale locale) {
  CmsXmlContentValueSequence messages = m_xmlBundle.getValueSequence("Message", locale);
  SortedProperties props = new SortedProperties();
  if (null != messages) {
    for (I_CmsXmlContentValue msg : messages.getValues()) {
      String msgpath = msg.getPath();
      props.put(
        m_xmlBundle.getStringValue(m_cms, msgpath + "/Key", locale),
        m_xmlBundle.getStringValue(m_cms, msgpath + "/Value", locale));
    }
  }
  m_localizations.put(locale, props);
}
origin: org.opencms/opencms-core

String rootPath = content.getFile().getRootPath();
List<String> optionValues = CmsAddFormatterWidget.getSelectOptionValues(cms, rootPath, false);
CmsXmlContentValueSequence addSequence = content.getValueSequence(ADD_PATH_SINGLE_NODE, locale);
List<I_CmsXmlContentValue> values = addSequence.getValues();
boolean removeMainAddNode = true;
origin: org.opencms/opencms-solr

CmsXmlContentValueSequence elementSequence = m_content.getValueSequence(name, getElementLocale());
int elementCount = elementSequence.getElementCount();
origin: org.opencms/opencms-core

CmsXmlContentValueSequence elementSequence = m_content.getValueSequence(
  pathPrefix + type.getName(),
  getElementLocale());
origin: org.opencms/opencms-core

CmsXmlContentValueSequence messages = m_descContent.getValueSequence(
  Descriptor.N_MESSAGE,
  Descriptor.LOCALE);
origin: org.opencms/opencms-core

CmsXmlContentValueSequence messages = m_descContent.getValueSequence(Descriptor.N_MESSAGE, Descriptor.LOCALE);
String descValue;
boolean hasDescription = false;
origin: org.opencms/opencms-core

/**
 * Creates the container for a bundle descriptor.
 * @return the container for a bundle descriptor.
 */
private IndexedContainer createContainerForDescriptorEditing() {
  IndexedContainer container = new IndexedContainer();
  // create properties
  container.addContainerProperty(TableProperty.KEY, String.class, "");
  container.addContainerProperty(TableProperty.DESCRIPTION, String.class, "");
  container.addContainerProperty(TableProperty.DEFAULT, String.class, "");
  // add entries
  CmsXmlContentValueSequence messages = m_descContent.getValueSequence(
    "/" + Descriptor.N_MESSAGE,
    Descriptor.LOCALE);
  for (int i = 0; i < messages.getElementCount(); i++) {
    String prefix = messages.getValue(i).getPath() + "/";
    Object itemId = container.addItem();
    Item item = container.getItem(itemId);
    String key = m_descContent.getValue(prefix + Descriptor.N_KEY, Descriptor.LOCALE).getStringValue(m_cms);
    item.getItemProperty(TableProperty.KEY).setValue(key);
    item.getItemProperty(TableProperty.DESCRIPTION).setValue(
      m_descContent.getValue(prefix + Descriptor.N_DESCRIPTION, Descriptor.LOCALE).getStringValue(m_cms));
    item.getItemProperty(TableProperty.DEFAULT).setValue(
      m_descContent.getValue(prefix + Descriptor.N_DEFAULT, Descriptor.LOCALE).getStringValue(m_cms));
  }
  return container;
}
org.opencms.xml.contentCmsXmlContentgetValueSequence

Javadoc

Returns the value sequence for the selected element name in this XML content.

If the given element name is not valid according to the schema of this XML content, null is returned.

Popular methods of CmsXmlContent

  • getValue
  • getStringValue
  • getValues
  • hasLocale
  • getFile
  • getLocales
  • marshal
  • addValue
    Adds a new XML schema type with the default value to the given parent node.
  • getIndexCount
  • hasValue
  • addLocale
  • copyLocale
    Copies the content of the given source locale to the given destination locale in this XML document.
  • addLocale,
  • copyLocale,
  • correctXmlStructure,
  • getEncoding,
  • getLocaleNode,
  • initDocument,
  • removeLocale,
  • setAutoCorrectionEnabled,
  • toString,
  • visitAllValuesWith

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now