Package org.wikipediacleaner.api.data

Examples of org.wikipediacleaner.api.data.PageElementTemplate$Parameter


          value = "978" + isbn.getISBN();
          if (PageElementISBN.isValid(value)) {
            addSearchEngines(analysis, errorResult, value);
          }
          if (isbn.isTemplateParameter()) {
            PageElementTemplate template = analysis.isInTemplate(isbn.getBeginIndex());
            addSearchEngines(analysis, errorResult, template);
          }
          errors.add(errorResult);
        }
      }
View Full Code Here


        boolean done = false;

        // Check for templates beginning with '{{{' instead of '{{'
        if (!done &&
            contents.startsWith("{{{", currentIndex)) {
          PageElementTemplate currentTemplate = analysis.isInTemplate(currentIndex);
          PageElementTemplate nextTemplate = analysis.isInTemplate(currentIndex + 1);
          if ((nextTemplate != null) &&
              (currentIndex + 1 == nextTemplate.getBeginIndex()) &&
              ((currentTemplate == null) ||
               (currentTemplate.getBeginIndex() < currentIndex - 1))) {
            result = true;
            done = true;
            if (errors == null) {
View Full Code Here

            if (PageElementISBN.isValid(value)) {
              addSearchEngines(analysis, errorResult, value);
            }
          }
          if (isbn.isTemplateParameter()) {
            PageElementTemplate template = analysis.isInTemplate(isbn.getBeginIndex());
            addSearchEngines(analysis, errorResult, template);
          }
          errors.add(errorResult);
        }
      }
View Full Code Here

            (analysis.isInTag(currentIndex) != null)) {
          shouldCount = false;
        }
      }
      if (shouldCount) {
        PageElementTemplate template = analysis.isInTemplate(currentIndex + 2);
        if ((template != null) && (contents.startsWith("]]", template.getEndIndex()))) {
          shouldCount = false;
        }
      }
      if (shouldCount) {
        if (errors == null) {
View Full Code Here

          result = true;
          CheckErrorResult errorResult = createCheckErrorResult(analysis, isbn, true);
          addHelpNeededTemplates(analysis, errorResult, isbn);
          addHelpNeededComment(analysis, errorResult, isbn);
          if (isbn.isTemplateParameter()) {
            PageElementTemplate template = analysis.isInTemplate(isbn.getBeginIndex());
            addSearchEngines(analysis, errorResult, template);
          }
          errors.add(errorResult);
        }
      }
View Full Code Here

        int currentPos = end;
        while ((currentPos < maxSize) && (contents.charAt(currentPos) == ' ')) {
          currentPos++;
        }
        if ((currentPos < maxSize) && (contents.charAt(currentPos) == '{')) {
          PageElementTemplate nextTemplate = pageAnalysis.isInTemplate(currentPos);
          if (nextTemplate != null) {
            for (String templateAfter : templatesAfter) {
              if (Page.areSameTitle(templateAfter, nextTemplate.getTemplateName())) {
                styleType = ConfigurationValueStyle.HELP_REQUESTED;
                end = nextTemplate.getEndIndex();
              }
            }
          }
        }
      }
View Full Code Here

              shouldCount = false;
            }
          }
          if (shouldCount) {
            // Check for template
            PageElementTemplate template = analysis.isInTemplate(currentIndex);
            if (template != null) {
              for (int numParam = 0; numParam < template.getParameterCount(); numParam++) {
                if (template.getParameterValueStartIndex(numParam) == currentIndex) {
                  shouldCount = false;
                }
              }
            }
          }
View Full Code Here

      return createDefaultPopupExternalLink(pageAnalysis, position, externalLink);
    }

    // Menu for template
    if (element instanceof PageElementTemplate) {
      PageElementTemplate template = (PageElementTemplate) element;
      return createDefaultPopupTemplate(pageAnalysis, position, template);
    }

    // Menu for category
    if (element instanceof PageElementCategory) {
View Full Code Here

    if (referencesTemplates != null) {
      List<PageElementTemplate> allTemplates = analysis.getTemplates();
      int templateNum = allTemplates.size();
      while (templateNum > 0) {
        templateNum--;
        PageElementTemplate template = allTemplates.get(templateNum);
        for (String referencesTemplate : referencesTemplates) {
          if (Page.areSameTitle(template.getTemplateName(), referencesTemplate)) {
            return false;
          }
        }
      }
    }
View Full Code Here

          addHelpNeededTemplates(analysis, errorResult, isbn);
          addHelpNeededComment(analysis, errorResult, isbn);
          String value = isbn.getISBN();
          addSearchEngines(analysis, errorResult, value);
          if (isbn.isTemplateParameter()) {
            PageElementTemplate template = analysis.isInTemplate(isbn.getBeginIndex());
            addSearchEngines(analysis, errorResult, template);
          }
          if (length == 8) {
            addSearchEnginesISSN(analysis, errorResult, isbn.getISBN());
          } else if (length == 9) {
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.api.data.PageElementTemplate$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.