Advance past the document header to the first JournalEntry.
186865
private void advanceIntoFile() throws XMLStreamException, JournalException {
        XMLEvent event = reader.nextEvent();
        if (!event.isStartDocument()) {
            throw new JournalException("Expecting XML document header, but event was '"
                    + event + "'");
        }

        event = reader.nextTag();
        if (!isStartTagEvent(event, QNAME_TAG_JOURNAL)) {
            throw new JournalException("Expecting FedoraJournal start tag, but event was '"
                    + event + "'");
        }

        String hash =
                getOptionalAttributeValue(event.asStartElement(),
                                          QNAME_ATTR_REPOSITORY_HASH);
        checkRepositoryHash(hash);
    }
696896
def begin(self):
        

        if self.journal != None:
            raise Exception('Storage is already active, nested begin not supported')

        # under normal operation journal is deleted at end of transaction
        # if it does exist we need to roll back
        if os.path.isfile(self.j_file):  self.rollback()

        self.journal = open(self.j_file, 'w')
357985
def go_to_previous_cell(self):
        """"""
        cursor = self.textCursor()
        cur_pos = prev_pos = cursor.position()

        if self.is_cell_separator(cursor):
            # Move to the previous cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            cur_pos = prev_pos = cursor.position()

        while not self.is_cell_separator(cursor):
            # Move to the previous cell or the beginning of the current cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            prev_pos = cur_pos
            cur_pos = cursor.position()
            if cur_pos == prev_pos:
                return

        self.setTextCursor(cursor)
1344646
def go_to_completion(self, index):
        
        assert index is None or isinstance(index, int)
        assert self.complete_state

        # Set new completion
        state = self.complete_state.go_to_index(index)

        # Set text/cursor position
        new_text, new_cursor_position = state.new_text_and_position()
        self.document = Document(new_text, new_cursor_position)

        # (changing text/cursor position will unset complete_state.)
        self.complete_state = state
375095
def page_next(self):
        """"""
        window_start = (self.parent.value('window_start') +
                        self.parent.value('window_length'))
        self.parent.overview.update_position(window_start)
43867
private void advance() {
        if (current == null || !current.hasNext()) {
            do {
                current = iters.poll();
            } while (current != null && !current.hasNext());
        }
    }
1255036
private void startNewAlarm(LinkedListEntry entry)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "startNewAlarm", new Object[] { entry });

    //start a new alarm
    entry.alarm = am.create(delta, percentLate, this, entry);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "startNewAlarm");
  }
725389
@Override
  public int advance(int target) throws IOException {
    reset();
    if (docId == NO_MORE_DOCS) {
      return docId;
    } else if (target <= docId) {
      // should not happen
      docId = NO_MORE_DOCS;
      return docId;
    } else {
      docId = spans1.spans.advance(target);
      if (docId == NO_MORE_DOCS) {
        return docId;
      } else {
        int spans2DocId = spans2.spans.docID();
        if (spans2DocId < docId) {
          spans2DocId = spans2.spans.advance(docId);
        }
        if (docId != spans2DocId) {
          return spans1.spans.nextStartPosition() != NO_MORE_POSITIONS ? docId
              : NO_MORE_DOCS;
        } else if (goToNextStartPosition()) {
          return docId;
        } else {
          return nextDoc();
        }
      }
    }
  }
15101
public void moveToEnd() throws IOException {
    int bytes;
    while (remaining > 0) {
      bytes = (int) inner.skip(remaining);
      if (bytes < 0) {
        break;
      }
      remaining -= bytes;
    }
  }
450519
def next(self):
    """"""
    self._has_iterated = True

    if self._read_before_start:
      self._blob_reader.readline()
      self._read_before_start = False
    start_position = self._blob_reader.tell()

    if start_position > self._end_position:
      raise StopIteration()

    line = self._blob_reader.readline()

    if not line:
      raise StopIteration()

    return start_position, line.rstrip("\n")
659572
def advance(self):
        """"""
        self.cursor += 1
        if self.cursor >= len(self.raw):
            self.char = None
        else:
            self.char = self.raw[self.cursor]
406439
@Override
  public int nextDoc() throws IOException {
    do {
      IndexDoc indexDoc = mtasCodecInfo.getNextDoc(field, docId);
      if (indexDoc != null) {
        docId = indexDoc.docId;
        minPosition = Math.max(start, indexDoc.minPosition);
        maxPosition = Math.min(end, indexDoc.maxPosition);
        currentStartPosition = -1;
        currentEndPosition = -1;
      } else {
        docId = NO_MORE_DOCS;
        minPosition = NO_MORE_POSITIONS;
        maxPosition = NO_MORE_POSITIONS;
        currentStartPosition = NO_MORE_POSITIONS;
        currentEndPosition = NO_MORE_POSITIONS;
      }
    } while (docId != NO_MORE_DOCS && (minPosition > maxPosition));
    return docId;
  }
641033
def start(self):
        

        while not self.is_start(self.current_tag):
            self.next()
        self.new_entry()
333112
public void applyAndJournal(Supplier<JournalContext> context, AddSyncPointEntry entry) {
    try {
      apply(entry);
      context.get().append(Journal.JournalEntry.newBuilder().setAddSyncPoint(entry).build());
    } catch (Throwable t) {
      ProcessUtils.fatalError(LOG, t, "Failed to apply %s", entry);
      throw t; // fatalError will usually system.exit
    }
  }
265792
@Override
    public void startedPart(Map headers) {
        if (_docReader != null)
            throw new IllegalStateException("_docReader is already defined");
        Log.v(TAG, "%s: Starting new document; headers =%s", this, headers);
        _docReader = new MultipartDocumentReader(db);
        _docReader.setHeaders(headers);
        _docReader.startedPart(headers);
    }
622860
def proceed(self):
        
        self._parse()
        for e in self.docs_list:
            e['docs'].generate_docs()
        return self.docs_list
802728
@Override
	public void documentStart() {
		structure = new StructureImpl();

		currentChain        = null;
		currentGroup 		= null;
		currentNmrModelNumber 	= null;
		//atomCount     		= 0;

		allModels     = new ArrayList<List<Chain>>();
		currentModel  = new ArrayList<Chain>();
		entities      = new ArrayList<Entity>();
		entityPolys   = new ArrayList<>();
		strucRefs     = new ArrayList<StructRef>();
		seqResChains  = new ArrayList<Chain>();
		entityChains  = new ArrayList<Chain>();
		structAsyms   = new ArrayList<StructAsym>();

		asymId2entityId = new HashMap<String,String>();
		asymId2authorId = new HashMap<>();
		structOpers   = new ArrayList<PdbxStructOperList>();
		strucAssemblies = new ArrayList<PdbxStructAssembly>();
		strucAssemblyGens = new ArrayList<PdbxStructAssemblyGen>();
		entitySrcGens = new ArrayList<EntitySrcGen>();
		entitySrcNats = new ArrayList<EntitySrcNat>();
		entitySrcSyns = new ArrayList<EntitySrcSyn>();
		structConn = new ArrayList<StructConn>();
		structNcsOper = new ArrayList<StructNcsOper>();
		sequenceDifs = new ArrayList<StructRefSeqDif>();
		structSiteGens = new ArrayList<StructSiteGen>();
	}