Add the document as an atomic pull.

 @example Add the atomic pull.
   person.add_atomic_pull(address)

 @param [ Document ] document The embedded document to pull.

 @since 2.2.0
516690
def add_atomic_pull(document)
      document.flagged_for_destroy = true
      (delayed_atomic_pulls[document.association_name.to_s] ||= []).push(document)
    end
801115
def add_label(self, doc, label, update_index=True):
        
        label = copy.copy(label)
        assert(label in self.labels.values())
        doc.add_label(label)
        if update_index:
            self.upd_doc(doc)
            self.commit()
533810
def add_document(docid, fields, options={})
            options.merge!( :docid => docid, :fields => fields )
            code, r = PUT "/docs", options
            return r
        end
357536
def run(document)
      @document = document
      @lints = []
      visit(document.tree)
      @lints
    rescue Parser::SyntaxError => e
      location = e.diagnostic.location
      @lints <<
        HamlLint::Lint.new(
          HamlLint::Linter::Syntax.new(config),
          document.file,
          location.line,
          e.to_s,
          :error
        )
    end
631362
void addDocument(Document doc) throws IOException
   {
      update(Collections.<String> emptyList(), Arrays.asList(new Document[]{doc}));
   }
771030
public Response update(String id, Object document) {
        Misc.checkNotNullOrEmpty(id, "id");
        Misc.checkNotNull(document, "Document");

        // Get the latest rev, will throw if doc doesn't exist
        getDocumentRev(id);

        return putUpdate(id, document);
    }
95366
def _add_token_to_document(self, token_string, token_attrs=None):
        """"""
        token_feat = {self.ns+':token': token_string}
        if token_attrs:
            token_attrs.update(token_feat)
        else:
            token_attrs = token_feat
        token_id = 'token_{}'.format(self.token_count)
        self.add_node(token_id, layers={self.ns, self.ns+':token'},
                      attr_dict=token_attrs)
        self.token_count += 1
        self.tokens.append(token_id)
        return token_id
545887
public static void add(Document document, String name) {
        Element element = findElement(document, name);

        AssertUtils.assertNotNull(element, "Failed to find element by name: " + name);

        add(element);
    }
368403
def follow
            doc = self.document

            if doc.nil?
                raise InvalidReferenceError, "Not attached to any document"
            end

            target = doc.get_object(self)

            if target.nil? and not Origami::OPTIONS[:ignore_bad_references]
                raise InvalidReferenceError, "Cannot resolve reference : #{self}"
            end

            target or Null.new
        end
918105
def merge_element!(hash, element, depth)
        raise REXML::ParseException, "The document is too deep" if depth == 0
        merge!(hash, element.name, collapse(element, depth))
      end
644388
function(url, callback, doc) {
		doc = doc || document;
		
		return _.element.create({
			tag: 'script',
			properties: {
				src: url,
				async: true,
				onload: callback
			},
			inside: doc.documentElement
		});
	}
1352159
public Document<K> addDocument(K id, String document)
    {
        return addDocument(id, preprocess(document));
    }
1141022
protected void addSplitAttributes(final GedDocument<?> document) {
        for (final GedDocument<? extends GedObject> attribute : document
                .getAttributes()) {
            final DocumentToApiModelVisitor v = createVisitor();
            attribute.accept(v);
            ((ApiHasImages) baseObject)
                    .addAttribute(convertToAttribute(v.getBaseObject()));
        }
    }
372917
def add( child )
      if child.kind_of? ( XMLDecl )
        if @children[0].kind_of?( XMLDecl )
          @children[0] = child
        else
          @children.unshift child
        end
        child.parent = self
      elsif child.kind_of? DocType
        # Find first Element or DocType node and insert the decl right 
        # before it.  If there is no such node, just insert the child at the
        # end.  If there is a child and it is an DocType, then replace it.
        insert_before_index = @children.find_index { |x|
          x.kind_of?(Element) || x.kind_of?(DocType)
        }
        if insert_before_index # Not null = not end of list
          if @children[ insert_before_index ].kind_of? DocType
            @children[ insert_before_index ] = child
          else
            @children[ insert_before_index-1, 0 ] = child
          end
        else  # Insert at end of list
          @children << child
        end
        child.parent = self
      else
        rv = super
        raise "attempted adding second root element to document" if @elements.size > 1
        rv
      end
    end
104673
def insert_one(self, document, **kwargs):
        
        self._arctic_lib.check_quota()
        return self._collection.insert_one(document, **kwargs)
380956
def setdocument(self, doc):
        
        assert isinstance(doc, Document)

        if not self.doc:
            self.doc = doc
            if self.id:
                if self.id in doc:
                    raise DuplicateIDError(self.id)
                else:
                    self.doc.index[id] = self

        for e in self: #recursive for all children
            if isinstance(e,AbstractElement): e.setdocument(doc)
492354
def add_document(self, data):
        

        document = self.dispatcher(
            'add_article',
            data,
            self._admintoken
        )

        return json.loads(document)