Package net.sourceforge.turtlescript.validator

Examples of net.sourceforge.turtlescript.validator.Validator.validate()


  @Test
  public void exampleTest() throws IOException, RecognitionException {
    Validator validator = new Validator();
    Model model =
        validator.validate(this.getClass().getResourceAsStream("/html/example.html"));
   
    Assert.assertFalse(model.isEmpty());
  }

  @Test
View Full Code Here


  @Test
  public void homepageTest() throws IOException, RecognitionException {
    Validator validator = new Validator();
    Model model =
        validator.validate(this.getClass().getResourceAsStream("/html/turtlescript.html"));
   
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    model.write(out, "RDF/XML");
    logger.debug(out.toString());
   
View Full Code Here

 
  @Test
  public void queryTest() throws IOException, RecognitionException {
    Validator validator = new Validator();
    Model model =
        validator.validate(this.getClass().getResourceAsStream("/html/example.html"));

    // Create a new query
    String queryString =
      "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
      "SELECT ?property ?object " +
View Full Code Here

 
  @Test
  public void jenaTest() throws IOException, RecognitionException {
    Validator validator = new Validator();
    Model model =
        validator.validate(this.getClass().getResourceAsStream("/html/example.html"));

    String[][] taxonomyTemplate = new String[][] {
          new String[] { "http://purl.org/NET/biol/ns#commonName", "Common Name"},
          new String[] { "http://purl.org/NET/biol/ns#kingdom", "Kingdom"},
          new String[] { "http://purl.org/NET/biol/ns#phylum", "Phylum"}
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.