/**
  * sets all attributes in XML Element from Search Index
  *
  * @param el
  * @param index
  * @throws SearchException
  */
 protected final void setAttributes(Element el, SearchIndex index) throws SearchException {
   if (el == null) return;
   setAttribute(el, "categoryTree", index.getCategoryTree());
   setAttribute(el, "category", engine.getListUtil().toList(index.getCategories(), ","));
   setAttribute(el, "custom1", index.getCustom1());
   setAttribute(el, "custom2", index.getCustom2());
   setAttribute(el, "custom3", index.getCustom3());
   setAttribute(el, "custom4", index.getCustom4());
   setAttribute(el, "id", index.getId());
   setAttribute(el, "key", index.getKey());
   setAttribute(el, "language", index.getLanguage());
   setAttribute(el, "title", index.getTitle());
   setAttribute(el, "extensions", engine.getListUtil().toList(index.getExtensions(), ","));
   setAttribute(el, "type", SearchIndexImpl.toStringType(index.getType()));
   setAttribute(el, "urlpath", index.getUrlpath());
   setAttribute(el, "query", index.getQuery());
 }
 /**
  * read in a single Index
  *
  * @param sc
  * @param el
  * @throws SearchException
  * @throws PageException
  */
 protected void readIndex(SearchCollection sc, Element el) throws SearchException {
   // Index
   SearchIndex si =
       new SearchIndexImpl(
           _attr(el, "id"),
           _attr(el, "title"),
           _attr(el, "key"),
           SearchIndexImpl.toType(_attr(el, "type")),
           _attr(el, "query"),
           engine.getListUtil().toStringArray(_attr(el, "extensions"), ","),
           _attr(el, "language"),
           _attr(el, "urlpath"),
           _attr(el, "categoryTree"),
           engine.getListUtil().toStringArray(_attr(el, "category"), ","),
           _attr(el, "custom1"),
           _attr(el, "custom2"),
           _attr(el, "custom3"),
           _attr(el, "custom4"));
   sc.addIndex(si);
 }