code: def _write_model(self, specification, specification_set, output_directory, package_name):
          
          template_file = "o11nplugin-core/model.java.tpl"
          filename = "%s%s.java" % (self._class_prefix, specification.entity_name)
  
          override_content = self._extract_override_content(specification.entity_name)
          superclass_name = "BaseRootObject" if specification.rest_name == self.api_root else "BaseObject"
  
          defaults = {}
          section = specification.entity_name
          if self.attrs_defaults.has_section(section):
              for attribute in self.attrs_defaults.options(section):
                  defaults[attribute] = self.attrs_defaults.get(section, attribute)
  
          entity_includes = self._get_entity_list_filter(self.inventory_entities, section, "includes")
          entity_excludes = self._get_entity_list_filter(self.inventory_entities, section, "excludes")
          entity_name_attr = "id"
          if self.inventory_entities.has_section(section):
              if self.inventory_entities.has_option(section, "name"):
                  entity_name_attr = self.inventory_entities.get(section, "name")
  
          self.write(destination=output_directory,
                     filename=filename, 
                     template_name=template_file,
                     specification=specification,
                     specification_set=specification_set,
                     version=self.api_version,
                     name=self._name,
                     class_prefix=self._class_prefix,
                     product_accronym=self._product_accronym,
                     override_content=override_content,
                     superclass_name=superclass_name,
                     header=self.header_content,
                     version_string=self._api_version_string,
                     package_name=package_name,
                     attribute_defaults=defaults,
                     entity_name_attr=entity_name_attr,
                     root_api=self.api_root,
                     entity_includes=entity_includes,
                     entity_excludes=entity_excludes)
  
          return (filename, specification.entity_name)
docs: Write autogenerate specification file