Package org.wikipediacleaner.api.data.PageElementTag

Examples of org.wikipediacleaner.api.data.PageElementTag.Parameter


   * @return List of names.
   */
  private List<String> getRefNames(List<PageElementTag> refs) {
    List<String> possibleNames = new ArrayList<String>();
    for (PageElementTag tag : refs) {
      Parameter name = tag.getParameter("name");
      if ((name != null) && (name.getTrimmedValue() != null)) {
        String nameValue = name.getTrimmedValue();
        if ((nameValue.length() > 0) && (!possibleNames.contains(nameValue))) {
          possibleNames.add(nameValue);
        }
      }
    }
View Full Code Here


                    analysis,
                    tag.getCompleteBeginIndex(), tag.getCompleteEndIndex(),
                    CheckErrorResult.ErrorLevel.CORRECT);
                errors.add(errorResult);
              } else {
                Parameter name = tag.getParameter("name");
                String nameValue = (name != null) ? name.getTrimmedValue() : null;
                if (nameValue != null) {
                  nameValue = nameValue.trim();
                }
                CheckErrorResult errorResult = createCheckErrorResult(
                    analysis,
View Full Code Here

    // Analyze each gallery tag
    List<PageElementTag> galleryTags = analysis.getTags(PageElementTag.TAG_WIKI_GALLERY);
    boolean result = false;
    for (PageElementTag galleryTag : galleryTags) {
      if (!galleryTag.isFullTag() && !galleryTag.isEndTag()) {
        Parameter description = galleryTag.getParameter("caption");
        if ((description == null) ||
            (description.getTrimmedValue() == null) ||
            (description.getTrimmedValue().length() == 0)) {
          if (errors == null) {
            return true;
          }
          result = true;
View Full Code Here

              PageAnalysis analysis = page.getAnalysis(contents, true);
              Collection<PageElementTag> tags = analysis.getTags(PageElementTag.TAG_OTHER_TYPO);
              for (PageElementTag tag : tags) {
                String chapterId = PageAnalysisUtils.getCurrentChapterId(analysis, tag.getBeginIndex());
                if ((suggestionIgnore == null) || (!suggestionIgnore.contains(chapterId))) {
                  Parameter word = tag.getParameter("word");
                  Parameter find = tag.getParameter("find");
                  Parameter replace = tag.getParameter("replace");
                  Parameter disabled = tag.getParameter("disabled");
                  if ((word != null) && (find != null) && (replace != null) && (disabled == null)) {
                    String wordValue = word.getValue();
                    String findValue = find.getValue();
                    String replaceValue = replace.getValue();
                    if ((wordValue != null) && (findValue != null) && (replaceValue != null)) {
View Full Code Here

TOP

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

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.