/** * Initializes the search exclusions values for this content handler.<p> * * For the full text search, the value of all elements in one locale of the XML content are combined * to one big text, which is referred to as the "content" in the context of the full text search. * With this option, it is possible to hide certain elements from this "content" that does not make sense * to include in the full text search.<p> * * @param root the "searchsettings" element from the appinfo node of the XML content definition * @param contentDefinition the content definition the default values belong to * * @throws CmsXmlException if something goes wrong */ protected void initSearchSettings(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException { Iterator<Element> i = CmsXmlGenericWrapper.elementIterator(root, APPINFO_SEARCHSETTING); while (i.hasNext()) { // iterate all "searchsetting" elements in the "searchsettings" node Element element = i.next(); String elementName = element.attributeValue(APPINFO_ATTR_ELEMENT); String searchContent = element.attributeValue(APPINFO_ATTR_SEARCHCONTENT); boolean include = CmsStringUtil.isEmpty(searchContent) || Boolean.valueOf(searchContent).booleanValue(); if (elementName != null) { // add search exclusion for the element // this may also be "false" in case a default of "true" is to be overwritten addSearchSetting(contentDefinition, elementName, Boolean.valueOf(include)); } } }
boolean include = (CmsStringUtil.isEmpty(searchContent)) || (Boolean.valueOf(searchContent).booleanValue()); if (elementName != null) { addSearchSetting(contentDefinition, elementName, Boolean.valueOf(include));