Examples of NodeAttribute


Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void double_quote(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], bookmarks[5] + 1, bookmarks[6], '"'));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void standalone(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], -1, -1, (char) 0));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void empty(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], bookmarks[2] + 1, -1, (char) 0));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void naked(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], bookmarks[3], bookmarks[4], (char) 0));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void single_quote(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], bookmarks[4] + 1, bookmarks[5], '\''));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void double_quote(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], bookmarks[5] + 1, bookmarks[6], '"'));
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   */
  public static NodeAttribute addAttributes(TagNode node, String attributesString) {
    if (attributesString != null) {
      List<NodeAttribute> attributes = getNodeAttributes(attributesString);
      if (attributes != null) {
        NodeAttribute attr = null;
        for (int i = 0; i < attributes.size(); i++) {
          attr = attributes.get(i);
          node.addAttribute(attr.getName(), attr.getValue(), true);
        }
        return attr;
      }
    }
    return null;
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

      String trimmed = attributesString.trim();
      if (trimmed.length() != 0) {
        map = new TreeMap<String, String>();
        WikipediaScanner scanner = new WikipediaScanner(trimmed);
        List<NodeAttribute> attributes = scanner.parseAttributes(0, trimmed.length());
        NodeAttribute attr;
        for (int i = 0; i < attributes.size(); i++) {
          attr = attributes.get(i);
          map.put(attr.getName(), attr.getValue());
        }
      }
    }
    return map;
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.NodeAttribute

   *          The list so far.
   * @param bookmarks
   *          The array of positions.
   */
  private void standalone(ArrayList<NodeAttribute> attributes, int[] bookmarks) {
    attributes.add(new NodeAttribute(fSource, bookmarks[1], bookmarks[2], -1, -1, (char) 0));
  }
View Full Code Here

Examples of org.sindice.siren.analysis.attributes.NodeAttribute

    if (expectedPosIncrs != null) {
      assertTrue("has PositionIncrementAttribute", t.hasAttribute(PositionIncrementAttribute.class));
      posIncrAtt = t.getAttribute(PositionIncrementAttribute.class);
    }

    NodeAttribute nodeAtt = null;
    if (expectedNode != null) {
      assertTrue("has NodeAttribute", t.hasAttribute(NodeAttribute.class));
      nodeAtt = t.getAttribute(NodeAttribute.class);
    }

    PositionAttribute posAtt = null;
    if (expectedPos != null) {
      assertTrue("has PositionAttribute", t.hasAttribute(PositionAttribute.class));
      posAtt = t.getAttribute(PositionAttribute.class);
    }

    for (int i = 0; i < expectedImages.length; i++) {

      assertTrue("token "+i+" exists", t.incrementToken());

      assertEquals("i=" + i, expectedImages[i], termAtt.toString());

      if (expectedTypes != null) {
        assertEquals(expectedTypes[i], typeAtt.type());
      }

      if (expectedPosIncrs != null) {
        assertEquals(expectedPosIncrs[i], posIncrAtt.getPositionIncrement());
      }

      if (expectedNode != null) {
        assertEquals(expectedNode[i], nodeAtt.node());
      }

      if (expectedPos != null) {
        assertEquals(expectedPos[i], posAtt.position());
      }
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.