Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.PageElementTag


             (currentIndex < lastIndex) &&
             (contents.charAt(currentIndex) != '=')) {
        currentIndex = getFirstIndexAfterSpace(contents, currentIndex);
        if (currentIndex < lastIndex) {
          PageElementComment comment = null;
          PageElementTag tag = null;
          char currentChar = contents.charAt(currentIndex);
          if (currentChar == '<') {
            comment = analysis.isInComment(currentIndex);
            tag = analysis.isInTag(currentIndex, PageElementTag.TAG_WIKI_NOWIKI);
          }
          if (comment != null) {
            currentIndex = comment.getEndIndex();
          } else if (tag != null) {
            currentIndex = tag.getCompleteEndIndex();
          } else if (currentChar != '=') {
            if (!Character.isWhitespace(currentChar)) {
              textFound = true;
            }
            currentIndex++;
View Full Code Here


          while (!shouldStop) {
            shouldStop = true;
            currentValuePos = getLastIndexBeforeWhiteSpace(paramValue, currentValuePos);
            if ((currentValuePos > 0) &&
                (paramValue.charAt(currentValuePos) == '>')) {
              PageElementTag tag = analysis.isInTag(
                  paramValueStartIndex +
                  currentValuePos);
              if (tag != null) {
                String name = tag.getNormalizedName();
                if (PageElementTag.TAG_HTML_BR.equals(name)) {
                  breakFound = true;
                  shouldStop = false;
                  beginError = tag.getBeginIndex();
                  if (endError < 0) {
                    endError = tag.getEndIndex();
                  }
                  currentValuePos -= tag.getEndIndex() - tag.getBeginIndex();
                } else if (!breakFound) {
                  if (/*PageElementTag.TAG_WIKI_MATH.equals(name) ||*/
                      PageElementTag.TAG_WIKI_HIERO.equals(name)) {
                    tagAfter = true;
                    shouldStop = false;
                    endError = tag.getCompleteBeginIndex();
                    currentValuePos -= tag.getEndIndex() - tag.getCompleteBeginIndex();
                  }
                }
              } else {
                PageElementComment comment = analysis.isInComment(paramValueStartIndex + currentValuePos);
                if (comment != null) {
View Full Code Here

        valueIndex = comment.getEndIndex() - offset;

      // If current value position is the beginning of a reference, skip it
      } else if ((valueChar == '<') &&
                 (analysis.isInTag(offset + valueIndex, PageElementTag.TAG_WIKI_REF) != null)) {
        PageElementTag tag = analysis.isInTag(offset + valueIndex, PageElementTag.TAG_WIKI_REF);
        formatOk = true;
        valueIndex = tag.getCompleteEndIndex() - offset;

      } else if (formatIndex < format.length()) {
        char formatChar = format.charAt(formatIndex);

        // If format string has a quote, it can be for quoted text or really a quote
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.PageElementTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.