Package net.sourceforge.turtlescript.validator

Examples of net.sourceforge.turtlescript.validator.Validator


public class ValidatorTest {
  static Logger logger = Logger.getLogger(ValidatorTest.class);

  @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());
  }
View Full Code Here


    Assert.assertFalse(model.isEmpty());
  }

  @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

    Assert.assertFalse(model.isEmpty());
  }
 
  @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

    Assert.assertNotNull(model);
  }
 
  @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

Related Classes of net.sourceforge.turtlescript.validator.Validator

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.