public void reset() {
   getChildren().clear();
   setInitialized(false);
   IWContext iwc = IWContext.getInstance();
   try {
     WebDAVMetadataResource resource =
         (WebDAVMetadataResource) IBOLookup.getSessionInstance(iwc, WebDAVMetadataResource.class);
     resource.clear();
   } catch (IBOLookupException e) {
     throw new RuntimeException(e);
   } catch (RemoteException e) {
     throw new RuntimeException(e);
   }
 }
  public void saveCategoriesSettings() {
    if (this.resourcePath == null) {
      throw new RuntimeException("resourcePath is null");
    }

    IWContext iwc = CoreUtil.getIWContext();

    //	Save the selection of categories to the article
    String categories = getEnabledCategories(iwc);

    try {
      WebDAVMetadataResource resource =
          (WebDAVMetadataResource) IBOLookup.getSessionInstance(iwc, WebDAVMetadataResource.class);
      resource.setCategories(resourcePath, categories.toString(), getSetCategoriesOnParent());
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
 /**
  * Gets the set categories, either from the resourcePath property or the setCategories property
  *
  * @return
  */
 private Collection<String> getSetCategoriesList() {
   if (this.resourcePath != null) {
     IWContext iwuc = IWContext.getInstance();
     try {
       WebDAVMetadataResource resource =
           (WebDAVMetadataResource)
               IBOLookup.getSessionInstance(iwuc, WebDAVMetadataResource.class);
       return resource.getCategories(this.resourcePath);
     } catch (IBOLookupException e) {
       throw new RuntimeException(e);
     } catch (IOException e) {
       throw new RuntimeException(e);
     }
   } else if (this.setCategories != null) {
     return CategoryBean.getCategoriesFromString(this.setCategories);
   }
   return null;
 }