A method to set the new extent location that the data for this Directory
        Record should live at.

        Parameters:
         current_extent - The new extent.
        Returns:
         Nothing.
340140
def set_data_location(self, current_extent, tag_location):  # pylint: disable=unused-argument
        # type: (int, int) -> None
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')

        self.new_extent_loc = current_extent
        if self.ptr is not None:
            self.ptr.update_extent_location(current_extent)
1055538
private DefaultLocalExtension createExtension(Extension extension)
    {
        DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);

        localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));

        return localExtension;
    }
1373896
def parent_link_extent(self):
        # type: () -> int
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge extension not yet initialized')

        if self.dr_entries.pl_record is not None:
            return self.dr_entries.pl_record.parent_log_block_num
        if self.ce_entries.pl_record is not None:
            return self.ce_entries.pl_record.parent_log_block_num

        raise pycdlibexception.PyCdlibInternalError('Asked for parent extent for non-existent parent record')
915397
def setExpanded(self, index, expanded):
        
        if index.isValid():
            item = self.getItem(index)
            item.expanded = expanded
217039
def _update_card_file_location(self, card_name, new_directory):
        
        with tmp_chdir(self.gssha_directory):
            file_card = self.project_manager.getCard(card_name)
            if file_card:
                if file_card.value:
                    original_location = file_card.value.strip("'").strip('"')
                    new_location = os.path.join(new_directory,
                                                os.path.basename(original_location))
                    file_card.value = '"{0}"'.format(os.path.basename(original_location))
                    try:
                        move(original_location, new_location)
                    except OSError as ex:
                        log.warning(ex)
                        pass
764091
def action_update_library_location(_location):
    

    # if not(os.path.exists(_location)):
    # 	os.mkdir(_location)
    # 	printDebug("Creating new folder..", "comment")

    printDebug("Old location: '%s'" % get_home_location(), "comment")

    if os.path.isdir(_location):

        config = SafeConfigParser()
        config_filename = ONTOSPY_LOCAL + '/config.ini'
        config.read(config_filename)
        if not config.has_section('models'):
            config.add_section('models')

        config.set('models', 'dir', _location)
        with open(config_filename, 'w') as f:
            config.write(
                f)  # note: this does not remove previously saved settings

        return _location
    else:
        return None
309715
def new(self, extension_sequence):
        # type: (int) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('ES record already initialized!')

        self.extension_sequence = extension_sequence
        self._initialized = True
1274249
def assignCurrentRecord(self, text):
        
        if self.showTreePopup():
            item = self._treePopupWidget.currentItem()
            if item:
                self._currentRecord = item.record()
            else:
                self._currentRecord = None
            return
        
        # look up the record for the given text
        if text:
            index = self.findText(text)
        elif self.isRequired():
            index = 0
        else:
            index = -1
        
        # determine new record to look for
        record = self.recordAt(index)
        if record == self._currentRecord:
            return
        
        # set the current index and record for any changes
        self._currentRecord = record
        self.setCurrentIndex(index)
655101
def _expand_address(addy):
    '''
    
    '''
    ret = {}
    ret.update(addy.__dict__)
    ret['extra']['zone'] = addy.region.name
    return ret
115427
def setExtension(self, ext):
        
        if ext[0] != ".":
            ext = "." + ext
        self._ext = utils.asString(ext)
1191066
def _update_current(self):
        
        if not self.current or self.current not in self.prefixes:
            if 'default' in self.prefixes:
                selected_current = 'default'
            elif self.prefixes:
                selected_current = sorted(self.prefixes.keys()).pop()
            else:
                # should never get here
                raise MalformedWorkdir(
                    'No current link and no prefixes in workdir %s' % self.path
                )

            logging.info(
                'Missing current link, setting it to %s',
                selected_current,
            )
            self._set_current(selected_current)
862635
def _on_new_location(self, form):
        """"""
        self._desired_longitude = float(form.data["long"])
        self._desired_latitude = float(form.data["lat"])
        self._desired_zoom = 13
        self._screen.force_update()
1018973
public boolean recordOverride() {
    if (!currentInfo.isOverride()) {
      currentInfo.setOverride(true);
      populated = true;
      return true;
    } else {
      return false;
    }
  }
367162
def add(self, name):
        '''
        
        '''
        if self.__current_section:
            self._flush_content()
        self.discard_current(name)
1020739
def current(directory=None, verbose=False, head_only=False):
    """"""
    config = current_app.extensions['migrate'].migrate.get_config(directory)
    if alembic_version >= (0, 7, 0):
        command.current(config, verbose=verbose, head_only=head_only)
    else:
        command.current(config)
1026423
def set_current_migration(self, migration_number=None):
        
        self.migration_data.version = migration_number or self.latest_migration
        self.session.commit()
778886
def current(cls, with_exception=True):
        
        if with_exception and len(cls.stack) == 0:
            raise NoContext()
        return cls.stack.top()