/**
   * Initializes the attributes.
   *
   * @param p0 the attribute items
   * @param p1 the attributes map
   */
  static void initialize_attributes(java.lang.Object p0, java.lang.Object p1) {

    LogHandler.log(LogHandler.INFO_LOG_LEVEL, "Initialize attributes.");
    java.lang.Object a = null;

    a = CategoryHandler.read_attribute(p1, CategoryHandler.NAME);
    MapHandler.set_map_element(p0, CategoryHandler.NAME, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.ITEM_CATEGORY);
    MapHandler.set_map_element(p0, CategoryHandler.ITEM_CATEGORY, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.ITEM_ABSTRACTION);
    MapHandler.set_map_element(p0, CategoryHandler.ITEM_ABSTRACTION, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.POSITION_CATEGORY);
    MapHandler.set_map_element(p0, CategoryHandler.POSITION_CATEGORY, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.POSITION_ABSTRACTION);
    MapHandler.set_map_element(p0, CategoryHandler.POSITION_ABSTRACTION, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.INSTANCE_CATEGORY);
    MapHandler.set_map_element(p0, CategoryHandler.INSTANCE_CATEGORY, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.INSTANCE_ABSTRACTION);
    MapHandler.set_map_element(p0, CategoryHandler.INSTANCE_ABSTRACTION, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.INTERACTION_CATEGORY);
    MapHandler.set_map_element(p0, CategoryHandler.INTERACTION_CATEGORY, a);

    a = CategoryHandler.read_attribute(p1, CategoryHandler.INTERACTION_ABSTRACTION);
    MapHandler.set_map_element(p0, CategoryHandler.INTERACTION_ABSTRACTION, a);
  }
  /**
   * Checks if java object is null.
   *
   * @param p0 the category items
   * @return true if the java object is null; false otherwise
   */
  static boolean is_java_object_null(java.lang.Object p0) {

    boolean b = false;
    org.apache.xerces.dom.NodeImpl n = (org.apache.xerces.dom.NodeImpl) p0;

    if (n != null) {

      LogHandler.log(LogHandler.INFO_LOG_LEVEL, "Check if java object is null.");
      org.apache.xerces.dom.NamedNodeMapImpl m =
          (org.apache.xerces.dom.NamedNodeMapImpl) n.getAttributes();
      java.lang.String a =
          (java.lang.String) CategoryHandler.read_attribute(m, CategoryHandler.CATEGORY);

      if (a.equals(CategoryHandler.NULL)) {

        b = true;
      }

    } else {

      LogHandler.log(
          LogHandler.WARNING_LOG_LEVEL,
          "Could not initialize java object. The java object node is null.");
    }

    return b;
  }
  /**
   * Initializes the super category.
   *
   * @param p0 the category
   * @param p1 the super category list
   */
  static void initialize_super_category(java.lang.Object p0, java.lang.Object p1)
      throws java.lang.Exception {

    org.apache.xerces.dom.DeepNodeListImpl l = (org.apache.xerces.dom.DeepNodeListImpl) p1;

    if (l != null) {

      org.apache.xerces.dom.NodeImpl n = (org.apache.xerces.dom.NodeImpl) l.item(0);

      if (n != null) {

        LogHandler.log(LogHandler.INFO_LOG_LEVEL, "Initialize super category.");
        java.lang.Object s =
            CategoryHandler.read_attribute(
                (org.apache.xerces.dom.NamedNodeMapImpl) n.getAttributes(),
                CategoryHandler.CATEGORY);
        CategoryHandler.initialize_category(p0, s);

      } else {

        LogHandler.log(
            LogHandler.WARNING_LOG_LEVEL,
            "Could not initialize super category. The super category node is null.");
      }

    } else {

      LogHandler.log(
          LogHandler.WARNING_LOG_LEVEL,
          "Could not initialize super category. The super category list is null.");
    }
  }
  /**
   * Initializes the java object attributes.
   *
   * @param p0 the attribute items
   * @param p1 the attributes map
   */
  static void initialize_java_object_attributes(java.lang.Object p0, java.lang.Object p1) {

    LogHandler.log(LogHandler.INFO_LOG_LEVEL, "Initialize java object attributes.");
    java.lang.Object a = null;

    a = CategoryHandler.read_attribute(p1, CategoryHandler.CATEGORY);
    MapHandler.set_map_element(p0, CategoryHandler.CATEGORY, a);

    a = CategoryHandler.read_attribute(p1, JavaObjectHandler.NAME);
    MapHandler.set_map_element(p0, JavaObjectHandler.NAME, a);

    a = CategoryHandler.read_attribute(p1, JavaObjectHandler.WIDTH);
    MapHandler.set_map_element(p0, JavaObjectHandler.WIDTH, a);

    a = CategoryHandler.read_attribute(p1, JavaObjectHandler.HEIGHT);
    MapHandler.set_map_element(p0, JavaObjectHandler.HEIGHT, a);

    a = CategoryHandler.read_attribute(p1, JavaObjectHandler.KEY_BINDING);
    MapHandler.set_map_element(p0, JavaObjectHandler.KEY_BINDING, a);
  }