Initializes a data source to be passed into the bokeh glyph.
760183
def _init_datasource(self, data):
        
        data = self._postprocess_data(data)
        return ColumnDataSource(data=data)
506760
protected void initialize(T input , GrayS32 output ) {
		this.graph = output;
		final int N = input.width*input.height;

		regionSize.resize(N);
		threshold.resize(N);
		for( int i = 0; i < N; i++ ) {
			regionSize.data[i] = 1;
			threshold.data[i] = K;
			graph.data[i] = i; // assign a unique label to each pixel since they are all their own region initially
		}

		edges.reset();
		edgesNotMatched.reset();
	}
48595
private void createGlyf(FontFileReader in,
                            Map glyphs) throws IOException {
        TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("glyf");
        int size = 0;
        int start = 0;
        int endOffset = 0;    // Store this as the last loca
        if (entry != null) {
            pad4();
            start = currentPos;

            /* Loca table must be in order by glyph index, so build
             * an array first and then write the glyph info and
             * location offset.
             */
            int[] origIndexes = new int[glyphs.size()];

            Iterator e = glyphs.keySet().iterator();
            while (e.hasNext()) {
                Integer origIndex = (Integer)e.next();
                Integer subsetIndex = (Integer)glyphs.get(origIndex);
                origIndexes[subsetIndex.intValue()] = origIndex.intValue();
            }

            for (int i = 0; i < origIndexes.length; i++) {
                int glyphLength = 0;
                int nextOffset = 0;
                int origGlyphIndex = origIndexes[i];
                if (origGlyphIndex >= (mtxTab.length - 1)) {
                    nextOffset = (int)lastLoca;
                } else {
                    nextOffset = (int)mtxTab[origGlyphIndex + 1].getOffset();
                }
                glyphLength = nextOffset - (int)mtxTab[origGlyphIndex].getOffset();

                // Copy glyph
                System.arraycopy(
                    in.getBytes((int)entry.getOffset() + (int)mtxTab[origGlyphIndex].getOffset(),
                        glyphLength), 0,
                    output, currentPos,
                    glyphLength);


                // Update loca table
                writeULong(locaOffset + i * 4, currentPos - start);
                if ((currentPos - start + glyphLength) > endOffset) {
                    endOffset = (currentPos - start + glyphLength);
                }

                currentPos += glyphLength;
                realSize += glyphLength;

            }

            size = currentPos - start;

            int checksum = getCheckSum(start, size);
            writeULong(glyfDirOffset, checksum);
            writeULong(glyfDirOffset + 4, start);
            writeULong(glyfDirOffset + 8, size);
            currentPos += 12;
            realSize += 12;

            // Update loca checksum and last loca index
            writeULong(locaOffset + glyphs.size() * 4, endOffset);

            checksum = getCheckSum(locaOffset, glyphs.size() * 4 + 4);
            writeULong(locaDirOffset, checksum);
        } else {
            throw new IOException("Can't find glyf table");
        }
    }
767911
def _init_map(self, record_types=None, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_map(self, record_types=record_types)
        self._my_map['url'] = self._url_default
        self._my_map['data'] = self._data_default
        self._my_map['accessibilityTypeId'] = self._accessibility_type_default
        self._my_map['assignedRepositoryIds'] = [str(kwargs['repository_id'])]
        self._my_map['assetId'] = str(kwargs['asset_id'])
869168
def initialize(self):
    

    # Retrieve the necessary extra arguments that were handled automatically
    autoArgs = {name: getattr(self, name) for name in self._poolerArgNames}
    autoArgs["inputDimensions"] = [self._inputWidth]
    autoArgs["columnDimensions"] = [self._columnCount]
    autoArgs["potentialRadius"] = self._inputWidth
    autoArgs["historyLength"] = self._historyLength
    autoArgs["minHistory"] = self._minHistory

    # Allocate the pooler
    self._pooler = self._poolerClass(**autoArgs)
1232542
def _init_data_map(self):
        

        if self._data_map is not None:
            return  # Initiation happens once

        # Parse and validate the FGDC metadata root

        if self._xml_tree is None:
            fgdc_root = FGDC_ROOT
        else:
            fgdc_root = get_element_name(self._xml_tree)

        if fgdc_root != FGDC_ROOT:
            raise InvalidContent('Invalid XML root for ISO-19115 standard: {root}', root=fgdc_root)

        fgdc_data_map = {'_root': FGDC_ROOT}
        fgdc_data_structures = {}

        # Capture and format other complex XPATHs

        ad_format = _fgdc_tag_formats[ATTRIBUTES]
        fgdc_data_structures[ATTRIBUTES] = format_xpaths(
            _fgdc_definitions[ATTRIBUTES],
            label=ad_format.format(ad_path='attrlabl'),
            aliases=ad_format.format(ad_path='attalias'),
            definition=ad_format.format(ad_path='attrdef'),
            definition_src=ad_format.format(ad_path='attrdefs')
        )

        bb_format = _fgdc_tag_formats[BOUNDING_BOX]
        fgdc_data_structures[BOUNDING_BOX] = format_xpaths(
            _fgdc_definitions[BOUNDING_BOX],
            east=bb_format.format(bbox_path='eastbc'),
            south=bb_format.format(bbox_path='southbc'),
            west=bb_format.format(bbox_path='westbc'),
            north=bb_format.format(bbox_path='northbc')
        )

        ct_format = _fgdc_tag_formats[CONTACTS]
        fgdc_data_structures[CONTACTS] = format_xpaths(
            _fgdc_definitions[CONTACTS],

            name=ct_format.format(ct_path='cntperp/cntper'),
            _name=ct_format.format(ct_path='cntorgp/cntper'),  # If not in cntperp

            organization=ct_format.format(ct_path='cntperp/cntorg'),
            _organization=ct_format.format(ct_path='cntorgp/cntorg'),  # If not in cntperp

            position=ct_format.format(ct_path='cntpos'),
            email=ct_format.format(ct_path='cntemail')
        )

        dt_format = _fgdc_tag_formats[DATES]
        fgdc_data_structures[DATES] = {
            DATE_TYPE_MULTIPLE: dt_format.format(type_path='mdattim/sngdate/caldate'),
            DATE_TYPE_RANGE_BEGIN: dt_format.format(type_path='rngdates/begdate'),
            DATE_TYPE_RANGE_END: dt_format.format(type_path='rngdates/enddate'),
            DATE_TYPE_SINGLE: dt_format.format(type_path='sngdate/caldate')
        }
        fgdc_data_structures[DATES][DATE_TYPE_RANGE] = [
            fgdc_data_structures[DATES][DATE_TYPE_RANGE_BEGIN],
            fgdc_data_structures[DATES][DATE_TYPE_RANGE_END]
        ]

        df_format = _fgdc_tag_formats[DIGITAL_FORMS]
        fgdc_data_structures[DIGITAL_FORMS] = format_xpaths(
            _fgdc_definitions[DIGITAL_FORMS],
            name=df_format.format(df_path='digtinfo/formname'),
            content=df_format.format(df_path='digtinfo/formcont'),
            decompression=df_format.format(df_path='digtinfo/filedec'),
            version=df_format.format(df_path='digtinfo/formvern'),
            specification=df_format.format(df_path='digtinfo/formspec'),
            access_desc=df_format.format(df_path='digtopt/onlinopt/oncomp'),
            access_instrs=df_format.format(df_path='digtopt/onlinopt/accinstr'),
            network_resource=df_format.format(df_path='digtopt/onlinopt/computer/networka/networkr')
        )

        lw_format = _fgdc_tag_formats[LARGER_WORKS]
        fgdc_data_structures[LARGER_WORKS] = format_xpaths(
            _fgdc_definitions[LARGER_WORKS],
            title=lw_format.format(lw_path='title'),
            edition=lw_format.format(lw_path='edition'),
            origin=lw_format.format(lw_path='origin'),
            online_linkage=lw_format.format(lw_path='onlink'),
            other_citation=lw_format.format(lw_path='othercit'),
            date=lw_format.format(lw_path='pubdate'),
            place=lw_format.format(lw_path='pubinfo/pubplace'),
            info=lw_format.format(lw_path='pubinfo/publish')
        )

        ps_format = _fgdc_tag_formats[PROCESS_STEPS]
        fgdc_data_structures[PROCESS_STEPS] = format_xpaths(
            _fgdc_definitions[PROCESS_STEPS],
            description=ps_format.format(ps_path='procdesc'),
            date=ps_format.format(ps_path='procdate'),
            sources=ps_format.format(ps_path='srcused')
        )

        ri_format = _fgdc_tag_formats[RASTER_INFO]
        fgdc_data_structures[RASTER_INFO] = format_xpaths(
            _fgdc_definitions[RASTER_INFO],

            dimensions=ri_format.format(ri_path='rasttype'),
            row_count=ri_format.format(ri_path='rowcount'),
            column_count=ri_format.format(ri_path='colcount'),
            vertical_count=ri_format.format(ri_path='vrtcount'),

            x_resolution=_fgdc_tag_formats['_raster_resolution'] + '/absres',
            _x_resolution=_fgdc_tag_formats['__raster_resolution'] + '/longres',
            y_resolution=_fgdc_tag_formats['_raster_resolution'] + '/ordres',
            _y_resolution=_fgdc_tag_formats['__raster_resolution'] + '/latres',
        )

        # Assign XPATHS and gis_metadata.utils.ParserProperties to fgdc_data_map

        fgdc_data_formats = dict(_fgdc_tag_formats)

        for prop, xpath in iteritems(fgdc_data_formats):
            if prop in (ATTRIBUTES, CONTACTS, DIGITAL_FORMS, PROCESS_STEPS):
                fgdc_data_map[prop] = ParserProperty(self._parse_complex_list, self._update_complex_list)

            elif prop in (BOUNDING_BOX, LARGER_WORKS):
                fgdc_data_map[prop] = ParserProperty(self._parse_complex, self._update_complex)

            elif prop == DATES:
                fgdc_data_map[prop] = ParserProperty(self._parse_dates, self._update_dates)

            elif prop == RASTER_INFO:
                fgdc_data_map[prop] = ParserProperty(self._parse_complex, self._update_raster_info)

            else:
                fgdc_data_map[prop] = xpath

        self._data_map = fgdc_data_map
        self._data_structures = fgdc_data_structures
410156
def _initialize(self,
                    provide_data: List[mx.io.DataDesc],
                    provide_label: List[mx.io.DataDesc],
                    default_bucket_key: Tuple[int, int]):
        
        source = mx.sym.Variable(C.SOURCE_NAME)
        source_words = source.split(num_outputs=self.config.config_embed_source.num_factors,
                                    axis=2, squeeze_axis=True)[0]
        source_length = utils.compute_lengths(source_words)
        target = mx.sym.Variable(C.TARGET_NAME)
        target_length = utils.compute_lengths(target)
        labels = mx.sym.reshape(data=mx.sym.Variable(C.TARGET_LABEL_NAME), shape=(-1,))

        self.model_loss = loss.get_loss(self.config.config_loss)
        logger.info("Using model loss: %s", self.model_loss)
        if self.config.config_length_task_loss is not None:
            self.length_task_loss = loss.get_length_task_loss(self.config.config_length_task_loss)
            logger.info("Using length task loss: %s", self.length_task_loss)
        else:
            self.length_task_loss = None

        data_names = [C.SOURCE_NAME, C.TARGET_NAME]
        label_names = [C.TARGET_LABEL_NAME]

        # length_ratio: (batch_size, ). Will be pruned if not used
        length_ratio = mx.sym.broadcast_div(target_length, source_length, name=C.LENRATIO_LABEL_NAME)

        # check provide_{data,label} names
        provide_data_names = [d[0] for d in provide_data]
        utils.check_condition(provide_data_names == data_names,
                              "incompatible provide_data: %s, names should be %s" % (provide_data_names, data_names))
        provide_label_names = [d[0] for d in provide_label]
        utils.check_condition(provide_label_names == label_names,
                              "incompatible provide_label: %s, names should be %s" % (provide_label_names, label_names))

        def sym_gen(seq_lens):
            """
            Returns a (grouped) loss symbol given source & target input lengths.
            Also returns data and label names for the BucketingModule.
            """
            source_seq_len, target_seq_len = seq_lens

            # source embedding
            (source_embed,
             source_embed_length,
             source_embed_seq_len) = self.embedding_source.encode(source, source_length, source_seq_len)

            # target embedding
            (target_embed,
             target_embed_length,
             target_embed_seq_len) = self.embedding_target.encode(target, target_length, target_seq_len)

            # encoder
            # source_encoded: (batch_size, source_encoded_length, encoder_depth)
            (source_encoded,
             source_encoded_length,
             source_encoded_seq_len) = self.encoder.encode(source_embed,
                                                           source_embed_length,
                                                           source_embed_seq_len)
            # decoder
            # target_decoded: (batch-size, target_len, decoder_depth)
            target_decoded = self.decoder.decode_sequence(source_encoded, source_encoded_length, source_encoded_seq_len,
                                                          target_embed, target_embed_length, target_embed_seq_len)

            # target_decoded: (batch_size * target_seq_len, decoder_depth)
            target_decoded = mx.sym.reshape(data=target_decoded, shape=(-3, 0))

            # output layer
            # logits: (batch_size * target_seq_len, target_vocab_size)
            logits = self.output_layer(target_decoded)

            # 1) standard cross-entropy loss
            net_outputs = [self.model_loss.get_loss(logits, labels)]
            # 2) length task losses
            if self.length_task_loss is not None:
                # predicted_length_ratios: (batch_size, 1)
                predicted_length_ratio = self.length_ratio(source_encoded, source_encoded_length)
                if isinstance(self.length_task_loss, loss.MSELoss):
                    loss_symbol = self.length_task_loss.get_loss(predicted_length_ratio, length_ratio)
                elif isinstance(self.length_task_loss, loss.PoissonLoss):
                    # convert ratios to (expected) length estimations for the Poisson loss
                    predicted_reference_length = predicted_length_ratio * source_encoded_length.reshape((-1, 1))
                    loss_symbol = self.length_task_loss.get_loss(predicted_reference_length, target_length)
                # return both the loss symbol, prediction and the computed length_ratio to be used in metrics
                net_outputs.extend([loss_symbol,
                                    mx.sym.BlockGrad(predicted_length_ratio, name=C.LENRATIO_NAME),
                                    mx.sym.BlockGrad(length_ratio, name=C.LENRATIO_LABEL_NAME)])

            return mx.sym.Group(net_outputs), data_names, label_names

        # Fix model parameters as needed for different training options.
        utils.check_condition(not self.config.lhuc or self.fixed_param_strategy is None,
                "LHUC fixes all other parameters and is thus not compatible with other fixing strategies.")
        if self.config.lhuc:
            arguments = sym_gen(default_bucket_key)[0].list_arguments()
            fixed_param_names = [a for a in arguments if not a.endswith(C.LHUC_NAME)]
        elif self.fixed_param_strategy is not None:
            arguments = sym_gen(default_bucket_key)[0].list_arguments()
            fixed_param_names = self._generate_fixed_param_names(arguments, self.fixed_param_strategy)
        else:
            fixed_param_names = self.fixed_param_names

        if self._bucketing:
            logger.info("Using bucketing. Default max_seq_len=%s", default_bucket_key)
            self.module = mx.mod.BucketingModule(sym_gen=sym_gen,
                                                 logger=logger,
                                                 default_bucket_key=default_bucket_key,
                                                 context=self.context,
                                                 compression_params=self._gradient_compression_params,
                                                 fixed_param_names=fixed_param_names)
        else:
            logger.info("No bucketing. Unrolled to (%d,%d)",
                        self.config.config_data.max_seq_len_source, self.config.config_data.max_seq_len_target)
            symbol, _, __ = sym_gen(default_bucket_key)
            self.module = mx.mod.Module(symbol=symbol,
                                        data_names=data_names,
                                        label_names=label_names,
                                        logger=logger,
                                        context=self.context,
                                        compression_params=self._gradient_compression_params,
                                        fixed_param_names=fixed_param_names)

        self.module.bind(data_shapes=provide_data,
                         label_shapes=provide_label,
                         for_training=True,
                         force_rebind=True,
                         grad_req='add' if self._gradient_accumulation else 'write')

        self.module.symbol.save(os.path.join(self.output_dir, C.SYMBOL_NAME))

        self.save_version(self.output_dir)
        self.save_config(self.output_dir)
184500
private void initArrays() {
        if (data == null || picsize != data.length) {
            data = new int[picsize];
            magnitude = new int[picsize];

            xConv = new float[picsize];
            yConv = new float[picsize];
            xGradient = new float[picsize];
            yGradient = new float[picsize];
        }
    }
1106053
def _initialize_context(self, trace_header):
        
        sampled = None
        if not global_sdk_config.sdk_enabled():
            # Force subsequent subsegments to be disabled and turned into DummySegments.
            sampled = False
        elif trace_header.sampled == 0:
            sampled = False
        elif trace_header.sampled == 1:
            sampled = True

        segment = FacadeSegment(
            name='facade',
            traceid=trace_header.root,
            entityid=trace_header.parent,
            sampled=sampled,
        )
        setattr(self._local, 'segment', segment)
        setattr(self._local, 'entities', [])
1047472
def initialize(self, data):
        
        for item in data:
            if hasattr(self, item):
                setattr(self, item, data[item])
517477
def _init_glyph(self, plot, mapping, properties):
        
        properties.pop('legend', None)
        for prop in ['color', 'alpha']:
            if prop not in properties:
                continue
            pval = properties.pop(prop)
            line_prop = 'line_%s' % prop
            fill_prop = 'fill_%s' % prop
            if line_prop not in properties:
                properties[line_prop] = pval
            if fill_prop not in properties and fill_prop in self.style_opts:
                properties[fill_prop] = pval
        properties = mpl_to_bokeh(properties)
        plot_method = self._plot_methods['single']
        glyph = plot_method(**dict(properties, **mapping))
        plot.add_layout(glyph)
        return None, glyph
406254
def init_text(self):
        
        d = self.declaration
        if d.text:
            self.set_text(d.text)
        if d.text_color:
            self.set_text_color(d.text_color)
        if d.text_alignment:
            self.set_text_alignment(d.text_alignment)
        if d.font_family or d.text_size:
            self.refresh_font()
        if hasattr(d, 'max_lines') and d.max_lines:
            self.set_max_lines(d.max_lines)
1108712
def copyData(self, source):
        
        super(BaseLayer, self).copyData(source)
        for name in source.keys():
            glyph = self.newGlyph(name)
            glyph.copyData(source[name])
904686
def _init_data_map(self):
        

        if self._data_map is not None:
            return  # Initiation happens once

        # Parse and validate the ISO metadata root

        if self._xml_tree is None:
            iso_root = ISO_ROOTS[0]
        else:
            iso_root = get_element_name(self._xml_tree)

        if iso_root not in ISO_ROOTS:
            raise InvalidContent('Invalid XML root for ISO-19115 standard: {root}', root=iso_root)

        iso_data_map = {'_root': iso_root}
        iso_data_map.update(_iso_tag_roots)
        iso_data_map.update(_iso_tag_formats)

        iso_data_structures = {}

        # Capture and format complex XPATHs

        ad_format = iso_data_map[ATTRIBUTES]
        ft_source = iso_data_map['_attr_src'].replace('/carrierOfCharacteristics/FC_FeatureAttribute', '')

        iso_data_structures[ATTRIBUTES] = format_xpaths(
            _iso_definitions[ATTRIBUTES],

            label=ad_format.format(ad_path='memberName/LocalName'),
            aliases=ad_format.format(ad_path='aliases/LocalName'),  # Not in spec
            definition=ad_format.format(ad_path='definition/CharacterString'),

            # First try to populate attribute definition source from FC_FeatureAttribute
            definition_src=iso_data_map['_attr_src'] + '/organisationName/CharacterString',
            _definition_src=iso_data_map['_attr_src'] + '/individualName/CharacterString',

            # Then assume feature type source is the same as attribute: populate from FC_FeatureType
            __definition_src=ft_source + '/organisationName/CharacterString',
            ___definition_src=ft_source + '/individualName/CharacterString'
        )

        bb_format = iso_data_map[BOUNDING_BOX]
        iso_data_structures[BOUNDING_BOX] = format_xpaths(
            _iso_definitions[BOUNDING_BOX],
            east=bb_format.format(bbox_path='eastBoundLongitude/Decimal'),
            south=bb_format.format(bbox_path='southBoundLatitude/Decimal'),
            west=bb_format.format(bbox_path='westBoundLongitude/Decimal'),
            north=bb_format.format(bbox_path='northBoundLatitude/Decimal')
        )

        ct_format = iso_data_map[CONTACTS]
        iso_data_structures[CONTACTS] = format_xpaths(
            _iso_definitions[CONTACTS],
            name=ct_format.format(ct_path='individualName/CharacterString'),
            organization=ct_format.format(ct_path='organisationName/CharacterString'),
            position=ct_format.format(ct_path='positionName/CharacterString'),
            email=ct_format.format(
                ct_path='contactInfo/CI_Contact/address/CI_Address/electronicMailAddress/CharacterString'
            )
        )

        dt_format = iso_data_map[DATES]
        iso_data_structures[DATES] = {
            DATE_TYPE_MULTIPLE: dt_format.format(type_path='TimeInstant/timePosition'),
            DATE_TYPE_RANGE_BEGIN: dt_format.format(type_path='TimePeriod/begin/TimeInstant/timePosition'),
            DATE_TYPE_RANGE_END: dt_format.format(type_path='TimePeriod/end/TimeInstant/timePosition'),
            DATE_TYPE_SINGLE: dt_format.format(type_path='TimeInstant/timePosition')  # Same as multiple
        }
        iso_data_structures[DATES][DATE_TYPE_RANGE] = [
            iso_data_structures[DATES][DATE_TYPE_RANGE_BEGIN],
            iso_data_structures[DATES][DATE_TYPE_RANGE_END]
        ]

        df_format = iso_data_map[DIGITAL_FORMS]
        iso_data_structures[DIGITAL_FORMS] = format_xpaths(
            _iso_definitions[DIGITAL_FORMS],
            name=df_format.format(df_path='name/CharacterString'),
            content='',  # Not supported in ISO-19115 (appending to spec)
            decompression=df_format.format(df_path='fileDecompressionTechnique/CharacterString'),
            version=df_format.format(df_path='version/CharacterString'),
            specification=df_format.format(df_path='specification/CharacterString'),
            access_desc=iso_data_map['_access_desc'],
            access_instrs=iso_data_map['_access_instrs'],
            network_resource=iso_data_map['_network_resource']
        )

        keywords_structure = {
            'keyword_root': 'MD_Keywords/keyword',
            'keyword_type': 'MD_Keywords/type/MD_KeywordTypeCode',
            'keyword': 'MD_Keywords/keyword/CharacterString'
        }
        for keyword_prop in KEYWORD_PROPS:
            iso_data_structures[keyword_prop] = deepcopy(keywords_structure)

        lw_format = iso_data_map[LARGER_WORKS]
        iso_data_structures[LARGER_WORKS] = format_xpaths(
            _iso_definitions[LARGER_WORKS],
            title=lw_format.format(lw_path='title/CharacterString'),
            edition=lw_format.format(lw_path='edition/CharacterString'),
            origin=iso_data_map['_lw_citation'].format(lw_path='individualName/CharacterString'),
            online_linkage=iso_data_map['_lw_linkage'].format(lw_path='linkage/URL'),
            other_citation=lw_format.format(lw_path='otherCitationDetails/CharacterString'),
            date=lw_format.format(lw_path='editionDate/Date'),
            place=iso_data_map['_lw_contact'].format(lw_path='address/CI_Address/city/CharacterString'),
            info=iso_data_map['_lw_citation'].format(lw_path='organisationName/CharacterString')
        )

        ps_format = iso_data_map[PROCESS_STEPS]
        iso_data_structures[PROCESS_STEPS] = format_xpaths(
            _iso_definitions[PROCESS_STEPS],
            description=ps_format.format(ps_path='description/CharacterString'),
            date=ps_format.format(ps_path='dateTime/DateTime'),
            sources=ps_format.format(
                ps_path='source/LI_Source/sourceCitation/CI_Citation/alternateTitle/CharacterString'
            )
        )

        ri_format = iso_data_map[RASTER_INFO]
        iso_data_structures[RASTER_INFO] = format_xpaths(
            _iso_definitions[RASTER_DIMS],
            type=ri_format.format(ri_path='dimensionName/MD_DimensionNameTypeCode'),
            _type=ri_format.format(ri_path='dimensionName/MD_DimensionNameTypeCode/@codeListValue'),
            size=ri_format.format(ri_path='dimensionSize/Integer'),
            value=ri_format.format(ri_path='resolution/Measure'),
            units=ri_format.format(ri_path='resolution/Measure/@uom')
        )

        # Assign XPATHS and gis_metadata.utils.ParserProperties to data map

        for prop, xpath in iteritems(dict(iso_data_map)):
            if prop == ATTRIBUTES:
                iso_data_map[prop] = ParserProperty(self._parse_attribute_details, self._update_attribute_details)

            elif prop in (CONTACTS, PROCESS_STEPS):
                iso_data_map[prop] = ParserProperty(self._parse_complex_list, self._update_complex_list)

            elif prop in (BOUNDING_BOX, LARGER_WORKS):
                iso_data_map[prop] = ParserProperty(self._parse_complex, self._update_complex)

            elif prop == DATES:
                iso_data_map[prop] = ParserProperty(self._parse_dates, self._update_dates)

            elif prop == DIGITAL_FORMS:
                iso_data_map[prop] = ParserProperty(self._parse_digital_forms, self._update_digital_forms)

            elif prop in KEYWORD_PROPS:
                iso_data_map[prop] = ParserProperty(self._parse_keywords, self._update_keywords)

            elif prop == RASTER_INFO:
                iso_data_map[prop] = ParserProperty(self._parse_raster_info, self._update_raster_info)

            else:
                iso_data_map[prop] = xpath

        self._data_map = iso_data_map
        self._data_structures = iso_data_structures
420485
def _init_go2obj(self, **kws):
        """"""
        if 'goids' in kws and 'obodag' in kws:
            self.godag.go_sources = kws['goids']
            obo = kws['obodag']
            for goid in self.godag.go_sources:
                self.godag.go2obj[goid] = obo[goid]
        elif 'goid2goobj' in kws:
            goid2goobj = kws['goid2goobj']
            self.godag.go_sources = goid2goobj.keys()
            for goid, goobj in goid2goobj.items():
                self.godag.go2obj[goid] = goobj
        elif 'goea_results' in kws:
            goea_results = kws['goea_results']
            self.godag.go_sources = [rec.GO for rec in goea_results]
            self.godag.go2obj = {rec.GO:rec.goterm for rec in goea_results}
496269
private void initialize() {
        width = getContext().getResources().getDimensionPixelSize(R.dimen.default_width);
        maximize = false;
        adapter = new DividableGridAdapter(getContext(), Style.LIST, width);
        super.setOnShowListener(createOnShowListener());
    }
166513
def init_from_datastore(self):
    """"""
    self._data = {}
    for entity in self._datastore_client.query_fetch(
        kind=self._entity_kind_batches):
      batch_id = entity.key.flat_path[-1]
      self._data[batch_id] = dict(entity)
      self._data[batch_id]['images'] = {}
    for entity in self._datastore_client.query_fetch(
        kind=self._entity_kind_images):
      batch_id = entity.key.flat_path[-3]
      image_id = entity.key.flat_path[-1]
      self._data[batch_id]['images'][image_id] = dict(entity)