Add a term to this section and set it's ownership. Should only be used on root level terms
359555
def add_term(self, t):
        """"""
        if t not in self.terms:
            if t.parent_term_lc == 'root':
                self.terms.append(t)

                self.doc.add_term(t, add_section=False)

                t.set_ownership()

            else:
                raise GenerateError("Can only add or move root-level terms. Term '{}' parent is '{}' "
                                    .format(t, t.parent_term_lc))

        assert t.section or t.join_lc == 'root.root', t
1003852
def reset_terms_for(term)
      self.minor = 0 if term == :major
      self.patch = 0 if term == :major || term == :minor
      self.pre   = nil if [:major, :minor, :patch].include? term
      self.build = nil if [:major, :minor, :patch, :pre].include? term

      self
    end
1249078
def add_section(self, section):
        """"""
        section, _, _ = self._validate_value_types(section=section)
        super(ConfigParser, self).add_section(section)
526403
public function addTerm($term_id)
    {
        TermContainer::findOrFail($term_id);

        // Cancel if the user wants to add the same term again
        if ($this->getTaxonomyQuery()->where('term_id', $term_id)->count()) {
            return;
        }

        $this->taxonomies()->attach($term_id);

        Cache::forget($this->getTaxonomyCacheKey());
    }
1372993
def _add_nested(self, rec, name, value):
        """"""
        # Remove comments and split term into typedef / target term.
        (typedef, target_term) = value.split('!')[0].rstrip().split(' ')

        # Save the nested term.
        getattr(rec, name)[typedef].append(target_term)
81115
def do_setup
        if (self.taxonomy_node == nil)
          self.taxonomy_node = self.respond_to?(:create_taxonomy_node) ? self.create_taxonomy_node : Taxonomite::Node.new
          self.taxonomy_node.owner = self
        end
      end
1250086
def add_section(self, section_name: str) -> None:
        """"""
        section_name = self._whitespace_re.sub('_', section_name)
        self._sections.append(section_name)
        setattr(self, section_name, Section())
379730
public static void addOtherChild(CodeSystem cs, ConceptDefinitionComponent owner, String code) {
    defineChildProperty(cs);
    owner.addProperty().setCode("child").setValue(new CodeType(code));
  }
220338
public void addSection(GSection section) {
        section.setPosition(sectionList.size());
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,(int)(48 * density));
        sectionList.add(section);
        sections.addView(section.getView(),params);
    }
217745
def _set_ownership(self):
        
        if self.owner or self.group:
            args = (
                self.path,
                self.owner if self.owner else -1,
                self.group if self.group else -1,
            )
            logger.debug("changing ownership bits of %s to %s", self.path, args)
            os.chown(*args)
1363948
def add_section(self, section):
        

        if not issubclass(section.__class__, SubSection):
            raise TypeError("Argument should be a subclass of SubSection, \
                             not :" + str(section.__class__))
        self.sections[section.name] = section
        return section
31942
def section(self, section):
        
        if not isinstance(self._container, ConfigUpdater):
            raise ValueError("Sections can only be added at section level!")
        if isinstance(section, str):
            # create a new section
            section = Section(section, container=self._container)
        elif not isinstance(section, Section):
            raise ValueError("Parameter must be a string or Section type!")
        if section.name in [block.name for block in self._container
                            if isinstance(block, Section)]:
            raise DuplicateSectionError(section.name)
        self._container.structure.insert(self._idx, section)
        self._idx += 1
        return self
1072249
def add(self, term):
        """"""
        self._value = self.accum_param.addInPlace(self._value, term)
625480
public void setDelete(Term term) {
    this.op = Op.DELETE;
    this.doc = null;
    this.term = term;
  }
953444
public void addSection(String section, Composite composite)
    {
        sections.put(section,composite);
        add(composite);
    }
1305546
def add_term(term, taxonomy, description, count)
      if term.respond_to?(:term_id)
        term_id = term.term_id
      else
        term_id = term.to_i
      end

      term_taxonomy = WPDB::TermTaxonomy.where(term_id: term_id, taxonomy: taxonomy).first
      unless term_taxonomy
        term_taxonomy = WPDB::TermTaxonomy.create(
          term_id: term_id,
          taxonomy: taxonomy,
          description: description,
          count: count
        )
      else
        term_taxonomy.count += count
      end

      add_termtaxonomy(term_taxonomy)
    end
1069608
def add_to_config(cls, section, name, value):
        
        if value:
            if not cls._config.has_section(section):
                cls._config.add_section(section)
            cls._config.set(section, name, str(value))