Returns the next RevisionTask.

@return RevisionTask.

@throws ArticleReaderException
if the parsing of the input fails
550965
@Override
	public Task<Revision> next()
		throws ArticleReaderException
	{
		this.startTime = System.currentTimeMillis();

		Task<Revision> task = super.next();

		processingTimeRead += System.currentTimeMillis() - startTime;

		if (task != null) {
			if (task.getTaskType() == TaskTypes.TASK_PARTIAL_LAST
					|| task.getTaskType() == TaskTypes.TASK_FULL) {

				lastTaskCompleted = true;

				ArticleInformation info = task.getHeader();
				info.setEnteringTime(enteringTime);
				info.setOriginalSize(this.getBytePosition() - taskStartPosition);
				info.setProcessingTimeRead(processingTimeRead);
				info.setReadRevisionCounter(readRevisionCounter);

			}
			else {
				lastTaskCompleted = false;
			}
		}
		else {
			lastTaskCompleted = true;
		}

		return task;
	}
680346
public function getCurrentArticle()
    {
        if ($this->current_article instanceof Article || $this->current_article === null) {
            return $this->current_article;
        }

        $params = Controller::curr()->getRequest()->params();
        if(empty($params['ID'])){
            $this->current_article = null;
        } else {
            $this->current_article = Article::get()->filter(['HailID' => $params['ID']])->first();
        }

        return $this->current_article;
    }
989899
protected Revision readRevision()
		throws IOException, ArticleReaderException
	{

		this.taskRevisionCounter++;
		Revision revision = new Revision(this.taskRevisionCounter);

		int size, r = read();
		boolean hasId = false;

		StringBuilder buffer = null;
		this.keywords.reset();

		while (r != -1) {

			if (buffer != null) {
				buffer.append((char) r);
			}

			if (this.keywords.check((char) r)) {
				switch (this.keywords.getValue()) {

				case KEY_START_TEXT:

				case KEY_START_TIMESTAMP:

				case KEY_START_COMMENT:

				case KEY_START_CONTRIBUTOR:
					buffer = new StringBuilder();
					break;

				case KEY_START_ID:
					if (!hasId) {
						buffer = new StringBuilder();
					}
					break;

				case KEY_END_ID:
					if (!hasId) {
						size = buffer.length();
						buffer.delete(size
								- WikipediaXMLKeys.KEY_END_ID.getKeyword()
										.length(), size);

						revision.setRevisionID(Integer.parseInt(buffer
								.toString()));
						buffer = null;

						hasId = true;
					}
					break;

				case KEY_END_TIMESTAMP:
					size = buffer.length();
					buffer.delete(size
							- WikipediaXMLKeys.KEY_END_TIMESTAMP.getKeyword()
									.length(), size);

					revision.setTimeStamp(buffer.toString());
					buffer = null;
					break;

				case KEY_END_TEXT:
					size = buffer.length();
					buffer.delete(size
							- WikipediaXMLKeys.KEY_END_TEXT.getKeyword()
									.length(), size);

					revision.setRevisionText(buffer.toString());
					buffer = null;
					break;

				case KEY_END_COMMENT:
					size = buffer.length();
					buffer.delete(size
							- WikipediaXMLKeys.KEY_END_COMMENT.getKeyword()
									.length(), size);
					//escape comment string
					revision.setComment(SQLEscape.escape(buffer.toString()));
					buffer = null;
					break;

				case KEY_END_CONTRIBUTOR:
					size = buffer.length();
					buffer.delete(size
							- WikipediaXMLKeys.KEY_END_CONTRIBUTOR.getKeyword()
									.length(), size);
					//escape id string
					readContributor(revision, buffer.toString());
					buffer = null;
					break;

				case KEY_MINOR_FLAG:
					revision.setMinor(true);
					buffer = null;
					break;

				case KEY_END_REVISION:
					this.keywords.reset();
					buffer = null;
					return revision;

				//the following cases are handeled in readContributor()
				//they can be skipped here
				case KEY_START_IP:
				case KEY_END_IP:
				case KEY_START_USERNAME:
				case KEY_END_USERNAME:
					break;

				default:
					System.out.println(keywords.getValue());
					throw ErrorFactory
							.createArticleReaderException(ErrorKeys.DELTA_CONSUMERS_TASK_READER_WIKIPEDIAXMLREADER_UNEXPECTED_KEYWORD);
				}

				this.keywords.reset();
			}

			r = read();
		}

		throw ErrorFactory
				.createArticleReaderException(ErrorKeys.DELTA_CONSUMERS_TASK_READER_WIKIPEDIAXMLREADER_UNEXPECTED_END_OF_FILE);
	}
9614
public UrlSearchResult next() {
		if(cachedNext == null) {
			throw new NoSuchElementException("use hasNext!");
		}
		UrlSearchResult tmp = cachedNext;
		cachedNext = null;
		return tmp;
	}
16549
public Revision next()
	{
		try {
			Revision revision = new Revision(result.getInt(2));

			this.primaryKey = result.getInt(1);
			revision.setPrimaryKey(this.primaryKey);

			revision.setRevisionID(result.getInt(3));
			revision.setArticleID(result.getInt(4));
			revision.setTimeStamp(new Timestamp(result.getLong(5)));
			revision.setFullRevisionID(result.getInt(6));

			return revision;

		}
		catch (Exception e) {

			e.printStackTrace();

			throw new RuntimeException(e);
		}
	}
1166294
public function next() {
		$next = $this->domnode;
		if(!$next)
			return new Node(null);
		while(true) {
			$next = $next->nextSibling;
			if(!$next)
				return new Node(null);
			if($next->nodeType == XML_ELEMENT_NODE)
				return new Node($next);
		}
	}
431641
public String next() throws IOException {
        if (done) {
            return null;
        }
        for (;;) {
            if (line == null) {
                line = reader.readLineSkippingComments();
                if (line == null) {
                    done = true;
                    return null;
                }
                pos = 0;
            }
            buf.setLength(0);
            lastpos = pos;
            pos = nextToken(pos);
            if (pos < 0) {
                line = null;
                continue;
            }
            return buf.toString();
        }
    }
286549
public int getFirstRevisionPK(final int articleID)
        throws WikiApiException
    {

        try {
            if (articleID < 1) {
                throw new IllegalArgumentException();
            }

            PreparedStatement statement = null;
            ResultSet result = null;
            String firstRevPK;

            try {
                // Retrieve the fullRevisionPK and calculate the limit
                statement = this.connection.prepareStatement("SELECT PrimaryKey "
                        + "FROM revisions " + "WHERE ArticleID=? AND RevisionCounter =1 LIMIT 1");
                statement.setInt(1, articleID);
                result = statement.executeQuery();

                if (result.next()) {

                    firstRevPK = result.getString(1);

                }
                else {
                    throw new WikiPageNotFoundException("The article with the ID " + articleID
                            + " was not found.");
                }
            }
            finally {
                if (statement != null) {
                    statement.close();
                }
                if (result != null) {
                    result.close();
                }
            }

            return Integer.parseInt(firstRevPK);

        }
        catch (WikiApiException e) {
            throw e;
        }
        catch (Exception e) {
            throw new WikiApiException(e);
        }
    }
774486
public function getNextCharacter()
	{
		$next = next($this->characters);
		
		if ($next === false && $this->chunker->hasNextChunk()) {
			$this->read($this->chunker->getNextChunk());
			$next = reset($this->characters);
		}
		
		return $next;
	}
1217401
public function next() {
    $next = next($this->currentAttributes);
    if ($next !== false) {
      $this->currentAttribute = $next;
    }
    else {
      if ($this->recursive) {
        $this->nodeIterator->next();
        if (!$this->nodeIterator->valid()) {
          $this->end = true;
        }
        else {
          $nextNode = $this->nodeIterator->current();
          $this->currentAttributes = $nextNode->getValueNames(false);
          $this->currentAttribute = current($this->currentAttributes);
        }
      }
      else {
        $this->end = true;
      }
    }
    return $this;
  }
260505
public boolean next()
    {
        boolean ret = false;
        if (this.iterator == null) {
            this.iterator = this.objects.iterator();
        }
        if (this.iterator.hasNext()) {
            this.current = this.iterator.next();
            ret = true;
        }
        return ret;
    }
1044535
protected function getNext() {
		if ($this->get('page')< $this->pageTotal) {
			return $this->replaceLine($this->get('page')+ 1, $this->get('next'));
		}
		return null;
	}
1195226
public Revision getNearest(final int revisionCounter)
	{

		if (first != null) {

			ChronoStorageBlock previous = null, current = first;
			while (current != null
					&& current.getRevisionCounter() <= revisionCounter) {
				previous = current;
				current = current.getCounterNext();
			}

			return previous.getRev();
		}

		return null;
	}
1136589
protected function next() {
		$get = $this->get();
		if ($get !== '/') {
			return $get;
		}
		switch ($this->peek()) {
			case '/':
				return $this->singleLineComment();
			case '*':
				return $this->multipleLineComment();
			default:
				return $get;
		}
	}
664874
protected function NextItem()
	{
		while ( true )
		{
			if ( is_null( $this->iter ) )
			{
				if ( ! $this->baseIter->MoveNext() )
					return null;
				$this->sequentialPosition = 0;
				$this->iter = XPath2NodeIterator::Create( $this->node->Execute( new NodeProvider( $this->baseIter->getCurrent() ), $this->dataPool ) );
			}
			if ( $this->iter->MoveNext() )
			{
				$this->sequentialPosition++;
				return $this->iter->getCurrent();
			}
			$this->iter = null;
		}
	}
42595
public function getNext()
    {
        $nextIndex = $this->head + 1;
        if (!array_key_exists($nextIndex, $this->tokens)) {
            return null;
        }

        $this->head = $nextIndex;
        return $this->tokens[$nextIndex];
    }
552002
public static function getAnnotationReader()
    {
        if (self::$annotationReader === null) {
            self::$annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache());
        }

        return self::$annotationReader;
    }