For exporting, set data on `node` from ourselves.
979353
def add_xml_to_node(self, node):
        
        # pylint: disable=E1101
        # Set node.tag based on our class name.
        node.tag = self.xml_element_name()
        node.set('xblock-family', self.entry_point)

        # Set node attributes based on our fields.
        for field_name, field in self.fields.items():
            if field_name in ('children', 'parent', 'content'):
                continue
            if field.is_set_on(self) or field.force_export:
                self._add_field(node, field_name, field)

        # A content field becomes text content.
        text = self.xml_text_content()
        if text is not None:
            node.text = text
1062351
def assign(self, node):
        
        child_object = self.translate(node.child)
        child_object.prefix = 'CREATE TEMPORARY TABLE {name}({attributes}) AS '\
            .format(name=node.name, attributes=', '.join(node.attributes.names))
        return child_object
45784
protected void setNode(Node node) {
        assert node!=null;
        if(node instanceof Slave)
            this.nodeName = node.getNodeName();
        else
            this.nodeName = null;

        setNumExecutors(node.getNumExecutors());
        if (this.temporarilyOffline) {
            // When we get a new node, push our current temp offline
            // status to it (as the status is not carried across
            // configuration changes that recreate the node).
            // Since this is also called the very first time this
            // Computer is created, avoid pushing an empty status
            // as that could overwrite any status that the Node
            // brought along from its persisted config data.
            node.setTemporaryOfflineCause(this.offlineCause);
        }
    }
193822
def project(self, node):
        
        child_object = self.translate(node.child)
        child_object.select_block = str(node.attributes)
        return child_object
954257
static Document.OutputSettings outputSettings(Node node) {
        Document owner = node.ownerDocument();
        return owner != null ? owner.outputSettings() : (new Document("")).outputSettings();
    }
855462
def set(self, uri, content, **meta):
        
        try:
            node = self._update(uri, content, **meta)
            created = False
        except NodeDoesNotExist:
            node = self._create(uri, content, **meta)
            created = True
        return self._serialize(uri, node), created
1032984
def add_from_xmlnode(self, element):
        """"""
        if self.tree is None:
            root = ET.Element('interface')
            root.append(element)
            self.tree = tree = ET.ElementTree(root)
            self.root = tree.getroot()
            self.objects = {}
            # ET.dump(tree)
        else:
            # TODO: append to current tree
            pass
471324
def make_export(self, exports):
        """"""
        sql = 'drop table if exists export'
        logging.debug(sql)
        self.cursor.execute(sql)
        sql = 'create table if not exists export ' \
              '(func text unique, module text)'
        logging.debug(sql)
        self.cursor.execute(sql)
        for module in exports:
            logging.debug(_('insering exports from %s'), module)
            sql = 'insert into export values (?, ?)'
            for func in exports[module]:
                if func:
                    try:
                        self.cursor.execute(sql, (func, module))
                    except sqlite3.IntegrityError:
                        pass
        self.con.commit()
510641
function build(node, nodes, scope) {
  var first = node.specifiers[0];
  if (!t.isExportNamespaceSpecifier(first) && !t.isExportDefaultSpecifier(first)) return;

  var specifier = node.specifiers.shift();
  var uid = scope.generateUidIdentifier(specifier.exported.name);

  var newSpecifier;
  if (t.isExportNamespaceSpecifier(specifier)) {
    newSpecifier = t.importNamespaceSpecifier(uid);
  } else {
    newSpecifier = t.importDefaultSpecifier(uid);
  }

  nodes.push(t.importDeclaration([newSpecifier], node.source));
  nodes.push(t.exportNamedDeclaration(null, [t.exportSpecifier(uid, specifier.exported)]));

  build(node, nodes, scope);
}
1195721
def _set(self, data, version):
        """"""

        self.zk.set(self.path, json.dumps(data), version)
745728
def from_payload(self, payload):
        """"""
        self.node_id = payload[0]
        self.name = bytes_to_string(payload[1:65])
738611
protected void initDatabaseExportObject() {

        Object o;

        if (CmsStringUtil.isEmpty(getParamAction())) {
            o = new CmsExportParameters();
        } else {
            // this is not the initial call, get the job object from session
            o = getDialogObject();
        }

        if (!(o instanceof CmsExportParameters)) {
            // create a new export parameters object
            m_exportParams = new CmsExportParameters();
        } else {
            // reuse export parameters object stored in session
            m_exportParams = (CmsExportParameters)o;
        }

        if (CmsStringUtil.isEmpty(getParamAction()) && (m_exportParams.getResources().size() < 1)) {
            // on initial call, at least on resource input field has to be present
            List initialPaths = new ArrayList(1);
            initialPaths.add("/");
            m_exportParams.setResources(initialPaths);
        }
    }
1013937
def start(self, content):
        
        content.data = Factory.object(content.node.name)
1315107
def from_payload(self, payload):
        """"""
        self.status = NodeInformationStatus(payload[0])
        self.node_id = payload[1]
1170884
def set_data(self, data):
        
        for name in self._fields:
            setattr(self, name, data.get(name))
        return self
717480
def copy_node(node):
    """"""
    element = node.makeelement(node.tag)
    element.text = node.text
    element.tail = node.tail
    for key, value in node.items():
        element.set(key, value)

    return element
411178
def _startXTVDNode(self, name, attrs):
        """"""

        schemaVersion = attrs.get('schemaVersion')
        validFrom = self._parseDateTime(attrs.get('from'))
        validTo = self._parseDateTime(attrs.get('to'))
        self._progress.printMsg('Parsing version %s data from %s to %s' %
                                    (schemaVersion,
                                     validFrom.strftime('%Y/%m/%d'),
                                     validTo.strftime('%Y/%m/%d')))