Examples of ContentToken


Examples of info.bliki.htmlcleaner.ContentToken

        Object item = childrenIt.next();
        if (item != null) {
          if (item instanceof List) {
            nodesToText((List) item, resultBuffer, model);
          } else if (item instanceof ContentToken) {
            ContentToken contentToken = (ContentToken) item;
            resultBuffer.append(texEscapeString(contentToken.getContent()));
          } else if (item instanceof HTMLTag) {
            renderLaTeX(((HTMLTag) item), this, resultBuffer, model);
          } else if (item instanceof TagNode) {
            TagNode node = (TagNode) item;
            Map map = node.getObjectAttributes();
View Full Code Here

Examples of info.bliki.htmlcleaner.ContentToken

      aTagNode.addAttribute("href", link, true);
      aTagNode.addAttribute("class", "telephonelink", true);
      aTagNode.addAttribute("title", link, true);
      if (withoutSquareBrackets) {
        append(aTagNode);
        aTagNode.addChild(new ContentToken(linkName));
      } else {
        String trimmedText = linkName.trim();
        if (trimmedText.length() > 0) {
          pushNode(aTagNode);
          WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

Examples of info.bliki.htmlcleaner.ContentToken

      aTagNode.addAttribute("href", link, true);
      aTagNode.addAttribute("class", "telephonelink", true);
      aTagNode.addAttribute("title", link, true);
      if (withoutSquareBrackets) {
        append(aTagNode);
        aTagNode.addChild(new ContentToken(linkName));
      } else {
        String trimmedText = linkName.trim();
        if (trimmedText.length() > 0) {
          pushNode(aTagNode);
          WikipediaParser.parseRecursive(trimmedText, this, false, true);
View Full Code Here

Examples of info.bliki.htmlcleaner.ContentToken

    if (fWhiteStart) {
      try {
        final int whiteEndPosition = fCurrentPosition - diff;
        int count = whiteEndPosition - fWhiteStartPosition;
        if (count > 0) {
          fWikiModel.append(new ContentToken(fStringSource.substring(fWhiteStartPosition, fWhiteStartPosition + count)));
        }
      } finally {
        fWhiteStart = false;
      }
    }
View Full Code Here

Examples of org.htmlcleaner.ContentToken

  public void buildEditLinkUrl(int section) {
    if (fParserInput.getAllowSectionEdit()) {
      TagNode divTagNode = new TagNode("div");
      divTagNode.addAttribute("style", "font-size:90%;float:right;margin-left:5px;", false);
      divTagNode.addChild(new ContentToken("["));
      append(divTagNode);

      String url = "";
      try {
        url = LinkUtil.buildEditLinkUrl(fParserInput.getContext(), fParserInput.getVirtualWiki(), fParserInput.getTopicName(),
            null, section);
      } catch (Exception e) {
        logger.severe("Failure while building link for topic " + fParserInput.getVirtualWiki() + " / "
            + fParserInput.getTopicName(), e);
      }
      TagNode aTagNode = new TagNode("a");
      aTagNode.addAttribute("href", url, false);
      aTagNode.addChild(new ContentToken(Utilities.formatMessage("common.sectionedit", fParserInput.getLocale())));
      divTagNode.addChild(aTagNode);
      divTagNode.addChild(new ContentToken("]"));
    }
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.content.ContentToken

    final ContentSpecification cspec =
        element.getLayoutContext().getContentSpecification();
    final ContentToken[] tokens = cspec.getContents();
    for (int i = 0; i < tokens.length; i++)
    {
      final ContentToken token = tokens[i];
      if (token instanceof ContentsToken)
      {
        element.setContentsConsumed(true);
        return true;
      }
      if (token instanceof ComputedToken)
      {
        final ContentToken resolved = computeToken(token, cspec);
        if (resolved != null)
        {
          addContent(resolved);
        }
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken

    }

    contentSpecification.setStrings(XAlternateTextResolveHandler.DEFAULT_CONTENT);
    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token =
              evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setStrings(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken

    }

    contentSpecification.setStrings(DEFAULT_CONTENT);
    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token =
              evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setStrings(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken

          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }

      final ContentToken token = (ContentToken) tokenMapping.get(content);
      if (token != null)
      {
        return token;
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken

    contentSpecification.setAllowContentProcessing(true);
    contentSpecification.setContents(DEFAULT_CONTENT);

    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token = evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setContents(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.