Package info.bliki.wiki.model

Examples of info.bliki.wiki.model.SemanticRelation


    assertEquals(
        "\n"
            + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" title=\"Germany\">Germany</a>.</p>",
        wikiModel.render("Berlin is the capital of [[Is capital of::Germany]].", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("Is capital of"));
    assertTrue(rel.getValue().equals("Germany"));
  }
View Full Code Here


    assertEquals(
        "\n"
            + "<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" title=\"link\">alternate text</a> appear in place of the link.</p>",
        wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link.", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  public void testLink04() {

    assertEquals("\n<p>To hide the property  from appearing at all</p>", wikiModel
        .render("To hide the property [[    example relation::link   | ]] from appearing at all", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

    assertEquals(
        "\n"
            + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" title=\"Germany\">Germany</a>.</p>",
        wikiModel.render("Berlin is the capital of [[Is capital of::Germany]]."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("Is capital of"));
    assertTrue(rel.getValue().equals("Germany"));
  }
View Full Code Here

    assertEquals(
        "\n"
            + "<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" title=\"link\">alternate text</a> appear in place of the link.</p>",
        wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  public void testLink04() {

    assertEquals("\n<p>To hide the property  from appearing at all</p>", wikiModel
        .render("To hide the property [[    example relation::link   | ]] from appearing at all"));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  @Override
  public boolean addSemanticRelation(String relation, String relationValue) {
    if (semanticRelations == null) {
      semanticRelations = new ArrayList<SemanticRelation>();
    }
    semanticRelations.add(new SemanticRelation(relation, relationValue));
    return true;
  }
View Full Code Here

    assertEquals(
        "\n"
            + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" title=\"Germany\">Germany</a>.</p>",
        wikiModel.render("Berlin is the capital of [[Is capital of::Germany]].", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("Is capital of"));
    assertTrue(rel.getValue().equals("Germany"));
  }
View Full Code Here

  public void testLink04() {

    assertEquals("\n<p>To hide the property  from appearing at all</p>", wikiModel
        .render("To hide the property [[    example relation::link   | ]] from appearing at all"));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

    assertEquals(
        "\n"
            + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" title=\"Germany\">Germany</a>.</p>",
        wikiModel.render("Berlin is the capital of [[Is capital of::Germany]]."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("Is capital of"));
    assertTrue(rel.getValue().equals("Germany"));
  }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.model.SemanticRelation

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.